Merge branch 'develop' into feature/share_dialog

This commit is contained in:
Brian Smith 2014-02-02 18:15:37 -05:00
commit 730c315589
28 changed files with 153 additions and 43 deletions

View File

@ -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

4
build
View File

@ -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
fi

View File

@ -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'

View File

@ -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)

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -49,6 +49,10 @@
}
function loadMe() {
if(!context.JK.currentUserId) {
return;
}
$.ajax({
url: '/api/users/' + context.JK.currentUserId
}).done(function(r) {

View File

@ -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);

View File

@ -5,6 +5,7 @@
//= require AAA_Log
//= require AAC_underscore
//= require globals
//= require web/signupDialog
//= require invitationDialog
//= require shareDialog
//= require layout

View File

@ -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);

View File

@ -10,6 +10,10 @@
z-index: 100;
}
.thin-dialog {
min-width: 100px;
}
.dialog-inner {
padding:25px;
color:#aaa;

View File

@ -131,6 +131,14 @@ input[type="button"] {
font-size:11px;
}
.center {
text-align:center;
}
.block {
display:block;
}
.orange {
color: $ColorScreenPrimary !important;
}

View File

@ -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

View File

@ -49,6 +49,7 @@
</div>
<%= render "clients/invitationDialog" %>
<%= render "users/signupDialog" %>
<script type="text/javascript">
$(function () {
@ -61,16 +62,17 @@
JK.currentUserId = null;
<% end %>
if (JK.currentUserId) {
JK.app = JK.JamKazam();
JK.app.initialize({inClient: false, layoutOpts: {layoutFooter: false}});
JK.app = JK.JamKazam();
JK.app.initialize({inClient: false, layoutOpts: {layoutFooter: false}});
var invitationDialog = new JK.InvitationDialog(JK.app);
invitationDialog.initialize();
var invitationDialog = new JK.InvitationDialog(JK.app);
invitationDialog.initialize();
var userDropdown = new JK.UserDropdown(JK.app);
userDropdown.initialize(invitationDialog);
}
var userDropdown = new JK.UserDropdown(JK.app);
userDropdown.initialize(invitationDialog);
var signupDialog = new JK.SignupDialog(JK.app);
signupDialog.initialize();
})
</script>

View File

@ -0,0 +1,33 @@
<div class="dialog thin-dialog overlay-small" layout-id="signup-dialog" id="signup-dialog">
<!-- ftue header -->
<div class="content-head">
<h1>sign up for jamkazam</h1>
</div>
<!-- inner wrapper -->
<div class="overlay-inner">
<%= image_tag "content/button_facebook_signup.png", {:width => 249, :height => 46 } %>
<br>
<br><br>
<div class="center"><strong class="white">Or</strong></div>
<br>
<br>
<div class="center"><%= link_to "SIGN UP WITH YOUR EMAIL", signup_path, class: "button-orange block" %>
<br>
<div class="center">
<small>Already have an account? <a href="#" class='signin'>Sign In</a><br>
<br>
<a href="#" layout-action="close">Cancel</a></small>
</div>
</div>
<!-- end inner -->
<br clear="all">
</div>
<!-- end overlay content -->
</div>

View File

@ -3,7 +3,7 @@
<% end %>
<div class="clearall"></div>
<div class="login-wrapper">
<%= 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" %>
<div class="clearall"></div>
<%= link_to "Already have an account?", signin_path, class: "signin", id: "signin" %>
</div>
@ -13,4 +13,6 @@
Have questions about how JamKazam works?
<a href="#" id="faq-open">Here are some answers</a>.
<% end %>
<% end %>
<% end %>
<%= javascript_include_tag "web/welcome" %>

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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?')
}

View File

@ -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

View File

@ -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