diff --git a/admin/build b/admin/build index dea84d1da..64c48f159 100755 --- a/admin/build +++ b/admin/build @@ -25,7 +25,7 @@ cp ../ruby/jam_ruby-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy j #rm -rf vendor/bundle -- let jenkins config 'wipe workspace' decide this rm Gemfile.lock # if we don't want versions to float, pin it in the Gemfile, not count on Gemfile.lock bundle install --path vendor/bundle -bundle update +#bundle update if [ "$?" = "0" ]; then echo "success: updated dependencies" @@ -74,7 +74,7 @@ EOF set -e # cache all gems local, and tell bundle to use local gems only - bundle install --path vendor/bundle --local + #bundle install --path vendor/bundle --local # prepare production acssets rm -rf $DIR/public/assets bundle exec rake assets:precompile RAILS_ENV=production diff --git a/build b/build index 6fc0ce391..9b97f9176 100755 --- a/build +++ b/build @@ -3,6 +3,8 @@ # RUN_SLOW_TESTS, RUN_AWS_TESTS, SKIP_KARMA=1 SHOW_JS_ERRORS=1 PACKAGE=1 # WORKSPACE=/var/lib/jenkins/jobs/jam-web/workspace +set -e + export BUNDLE_JOBS=1 # 6, which i want to use, makes the whole server crawl echo "" @@ -130,4 +132,4 @@ GEM_SERVER=http://localhost:9000/gems echo "Skipping publish since branch is neither master or develop..." fi -fi \ No newline at end of file +fi diff --git a/db/Gemfile b/db/Gemfile index e6d5a3717..45bf466d6 100644 --- a/db/Gemfile +++ b/db/Gemfile @@ -3,4 +3,4 @@ source 'https://rubygems.org' # Assumes you have already cloned pg_migrate_ruby in your workspace # $ cd [workspace] # $ git clone https://github.com/sethcall/pg_migrate_ruby -gem 'pg_migrate', '0.1.11' +gem 'pg_migrate', '0.1.12' diff --git a/db/Gemfile.lock b/db/Gemfile.lock index e9646a77c..0b59faefa 100644 --- a/db/Gemfile.lock +++ b/db/Gemfile.lock @@ -4,11 +4,11 @@ GEM little-plugger (1.1.3) logging (1.7.2) little-plugger (>= 1.1.3) - pg (0.15.1) - pg (0.15.1-x86-mingw32) - pg_migrate (0.1.11) + pg (0.17.1) + pg (0.17.1-x86-mingw32) + pg_migrate (0.1.12) logging (= 1.7.2) - pg (= 0.15.1) + pg (= 0.17.1) thor (= 0.15.4) thor (0.15.4) @@ -17,4 +17,4 @@ PLATFORMS x86-mingw32 DEPENDENCIES - pg_migrate (= 0.1.11) + pg_migrate (= 0.1.12) diff --git a/db/build b/db/build index 259aea93b..a0084254e 100755 --- a/db/build +++ b/db/build @@ -19,7 +19,7 @@ rm -rf $TARGET mkdir -p $PG_BUILD_OUT mkdir -p $PG_RUBY_PACKAGE_OUT -bundle update +bundle install --path vendor/bundle echo "building migrations" bundle exec pg_migrate build --source . --out $PG_BUILD_OUT --test --verbose diff --git a/ruby/Gemfile b/ruby/Gemfile index 1925a2033..989804c45 100644 --- a/ruby/Gemfile +++ b/ruby/Gemfile @@ -15,7 +15,7 @@ else ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true" end -gem 'pg', '0.15.1', :platform => [:mri, :mswin, :mingw] +gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw] gem 'jdbc_postgres', :platform => [:jruby] gem 'activerecord', '3.2.13' diff --git a/ruby/build b/ruby/build index df9ac25e3..f405937d2 100755 --- a/ruby/build +++ b/ruby/build @@ -1,8 +1,7 @@ #!/bin/bash echo "updating dependencies" -bundle install --path vendor/bundle --local -bundle update +bundle install --path vendor/bundle echo "running rspec tests" bundle exec rspec diff --git a/web/Gemfile b/web/Gemfile index 884ae244b..ac5e4551f 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -31,7 +31,7 @@ gem 'bootstrap-will_paginate', '0.0.6' gem 'em-websocket', '>=0.4.0' #, :path => '/Users/seth/workspace/em-websocket' gem 'uuidtools', '2.1.2' gem 'ruby-protocol-buffers', '1.2.2' -gem 'pg', '0.15.1' +gem 'pg', '0.17.1' gem 'compass-rails' gem 'rabl' # for JSON API development gem 'gon', '~>4.1.0' # for passthrough of Ruby variables to Javascript variables diff --git a/web/app/assets/images/content/button_facebook_signup.png b/web/app/assets/images/content/button_facebook_signup.png new file mode 100644 index 000000000..d51b55402 Binary files /dev/null and b/web/app/assets/images/content/button_facebook_signup.png differ diff --git a/web/app/assets/javascripts/user_dropdown.js b/web/app/assets/javascripts/user_dropdown.js index 2973dda7d..807f154e2 100644 --- a/web/app/assets/javascripts/user_dropdown.js +++ b/web/app/assets/javascripts/user_dropdown.js @@ -49,6 +49,10 @@ } function loadMe() { + if(!context.JK.currentUserId) { + return; + } + $.ajax({ url: '/api/users/' + context.JK.currentUserId }).done(function(r) { diff --git a/web/app/assets/javascripts/web/signupDialog.js b/web/app/assets/javascripts/web/signupDialog.js new file mode 100644 index 000000000..459833503 --- /dev/null +++ b/web/app/assets/javascripts/web/signupDialog.js @@ -0,0 +1,41 @@ +(function(context,$) { + + "use strict"; + + context.JK = context.JK || {}; + + context.JK.SignupDialog = function(app) { + var logger = context.JK.logger; + var rest = context.JK.Rest(); + var dialogId = '#signup-dialog'; + + function events() { + + + } + + function beforeShow() { + + } + + function afterHide() { + + } + + function initialize(){ + + var dialogBindings = { + 'beforeShow' : beforeShow, + 'afterHide': afterHide + }; + + app.bindDialog('signup-dialog', dialogBindings); + + console.log("honuth") + events(); + } + + this.initialize = initialize; + + } +})(window, jQuery); \ No newline at end of file diff --git a/web/app/assets/javascripts/web/web.js b/web/app/assets/javascripts/web/web.js index 0cde1c7d7..c6489a530 100644 --- a/web/app/assets/javascripts/web/web.js +++ b/web/app/assets/javascripts/web/web.js @@ -5,6 +5,7 @@ //= require AAA_Log //= require AAC_underscore //= require globals +//= require web/signupDialog //= require invitationDialog //= require shareDialog //= require layout diff --git a/web/app/assets/javascripts/web/welcome.js b/web/app/assets/javascripts/web/welcome.js new file mode 100644 index 000000000..7d4728e03 --- /dev/null +++ b/web/app/assets/javascripts/web/welcome.js @@ -0,0 +1,17 @@ +(function(context,$) { + + "use strict"; + + context.JK = context.JK || {}; + + function initialize() { + $('#signup').click(function(e) { + context.JK.app.layout.showDialog('signup-dialog'); + e.preventDefault(); + return false; + }); + } + + initialize() + +})(window, jQuery); \ No newline at end of file diff --git a/web/app/assets/stylesheets/client/dialog.css.scss b/web/app/assets/stylesheets/client/dialog.css.scss index d1c188cfa..438725f43 100644 --- a/web/app/assets/stylesheets/client/dialog.css.scss +++ b/web/app/assets/stylesheets/client/dialog.css.scss @@ -10,6 +10,10 @@ z-index: 100; } +.thin-dialog { + min-width: 100px; +} + .dialog-inner { padding:25px; color:#aaa; diff --git a/web/app/assets/stylesheets/client/jamkazam.css.scss b/web/app/assets/stylesheets/client/jamkazam.css.scss index 819e8e9ef..0d6321bb4 100644 --- a/web/app/assets/stylesheets/client/jamkazam.css.scss +++ b/web/app/assets/stylesheets/client/jamkazam.css.scss @@ -131,6 +131,14 @@ input[type="button"] { font-size:11px; } +.center { + text-align:center; +} + +.block { + display:block; +} + .orange { color: $ColorScreenPrimary !important; } diff --git a/web/app/controllers/users_controller.rb b/web/app/controllers/users_controller.rb index e6a2837f4..e2aae2132 100644 --- a/web/app/controllers/users_controller.rb +++ b/web/app/controllers/users_controller.rb @@ -23,7 +23,7 @@ class UsersController < ApplicationController def new if current_user - redirect_to :root + redirect_to client_url return end @@ -51,7 +51,7 @@ class UsersController < ApplicationController def create if current_user - redirect_to :root + redirect_to client_url return end @@ -121,9 +121,6 @@ class UsersController < ApplicationController end def welcome - if current_user - - end @hide_user_dropdown = true render :layout => "web" end diff --git a/web/app/views/layouts/web.erb b/web/app/views/layouts/web.erb index 50e6e8cf9..58c07dd86 100644 --- a/web/app/views/layouts/web.erb +++ b/web/app/views/layouts/web.erb @@ -49,6 +49,7 @@ <%= render "clients/invitationDialog" %> + <%= render "users/signupDialog" %> diff --git a/web/app/views/users/_signupDialog.html.erb b/web/app/views/users/_signupDialog.html.erb new file mode 100644 index 000000000..9484902a5 --- /dev/null +++ b/web/app/views/users/_signupDialog.html.erb @@ -0,0 +1,33 @@ +
+ + +
+

