From 6f39421c7418e8cce8c0b104a8237e1271eb069f Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sat, 13 Feb 2021 15:04:28 -0600 Subject: [PATCH] new welcome email --- .../user_mailer/welcome_message.html.erb | 96 ++++++++++--------- ruby/lib/jam_ruby/connection_manager.rb | 10 +- ruby/lib/jam_ruby/models/connection.rb | 1 - .../jam_ruby/models/max_mind_releases_spec.rb | 60 ------------ ruby/spec/mailers/user_mailer_spec.rb | 2 - 5 files changed, 59 insertions(+), 110 deletions(-) delete mode 100644 ruby/spec/jam_ruby/models/max_mind_releases_spec.rb diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb index 62c05046c..08b129151 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/welcome_message.html.erb @@ -7,9 +7,11 @@ <% end %> -

We're delighted to welcome you to the JamKazam community of musicians. Following are - resources you can use to get the most out of JamKazam. We recommend you keep this email in - your inbox so you can refer back to the links if needed. +

+ We're delighted to welcome you to the JamKazam community of musicians. + Following are resources you can use to get the most out of JamKazam. + We recommend you keep this email in your inbox so you can refer back to these instructions and links if needed. +

<% if @reset_url %> @@ -26,51 +28,59 @@
<% end %> -

For Playing Music Together Live & In Sync From Different Locations
- JamKazam's Mac and Windows desktop apps let musicians play together live and in sync with - high-quality audio from different locations over the Internet, with an amazing feature set for - mixing, recording, broadcasting, using backing tracks, and more. Great for band rehearsals, co- - writing music, or just hopping into open jams with other musicians for fun. We recommend - reading the Getting Started - help articles to get oriented. Then really focus on the What Gear Do - I Need and How Do I Set Up My Gear help articles to guide your activities to get up and running - successfully in JamKazam sessions. +

Playing Music Together Live & In Sync Over the Internet
+ + JamKazam’s Mac and Windows desktop apps let musicians play together live and in sync with high-quality audio from different locations over the Internet, with an amazing feature set for mixing, recording, broadcasting, using backing tracks, and more. Great for band rehearsals, co-writing music, or just hopping into open jams with other musicians for fun. Getting your gear set up properly is critical to having a great experience on JamKazam, so we highly recommend you invest some time to use our knowledge base articles to guide you as follows: +

+ + + + +

Music Education
+ JamKazam is being used heavily for music education – by universities, K-12 schools, other commercial and community music schools, and individual freelance instructors. + You can visit the education section of our website to learn more about JamKazam for music education. Educational organizations must be licensed to use JamKazam for educational purposes.

+ +

Learning & Playing Along With Your Favorite Songs
+ In addition to playing with other musicians online, JamKazam also provides a fantastic way to play along with your + favorite songs, called JamTracks. JamTracks are complete multi-track professional recordings, with fully isolated tracks + for each part of the music. Mute any part. Slow down playback for practice. Change pitch/key up or down. + Record yourself playing along with the rest of “the band” in audio or video, and more. Get your first JamTrack free to try one out! + After that they are just $1.99/$2.99 each. You can use JamTracks in your browser, in our Mac or Windows desktop app, or in our iOS app.

- -

For Music Education
-JamKazam is being used heavily for music education – by universities, K-12 schools, other -commercial/community music schools, and individual freelance instructors. Educational -organizations must be licensed to use JamKazam for educational purposes. Please contact us at education@jamkazam.com for more info.

- -

For Live Music Broadcasts
- JamKazam is also being increasingly used to live broadcast JamKazam session performances – - for free/fun, to busk for tips, and for premium ticketed concert events. Premium - ticketed concert broadcasts require licensing from JamKazam. Please contact us at concerts@jamkazam.com for more info. +

Live Music Broadcasts
+ JamKazam is also being increasingly used to live broadcast JamKazam session performances – for free just for fun, to busk for tips, and for premium ticketed concert events. + Check out a help video on how to live broadcast session performances for fun, + and if your band wants to use JamKazam to broadcast premium ticketed concert events using JamKazam, + visit the premium concert section of our website to connect with us about this. + Premium ticketed concert broadcasts require licensing from JamKazam.

-

For Learning & Playing Along With Your Favorite Songs
- JamTracks by JamKazam are the best way to play along with your favorite songs. JamTracks are - complete multi-track professional recordings, with fully isolated tracks for each part of the - music. Mute any part. Slow down playback for practice. Change pitch/key up or down. Record - yourself playing along with the rest of the band in audio or video, and more. Get your first - JamTrack free to try one out! After that they are just $1.99/$2.99 each. You can use JamTracks - in your browser, in our free Mac or Windows desktop app, or in our free iOS app. -

- -

And More...
-You can also connect and network with other musicians. If you run into trouble and need help, -you can refer to our knowledge base of help articles or visit our  - helpful forums to post -questions that have not already been answered. You can also email us -at support@jamkazam.com, but we have limited bandwidth currently to answer 1:1 questions -from our users. -

-

-
-
- Again, welcome to JamKazam, and we hope you have a great time here! + Whew! That was a lot to cover, but JamKazam is a fantastic musical playground, and we wanted to make sure you know how + to get the most out of everything you can do on this platform. + Again, welcome to JamKazam, and we hope you have a great time here with us!

