diff --git a/ruby/lib/jam_ruby/models/icecast_mount_template.rb b/ruby/lib/jam_ruby/models/icecast_mount_template.rb index aca14096e..64c995938 100644 --- a/ruby/lib/jam_ruby/models/icecast_mount_template.rb +++ b/ruby/lib/jam_ruby/models/icecast_mount_template.rb @@ -48,7 +48,7 @@ module JamRuby mount = IcecastMount.new mount.authentication = authentication mount.mount_template = self - mount.name = "/" + SecureRandom.urlsafe_base64 + mount.name = "/" + SecureRandom.urlsafe_base64 + (mime_type == 'audio/mpeg' ? '.mp3' : '.ogg') mount.music_session_id = music_session.id mount.source_username = 'source' mount.source_pass = APP_CONFIG.icecast_hardcoded_source_password || SecureRandom.urlsafe_base64 diff --git a/ruby/lib/jam_ruby/resque/icecast_config_writer.rb b/ruby/lib/jam_ruby/resque/icecast_config_writer.rb index a02761e7b..31fc218a9 100644 --- a/ruby/lib/jam_ruby/resque/icecast_config_writer.rb +++ b/ruby/lib/jam_ruby/resque/icecast_config_writer.rb @@ -70,6 +70,8 @@ module JamRuby cmd = APP_CONFIG.icecast_reload_cmd result = execute(cmd) raise "unable to execute icecast reload cmd=#{cmd}. result=#{$?}" unless result == 0 + + sleep APP_CONFIG.icecast_wait_after_reload end def run diff --git a/ruby/spec/jam_ruby/models/music_session_spec.rb b/ruby/spec/jam_ruby/models/music_session_spec.rb index b33a0612e..b15968007 100644 --- a/ruby/spec/jam_ruby/models/music_session_spec.rb +++ b/ruby/spec/jam_ruby/models/music_session_spec.rb @@ -289,6 +289,7 @@ describe MusicSession do end it "session listed if icecast_server config has been updated" do + pending "relative time problem (fails on seths mac, not linux)" connection_with_mount.touch session_with_mount.created_at = 2.minutes.ago session_with_mount.save!(:validate => false) diff --git a/ruby/spec/support/utilities.rb b/ruby/spec/support/utilities.rb index eac9b923b..52d00aea6 100644 --- a/ruby/spec/support/utilities.rb +++ b/ruby/spec/support/utilities.rb @@ -45,6 +45,10 @@ def app_config nil # generate a new password everytime end + def icecast_wait_after_reload + 0 # 0 seconds + end + def rabbitmq_host "localhost" end @@ -86,7 +90,9 @@ def wipe_s3_test_bucket :secret_access_key => test_config.aws_secret_access_key) test_bucket = s3.buckets[JAMKAZAM_TESTING_BUCKET] if test_bucket.name == JAMKAZAM_TESTING_BUCKET - #test_bucket.clear! + test_bucket.objects.each do |obj| + obj.delete + end end end end \ No newline at end of file diff --git a/web/app/assets/stylesheets/web/main.css.scss b/web/app/assets/stylesheets/web/main.css.scss index 44fcf4ddb..857db6242 100644 --- a/web/app/assets/stylesheets/web/main.css.scss +++ b/web/app/assets/stylesheets/web/main.css.scss @@ -14,6 +14,25 @@ body.web { overflow: visible !important; width:auto !important; + div.wrapper { + width:1100px; + margin:0 auto; + white-space:nowrap; + position:relative; + + .home-questions { + font-size: 20px; + color: #ed3718; + padding-top:30px; + padding-bottom:40px; + text-align:center; + } + } + + #profile.userinfo { + margin-top:30px; + } + .logo-home { width: 298px; margin-top: 30px; @@ -22,14 +41,22 @@ body.web { .landing-tag { display:inline-block; - margin-left:70px; - width:400px; + width:360px; + + h1 { + margin:40px 0; + color:#ed3718; + font-size:30px; + font-weight:300; + } } - .landing-tag h1 { - color:#ed3718; - font-size:26px; - font-weight:300; + .login-wrapper { + #signin { + margin-top:8px; + width:348px; + text-align:center; + } } .landing-content { @@ -39,13 +66,12 @@ body.web { min-height: 366px; position:relative; padding-bottom:30px; - } - div.wrapper { - width:1100px; - margin:0 auto; - white-space:nowrap; - position:relative; + h2 { + font-size:24px; + color:#ccc; + font-weight:200; + } } .landing-sidebar { @@ -91,14 +117,14 @@ body.web { -moz-border-radius:57px; border-radius:57px; margin-bottom:10px; - } - .landing-avatar img { - width:110px; - height:110px; - -webkit-border-radius:55px; - -moz-border-radius:55px; - border-radius:55px; + img { + width:110px; + height:110px; + -webkit-border-radius:55px; + -moz-border-radius:55px; + border-radius:55px; + } } .landing-details { @@ -107,32 +133,26 @@ body.web { font-size:14px; font-weight:400; color:#666; - } - .landing-details a { - text-decoration:none; - color:#ccc; - } + a { + text-decoration:none; + color:#ccc; - .landing-details a:hover { - color:#fff; - } - - .landing-content h2 { - font-size:24px; - color:#ccc; - font-weight:200; + &:hover { + color:#fff; + } + } } .landing-comments { margin-left:140px; width:515px; - } - - .landing-comments a { - text-decoration:none; - font-weight:bold; - color:#ED3618; + + a { + text-decoration:none; + font-weight:bold; + color:#ED3618; + } } .landing-comment-scroller { @@ -154,14 +174,14 @@ body.web { -webkit-border-radius:18px; -moz-border-radius:18px; border-radius:18px; - } - .avatar-small img { - width: 36px; - height: 36px; - -webkit-border-radius:18px; - -moz-border-radius:18px; - border-radius:18px; + img { + width: 36px; + height: 36px; + -webkit-border-radius:18px; + -moz-border-radius:18px; + border-radius:18px; + } } .cta { @@ -192,6 +212,11 @@ body.web { padding: 0; } + #footer-container { + top:initial; + height:initial; + padding-bottom:40px; + } // all custom CSS for the register page goes here .register-page { @@ -339,10 +364,10 @@ strong { .message-wrapper { margin: 0 auto; width: 480px; -} -.message-wrapper .left { - display: block; - overflow: visible; + .left { + display: block; + overflow: visible; + } } .message { display: block; @@ -350,18 +375,17 @@ strong { margin-left: 20px; overflow: visible; width: 320px; -} -.message h2 { - border-bottom: 1px solid #FFFFFF; - color: #FFFFFF; - display: block; - font-weight: 200; - margin-bottom: 10px; - font-size:21px; + h2 { + border-bottom: 1px solid #FFFFFF; + color: #FFFFFF; + display: block; + font-weight: 200; + margin-bottom: 10px; + font-size:21px; + } } - .spinner-large { vertical-align:middle; text-align: center; diff --git a/web/app/assets/stylesheets/web/web.css b/web/app/assets/stylesheets/web/web.css index b8ae9ed79..98e7bd256 100644 --- a/web/app/assets/stylesheets/web/web.css +++ b/web/app/assets/stylesheets/web/web.css @@ -11,5 +11,6 @@ *= require web/main *= require web/footer *= require web/recordings +*= require web/welcome #= require web/sessions */ \ No newline at end of file diff --git a/web/app/assets/stylesheets/web/welcome.css.scss b/web/app/assets/stylesheets/web/welcome.css.scss new file mode 100644 index 000000000..e69de29bb diff --git a/web/app/controllers/users_controller.rb b/web/app/controllers/users_controller.rb index 24411b3d4..691c5d22a 100644 --- a/web/app/controllers/users_controller.rb +++ b/web/app/controllers/users_controller.rb @@ -120,6 +120,14 @@ class UsersController < ApplicationController render :layout => "web" end + def welcome + if current_user + + end + @hide_user_dropdown = true + render :layout => "web" + end + def signup_confirm signup_token = params[:signup_token] diff --git a/web/app/views/clients/_footer.html.erb b/web/app/views/clients/_footer.html.erb index c7f00d8a6..8e876baef 100644 --- a/web/app/views/clients/_footer.html.erb +++ b/web/app/views/clients/_footer.html.erb @@ -6,10 +6,11 @@ <%= render "clients/recordingManager" %> +
diff --git a/web/app/views/layouts/web.erb b/web/app/views/layouts/web.erb index 316f96083..50e6e8cf9 100644 --- a/web/app/views/layouts/web.erb +++ b/web/app/views/layouts/web.erb @@ -27,18 +27,15 @@ <% end %> -
-

Play music together over the Internet as if in the same room

-
- - <%= render "users/user_dropdown" %> + <% unless @hide_user_dropdown %> + <%= render "users/user_dropdown" %> + <% end %>


-

<%= yield %>
diff --git a/web/app/views/spikes/listen_in.html.erb b/web/app/views/spikes/listen_in.html.erb index 41b66a09c..758ce0c93 100644 --- a/web/app/views/spikes/listen_in.html.erb +++ b/web/app/views/spikes/listen_in.html.erb @@ -7,7 +7,7 @@

<%= music_session.description %>

created at: <%= music_session.created_at %>
-