diff --git a/.travis.yml b/.travis.yml index 8931690f5..275a12af1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: ruby +cache: bundler env: - DB=postgresql bundler_args: --without development staging production diff --git a/Gemfile b/Gemfile index 0f9ba3511..cfde3779e 100644 --- a/Gemfile +++ b/Gemfile @@ -139,8 +139,6 @@ group :development, :test do # debug gem 'pry', '0.10.1' - # code review - gem 'rubycritic', '3.2.0' gem 'bullet', '4.14.7' # for finding database optimizations gem 'bundler-audit' gem 'brakeman', '3.6.1', require: false # for security audit' diff --git a/Gemfile.lock b/Gemfile.lock index 3495e9eea..dd9d7d8bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -141,8 +141,6 @@ GEM xpath (~> 2.0) chronic (0.10.2) cliver (0.3.2) - codeclimate-engine-rb (0.4.0) - virtus (~> 1.0) codeclimate-test-reporter (1.0.8) simplecov (<= 0.13) coderay (1.1.0) @@ -195,15 +193,6 @@ GEM ffi (1.9.18) figaro (1.1.1) thor (~> 0.14) - flay (2.8.1) - erubis (~> 2.7.0) - path_expander (~> 1.0) - ruby_parser (~> 3.0) - sexp_processor (~> 4.0) - flog (4.6.1) - path_expander (~> 1.0) - ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.8) formatador (0.2.5) globalid (0.3.7) activesupport (>= 4.1.0) @@ -297,7 +286,7 @@ GEM loofah (2.0.3) nokogiri (>= 1.5.9) lumberjack (1.0.11) - mail (2.6.4) + mail (2.6.5) mime-types (>= 1.16, < 4) method_source (0.8.2) mime-types (3.1) @@ -333,7 +322,6 @@ GEM orm_adapter (0.5.0) parser (2.4.0.0) ast (~> 2.2) - path_expander (1.0.1) pdfkit (0.6.2) pg (0.19.0) phantomjs (1.9.8.0) @@ -405,10 +393,6 @@ GEM rb-inotify (0.9.8) ffi (>= 0.5.0) rdoc (4.3.0) - reek (4.6.1) - codeclimate-engine-rb (~> 0.4.0) - parser (>= 2.3.1.2, < 2.5) - rainbow (~> 2.0) ref (2.0.0) request_store (1.1.0) responders (2.3.0) @@ -448,15 +432,6 @@ GEM ruby_dep (1.5.0) ruby_parser (3.8.4) sexp_processor (~> 4.1) - rubycritic (3.2.0) - flay (~> 2.8) - flog (~> 4.4) - launchy (= 2.4.3) - parser (= 2.4.0) - rainbow (~> 2.1) - reek (~> 4.4) - ruby_parser (~> 3.8) - virtus (~> 1.0) safe_yaml (1.0.4) sass (3.4.23) sass-rails (5.0.6) @@ -620,7 +595,6 @@ DEPENDENCIES rest-client rspec-rails (~> 3.5) rubocop (= 0.48.1) - rubycritic (= 3.2.0) sass-rails (= 5.0.6) sdoc (= 0.4.1) select2-rails (= 3.5.9.3) diff --git a/bin/robot b/bin/robot index a9255c78d..864ed6b52 100755 --- a/bin/robot +++ b/bin/robot @@ -58,9 +58,6 @@ BCODE=0 # tmp bundle exec brakeman -q echo "END_OF_SECURITY_RESULTS" -# update code review -bundle exec rubycritic app lib - if [ $RCODE == 0 ] && [ $TCODE == 0 ] &&[ $BCODE == 0 ]; then exit 0 else diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..53c3cead5 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,14 @@ +preload_app! + +threads 1, 4 +workers 2 + +on_worker_boot do + ActiveSupport.on_load(:active_record) do + ActiveRecord::Base.establish_connection + end +end + +before_fork do + ActiveRecord::Base.connection_pool.disconnect! +end