From da4afbc9915ccb5160372c63600b3bcff56cf41d Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Wed, 24 Dec 2014 11:01:50 +0100 Subject: [PATCH] local precompile assets --- .capistrano/metrics | 1 + Gemfile | 1 + Gemfile.lock | 3 +++ .../user/app/controllers/application_controller.js.coffee | 6 ++++-- app/assets/javascripts/user/app/templates/settings.emblem | 4 ++++ config/deploy.rb | 1 + config/version | 2 +- 7 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .capistrano/metrics diff --git a/.capistrano/metrics b/.capistrano/metrics new file mode 100644 index 00000000..94a4335e --- /dev/null +++ b/.capistrano/metrics @@ -0,0 +1 @@ +full \ No newline at end of file diff --git a/Gemfile b/Gemfile index 534fc01e..07527b96 100644 --- a/Gemfile +++ b/Gemfile @@ -29,6 +29,7 @@ group :assets do #gem 'compass-rails' gem 'js-routes' gem "font-awesome-rails" + gem 'capistrano-local-precompile', require: false # See https://github.com/sstephenson/execjs#readme for more supported runtimes #gem 'therubyracer', :platforms => :ruby diff --git a/Gemfile.lock b/Gemfile.lock index a88af479..6fa655e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -123,6 +123,8 @@ GEM capistrano-bundler (1.1.3) capistrano (~> 3.1) sshkit (~> 1.2) + capistrano-local-precompile (0.0.2) + capistrano capistrano-rails (1.1.2) capistrano (~> 3.1) capistrano-bundler (~> 1.1) @@ -444,6 +446,7 @@ DEPENDENCIES bootstrap-sass (~> 2.3) bourbon capistrano (~> 3.0) + capistrano-local-precompile capistrano-rails (~> 1.1) capistrano-rvm (~> 0.1) capybara-screenshot diff --git a/app/assets/javascripts/user/app/controllers/application_controller.js.coffee b/app/assets/javascripts/user/app/controllers/application_controller.js.coffee index 032aa8a6..7ed15c7e 100644 --- a/app/assets/javascripts/user/app/controllers/application_controller.js.coffee +++ b/app/assets/javascripts/user/app/controllers/application_controller.js.coffee @@ -11,6 +11,10 @@ App.ApplicationController = Ember.Controller.extend @set 'notice', null openDebugger: -> debugger + evalDebugString: -> + if text = $('#debug-eval-string') + $('.debug-info').append eval(text) + $('.debug-info').append "\n" currentPathDidChange: (-> @set 'notice', '' @@ -106,5 +110,3 @@ App.ApplicationController = Ember.Controller.extend @redirect_to 'index' @store.find('list', 'current').then(success, error) - didInsertElement: (e)-> - #debugger diff --git a/app/assets/javascripts/user/app/templates/settings.emblem b/app/assets/javascripts/user/app/templates/settings.emblem index 2be4283a..ea4f76b8 100644 --- a/app/assets/javascripts/user/app/templates/settings.emblem +++ b/app/assets/javascripts/user/app/templates/settings.emblem @@ -8,3 +8,7 @@ .display-row .display-label   .display-field: a.button href="./index.html"=t 'settings.reload_application' +.row + .small-8.columns: input#debug-eval-string + .small-4.columns: button{action "evalDebugString"} Debug +.row: .small-12.columns: pre.panel.debug-info diff --git a/config/deploy.rb b/config/deploy.rb index 83c9e576..231f72f3 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,5 +1,6 @@ # config valid only for Capistrano 3.1 # lock '3.2.1' +require 'capistrano/local_precompile' set :application, 'mozo.bar' #set :repo_url, 'root@uflows.com:/var/git/qwaiter.git' diff --git a/config/version b/config/version index b2160230..ea3f0d7a 100644 --- a/config/version +++ b/config/version @@ -1 +1 @@ -0.9.21 +0.9.22