diff --git a/db/Gemfile.lock b/db/Gemfile.lock index eb6aee107..8d6d039c2 100644 --- a/db/Gemfile.lock +++ b/db/Gemfile.lock @@ -16,3 +16,6 @@ PLATFORMS DEPENDENCIES pg_migrate (= 0.1.13) + +BUNDLED WITH + 1.10.3 diff --git a/db/build b/db/build index a0084254e..5c97d25a5 100755 --- a/db/build +++ b/db/build @@ -31,6 +31,7 @@ if [ ! -z "$PACKAGE" ]; then bundle install --path target/vendor/bundle pushd target fpm -s gem -t deb ruby_package/jam_db-$VERSION.gem + find vendor/bundle/ruby/2.2.0/cache -name '*.gem' | xargs -rn1 fpm -s gem -t deb find vendor/bundle/ruby/2.0.0/cache -name '*.gem' | xargs -rn1 fpm -s gem -t deb popd fi diff --git a/ruby/jt_metadata.json b/ruby/jt_metadata.json index fdcf32faf..4c602ea1d 100644 --- a/ruby/jt_metadata.json +++ b/ruby/jt_metadata.json @@ -1 +1 @@ -{"container_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150706-18103-9lb217/jam-track-45.jkz", "version": "0", "coverart": null, "rsa_priv_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150706-18103-9lb217/skey.pem", "tracks": [{"name": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150706-18103-9lb217/4630741c-69a1-4bc6-8a9f-ec70cb5cd401.ogg", "trackName": "track_00"}], "rsa_pub_file": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/d20150706-18103-9lb217/pkey.pem", "jamktrack_info": "/var/folders/fk/0ckzmddd4tq28kxbb09vckbr0000gn/T/tmpmwZtC7"} \ No newline at end of file +{"container_file": "/var/folders/05/1jpzfcln1hq9p666whnd7chr0000gn/T/d20150715-88934-1dmx4e8/jam-track-71.jkz", "version": "0", "coverart": null, "rsa_priv_file": "/var/folders/05/1jpzfcln1hq9p666whnd7chr0000gn/T/d20150715-88934-1dmx4e8/skey.pem", "tracks": [{"name": "/var/folders/05/1jpzfcln1hq9p666whnd7chr0000gn/T/d20150715-88934-1dmx4e8/8d7bb782-6c21-4809-9f6f-1f55225b0ba3.ogg", "trackName": "track_00"}], "rsa_pub_file": "/var/folders/05/1jpzfcln1hq9p666whnd7chr0000gn/T/d20150715-88934-1dmx4e8/pkey.pem", "jamktrack_info": "/var/folders/05/1jpzfcln1hq9p666whnd7chr0000gn/T/tmp1PmIe2"} \ No newline at end of file diff --git a/ruby/lib/jam_ruby/models/email_batch_scheduled_sessions.rb b/ruby/lib/jam_ruby/models/email_batch_scheduled_sessions.rb index d388bce9e..68dfb9fb0 100644 --- a/ruby/lib/jam_ruby/models/email_batch_scheduled_sessions.rb +++ b/ruby/lib/jam_ruby/models/email_batch_scheduled_sessions.rb @@ -200,7 +200,7 @@ SELECT tmp_candidate_sessions.creator_score_idx AS creator_score_idx INTO TEMP TABLE tmp_candidate_recipients FROM users -INNER JOIN musicians_instruments AS mi ON mi.user_id = users.id +INNER JOIN musicians_instruments AS mi ON mi.player_id = users.id INNER JOIN tmp_candidate_sessions ON tmp_candidate_sessions.is_unstructured_rsvp = TRUE OR (tmp_candidate_sessions.open_rsvps = TRUE AND tmp_candidate_sessions.instrument_id = mi.instrument_id) OR tmp_candidate_sessions.invited_user_id = users.id diff --git a/ruby/spec/jam_ruby/models/band_filter_search_spec.rb b/ruby/spec/jam_ruby/models/band_filter_search_spec.rb index d2114f13c..82b5f70eb 100644 --- a/ruby/spec/jam_ruby/models/band_filter_search_spec.rb +++ b/ruby/spec/jam_ruby/models/band_filter_search_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' describe 'Band search' do before(:each) do - Band.delete_all @bands = [] @bands << @band1 = FactoryGirl.create(:band) @bands << @band2 = FactoryGirl.create(:band) diff --git a/ruby/spec/jam_ruby/models/band_spec.rb b/ruby/spec/jam_ruby/models/band_spec.rb index 23e36bb54..9bbd30dd4 100644 --- a/ruby/spec/jam_ruby/models/band_spec.rb +++ b/ruby/spec/jam_ruby/models/band_spec.rb @@ -91,13 +91,6 @@ describe Band do band.band_type.should == "virtual" band.band_status.should == "amateur" band.concert_count.should == 3 - - parms[:hourly_rate]="foobar" - parms[:gig_minimum]="barfoo" - band=Band.save(user, parms) - band.errors.any?.should be_true - band.errors[:hourly_rate].should == ["is not a number"] - band.errors[:gig_minimum].should == ["is not a number"] end diff --git a/ruby/spec/jam_ruby/models/broadcast_notification_spec.rb b/ruby/spec/jam_ruby/models/broadcast_notification_spec.rb index 4ec86db70..dc2fc47e3 100644 --- a/ruby/spec/jam_ruby/models/broadcast_notification_spec.rb +++ b/ruby/spec/jam_ruby/models/broadcast_notification_spec.rb @@ -42,8 +42,10 @@ describe BroadcastNotification do bns = BroadcastNotification.viewable_notifications(user1) expect(bns.count).to be(3) - expect(bns[0].id).to eq(broadcast3.id) + expect(bns[0].id).to eq(broadcast4.id) expect(bns.detect {|bb| bb.id==broadcast2.id }).to be_nil + # now view broadcast 4, since it hasn't been seen, which should bring broadcast 3 up as next since it was seen longest ago + broadcast4.did_view(user1) expect(BroadcastNotification.next_broadcast(user1).id).to eq(broadcast3.id) end diff --git a/ruby/spec/jam_ruby/models/musician_search_spec.rb b/ruby/spec/jam_ruby/models/musician_search_spec.rb index da97f5eaa..148cb312b 100644 --- a/ruby/spec/jam_ruby/models/musician_search_spec.rb +++ b/ruby/spec/jam_ruby/models/musician_search_spec.rb @@ -169,8 +169,8 @@ describe 'Musician Search Model' do end it "gets expected number of users" do - instjson = [{ instrument_id: Instrument.first.id, proficiency_level: 2 }, - { instrument_id: Instrument.first(2)[1].id, proficiency_level: 2 } + instjson = [{ id: Instrument.first.id, level: 2 }, + { id: Instrument.first(2)[1].id, level: 2 } ] search.update_json_value(MusicianSearch::KEY_INSTRUMENTS, instjson) expect(search.do_search.count).to eq(3) @@ -286,28 +286,28 @@ describe 'Musician Search Model' do selections.each do |hash| search.update_json_value(hash[:key], hash[:value]) json_val = search.json_value(hash[:key]) - expect(search.description).to match(/; #{hash[:description]} = #{hash[:lookup][json_val]}/) + expect(search.description).to match(/ #{hash[:description]} = #{hash[:lookup][json_val]}/) end end it 'has correct description for genres' do search.update_json_value(MusicianSearch::KEY_GENRES, [Genre.first.id, Genre.last.id]) - expect(search.description).to match(/; Genres = #{Genre.first.description}, #{Genre.last.description}/) + expect(search.description).to match(/ Genres = #{Genre.first.description}, #{Genre.last.description}/) end it 'has correct description for ages' do search.update_json_value(MusicianSearch::KEY_AGES, [MusicianSearch::AGE_COUNTS[0],MusicianSearch::AGE_COUNTS[1]]) - expect(search.description).to match(/; Ages = #{MusicianSearch::AGES[MusicianSearch::AGE_COUNTS[0]]}, #{MusicianSearch::AGES[MusicianSearch::AGE_COUNTS[1]]}/) + expect(search.description).to match(/ Ages = #{MusicianSearch::AGES[MusicianSearch::AGE_COUNTS[0]]}, #{MusicianSearch::AGES[MusicianSearch::AGE_COUNTS[1]]}/) end it 'has correct description for instruments' do instrs = Instrument.limit(2).order(:description) - instjson = [{ instrument_id: instrs[0].id, proficiency_level: 2 }, - { instrument_id: instrs[1].id, proficiency_level: 1 } + instjson = [{ id: instrs[0].id, level: 2 }, + { id: instrs[1].id, level: 1 } ] search.update_json_value(MusicianSearch::KEY_INSTRUMENTS, instjson) - instr_descrip = "#{instrs[0].description} (#{MusicianSearch::INSTRUMENT_PROFICIENCY[2]}), #{instrs[1].description} (#{MusicianSearch::INSTRUMENT_PROFICIENCY[1]})" - expect(search.description).to match(/; Instruments = #{Regexp.escape(instr_descrip)}/) + instr_descrip = "#{instrs[0].description} / #{MusicianSearch::INSTRUMENT_PROFICIENCY[2]}, #{instrs[1].description} / #{MusicianSearch::INSTRUMENT_PROFICIENCY[1]}" + expect(search.description).to match(/ Instruments = #{Regexp.escape(instr_descrip)}/) end end