* VRFS-2603 private key now stored
This commit is contained in:
parent
7f18bff3fc
commit
d677b43c28
|
|
@ -235,3 +235,4 @@ user_online.sql
|
|||
icecast_source_changes.sql
|
||||
diagnostics_user_id_index.sql
|
||||
jam_track_updates.sql
|
||||
private_key_in_jam_track_rights.sql
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE jam_track_rights ADD COLUMN private_key VARCHAR;
|
||||
|
|
@ -55,6 +55,7 @@ module JamRuby
|
|||
jam_track_right.url.store!(File.open(output_jkz, "rb"))
|
||||
jam_track_right.signed=true
|
||||
jam_track_right.downloaded_since_sign=false
|
||||
jam_track_right.private_key=File.read("#{tmp_dir}/skey.pem")
|
||||
jam_track_right.save!
|
||||
end
|
||||
end # mktmpdir
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ describe ApiJamTracksController do
|
|||
get :download, :id => @jam_track.id
|
||||
response.status.should == 202
|
||||
right.download_count.should eq(0)
|
||||
right.private_key.should be_nil
|
||||
|
||||
JamTracksBuilder.should have_queued(right.id).in(:jam_tracks_builder)
|
||||
|
||||
|
|
@ -96,6 +97,7 @@ describe ApiJamTracksController do
|
|||
|
||||
JamTracksBuilder.should_not have_queued(right.id).in(:jam_tracks_builder)
|
||||
right.reload
|
||||
right.private_key.should_not be_nil
|
||||
right.download_count.should eq(0)
|
||||
|
||||
get :download, :id => @jam_track.id
|
||||
|
|
|
|||
Loading…
Reference in New Issue