sign up for jamkazam

+
+ + +
+ + <%= image_tag "content/button_facebook_signup.png", {:width => 249, :height => 46 } %> +
+

+ +
Or
+
+
+ +
<%= link_to "SIGN UP WITH YOUR EMAIL", signup_path, class: "button-orange block" %> + +
+ +
+ Already have an account?
+
+ Cancel
+
+
+ +
+
+ +
\ No newline at end of file diff --git a/web/app/views/users/welcome.html.erb b/web/app/views/users/welcome.html.erb index 9bf3df638..86d9ed153 100644 --- a/web/app/views/users/welcome.html.erb +++ b/web/app/views/users/welcome.html.erb @@ -3,7 +3,7 @@ <% end %>
- <%= link_to image_tag("/assets/web/cta_button.png", :alt => "Sign up now for your free account!"), signup_path, class: "signup", id: "signup" %> + <%= link_to image_tag("/assets/web/cta_button.png", :alt => "Sign up now for your free account!"), '#', class: "signup", id: "signup" %>
<%= link_to "Already have an account?", signin_path, class: "signin", id: "signin" %>
@@ -13,4 +13,6 @@ Have questions about how JamKazam works? Here are some answers. <% end %> -<% end %> \ No newline at end of file +<% end %> + +<%= javascript_include_tag "web/welcome" %> \ No newline at end of file diff --git a/web/build b/web/build index 40d979147..71544af08 100755 --- a/web/build +++ b/web/build @@ -31,7 +31,7 @@ cp ../websocket-gateway/jam_websockets-${GEM_VERSION}.gem vendor/cache/ || { ech echo "updating dependencies" bundle install --path vendor/bundle -bundle update +#bundle update # clean assets, because they may be lingering from last build bundle exec rake assets:clean diff --git a/web/config/routes.rb b/web/config/routes.rb index cad25d4b5..4c5556626 100644 --- a/web/config/routes.rb +++ b/web/config/routes.rb @@ -9,10 +9,10 @@ SampleApp::Application.routes.draw do resources :sessions, only: [:new, :create, :destroy] #root to: 'static_pages#home' - root to: 'clients#index' - #root to: 'users#welcome' + #root to: 'clients#index' + root to: 'users#welcome' - match '/welcome', to: 'users#welcome' + #match '/welcome', to: 'users#welcome' # This page is still here, and is under test. Keep a route to it. match '/oldhome', to: 'static_pages#home' diff --git a/web/spec/features/admin_spec.rb b/web/spec/features/admin_spec.rb index 19145d17e..eef4caf2e 100644 --- a/web/spec/features/admin_spec.rb +++ b/web/spec/features/admin_spec.rb @@ -17,7 +17,7 @@ describe "Admin", :js => true, :type => :feature, :capybara_feature => true do before(:each) do UserMailer.deliveries.clear sign_in_poltergeist user - visit "/" + visit "/client" find('h2', text: 'musicians') end diff --git a/web/spec/features/home_spec.rb b/web/spec/features/home_spec.rb index a47e47cac..1585f9c73 100644 --- a/web/spec/features/home_spec.rb +++ b/web/spec/features/home_spec.rb @@ -115,7 +115,7 @@ describe "Home Screen", :js => true, :type => :feature, :capybara_feature => tru UserMailer.deliveries.clear page.driver.headers = { 'User-Agent' => ' JamKazam ' } sign_in_poltergeist user - visit "/" + visit "/client" end it_behaves_like :has_footer @@ -133,7 +133,7 @@ describe "Home Screen", :js => true, :type => :feature, :capybara_feature => tru UserMailer.deliveries.clear page.driver.headers = { 'User-Agent' => 'Firefox' } sign_in_poltergeist user - visit "/" + visit "/client" end it_behaves_like :has_footer diff --git a/web/spec/features/profile_menu_spec.rb b/web/spec/features/profile_menu_spec.rb index d04e5f876..d60a670cf 100644 --- a/web/spec/features/profile_menu_spec.rb +++ b/web/spec/features/profile_menu_spec.rb @@ -90,7 +90,7 @@ describe "Profile Menu", :js => true, :type => :feature, :capybara_feature => tr before(:each) do UserMailer.deliveries.clear sign_in_poltergeist user - visit "/" + visit "/client" find('h2', text: 'musicians') # open menu find('.userinfo').hover() diff --git a/web/spec/features/sidebar_spec.rb b/web/spec/features/sidebar_spec.rb index e00c4b6af..35ecb1583 100644 --- a/web/spec/features/sidebar_spec.rb +++ b/web/spec/features/sidebar_spec.rb @@ -15,7 +15,7 @@ describe "Profile Menu", :js => true, :type => :feature, :capybara_feature => tr before(:each) do UserMailer.deliveries.clear sign_in_poltergeist user - visit "/" + visit "/client" find('h2', text: 'musicians') end diff --git a/web/spec/features/whats_next_spec.rb b/web/spec/features/whats_next_spec.rb index f4a96eca8..1946e622e 100644 --- a/web/spec/features/whats_next_spec.rb +++ b/web/spec/features/whats_next_spec.rb @@ -13,7 +13,7 @@ describe "Home Screen", :js => true, :type => :feature, :capybara_feature => tru before(:each) do sign_in_poltergeist user page.driver.headers = { 'User-Agent' => ' JamKazam ' } - visit "/" + visit "/client" end @@ -63,7 +63,7 @@ describe "Home Screen", :js => true, :type => :feature, :capybara_feature => tru # needed because we poke the server with an updateUser call, but their is no indication in the UI that it's done wait_for_ajax page.driver.headers = { 'User-Agent' => ' JamKazam ' } - visit "/" + visit "/client" wait_until_curtain_gone should_not have_selector('h1', text: 'what\'s next?') } diff --git a/websocket-gateway/Gemfile b/websocket-gateway/Gemfile index 52e8dd565..6634c7858 100644 --- a/websocket-gateway/Gemfile +++ b/websocket-gateway/Gemfile @@ -56,7 +56,7 @@ group :test do gem 'database_cleaner', '0.7.0' gem 'guard', '>= 0.10.0' gem 'guard-rspec', '>= 0.7.3' - gem 'pg_migrate','0.1.11' #:path => "#{workspace}/pg_migrate_ruby" + gem 'pg_migrate','0.1.12' #:path => "#{workspace}/pg_migrate_ruby" gem 'evented-spec' end diff --git a/websocket-gateway/build b/websocket-gateway/build index 568a403c7..1d0af4990 100755 --- a/websocket-gateway/build +++ b/websocket-gateway/build @@ -25,7 +25,7 @@ cp ../ruby/jam_ruby-${GEM_VERSION}.gem vendor/cache/ || { echo "unable to copy j echo "updating dependencies" bundle install --path vendor/bundle -bundle update +#bundle update if [ -z $SKIP_TESTS ]; then @@ -59,7 +59,7 @@ if [ -n "$PACKAGE" ]; then set -e # cache all gems local, and tell bundle to use local gems only - bundle install --path vendor/bundle --local + #bundle install --path vendor/bundle --local # create debian using fpm bundle exec fpm -s dir -t deb -p target/deb/websocket-gateway_0.1.${BUILD_NUMBER}_${ARCH}.deb -n "websocket-gateway" -v "0.1.$BUILD_NUMBER" --prefix /var/lib/websocket-gateway --after-install $DIR/script/package/post-install.sh --before-install $DIR/script/package/pre-install.sh --before-remove $DIR/script/package/pre-uninstall.sh --after-remove $DIR/script/package/post-uninstall.sh Gemfile lib bin vendor .bundle config script BUILD_NUMBER