Best Regards,
diff --git a/ruby/lib/jam_ruby/connection_manager.rb b/ruby/lib/jam_ruby/connection_manager.rb index 4ae6e9311..1e2114457 100644 --- a/ruby/lib/jam_ruby/connection_manager.rb +++ b/ruby/lib/jam_ruby/connection_manager.rb @@ -185,7 +185,8 @@ SQL def cleanup_dangling ConnectionManager.active_record_transaction do |connection_manager, conn| - sql = "update connections set music_session_id = null where id in (select id from connections where music_session_id in (select id from active_music_sessions where updated_at::date < (current_date - 2)))" + # select * from connections set music_session_id = null where id in (select id from connections where music_session_id in (select id from active_music_sessions where updated_at < (NOW() - '12 hours'::interval))) + sql = "update connections set music_session_id = null where id in (select id from connections where music_session_id in (select id from active_music_sessions where updated_at < (NOW() - '12 hours'::interval)))" conn.exec(sql) do |result| end end @@ -386,12 +387,13 @@ SQL if kick_extras num_participants = active_music_session.users.count - puts("kick extras = num_participants #{num_participants}") + #puts("kick extras = num_participants #{num_participants}") active_music_session.users.each do |user| subscription_rules = user.subscription_rules(false) - puts "checking max players for #{user.email} #{subscription_rules[:max_players]}" + #puts "checking max players for #{user.email} #{subscription_rules[:max_players]}" if subscription_rules[:max_players] && subscription_rules[:max_players] < num_participants - puts "kicking user #{user.email}" + #puts "kicking user #{user.email}" + # XXX TODO? Should we do this? end end end diff --git a/ruby/lib/jam_ruby/models/connection.rb b/ruby/lib/jam_ruby/models/connection.rb index 73b2ad774..587b8e516 100644 --- a/ruby/lib/jam_ruby/models/connection.rb +++ b/ruby/lib/jam_ruby/models/connection.rb @@ -168,7 +168,6 @@ module JamRuby num_participants = music_session.users.count - puts "NUM PARTICIPANTS BEFORE JOIN #{num_participants}" subscription_rules = self.user.subscription_rules(dynamic_definitions = false) max_players = subscription_rules[:max_players] diff --git a/ruby/spec/jam_ruby/models/max_mind_releases_spec.rb b/ruby/spec/jam_ruby/models/max_mind_releases_spec.rb deleted file mode 100644 index 4e6971b61..000000000 --- a/ruby/spec/jam_ruby/models/max_mind_releases_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'spec_helper' - -describe MaxMindRelease do - - include UsesTempFiles - - GEOISP_124 = 'geoisp_124.csv' - - in_directory_with_file(GEOISP_124) - - before(:all) do - @original_storage = MaxMindReleaseUploader.storage = :fog - end - - after(:all) do - MaxMindReleaseUploader.storage = @original_storage - end - - let(:zipfile) {fake_geo_124_zip(File.new(GEOISP_124))} - let(:release) {FactoryGirl.create(:max_mind_release)} - - before(:each) do - content_for_file('abc') - - Dir.mkdir(APP_CONFIG.max_mind_working_dir) unless Dir.exists?(APP_CONFIG.max_mind_working_dir) - end - - it "unzip" do - result = release.unzip(APP_CONFIG.max_mind_working_dir, zipfile.path) - result.include?('GeoIPISP.csv').should be_true - output = result['GeoIPISP.csv'] - File.exists?(output).should be_true - IO.read(output).should == 'abc' - end - - it "downloads", aws: true do - uploader = MaxMindReleaseUploader.new(release, :geo_ip_124_url) - zipfile.open - uploader.store!(zipfile) # uploads the file to s3 - release.save! - release[:geo_ip_124_url].should == File.join(release.store_dir, 'geo_ip_124_url.zip') - release[:geo_ip_124_md5].should == Digest::MD5.file(zipfile).hexdigest - release[:geo_ip_124_size].should == zipfile.size - - downloaded_filename = release.download(release.dated_working_dir, :geo_ip_124_url, release[:geo_ip_124_md5]) - - Digest::MD5.file(downloaded_filename ).hexdigest.should == Digest::MD5.file(zipfile).hexdigest - end - - describe "import" do - it "succeeds" do - release.touch - dataset = dataset_to_tmp_files - release.import_to_database(dataset[:geo_ip_124_files], dataset[:geo_ip_134_files], dataset[:iso3166], dataset[:region_codes]) - release.imported.should be_true - release.imported_at.should_not be_nil - end - end - -end \ No newline at end of file diff --git a/ruby/spec/mailers/user_mailer_spec.rb b/ruby/spec/mailers/user_mailer_spec.rb index 441dc02fd..f53a97bd1 100644 --- a/ruby/spec/mailers/user_mailer_spec.rb +++ b/ruby/spec/mailers/user_mailer_spec.rb @@ -16,8 +16,6 @@ describe UserMailer do UserMailer.deliveries.clear end - - describe "should send confirm email" do let (:mail) { UserMailer.deliveries[0] }