From dc09f0f36bc9e4e985363c18b410e514fc454dd9 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sun, 18 Nov 2012 01:56:50 -0600 Subject: [PATCH 01/10] * jam-web getting ready to build tests --- Gemfile | 17 +++++++++++++---- build | 18 ++++++++++++++++++ jenkins | 15 +++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100755 build create mode 100755 jenkins diff --git a/Gemfile b/Gemfile index c09c6750c..6f7972ad9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,20 @@ +#ruby=1.9.3 source 'https://rubygems.org' +source 'https://jamjam:blueberryjam@www.jamkazam.com/gems/' # Look for $WORKSPACE, otherwise use "workspace" as dev path. workspace = ENV["WORKSPACE"] || "~/workspace" +devenv = ENV["BUILD_NUMBER"].nil? # Jenkins sets a build number environment variable + +if devenv + gem 'jam_db', :path=> "#{workspace}/jam-db/target/ruby_package" + gem 'jampb', :path => "#{workspace}/jam-pb/target/ruby/jampb" + gem 'jam_ruby', :path => "#{workspace}/jam-ruby" +else + gem 'jam_db' + gem 'jampb' + gem 'jam_ruby' +end gem 'rails', '3.2.8' gem 'jquery-rails', '2.0.2' @@ -13,10 +26,6 @@ gem 'bootstrap-will_paginate', '0.0.6' gem 'uuidtools', '2.1.2' gem 'ruby-protocol-buffers', '1.2.2' -#gem 'pg_migrate','0.1.6' #:path => "#{workspace}/pg_migrate_ruby" -gem 'jam_db', :path => "#{workspace}/jam-db/target/ruby_package" -gem 'jam_ruby', :path => "#{workspace}/jam-ruby" -gem 'jampb', :path => "#{workspace}/jam-pb/target/ruby/jampb" gem 'pg', '0.14.0' gem 'compass-rails' gem 'rabl' # for JSON API development diff --git a/build b/build new file mode 100755 index 000000000..2ab04ea45 --- /dev/null +++ b/build @@ -0,0 +1,18 @@ +#!/bin/bash + +echo "updating dependencies" +bundle update +echo "running rspec tests" +bundle exec rspec +echo "running jasmine tests" +rake jasmine + +if [ "$?" = "0" ]; then + echo "tests completed" +else + echo "tests failed." + exit 1 +fi + +echo "build complete" + diff --git a/jenkins b/jenkins new file mode 100755 index 000000000..60eddfe68 --- /dev/null +++ b/jenkins @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "starting build..." +./build + +if [ "$?" = "0" ]; then + echo "build succeeded" + + echo "TODO: build debian package" +else + echo "build failed" + exit 1 +fi + + From fded8934022fc3df2e32aa171e7f10836a269c63 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sun, 18 Nov 2012 02:03:12 -0600 Subject: [PATCH 02/10] * require jam_ruby at top of spec_helper.rb --- spec/spec_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 664966e7a..50c50904a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,7 @@ require 'spork' require 'active_record' require 'action_mailer' require 'jam_db' +require 'jam_ruby' require 'spec_db' include JamRuby From e3b647e4fa4274fd9d2bad3c31729471cdfb8099 Mon Sep 17 00:00:00 2001 From: Mike Slemmer Date: Sun, 18 Nov 2012 01:07:54 -0800 Subject: [PATCH 03/10] missing image --- public/fb-signup-button.png | Bin 0 -> 1674 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/fb-signup-button.png diff --git a/public/fb-signup-button.png b/public/fb-signup-button.png new file mode 100644 index 0000000000000000000000000000000000000000..d60bbeb48a0c83d1dde04edb0c36c66316e1dac4 GIT binary patch literal 1674 zcmV;526g#~P)? z!C%$WnyBgfEF){>GTx4hp`H9n&$x4V)DiU&c87Bzj(rIu_XX?b#~R*h3#-tvVZj6Y-}}z(xfXZ1 z<;$g&Wy;3Zo?eS}7PPlsdlX5ConE^>_0fs0sM)m}EI)J)M?nrTFv3>1IXY=`x^IQV z3`bu1gc4)TK^?|z&!{o2JJH#uA3*=NF0XlD3_TLeYt|`9yI_Wd{w*Yd&5JhX&e={P zPUs!*27%dPE!XC!CW{og(!vc{``$f+=)}r;WjeK8s#H|h(7CNr?RHON3)Arl*YPGJ z0-8PWmFG5L9kig*7RlQT7N!ss$%jVl*)k>vw6yj9+;fG+#~q^hfM0*P2xI$MOJ$j= zvDGvzLp*X{|$v9_9qtO|9@3X@d+-YW-DW5iV!~4Zgplg0b%r}}4-UUk>is-#F`;k- z;G>9e|C&I!p?o7RJ6~!sn=BZT~M$;(PanAx61sA-ElKcRCVSG#gI||eu z`<6|K3U4Y3ts{3NT#jT$$plASBd~Tv;L+ujMaX`rPER|FO{aAYT`Z1(geAW?Y=a3_ z#K!_=-nWF2jCh^IzyP2y5VB?W3Vf#t*z8THhW_rDaAFAsSSXD1zo!Y4zzK6y3Zf8+ zi%WvYK%gTi&HZD9lcFVwD*+gOy5w@-3TEUpsJ{o}Q~42C*xj>JQ&p~_D@=VM0^D76 z%1-fM3Tpw>0(4<~EJaf*GpNjv6G9@T!x}X6GpUsbu>1L!-2jlxNqAGUwM0) zS-v})Pnn-ARqWrrm8O?wof!_!@gysd=(~mhSClA9G`Ux;lQ24CDgT)PkSA;PTOZ0z zd9kWsaKy$f`Jg@e=Hplk1Uq3wL%7z$N_Fz(#1qyCsD0$oS{OVt}{c4{v4GY{PY zWxDSB{$Rz}SupM4>{693)`MwxmR*Ud6ibS|L zXVZ5LqM*VV=(wa`pSlpmIfVVN6Y#%G`I2o$nm7{FxY&DwF~_WbL~Y0~ntxfK^vKxg zycZ+-?hI8sLj?#Q7)!^Uk^JV%x4Y@i1^+C``*X20=4Jcm)Ff|+CD2xh68{lk0FiZC U4LSA&ssI2007*qoM6N<$f*8akhyVZp literal 0 HcmV?d00001 From d603d35c2dfb5fd28e13f6be8411a000210cd7f9 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sun, 18 Nov 2012 09:09:36 -0600 Subject: [PATCH 04/10] * running jasmine differently for build server --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 2ab04ea45..db377be45 100755 --- a/build +++ b/build @@ -5,7 +5,7 @@ bundle update echo "running rspec tests" bundle exec rspec echo "running jasmine tests" -rake jasmine +rake jasmine:ci RAILS_ENV=test if [ "$?" = "0" ]; then echo "tests completed" From 1099720911af5bd24e80485f59d635bc08c23adb Mon Sep 17 00:00:00 2001 From: Seth Call Date: Sun, 18 Nov 2012 09:21:01 -0600 Subject: [PATCH 05/10] * checking error codes of tests better and cleade up lecho logs --- build | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/build b/build index db377be45..65255f68f 100755 --- a/build +++ b/build @@ -2,15 +2,31 @@ echo "updating dependencies" bundle update +if [ "$?" = "0" ]; then + echo "success: updated dependencies" +else + echo "could not update dependencies" + exit 1 +fi + + echo "running rspec tests" bundle exec rspec +if [ "$?" = "0" ]; then + echo "success: ran rspec tests" +else + echo "running rspec tests failed." + exit 1 +fi + + echo "running jasmine tests" rake jasmine:ci RAILS_ENV=test if [ "$?" = "0" ]; then - echo "tests completed" + echo "success: jasmine tests completed" else - echo "tests failed." + echo "running jasmine tests failed" exit 1 fi From 2c8fb48e53512218c0f96cf884f153c231243f7d Mon Sep 17 00:00:00 2001 From: Jonathon Wilson Date: Sat, 17 Nov 2012 15:03:06 -0600 Subject: [PATCH 06/10] Initial version of landing page and support for non-logged-in client home. --- app/assets/javascripts/landing.js | 23 +++++++ app/assets/javascripts/layout.js | 8 +-- app/assets/javascripts/utils.js | 6 ++ .../stylesheets/client/jamkazam.css.scss | 6 ++ app/controllers/clients_controller.rb | 2 +- app/controllers/sessions_controller.rb | 6 +- app/views/clients/index.html.erb | 62 +++++++++++++------ config/routes.rb | 3 +- 8 files changed, 85 insertions(+), 31 deletions(-) create mode 100644 app/assets/javascripts/landing.js diff --git a/app/assets/javascripts/landing.js b/app/assets/javascripts/landing.js new file mode 100644 index 000000000..8efdb9929 --- /dev/null +++ b/app/assets/javascripts/landing.js @@ -0,0 +1,23 @@ +/** +* Javascript for controlling the landing page. +* This is the page you'll see when you visit the +* client home page without being logged in. +*/ +(function(context,$) { + + context.JK = context.JK || {}; + + context.JK.LandingPage = function() { + var logger = context.JK.logger; + logger.debug("Landing Page TODO"); + + this.initialize = function() { + $('div[layout="landing"]').show(); + JK.hideCurtain(400); + }; + + return this; + + }; + + }(window,jQuery)); \ No newline at end of file diff --git a/app/assets/javascripts/layout.js b/app/assets/javascripts/layout.js index 0e6bbadd5..228283a19 100644 --- a/app/assets/javascripts/layout.js +++ b/app/assets/javascripts/layout.js @@ -49,19 +49,13 @@ $('[layout="sidebar"]').show(); $('[layout="panel"]').show(); layout(); - hideCurtain(); + JK.hideCurtain(opts.animationDuration); } function setInitialExpandedSidebarPanel() { expandedPanel = $('[layout="panel"]').first().attr("layout-id"); } - function hideCurtain() { - setTimeout(function() { - $('.curtain').fadeOut(2*opts.animationDuration); - }, opts.animationDuration); - } - function layout() { width = $(window).width(); height = $(window).height(); diff --git a/app/assets/javascripts/utils.js b/app/assets/javascripts/utils.js index 0698d6d67..a34b9f405 100644 --- a/app/assets/javascripts/utils.js +++ b/app/assets/javascripts/utils.js @@ -16,6 +16,12 @@ }; + context.JK.hideCurtain = function(duration) { + setTimeout(function() { + $('.curtain').fadeOut(2*duration); + }, duration); + }; + /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. diff --git a/app/assets/stylesheets/client/jamkazam.css.scss b/app/assets/stylesheets/client/jamkazam.css.scss index c105e9bbe..bdc1311ad 100644 --- a/app/assets/stylesheets/client/jamkazam.css.scss +++ b/app/assets/stylesheets/client/jamkazam.css.scss @@ -82,6 +82,7 @@ label { } .notify { + display:none; background-color: $color8; color:#000; overflow:auto; @@ -92,6 +93,7 @@ label { } .dialog { + display:none; background-color:$color8; border: #666; color:#000; @@ -158,6 +160,10 @@ label { background: scale-lightness($color7, 10%); } +.screen { + display:none; +} + .screen.secondary { } .buttonrow, .screen.secondary .footer { diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index fad1d3213..cc745520c 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -3,7 +3,7 @@ class ClientsController < ApplicationController include UsersHelper # have to be signed in currently to see this screen - before_filter :signed_in_user + # before_filter :signed_in_user def index # use gon to pass variables into javascript diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index e5e5f6b6f..c45f7bd46 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -59,12 +59,14 @@ class SessionsController < ApplicationController def complete_sign_in(user) sign_in user - redirect_back_or music_sessions_url + #redirect_back_or music_sessions_url + redirect_back_or client_url end def destroy sign_out - redirect_to root_url + #redirect_to root_url + redirect_to client_url end def failure diff --git a/app/views/clients/index.html.erb b/app/views/clients/index.html.erb index b52d70c06..5a0aaf3a0 100644 --- a/app/views/clients/index.html.erb +++ b/app/views/clients/index.html.erb @@ -1,5 +1,15 @@ -
-
+
+ + + + + +