From 700f42f9ea2f9d5631a4ecc32a1bafc2922fd3e1 Mon Sep 17 00:00:00 2001 From: echarp Date: Tue, 1 Nov 2016 00:30:10 +0100 Subject: [PATCH] Added guard-rails to automatically restart rails when need, and bundle audit, to scheck for security issues --- Gemfile | 4 +++- Gemfile.lock | 24 +++++++++++++----------- Guardfile | 5 +++++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 9c974eaa..e830e4a7 100644 --- a/Gemfile +++ b/Gemfile @@ -50,7 +50,6 @@ gem 'differ' gem 'activeadmin', '~> 1.0.0.pre4' # A nicer markdown editor in active admin gem 'activeadmin_pagedown' -gem 'inherited_resources', github: 'activeadmin/inherited_resources' gem 'jquery-sparkline-rails', github: 'cubus/jquery-sparkline-rails' @@ -80,6 +79,7 @@ group :development do # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console' + gem 'guard-rails', require: false gem 'guard-migrate', require: false gem 'guard-bundler', require: false gem 'guard-rubocop', require: false @@ -104,6 +104,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' + + gem 'bundler-audit' end group :development, :test, :assets do diff --git a/Gemfile.lock b/Gemfile.lock index 75bedc9f..b02a0be4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,3 @@ -GIT - remote: git://github.com/activeadmin/inherited_resources.git - revision: 4434f0ae72f790cf371728838c927c338100555d - specs: - inherited_resources (1.6.0) - actionpack (>= 3.2, < 5.1) - has_scope (~> 0.6) - railties (>= 3.2, < 5.1) - responders - GIT remote: git://github.com/cubus/jquery-sparkline-rails.git revision: c5b531f51e3e734710c7561b06c2c829107f9b38 @@ -91,6 +81,9 @@ GEM brakeman (3.4.0) buftok (0.2.0) builder (3.2.2) + bundler-audit (0.5.0) + bundler (~> 1.2) + thor (~> 0.18) byebug (9.0.6) coderay (1.1.1) coffee-rails (4.2.1) @@ -163,6 +156,9 @@ GEM guard-minitest (2.4.6) guard-compat (~> 1.2) minitest (>= 3.0) + guard-rails (0.8.0) + guard (~> 2.11) + guard-compat (~> 1.0) guard-rubocop (1.2.0) guard (~> 2.0) rubocop (~> 0.20) @@ -200,6 +196,11 @@ GEM http_parser.rb (0.6.0) i18n (0.7.0) ice_cube (0.14.0) + inherited_resources (1.6.0) + actionpack (>= 3.2, < 5) + has_scope (~> 0.6.0.rc) + railties (>= 3.2, < 5) + responders jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) @@ -412,6 +413,7 @@ DEPENDENCIES activeadmin (~> 1.0.0.pre4) activeadmin_pagedown brakeman + bundler-audit byebug coffee-rails devise @@ -425,6 +427,7 @@ DEPENDENCIES guard-livereload guard-migrate guard-minitest + guard-rails guard-rubocop haml-rails haml_lint @@ -433,7 +436,6 @@ DEPENDENCIES http_accept_language i18n-active_record! ice_cube - inherited_resources! jbuilder jquery-rails (< 4.1) jquery-sparkline-rails! diff --git a/Guardfile b/Guardfile index 5c00156e..37d5ca2e 100644 --- a/Guardfile +++ b/Guardfile @@ -43,3 +43,8 @@ guard 'migrate' do watch(%r{^db/migrate/(\d+).+\.rb}) watch('db/seeds.rb') end + +guard :rails, port: 3000, host: '0.0.0.0' do + watch('Gemfile.lock') + watch(%r{^(config|lib)/.*}) +end