From a52d2c6b709cfbdf1789a187543ac1e776c0186f Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Fri, 2 Feb 2018 08:17:04 -0500 Subject: [PATCH 01/12] Reload tournament matches so generateweight moves finals to the last round as well --- app/services/tournament_services/generate_tournament_matches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/tournament_services/generate_tournament_matches.rb b/app/services/tournament_services/generate_tournament_matches.rb index 02e8751..35fef43 100644 --- a/app/services/tournament_services/generate_tournament_matches.rb +++ b/app/services/tournament_services/generate_tournament_matches.rb @@ -54,7 +54,7 @@ class GenerateTournamentMatches def moveFinalsMatchesToLastRound finalsRound = @tournament.totalRounds - finalsMatches = @tournament.matches.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"} + finalsMatches = @tournament.matches.reload.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"} finalsMatches. each do |m| m.round = finalsRound m.save From 81158be5754df132040fc5e0f08e17b3af89113a Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 24 Apr 2018 08:55:50 -0400 Subject: [PATCH 02/12] Use git to find project_dir --- bin/fix-permissions.sh | 2 +- bin/rails-dev-db-create.sh | 2 +- bin/rails-dev-run.sh | 2 +- bin/run-all-tests.sh | 2 +- bin/tmux.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/fix-permissions.sh b/bin/fix-permissions.sh index a675e38..f57694f 100755 --- a/bin/fix-permissions.sh +++ b/bin/fix-permissions.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(git rev-parse --show-toplevel)" USERNAME=$USER sudo chown -R ${USERNAME}:${USERNAME} ${project_dir}/. diff --git a/bin/rails-dev-db-create.sh b/bin/rails-dev-db-create.sh index aa63596..90d019e 100755 --- a/bin/rails-dev-db-create.sh +++ b/bin/rails-dev-db-create.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(git rev-parse --show-toplevel)" cd ${project_dir} rake db:setup diff --git a/bin/rails-dev-run.sh b/bin/rails-dev-run.sh index 52feef9..cada0b5 100755 --- a/bin/rails-dev-run.sh +++ b/bin/rails-dev-run.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(git rev-parse --show-toplevel)" if [ $# != 1 ]; then echo "Please enter docker image name for the rails development environment" diff --git a/bin/run-all-tests.sh b/bin/run-all-tests.sh index 961a6e7..d68f1ed 100755 --- a/bin/run-all-tests.sh +++ b/bin/run-all-tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(git rev-parse --show-toplevel)" cd ${project_dir} rake db:migrate RAILS_ENV=test diff --git a/bin/tmux.sh b/bin/tmux.sh index c928539..84faed5 100755 --- a/bin/tmux.sh +++ b/bin/tmux.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(git rev-parse --show-toplevel)" cd ${project_dir} CURRENT_SESSION=wrestlingdev From a8ee3ffa616ab8f4451e36bb06ceceb7337ac4cd Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 08:11:03 -0400 Subject: [PATCH 03/12] Revert "Use git to find project_dir" This reverts commit 81158be5754df132040fc5e0f08e17b3af89113a. --- bin/fix-permissions.sh | 2 +- bin/rails-dev-db-create.sh | 2 +- bin/rails-dev-run.sh | 2 +- bin/run-all-tests.sh | 2 +- bin/tmux.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/fix-permissions.sh b/bin/fix-permissions.sh index f57694f..a675e38 100755 --- a/bin/fix-permissions.sh +++ b/bin/fix-permissions.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(git rev-parse --show-toplevel)" +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" USERNAME=$USER sudo chown -R ${USERNAME}:${USERNAME} ${project_dir}/. diff --git a/bin/rails-dev-db-create.sh b/bin/rails-dev-db-create.sh index 90d019e..aa63596 100755 --- a/bin/rails-dev-db-create.sh +++ b/bin/rails-dev-db-create.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(git rev-parse --show-toplevel)" +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" cd ${project_dir} rake db:setup diff --git a/bin/rails-dev-run.sh b/bin/rails-dev-run.sh index cada0b5..52feef9 100755 --- a/bin/rails-dev-run.sh +++ b/bin/rails-dev-run.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -project_dir="$(git rev-parse --show-toplevel)" +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" if [ $# != 1 ]; then echo "Please enter docker image name for the rails development environment" diff --git a/bin/run-all-tests.sh b/bin/run-all-tests.sh index d68f1ed..961a6e7 100755 --- a/bin/run-all-tests.sh +++ b/bin/run-all-tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(git rev-parse --show-toplevel)" +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" cd ${project_dir} rake db:migrate RAILS_ENV=test diff --git a/bin/tmux.sh b/bin/tmux.sh index 84faed5..c928539 100755 --- a/bin/tmux.sh +++ b/bin/tmux.sh @@ -1,5 +1,5 @@ #!/bin/bash -project_dir="$(git rev-parse --show-toplevel)" +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" cd ${project_dir} CURRENT_SESSION=wrestlingdev From 37c106fb069ccb535d841c1d5d0d2e01a1acbcf6 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 12:55:23 +0000 Subject: [PATCH 04/12] Fixed depricated callback --- app/models/match.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index 711c680..ac3bc7c 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -3,8 +3,8 @@ class Match < ActiveRecord::Base belongs_to :weight, touch: true belongs_to :mat, touch: true has_many :wrestlers, :through => :weight - after_update :after_finished_actions, :if => :finished_changed? - after_update :after_finished_actions, :if => :winner_id_changed? + after_update :after_finished_actions, :if => :saved_change_to_finished? + after_update :after_finished_actions, :if => :saved_change_to_winner_id? def after_finished_actions if self.finished == 1 && self.winner_id != nil From d3ae73cb4a4563e9e5c289dcfce7c1d561fa9a0b Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 12:55:44 +0000 Subject: [PATCH 05/12] Run travis tests with docker --- .travis.yml | 8 ++++++-- bin/run-tests-with-docker.sh | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 bin/run-tests-with-docker.sh diff --git a/.travis.yml b/.travis.yml index 4962705..6fce4c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,15 @@ +sudo: required language: ruby +services: + - docker rvm: - 2.4.2 env: - DB=sqlite script: -- RAILS_ENV=test bundle exec rake db:migrate --trace -- bundle exec rake test +#- RAILS_ENV=test bundle exec rake db:migrate --trace +#- bundle exec rake test +- bash bin/run-tests-with-docker.sh deploy: provider: heroku api_key: diff --git a/bin/run-tests-with-docker.sh b/bin/run-tests-with-docker.sh new file mode 100644 index 0000000..5a5dd94 --- /dev/null +++ b/bin/run-tests-with-docker.sh @@ -0,0 +1,5 @@ +#!/bin/bash +project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" + +docker build -f ${project_dir}/deploy/rails-prod-Dockerfile -t wrestlingdevtests ${project_dir}/. +docker run -it wrestlingdevtests bash /rails/bin/run-all-tests.sh From ffcd33903fd9b891eeb47f479b3a2c171575363f Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 13:53:11 +0000 Subject: [PATCH 06/12] Removed old rvm travis tests --- .travis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6fce4c9..1e06af7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,7 @@ sudo: required -language: ruby services: - docker -rvm: -- 2.4.2 -env: -- DB=sqlite script: -#- RAILS_ENV=test bundle exec rake db:migrate --trace -#- bundle exec rake test - bash bin/run-tests-with-docker.sh deploy: provider: heroku From 533f0e089017d98a0400d7d0e301416763838d27 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 14:01:55 +0000 Subject: [PATCH 07/12] Revert "Removed old rvm travis tests" This reverts commit ffcd33903fd9b891eeb47f479b3a2c171575363f. --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1e06af7..6fce4c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,14 @@ sudo: required +language: ruby services: - docker +rvm: +- 2.4.2 +env: +- DB=sqlite script: +#- RAILS_ENV=test bundle exec rake db:migrate --trace +#- bundle exec rake test - bash bin/run-tests-with-docker.sh deploy: provider: heroku From 5bd97b923a403aebde166dca02d76b01686c5a42 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 17:17:38 +0000 Subject: [PATCH 08/12] Added brakeman to running tests and added a silencer for secret key --- bin/run-all-tests.sh | 1 + config/brakeman.ignore | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 config/brakeman.ignore diff --git a/bin/run-all-tests.sh b/bin/run-all-tests.sh index 961a6e7..266674c 100755 --- a/bin/run-all-tests.sh +++ b/bin/run-all-tests.sh @@ -3,4 +3,5 @@ project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" cd ${project_dir} rake db:migrate RAILS_ENV=test +brakeman rake test diff --git a/config/brakeman.ignore b/config/brakeman.ignore new file mode 100644 index 0000000..9cf104b --- /dev/null +++ b/config/brakeman.ignore @@ -0,0 +1,22 @@ +{ + "ignored_warnings": [ + { + "warning_type": "Session Setting", + "warning_code": 29, + "fingerprint": "715ad9c0d76f57a6a657192574d528b620176a80fec969e2f63c88eacab0b984", + "check_name": "SessionSettings", + "message": "Session secret should not be included in version control", + "file": "config/initializers/secret_token.rb", + "line": 15, + "link": "https://brakemanscanner.org/docs/warning_types/session_setting/", + "code": null, + "render_path": null, + "location": null, + "user_input": null, + "confidence": "High", + "note": "This is an environment variable for production and embedded for test and dev" + } + ], + "updated": "2018-05-03 17:15:51 +0000", + "brakeman_version": "4.2.1" +} From a2f3d836ecabb56e45655a894845f7d4998f72c1 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 18:04:29 +0000 Subject: [PATCH 09/12] Updated gems --- Gemfile.lock | 97 +++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ee86618..48db22c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,14 +39,14 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) arel (8.0.0) - ast (2.3.0) + ast (2.4.0) bcrypt (3.1.11) - brakeman (4.0.1) + brakeman (4.2.1) builder (3.2.3) - bullet (5.7.0) + bullet (5.7.5) activesupport (>= 3.0.0) - uniform_notifier (~> 1.10.0) - cancancan (2.1.2) + uniform_notifier (~> 1.11.0) + cancancan (2.2.0) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -55,35 +55,34 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.0.5) - crass (1.0.3) - dalli (2.7.6) - delayed_job (4.1.3) - activesupport (>= 3.0, < 5.2) - delayed_job_active_record (4.1.2) - activerecord (>= 3.0, < 5.2) + crass (1.0.4) + dalli (2.7.8) + delayed_job (4.1.5) + activesupport (>= 3.0, < 5.3) + delayed_job_active_record (4.1.3) + activerecord (>= 3.0, < 5.3) delayed_job (>= 3.0, < 5) - devise (4.3.0) + devise (4.4.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.2) + railties (>= 4.1.0, < 6.0) responders warden (~> 1.2.3) - erubi (1.7.0) + erubi (1.7.1) execjs (2.7.0) globalid (0.4.1) activesupport (>= 4.2.0) - i18n (0.9.1) + i18n (0.9.5) concurrent-ruby (~> 1.0) jbuilder (2.7.0) activesupport (>= 4.2.0) multi_json (>= 1.2) - jquery-rails (4.3.1) + jquery-rails (4.3.3) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.6) libv8 (3.16.14.19) - loofah (2.1.1) + loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -91,21 +90,21 @@ GEM method_source (0.9.0) mini_mime (1.0.0) mini_portile2 (2.3.0) - minitest (5.10.3) - multi_json (1.12.2) - mysql2 (0.4.10) - newrelic_rpm (4.6.0.338) - nio4r (2.1.0) - nokogiri (1.8.1) + minitest (5.11.3) + multi_json (1.13.1) + mysql2 (0.5.1) + newrelic_rpm (5.1.0.344) + nio4r (2.3.1) + nokogiri (1.8.2) mini_portile2 (~> 2.3.0) orm_adapter (0.5.0) - parallel (1.12.0) - parser (2.4.0.2) - ast (~> 2.3) + parallel (1.12.1) + parser (2.5.1.0) + ast (~> 2.4.0) powerpack (0.1.1) - puma (3.11.0) - rack (2.0.3) - rack-test (0.8.2) + puma (3.11.4) + rack (2.0.5) + rack-test (1.0.0) rack (>= 1.0, < 3) rails (5.1.4) actioncable (= 5.1.4) @@ -122,8 +121,8 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) + rails-html-sanitizer (1.0.4) + loofah (~> 2.2, >= 2.2.2) rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging @@ -135,27 +134,25 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.2.2) - rake - rake (12.3.0) + rainbow (3.0.0) + rake (12.3.1) rb-readline (0.5.5) - rdoc (4.3.0) + rdoc (6.0.3) ref (2.0.0) responders (2.4.0) actionpack (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3) round_robin_tournament (0.0.1) - rubocop (0.51.0) + rubocop (0.55.0) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) - rainbow (>= 2.2.2, < 3.0) + rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.9.0) - sdoc (0.4.2) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) + sdoc (1.0.0) + rdoc (>= 5.0) spring (2.0.2) activesupport (>= 4.2) sprockets (3.7.1) @@ -171,15 +168,15 @@ GEM ref thor (0.20.0) thread_safe (0.3.6) - turbolinks (5.0.1) - turbolinks-source (~> 5) - turbolinks-source (5.0.3) - tzinfo (1.2.4) + turbolinks (5.1.1) + turbolinks-source (~> 5.1) + turbolinks-source (5.1.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.0.2) + uglifier (4.1.10) execjs (>= 0.3.0, < 3) - unicode-display_width (1.3.0) - uniform_notifier (1.10.0) + unicode-display_width (1.3.2) + uniform_notifier (1.11.0) warden (1.2.7) rack (>= 1.0) websocket-driver (0.6.5) @@ -218,4 +215,4 @@ RUBY VERSION ruby 2.4.2p198 BUNDLED WITH - 1.16.0 + 1.16.1 From 5c1975ff44df1abc7fd59c08cd3b84eabf3aeed8 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 18:45:25 +0000 Subject: [PATCH 10/12] Updated to Ruby 2.5.1 and Rails 5.2.0 --- .travis.yml | 2 +- Gemfile | 4 +- Gemfile.lock | 88 +++++++++++++++++-------------- bin/run-tests-with-docker.sh | 2 +- deploy/.rails-dev-Dockerfile.swp | Bin 12288 -> 0 bytes deploy/rails-dev-Dockerfile | 2 +- deploy/rails-prod-Dockerfile | 5 +- 7 files changed, 56 insertions(+), 47 deletions(-) delete mode 100644 deploy/.rails-dev-Dockerfile.swp diff --git a/.travis.yml b/.travis.yml index 6fce4c9..a3e426c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: ruby services: - docker rvm: -- 2.4.2 +- 2.5.1 env: - DB=sqlite script: diff --git a/Gemfile b/Gemfile index 2457e8d..0a4dc97 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -ruby '2.4.2' +ruby '2.5.1' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '5.1.4' +gem 'rails', '5.2.0' # Use sqlite3 as the database for Active Record gem 'sqlite3', :group => :development diff --git a/Gemfile.lock b/Gemfile.lock index 48db22c..54beb54 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,44 +1,48 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.1.4) - actionpack (= 5.1.4) + actioncable (5.2.0) + actionpack (= 5.2.0) nio4r (~> 2.0) - websocket-driver (~> 0.6.1) - actionmailer (5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) + websocket-driver (>= 0.6.1) + actionmailer (5.2.0) + actionpack (= 5.2.0) + actionview (= 5.2.0) + activejob (= 5.2.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.4) - actionview (= 5.1.4) - activesupport (= 5.1.4) + actionpack (5.2.0) + actionview (= 5.2.0) + activesupport (= 5.2.0) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.4) - activesupport (= 5.1.4) + actionview (5.2.0) + activesupport (= 5.2.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.1.4) - activesupport (= 5.1.4) + activejob (5.2.0) + activesupport (= 5.2.0) globalid (>= 0.3.6) - activemodel (5.1.4) - activesupport (= 5.1.4) - activerecord (5.1.4) - activemodel (= 5.1.4) - activesupport (= 5.1.4) - arel (~> 8.0) - activesupport (5.1.4) + activemodel (5.2.0) + activesupport (= 5.2.0) + activerecord (5.2.0) + activemodel (= 5.2.0) + activesupport (= 5.2.0) + arel (>= 9.0) + activestorage (5.2.0) + actionpack (= 5.2.0) + activerecord (= 5.2.0) + marcel (~> 0.3.1) + activesupport (5.2.0) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) + i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - arel (8.0.0) + arel (9.0.0) ast (2.4.0) bcrypt (3.1.11) brakeman (4.2.1) @@ -72,7 +76,7 @@ GEM execjs (2.7.0) globalid (0.4.1) activesupport (>= 4.2.0) - i18n (0.9.5) + i18n (1.0.1) concurrent-ruby (~> 1.0) jbuilder (2.7.0) activesupport (>= 4.2.0) @@ -87,7 +91,10 @@ GEM nokogiri (>= 1.5.9) mail (2.7.0) mini_mime (>= 0.1.1) + marcel (0.3.2) + mimemagic (~> 0.3.2) method_source (0.9.0) + mimemagic (0.3.2) mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.11.3) @@ -106,17 +113,18 @@ GEM rack (2.0.5) rack-test (1.0.0) rack (>= 1.0, < 3) - rails (5.1.4) - actioncable (= 5.1.4) - actionmailer (= 5.1.4) - actionpack (= 5.1.4) - actionview (= 5.1.4) - activejob (= 5.1.4) - activemodel (= 5.1.4) - activerecord (= 5.1.4) - activesupport (= 5.1.4) + rails (5.2.0) + actioncable (= 5.2.0) + actionmailer (= 5.2.0) + actionpack (= 5.2.0) + actionview (= 5.2.0) + activejob (= 5.2.0) + activemodel (= 5.2.0) + activerecord (= 5.2.0) + activestorage (= 5.2.0) + activesupport (= 5.2.0) bundler (>= 1.3.0) - railties (= 5.1.4) + railties (= 5.2.0) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) @@ -128,9 +136,9 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (5.1.4) - actionpack (= 5.1.4) - activesupport (= 5.1.4) + railties (5.2.0) + actionpack (= 5.2.0) + activesupport (= 5.2.0) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -179,7 +187,7 @@ GEM uniform_notifier (1.11.0) warden (1.2.7) rack (>= 1.0) - websocket-driver (0.6.5) + websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) @@ -199,7 +207,7 @@ DEPENDENCIES mysql2 newrelic_rpm puma - rails (= 5.1.4) + rails (= 5.2.0) rails_12factor rb-readline round_robin_tournament @@ -212,7 +220,7 @@ DEPENDENCIES uglifier RUBY VERSION - ruby 2.4.2p198 + ruby 2.5.1p57 BUNDLED WITH 1.16.1 diff --git a/bin/run-tests-with-docker.sh b/bin/run-tests-with-docker.sh index 5a5dd94..abac17f 100644 --- a/bin/run-tests-with-docker.sh +++ b/bin/run-tests-with-docker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" docker build -f ${project_dir}/deploy/rails-prod-Dockerfile -t wrestlingdevtests ${project_dir}/. diff --git a/deploy/.rails-dev-Dockerfile.swp b/deploy/.rails-dev-Dockerfile.swp deleted file mode 100644 index 95e684a66b8f6a2675103a245ac48d37805a0c5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2y>1jS5P%&-NeF@$a4u2=k@kG~K|~ah0vAvOmxGHg{0qFhzB?1Iy|KNCLP6+w z0iJ*dfQEvGJOK3RprZl_L`%c?Zu6rkQfgoFvwOR7DLr7xM%`ko32zjYkKQ4_t4~fi*+&H#jh4V`4F5I{u%;z~vMXn5_aj9Gc zt5Mw~tHO4q632GH1T=sKjxi*5;5YR84txW?0H1+Rz(-&k_yC0cya8~a0W^RH&;S}h184vZpaC?12L4k6R~vQ8 zVyRioT@T*C?%rxHFVN{)4L<5zY2Iu%7U+Y@;M?iSBSPluby}r^n21U z71@Cz+C(-r36u-JWZA_MLdVCc(lm0E70xo(<5sX|MhmGshRtWf%7n8evGMqxv8$8` zpD<+-uDr}d|8AQdnxzl>8xTp)(8}Qo6*@Oa5BG;YkUd71g{ONHaCDgp>U)AFMtd%` z2pfgL*17GUaAFXK!%jefy)`9c#&geALc?fnjV4NPT~^R0 z6;E9mxHTocm@cEZkSdLYb3%K`)lrr99@r+Vh6j1DO_8VEhoh2ft!9JTBHp|_Rh_9$ Fkw2`=^_Tzv diff --git a/deploy/rails-dev-Dockerfile b/deploy/rails-dev-Dockerfile index 8aa6a7e..1202443 100644 --- a/deploy/rails-dev-Dockerfile +++ b/deploy/rails-dev-Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.4.2 +FROM ruby:2.5.1 RUN apt-get -qq update \ && apt-get -qq install -y \ diff --git a/deploy/rails-prod-Dockerfile b/deploy/rails-prod-Dockerfile index b1b53a4..d04dab6 100644 --- a/deploy/rails-prod-Dockerfile +++ b/deploy/rails-prod-Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.4.2 +FROM ruby:2.5.1 RUN apt-get -qq update \ && DEBIAN_FRONTEND=noninteractive apt-get -qq upgrade -y \ @@ -53,7 +53,8 @@ RUN gem install --no-rdoc --no-ri bundler WORKDIR /tmp COPY Gemfile Gemfile COPY Gemfile.lock Gemfile.lock -RUN bundle install --without test +#RUN bundle install --without test +RUN bundle install # Copy site into place. RUN mkdir /rails From fc3b7694d3f8a03395fe41bdc90b6740e6e6c417 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Thu, 3 May 2018 19:20:53 +0000 Subject: [PATCH 11/12] Fixing brakeman on CI --- bin/run-all-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/run-all-tests.sh b/bin/run-all-tests.sh index 266674c..2a50b7d 100755 --- a/bin/run-all-tests.sh +++ b/bin/run-all-tests.sh @@ -3,5 +3,5 @@ project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" cd ${project_dir} rake db:migrate RAILS_ENV=test -brakeman +CI=true brakeman rake test From 31025ff8331a9d0655a6390a73c1b2ae06901231 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Fri, 6 Jul 2018 14:09:09 -0400 Subject: [PATCH 12/12] Added healthcheck to dockerfile --- deploy/rails-prod-Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/rails-prod-Dockerfile b/deploy/rails-prod-Dockerfile index d04dab6..b8c9c83 100644 --- a/deploy/rails-prod-Dockerfile +++ b/deploy/rails-prod-Dockerfile @@ -1,5 +1,7 @@ FROM ruby:2.5.1 +HEALTHCHECK --start-period=30s curl --insecure https://127.0.0.1/ + RUN apt-get -qq update \ && DEBIAN_FRONTEND=noninteractive apt-get -qq upgrade -y \ && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \