diff --git a/AssetFile b/AssetFile index 6acfcebb..9d6af5d4 100644 --- a/AssetFile +++ b/AssetFile @@ -23,7 +23,7 @@ input assets.scripts do safe_concat assets.vendor_order, 'vendor.js' end - match 'spec/*.js' do + match '{spec,spec/unit}/*.js' do concat 'spec/specs.js' end diff --git a/Gemfile b/Gemfile index 28ba7e9b..3d983993 100644 --- a/Gemfile +++ b/Gemfile @@ -3,10 +3,6 @@ ruby '1.9.3' rescue nil source :rubygems gem 'unicorn' -gem 'sinatra' -gem 'sinatra-contrib' -gem 'yard-sinatra', github: 'rkh/yard-sinatra' -gem 'rack-contrib', github: 'rack/rack-contrib' gem 'rack-ssl', '~> 1.3' gem 'rack-cache' @@ -15,35 +11,13 @@ group :development, :test do end group :development do - gem 'travis-api', github: 'travis-ci/travis-api' - gem 'travis-core', github: 'travis-ci/travis-core', branch: 'sf-travis-api' - gem 'travis-support', github: 'travis-ci/travis-support' - gem 'gh', github: 'rkh/gh' - - gem 'bunny' - gem 'pg', '~> 0.13.2' - gem 'newrelic_rpm', '~> 3.3.0' - gem 'hubble', github: 'roidrage/hubble' - gem 'rake-pipeline', github: 'livingsocial/rake-pipeline', ref: '3465e0e3e1' gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters' - gem 'coffee-script' gem 'compass' gem 'tilt' gem 'uglifier' - gem 'debugger' gem 'foreman' gem 'rerun' - gem 'rb-fsevent', '~> 0.9.1' - - gem 'guard' end - -group :test do - gem 'rspec', '~> 2.11' - gem 'factory_girl', '~> 2.4.0' - gem 'mocha', '~> 0.12' -end - diff --git a/Gemfile.lock b/Gemfile.lock index 2c8815ac..5846f4fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,86 +7,6 @@ GIT rake (~> 0.9.0) thor -GIT - remote: git://github.com/rack/rack-contrib.git - revision: b7e7c38fd02c3b5da91aa57af78b3f571c6ebcd0 - specs: - rack-contrib (1.1.0) - rack (>= 0.9.1) - -GIT - remote: git://github.com/rkh/gh.git - revision: affde20a4fecb1023f2e7031734b9386a76d22c2 - specs: - gh (0.8.0) - addressable - backports (~> 2.3) - faraday (~> 0.8) - multi_json (~> 1.0) - net-http-persistent (>= 2.7) - net-http-pipeline - -GIT - remote: git://github.com/rkh/yard-sinatra.git - revision: 3b1064eef407d2d288a5b96d258178a1e67b3b80 - specs: - yard-sinatra (1.0.0) - yard (~> 0.7) - -GIT - remote: git://github.com/roidrage/hubble.git - revision: f5e6301ac24eabeebaf8f4485d71cdcf93b2f3f8 - specs: - hubble (0.1.2) - faraday - json (~> 1.6) - -GIT - remote: git://github.com/travis-ci/travis-api.git - revision: 558847f6555202adb7da4f7d31a7b2b80ab4bac2 - specs: - travis-api (0.0.1) - backports (~> 2.5) - hubble (~> 0.1) - newrelic_rpm (~> 3.3.0) - pg (~> 0.13.2) - rack-contrib (~> 1.1) - rack-ssl (~> 1.3) - redcarpet (~> 2.1) - sinatra (~> 1.3) - sinatra-contrib (~> 1.3) - thin (~> 1.4) - travis-core - travis-support - -GIT - remote: git://github.com/travis-ci/travis-core.git - revision: aae3e646dc73c3196d173baea9265d2b1cb0cd97 - branch: sf-travis-api - specs: - travis-core (0.0.1) - actionmailer (~> 3.2.3) - activerecord (~> 3.2.3) - data_migrations (~> 0.0.1) - gh - hashr (~> 0.0.19) - metriks (~> 0.9.7) - multi_json - postmark-rails (~> 0.4.1) - pusher (~> 0.9.2) - railties (~> 3.2.3) - rake (~> 0.9.2.2) - redis (~> 3.0) - rollout (~> 1.1.0) - simple_states (~> 0.1.1) - thor (~> 0.14.6) - -GIT - remote: git://github.com/travis-ci/travis-support.git - revision: 7fb3660e0d5705305aa59b30fa74cbcc6248bbad - specs: - travis-support (0.0.1) - GIT remote: git://github.com/wycats/rake-pipeline-web-filters.git revision: f28f5809d6a3e580401a0c589d54e6ad28f34a26 @@ -98,37 +18,6 @@ GIT GEM remote: http://rubygems.org/ specs: - actionmailer (3.2.8) - actionpack (= 3.2.8) - mail (~> 2.4.4) - actionpack (3.2.8) - activemodel (= 3.2.8) - activesupport (= 3.2.8) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.0) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.1.3) - activemodel (3.2.8) - activesupport (= 3.2.8) - builder (~> 3.0.0) - activerecord (3.2.8) - activemodel (= 3.2.8) - activesupport (= 3.2.8) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activesupport (3.2.8) - i18n (~> 0.6) - multi_json (~> 1.0) - addressable (2.3.2) - arel (3.0.2) - atomic (1.0.1) - avl_tree (1.1.3) - backports (2.6.4) - builder (3.0.3) - bunny (0.8.0) chunky_png (1.2.6) coffee-script (2.2.0) coffee-script-source @@ -139,10 +28,6 @@ GEM chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) - daemons (1.1.9) - data_migrations (0.0.1) - activerecord - rake debugger (1.2.1) columnize (>= 0.3.1) debugger-linecache (~> 1.1.1) @@ -150,122 +35,26 @@ GEM debugger-linecache (1.1.2) debugger-ruby_core_source (>= 1.1.1) debugger-ruby_core_source (1.1.4) - diff-lcs (1.1.3) - erubis (2.7.0) - eventmachine (1.0.0) execjs (1.4.0) multi_json (~> 1.0) - factory_girl (2.4.2) - activesupport - faraday (0.8.4) - multipart-post (~> 1.1) foreman (0.60.2) thor (>= 0.13.6) fssm (0.2.9) - guard (1.4.0) - listen (>= 0.4.2) - thor (>= 0.14.6) - hashr (0.0.22) - hike (1.2.1) - hitimes (1.1.1) - i18n (0.6.1) - journey (1.0.4) - json (1.7.5) kgio (2.7.4) listen (0.5.3) - mail (2.4.4) - i18n (>= 0.4.0) - mime-types (~> 1.16) - treetop (~> 1.4.8) - metaclass (0.0.1) - metriks (0.9.9.1) - atomic (~> 1.0) - avl_tree (~> 1.1.2) - hitimes (~> 1.1) - mime-types (1.19) - mocha (0.12.7) - metaclass (~> 0.0.1) multi_json (1.3.6) - multipart-post (1.1.5) - net-http-persistent (2.7) - net-http-pipeline (1.0.1) - newrelic_rpm (3.3.5) - pg (0.13.2) - polyglot (0.3.3) - postmark (0.9.13) - json - rake - postmark-rails (0.4.1) - actionmailer - postmark (>= 0.9.0) - rake - pusher (0.9.4) - multi_json (~> 1.0) - signature (~> 0.1.2) rack (1.4.1) rack-cache (1.2) rack (>= 0.4) - rack-protection (1.2.0) - rack rack-ssl (1.3.2) rack - rack-test (0.6.2) - rack (>= 1.0) - railties (3.2.8) - actionpack (= 3.2.8) - activesupport (= 3.2.8) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) raindrops (0.10.0) rake (0.9.2.2) - rb-fsevent (0.9.2) - rdoc (3.12) - json (~> 1.4) - redcarpet (2.2.1) - redis (3.0.2) rerun (0.7.1) listen - rollout (1.1.0) - rspec (2.11.0) - rspec-core (~> 2.11.0) - rspec-expectations (~> 2.11.0) - rspec-mocks (~> 2.11.0) - rspec-core (2.11.1) - rspec-expectations (2.11.3) - diff-lcs (~> 1.1.3) - rspec-mocks (2.11.3) sass (3.2.1) - signature (0.1.4) - simple_states (0.1.1) - activesupport - hashr (~> 0.0.10) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) - sinatra-contrib (1.3.1) - backports (>= 2.0) - eventmachine - rack-protection - rack-test - sinatra (~> 1.3.0) - tilt (~> 1.3) - sprockets (2.1.3) - hike (~> 1.2) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - thin (1.5.0) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) thor (0.14.6) tilt (1.3.3) - treetop (1.4.11) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.33) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) @@ -273,39 +62,21 @@ GEM kgio (~> 2.6) rack raindrops (~> 0.7) - yard (0.8.3) PLATFORMS ruby DEPENDENCIES - bunny coffee-script compass debugger - factory_girl (~> 2.4.0) foreman - gh! - guard - hubble! - mocha (~> 0.12) - newrelic_rpm (~> 3.3.0) - pg (~> 0.13.2) rack-cache - rack-contrib! rack-ssl (~> 1.3) rake (~> 0.9.2) rake-pipeline! rake-pipeline-web-filters! - rb-fsevent (~> 0.9.1) rerun - rspec (~> 2.11) - sinatra - sinatra-contrib tilt - travis-api! - travis-core! - travis-support! uglifier unicorn - yard-sinatra! diff --git a/Procfile b/Procfile index 946ba530..33c2caf6 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ -web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb -guard: bundle exec guard -rerun: rerun -p 'assets/**/*' 'bundle exec rakep' +web: script/server +assets: rerun -x -p 'assets/**/*' 'bundle exec rakep' +#specs: rerun -x -p 'public/**/*' './run_jasmine.coffee public/spec.html' diff --git a/assets/scripts/app/auth.coffee b/assets/scripts/app/auth.coffee index 054e1c83..0cac0687 100644 --- a/assets/scripts/app/auth.coffee +++ b/assets/scripts/app/auth.coffee @@ -67,6 +67,7 @@ receiveMessage: (event) -> if event.origin == @expectedOrigin() + event.data.user.token = event.data.token if event.data.token @setData(event.data) console.log("signed in as #{event.data.user.login}") else diff --git a/assets/scripts/app/store.coffee b/assets/scripts/app/store.coffee index 4b9a2b6f..c49a25f7 100644 --- a/assets/scripts/app/store.coffee +++ b/assets/scripts/app/store.coffee @@ -76,18 +76,21 @@ Travis.Store = DS.Store.extend # if we need sideload becasue we have side records with other events it needs to # be revised if type == Travis.Build && json.repository - result = @_loadIncomplete(Travis.Repo, 'repository', json.repository) - @_loadIncomplete(type, root, json[root]) + result = @loadIncomplete(Travis.Repo, json.repository) + @loadIncomplete(type, json[root]) - _loadIncomplete: (type, root, hash) -> + loadIncomplete: (type, hash) -> result = @merge(type, hash) if result && result.clientId record = @findByClientId(type, result.clientId) unless record.get('complete') record.set 'incomplete', true + record.loadedAttributes = Object.keys hash - @_updateAssociations(type, root, hash) + @_updateAssociations(type, type.singularName(), hash) + + record _loadMany: (store, type, json) -> root = type.pluralName() diff --git a/assets/scripts/app/templates/jobs/list.hbs b/assets/scripts/app/templates/jobs/list.hbs index c0be30be..a59ff266 100644 --- a/assets/scripts/app/templates/jobs/list.hbs +++ b/assets/scripts/app/templates/jobs/list.hbs @@ -8,7 +8,7 @@ {{/if}} diff --git a/assets/scripts/app/templates/layouts/sidebar.hbs b/assets/scripts/app/templates/layouts/sidebar.hbs index abc7acfc..3ea91b3b 100644 --- a/assets/scripts/app/templates/layouts/sidebar.hbs +++ b/assets/scripts/app/templates/layouts/sidebar.hbs @@ -1,6 +1,8 @@ - - {{t layouts.application.fork_me}} - +
+ + {{t layouts.application.fork_me}} + +
  diff --git a/assets/scripts/app/templates/repos/show/tools.hbs b/assets/scripts/app/templates/repos/show/tools.hbs index 36aaedf2..d6824112 100644 --- a/assets/scripts/app/templates/repos/show/tools.hbs +++ b/assets/scripts/app/templates/repos/show/tools.hbs @@ -2,7 +2,7 @@
{{t jobs.allowed_failures}} - +