From 505bab709e8fcaa30c6c613b369b65df7119eac2 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 11:13:14 +0200 Subject: [PATCH 1/7] removed deploy comments --- config/deploy.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index b56205c06..a7ae1fe1d 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -91,8 +91,6 @@ task deploy: :environment do to :launch do queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt" - #queue 'RAILS_ENV=production bin/delayed_job stop' - #queue 'RAILS_ENV=production bin/delayed_job start' end end end From fd5e84bd62310972f8416ea1c2649a9c2f44c8cd Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 11:19:32 +0200 Subject: [PATCH 2/7] Settings now honor empty database --- config/initializers/initial_settings.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/config/initializers/initial_settings.rb b/config/initializers/initial_settings.rb index 05f2a9863..7a00d673c 100644 --- a/config/initializers/initial_settings.rb +++ b/config/initializers/initial_settings.rb @@ -1,7 +1,9 @@ -Setting.disclosure_name = true if Setting.disclosure_name.nil? -Setting.disclosure_name = true if Setting.disclosure_name.nil? -Setting.disclosure_org_name = true if Setting.disclosure_org_name.nil? -Setting.disclosure_email = true if Setting.disclosure_email.nil? -Setting.disclosure_phone = false if Setting.disclosure_phone.nil? -Setting.disclosure_fax = false if Setting.disclosure_fax.nil? -Setting.disclosure_address = false if Setting.disclosure_address.nil? +if ActiveRecord::Base.connection.table_exists? 'settings' # otherwise rake not working 100% + Setting.disclosure_name = true if Setting.disclosure_name.nil? + Setting.disclosure_name = true if Setting.disclosure_name.nil? + Setting.disclosure_org_name = true if Setting.disclosure_org_name.nil? + Setting.disclosure_email = true if Setting.disclosure_email.nil? + Setting.disclosure_phone = false if Setting.disclosure_phone.nil? + Setting.disclosure_fax = false if Setting.disclosure_fax.nil? + Setting.disclosure_address = false if Setting.disclosure_address.nil? +end From e59152c12b11f287363402b389231b3d95c29de8 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 14:25:15 +0200 Subject: [PATCH 3/7] replaced web-console with better_errors gem --- Gemfile | 5 +++-- Gemfile.lock | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 2738056d6..db17f0678 100644 --- a/Gemfile +++ b/Gemfile @@ -145,8 +145,9 @@ group :development, :test do gem 'rubocop', '~> 0.26.1' gem 'guard-rubocop', '~> 1.1.0' - # for quick debugging - gem 'web-console', '~> 2.0.0.beta4' + # for improved errors + gem 'better_errors', '~> 2.0.0' + gem 'binding_of_caller', '~> 0.7.2' # for finding dead routes and unused actions gem 'traceroute', '~> 0.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index c3132945d..2af4db115 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,6 +38,10 @@ GEM ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) bcrypt (3.1.7) + better_errors (2.0.0) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.3.pre1) debug_inspector (>= 0.0.1) bootstrap-sass (3.2.0.2) @@ -352,11 +356,6 @@ GEM equalizer (~> 0.0, >= 0.0.9) warden (1.2.3) rack (>= 1.0) - web-console (2.0.0.beta4) - activemodel (~> 4.0) - binding_of_caller (= 0.7.3.pre1) - railties (~> 4.0) - sprockets-rails (>= 2.0, < 4.0) websocket-driver (0.3.5) whenever (0.9.4) chronic (>= 0.6.3) @@ -368,6 +367,8 @@ PLATFORMS DEPENDENCIES activerecord-import (~> 0.6.0) + better_errors (~> 2.0.0) + binding_of_caller (~> 0.7.2) bootstrap-sass (~> 3.2.0.1) brakeman (~> 2.6.2) bullet (~> 4.14.0) @@ -419,5 +420,4 @@ DEPENDENCIES uglifier (>= 1.3.0) unicorn uuidtools (~> 2.1.4) - web-console (~> 2.0.0.beta4) whenever (~> 0.9.4) From 882161807d797e1bdf313e65b9a858c6ee6b89b9 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 15:06:10 +0200 Subject: [PATCH 4/7] added rspec commond to spring and require missing libs --- Gemfile | 1 + Gemfile.lock | 3 +++ spec/rails_helper.rb | 1 + 3 files changed, 5 insertions(+) diff --git a/Gemfile b/Gemfile index db17f0678..0c2a877d9 100644 --- a/Gemfile +++ b/Gemfile @@ -133,6 +133,7 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. # Read more: https://github.com/rails/spring gem 'spring', '~> 1.2.0' + gem 'spring-commands-rspec', '~> 1.0.2' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 2af4db115..3175db835 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -310,6 +310,8 @@ GEM tilt (>= 1.3.3, < 2.1) slop (3.6.0) spring (1.2.0) + spring-commands-rspec (1.0.2) + spring (>= 0.9.1) sprockets (2.8.0) hike (~> 1.2) multi_json (~> 1.0) @@ -414,6 +416,7 @@ DEPENDENCIES simplecov (~> 0.9.1) simpleidn (~> 0.0.5) spring (~> 1.2.0) + spring-commands-rspec (~> 1.0.2) therubyracer traceroute (~> 0.4.0) turbolinks diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 338fa88d6..9ebf88da9 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -5,6 +5,7 @@ require File.expand_path('../../config/environment', __FILE__) require 'rspec/rails' require 'shoulda/matchers' require 'capybara/poltergeist' +require 'paper_trail/frameworks/rspec' if ENV['ROBOT'] require 'simplecov' From 78e7dc28973a8589dfd2121dd742f088821f04b7 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 16:42:59 +0200 Subject: [PATCH 5/7] tmp turn off spring --- Gemfile | 4 ++-- Gemfile.lock | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 0c2a877d9..d1b2d7dc6 100644 --- a/Gemfile +++ b/Gemfile @@ -132,8 +132,8 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. # Read more: https://github.com/rails/spring - gem 'spring', '~> 1.2.0' - gem 'spring-commands-rspec', '~> 1.0.2' + # gem 'spring', '~> 1.2.0' + # gem 'spring-commands-rspec', '~> 1.0.2' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 3175db835..9496fd11f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -309,9 +309,6 @@ GEM temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) slop (3.6.0) - spring (1.2.0) - spring-commands-rspec (1.0.2) - spring (>= 0.9.1) sprockets (2.8.0) hike (~> 1.2) multi_json (~> 1.0) @@ -415,8 +412,6 @@ DEPENDENCIES shoulda-matchers (~> 2.6.1) simplecov (~> 0.9.1) simpleidn (~> 0.0.5) - spring (~> 1.2.0) - spring-commands-rspec (~> 1.0.2) therubyracer traceroute (~> 0.4.0) turbolinks From 3255f20ed0cd7f1f6e0f911b26d6cbce2a6453e9 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 17:06:20 +0200 Subject: [PATCH 6/7] move dev only gems into dev group --- Gemfile | 39 +++++++++++++++++++++------------------ Gemfile.lock | 5 +++++ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index d1b2d7dc6..8ada9d0b7 100644 --- a/Gemfile +++ b/Gemfile @@ -130,14 +130,29 @@ group :development, :test do # for security audit' gem 'brakeman', '~> 2.6.2', require: false - # Spring speeds up development by keeping your application running in the background. - # Read more: https://github.com/rails/spring - # gem 'spring', '~> 1.2.0' - # gem 'spring-commands-rspec', '~> 1.0.2' - # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0' + # faster dev load time + gem 'unicorn' +end + +group :development do + # Spring speeds up development by keeping your application running in the background. + # Read more: https://github.com/rails/spring + gem 'spring', '~> 1.2.0' + gem 'spring-commands-rspec', '~> 1.0.2' + + # for fast deployment + gem 'mina', '~> 0.3.1' + + # for finding dead routes and unused actions + gem 'traceroute', '~> 0.4.0' + + # for improved errors + gem 'better_errors', '~> 2.0.0' + gem 'binding_of_caller', '~> 0.7.2' + # run tests automatically gem 'guard', '~> 2.6.1' @@ -145,17 +160,5 @@ group :development, :test do gem 'guard-rspec', '~> 4.3.1' gem 'rubocop', '~> 0.26.1' gem 'guard-rubocop', '~> 1.1.0' - - # for improved errors - gem 'better_errors', '~> 2.0.0' - gem 'binding_of_caller', '~> 0.7.2' - - # for finding dead routes and unused actions - gem 'traceroute', '~> 0.4.0' - - # faster dev load time - gem 'unicorn' - - # for fast deployment - gem 'mina', '~> 0.3.1' end + diff --git a/Gemfile.lock b/Gemfile.lock index 9496fd11f..3175db835 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -309,6 +309,9 @@ GEM temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) slop (3.6.0) + spring (1.2.0) + spring-commands-rspec (1.0.2) + spring (>= 0.9.1) sprockets (2.8.0) hike (~> 1.2) multi_json (~> 1.0) @@ -412,6 +415,8 @@ DEPENDENCIES shoulda-matchers (~> 2.6.1) simplecov (~> 0.9.1) simpleidn (~> 0.0.5) + spring (~> 1.2.0) + spring-commands-rspec (~> 1.0.2) therubyracer traceroute (~> 0.4.0) turbolinks From f84fb4389e2f169d2e6b2261a598f394bd2f48ab Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 3 Dec 2014 17:15:58 +0200 Subject: [PATCH 7/7] removed blank line --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8ada9d0b7..00fb92d3e 100644 --- a/Gemfile +++ b/Gemfile @@ -161,4 +161,3 @@ group :development do gem 'rubocop', '~> 0.26.1' gem 'guard-rubocop', '~> 1.1.0' end -