diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index ee717ef6ea5..a61ab592059 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -170,10 +170,12 @@ jobs: fi needs_chromedriver: true steps: - - name: Set up Ruby 2.6.5 + - uses: actions/checkout@v3 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.5 + rubygems: 3.3.26 + bundler-cache: true - name: Setup Node.js for use with actions uses: actions/setup-node@v1 if: matrix.command_configs.skip_js != 'true' @@ -185,7 +187,6 @@ jobs: if: matrix.command_configs.skip_js != 'true' with: mongoDBVersion: ${{ matrix.mongodb-version }} - - uses: actions/checkout@v2 - name: Set up Chromedriver if: matrix.command_configs.needs_chromedriver uses: nanasess/setup-chromedriver@master @@ -207,7 +208,7 @@ jobs: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} - name: bundle install run: | - gem install bundler -v '1.17.3' + gem install bundler -v '1.17.3' bundle config path vendor/bundle bundle install --jobs 4 --retry 3 gem install treye-semaphore_test_boosters --version '2.5.1' diff --git a/.ruby-version b/.ruby-version index 57cf282ebbc..5b013b97d6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.5 +2.7.6 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 724294bc302..062299fd7a7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.6.5' +ruby '2.7.6' gem "benefit_markets", path: "components/benefit_markets" gem "benefit_sponsors", path: "components/benefit_sponsors" @@ -21,15 +21,12 @@ gem 'chosen-rails' gem 'ckeditor' gem 'coffee-rails', '~> 4.1.0' gem 'combine_pdf' -gem 'config', '~> 1.0.0' gem 'curl' gem 'devise', '~> 4.5' gem 'effective_datatables', path: './project_gems/effective_datatables-2.6.14' gem 'haml' gem 'httparty' gem 'i18n', '0.7.0' -gem 'interactor', '3.1.0' -gem 'interactor-rails', '2.0.2' gem 'jbuilder', '~> 2.0' gem 'jquery-datatables-rails', '3.4.0' gem 'jquery-rails', '4.0.5' @@ -37,7 +34,6 @@ gem 'jquery-turbolinks' gem 'jquery-ui-rails' gem 'kaminari', '0.17.0' gem 'language_list', '~> 1.1.0' -gem 'less-rails-bootstrap', '~> 3.3.1.0' gem 'mail', '2.6.3' gem 'maskedinput-rails' gem 'money-rails', '~> 1.10.0' @@ -50,8 +46,7 @@ gem 'mongoid-history' gem 'mongoid-versioning' gem 'mongoid_rails_migrations', git: 'https://github.com/adacosta/mongoid_rails_migrations.git', branch: 'master' gem 'mongoid_userstamp' -gem 'nokogiri', '1.9.1' -gem 'nokogiri-happymapper', :require => 'happymapper' + gem 'non-stupid-digest-assets', '~> 1.0', '>= 1.0.9' gem "notifier", path: "components/notifier" gem 'openhbx_cv2', git: 'https://github.com/ideacrew/openhbx_cv2.git', branch: 'trunk' @@ -67,14 +62,12 @@ gem 'redis-rails' gem 'resque' gem 'roo', '~> 2.1.0' gem 'ruby-saml', '~> 1.3.0' -gem 'sass-rails', '~> 5.0' gem 'slim', '~> 3.0.8' gem 'slim-rails' gem 'simple_calendar', :git => 'https://github.com/harshared/simple_calendar' gem "sponsored_benefits", path: "components/sponsored_benefits" gem 'sprockets', '~> 2.12.3' gem 'symmetric-encryption', '~> 3.6.0' -gem 'therubyracer', platforms: :ruby gem "transport_gateway", path: "components/transport_gateway" gem "transport_profiles", path: "components/transport_profiles" gem 'turbolinks', '2.5.3' @@ -86,6 +79,24 @@ gem 'webpacker' gem 'rubyXL' gem 'holidays', '~> 8.6' +#arm64 mac support +gem 'ffi', '1.14.0' +gem 'kostya-sigar', '2.0.10' +gem 'mini_racer', '0.6.4' +gem 'bigdecimal', '1.3.5' +gem 'loofah', '~>2.19.1' +gem 'dry-container', '~> 0.7.2' +gem 'haml-rails', '~> 1.0' +gem 'sassc', '~> 2.0' +gem 'sass-rails', '~> 5' +gem 'config', '~> 2.0' + +gem 'interactor', '~> 3.1' +gem 'interactor-rails', '~> 2.2' + +gem 'nokogiri', '~> 1.11' +gem 'nokogiri-happymapper', :require => 'happymapper' + ####################################################### # Removed gems ####################################################### @@ -136,7 +147,7 @@ end group :test do gem 'action_mailer_cache_delivery', '~> 0.3.7' - gem 'capybara' + gem 'capybara', '3.32.1' gem 'capybara-screenshot' gem 'cucumber', '3.1.2' gem 'cucumber-rails', '1.6.0', :require => false diff --git a/Gemfile.lock b/Gemfile.lock index 745d6ae9021..a6109401c4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GIT remote: https://github.com/adacosta/mongoid_rails_migrations.git - revision: e4e14cdcc6772c114ebed08c9ef8b79b6f362fb1 + revision: 2b8b1c98bac36d0332f7408c0ca2d8a9da308e37 branch: master specs: - mongoid_rails_migrations (1.2.1) + mongoid_rails_migrations (1.5.0) activesupport (>= 4.2.0) bundler (>= 1.0.0) - mongoid (>= 4.0.0) + mongoid (>= 5.0.0) rails (>= 4.2.0) railties (>= 4.2.0) @@ -30,17 +30,17 @@ GIT GIT remote: https://github.com/ideacrew/acapi.git - revision: 8f4b6cf53d7eb98f331c722bbcdf8e21aa265a76 + revision: 8c0493508d22f8603a2446b0efd2d28f6aba27b7 branch: trunk specs: - acapi (1.3.2) + acapi (1.3.4) activesupport (> 4.2.0) - bunny (~> 1.7.0) + bunny (>= 1.7.0, < 3) sneakers GIT remote: https://github.com/ideacrew/openhbx_cv2.git - revision: 6567dd46112982e6a9c90001b617caf313271fc9 + revision: 41f3152d127b141f0c6a8351dc8bd057e758b976 branch: trunk specs: openhbx_cv2 (0.0.1) @@ -49,7 +49,7 @@ GIT GIT remote: https://github.com/ideacrew/resource_registry.git - revision: 7b8f396afde849e584d0a749ade9ee88f1717e26 + revision: d692b7473fe80b17db9fd742c253a9dda912122f branch: trunk specs: resource_registry (0.7.0) @@ -92,7 +92,7 @@ PATH dry-types dry-validation i18n (= 0.7.0) - mini_portile2 (= 2.4.0) + mini_portile2 (~> 2.6.1) mongoid (~> 5.4.0) nokogiri pundit (~> 1.0.1) @@ -117,8 +117,8 @@ PATH dry-schema (~> 1.0) dry-struct dry-validation (~> 1.0) - interactor (= 3.1.0) - interactor-rails (= 2.0.2) + interactor (~> 3.1) + interactor-rails (~> 2.2) language_list (~> 1.1.0) money-rails (~> 1.10.0) mongoid (~> 5.4.0) @@ -186,7 +186,7 @@ PATH transport_profiles (0.0.1) acapi mongoid (= 5.4.0) - nokogiri (= 1.9.1) + nokogiri (~> 1.11) rails (>= 4.2.0, < 5.0) rubyzip (>= 1.3.0) symmetric-encryption (~> 3.6.0) @@ -229,9 +229,9 @@ GEM erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_model_serializers (0.10.12) - actionpack (>= 4.1, < 6.2) - activemodel (>= 4.1, < 6.2) + active_model_serializers (0.10.14) + actionpack (>= 4.1) + activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) activejob (4.2.11) @@ -252,12 +252,12 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) - amq-protocol (1.9.2) + amq-protocol (2.3.2) animate-rails (1.0.10) rails arel (6.0.4) ast (2.4.2) - awesome_print (1.8.0) + awesome_print (1.9.2) aws-sdk (2.2.4) aws-sdk-resources (= 2.2.4) aws-sdk-core (2.2.4) @@ -268,25 +268,28 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - backports (3.17.1) - bcrypt (3.1.13) + backports (3.24.1) + base64 (0.2.0) + bcrypt (3.1.19) benchmark-malloc (0.2.0) benchmark-perf (0.6.0) benchmark-trend (0.4.0) - binding_of_caller (0.8.0) + bigdecimal (1.3.5) + binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bootsnap (1.7.2) - msgpack (~> 1.0) + bootsnap (1.17.0) + msgpack (~> 1.2) bootstrap-multiselect-rails (0.9.9) rails (>= 4.0.0) bootstrap-slider-rails (6.0.17) railties (>= 3.2, < 5.0) - brakeman (5.0.0) + brakeman (5.4.1) browser (2.7.0) bson (4.3.0) builder (3.2.4) - bunny (1.7.1) - amq-protocol (~> 1.9.2) + bunny (2.22.0) + amq-protocol (~> 2.3, >= 2.3.1) + sorted_set (~> 1, >= 1.0.2) capistrano (3.3.5) capistrano-stats (~> 1.1.0) i18n @@ -306,16 +309,17 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - capybara-screenshot (1.0.24) + capybara-screenshot (1.0.26) capybara (>= 1.0, < 4) launchy - carrierwave (1.3.1) + carrierwave (1.3.4) activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) - carrierwave-mongoid (1.3.0) + ssrf_filter (~> 1.0, < 1.1.0) + carrierwave-mongoid (1.4.0) carrierwave (>= 0.8, < 3) - mongoid (>= 3.0, < 8.0) + mongoid (>= 3.0, < 9.0) mongoid-grid_fs (>= 1.3, < 3.0) case_transform (0.2) activesupport @@ -341,8 +345,7 @@ GEM celluloid-supervision (0.20.6) timers (>= 4.1.1) certified (1.0.0) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (4.1.0) chosen-rails (1.8.7) coffee-rails (>= 3.2) railties (>= 3.0) @@ -362,15 +365,15 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - combine_pdf (1.0.16) + combine_pdf (1.0.24) + matrix ruby-rc4 (>= 0.1.5) - commonjs (0.2.7) - concurrent-ruby (1.1.8) - config (1.0.0) - activesupport (>= 3.0) - deep_merge (~> 1.0.0) - crack (0.4.3) - safe_yaml (~> 1.0.0) + concurrent-ruby (1.2.2) + config (2.2.3) + deep_merge (~> 1.2, >= 1.2.1) + dry-validation (~> 1.0, >= 1.0.0) + crack (0.4.5) + rexml crass (1.0.6) cucumber (3.1.2) builder (>= 2.1.2) @@ -398,17 +401,17 @@ GEM awesome_print (>= 0.2.1) unidecoder (>= 1.1.1) database_cleaner (1.5.3) - debug_inspector (0.0.3) - deep_merge (1.0.1) + debug_inspector (1.1.0) + deep_merge (1.2.2) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.7.1) + devise (4.9.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.3) + diff-lcs (1.5.0) docile (1.1.5) dry-auto_inject (0.6.1) dry-container (>= 0.3.4) @@ -418,37 +421,41 @@ GEM dry-container (0.7.2) concurrent-ruby (~> 1.0) dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.5.0) + dry-core (0.9.1) concurrent-ruby (~> 1.0) + zeitwerk (~> 2.6) dry-equalizer (0.3.0) - dry-inflector (0.2.0) - dry-initializer (3.0.4) - dry-logic (1.1.0) + dry-inflector (0.3.0) + dry-initializer (3.1.1) + dry-logic (1.3.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.5, >= 0.5) - dry-matcher (0.8.3) - dry-core (>= 0.4.8) - dry-monads (1.3.5) + dry-core (~> 0.9, >= 0.9) + zeitwerk (~> 2.6) + dry-matcher (0.9.0) + dry-core (~> 0.4, >= 0.4.8) + dry-monads (1.5.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.4, >= 0.4.4) - dry-equalizer - dry-schema (1.6.1) + dry-core (~> 0.9, >= 0.9) + zeitwerk (~> 2.6) + dry-schema (1.7.1) concurrent-ruby (~> 1.0) dry-configurable (~> 0.8, >= 0.8.3) dry-core (~> 0.5, >= 0.5) dry-initializer (~> 3.0) dry-logic (~> 1.0) dry-types (~> 1.5) - dry-struct (1.4.0) - dry-core (~> 0.5, >= 0.5) - dry-types (~> 1.5) + dry-struct (1.5.2) + dry-core (~> 0.9, >= 0.9) + dry-types (~> 1.6) ice_nine (~> 0.11) - dry-types (1.5.1) + zeitwerk (~> 2.6) + dry-types (1.6.1) concurrent-ruby (~> 1.0) dry-container (~> 0.3) - dry-core (~> 0.5, >= 0.5) + dry-core (~> 0.9, >= 0.9) dry-inflector (~> 0.1, >= 0.1.2) - dry-logic (~> 1.0, >= 1.0.2) + dry-logic (~> 1.3, >= 1.3) + zeitwerk (~> 2.6) dry-validation (1.6.0) concurrent-ruby (~> 1.0) dry-container (~> 0.7, >= 0.7.1) @@ -463,7 +470,7 @@ GEM mail (~> 2.6.3) equalizer (0.0.11) erubis (2.7.0) - execjs (2.7.0) + execjs (2.9.1) eye (0.10.0) celluloid (~> 0.17.3) celluloid-io (~> 0.17.0) @@ -475,14 +482,14 @@ GEM factory_girl_rails (4.6.0) factory_girl (~> 4.5.0) railties (>= 3.0.0) - fakeredis (0.8.0) - redis (~> 4.1) - ffi (1.12.2) - forgery (0.7.0) + fakeredis (0.9.2) + redis (~> 4.8) + ffi (1.14.0) + forgery (0.8.1) gherkin (5.1.0) globalid (0.4.2) activesupport (>= 4.2.0) - haml (5.1.2) + haml (5.2.2) temple (>= 0.8.0) tilt haml-rails (1.0.0) @@ -495,25 +502,26 @@ GEM hashery (2.1.2) hike (1.2.3) holidays (8.6.0) - html2haml (2.2.0) + html2haml (2.3.0) erubis (~> 2.7.0) - haml (>= 4.0, < 6) + haml (>= 4.0) nokogiri (>= 1.6.0) ruby_parser (~> 3.5) htmlentities (4.3.4) - httparty (0.16.2) + httparty (0.21.0) + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) i18n (0.7.0) - ice_cube (0.16.3) + ice_cube (0.16.4) ice_nine (0.11.2) iniparse (1.5.0) - interactor (3.1.0) - interactor-rails (2.0.2) + interactor (3.1.2) + interactor-rails (2.2.1) interactor (~> 3.0) - rails (>= 3, < 5.1) + rails (>= 4.2) jbuilder (2.9.1) activesupport (>= 4.2.0) - jmespath (1.4.0) + jmespath (1.6.2) jquery-datatables-rails (3.4.0) actionpack (>= 3.1) jquery-rails @@ -533,29 +541,26 @@ GEM kaminari (0.17.0) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - kgio (2.11.3) - kostya-sigar (2.0.9) + kgio (2.11.4) + kostya-sigar (2.0.10) language_list (1.1.0) - launchy (2.4.3) - addressable (~> 2.3) - less (2.6.0) - commonjs (~> 0.2.7) - less-rails (2.6.0) - actionpack (>= 3.1) - less (~> 2.6.0) - less-rails-bootstrap (3.3.1.0) - less-rails (~> 2.6.0) - libv8 (3.16.14.19) - loofah (2.3.1) + launchy (2.5.2) + addressable (~> 2.8) + libv8-node (16.19.0.1) + libv8-node (16.19.0.1-x86_64-linux) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.6.3) mime-types (>= 1.16, < 3) maskedinput-rails (1.4.1.0) + matrix (0.4.2) mime-types (2.99.3) - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.0) + mini_mime (1.1.5) + mini_portile2 (2.6.1) + mini_racer (0.6.4) + libv8-node (~> 16.19.0.0) + minitest (5.20.0) monetize (1.7.0) money (~> 6.9) money (6.10.1) @@ -576,15 +581,15 @@ GEM tzinfo (>= 0.3.37) mongoid-autoinc (5.0.2) mongoid (~> 5.0) - mongoid-compatibility (0.5.1) + mongoid-compatibility (0.6.0) activesupport mongoid (>= 2.0) mongoid-enum (0.4.0) mongoid (~> 5.0) - mongoid-grid_fs (2.4.0) + mongoid-grid_fs (2.5.0) mime-types (>= 1.0, < 4.0) - mongoid (>= 3.0, < 8.0) - mongoid-history (0.8.2) + mongoid (>= 3.0, < 9.0) + mongoid-history (0.8.5) activesupport easy_diff mongoid (>= 3.0) @@ -598,50 +603,57 @@ GEM mongoid (>= 4.0.0, <= 6.0.0) mongoid_userstamp (0.4.0) mongoid (>= 3.0.4) - mono_logger (1.1.0) - msgpack (1.4.2) - multi_json (1.14.1) - multi_test (0.1.2) + mono_logger (1.1.2) + msgpack (1.7.2) + multi_json (1.15.0) + multi_test (1.1.0) multi_xml (0.6.0) - net-scp (3.0.0) - net-ssh (>= 2.6.5, < 7.0.0) + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) net-sftp (2.1.2) net-ssh (>= 2.6.5) net-ssh (4.2.0) - newrelic_rpm (6.10.0.364) - nio4r (2.5.7) - nokogiri (1.9.1) - mini_portile2 (~> 2.4.0) - nokogiri-happymapper (0.8.1) + newrelic_rpm (9.6.0) + base64 + nio4r (2.5.9) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) + nokogiri (1.12.5-x86_64-linux) + racc (~> 1.4) + nokogiri-happymapper (0.9.0) nokogiri (~> 1.5) non-stupid-digest-assets (1.0.9) sprockets (>= 2.0) origin (2.3.1) orm_adapter (0.5.0) - overcommit (0.53.0) - childprocess (>= 0.6.3, < 4) + overcommit (0.60.0) + childprocess (>= 0.6.3, < 5) iniparse (~> 1.4) - ox (2.14.1) - parallel (1.19.1) + rexml (~> 3.2) + ox (2.14.17) + parallel (1.23.0) parallel_tests (2.26.2) parallel - parser (3.0.1.1) + parser (3.2.2.4) ast (~> 2.4.1) + racc pdf-reader (1.4.1) Ascii85 (~> 1.0.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - public_suffix (4.0.6) + public_suffix (4.0.7) puma (4.3.6) nio4r (~> 2.0) pundit (1.0.1) activesupport (>= 3.0.0) + racc (1.7.3) rack (1.6.13) rack-protection (1.5.5) rack - rack-proxy (0.6.5) + rack-proxy (0.7.7) rack rack-test (0.6.3) rack (>= 1.0) @@ -657,14 +669,14 @@ GEM bundler (>= 1.3.0, < 2.0) railties (= 4.2.11) sprockets-rails - rails-deprecated_sanitizer (1.0.3) + rails-deprecated_sanitizer (1.0.4) activesupport (>= 4.2.0.alpha) rails-dom-testing (1.0.9) activesupport (>= 4.2.0, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) rails-i18n (4.0.8) i18n (~> 0.7) railties (~> 4.0) @@ -673,26 +685,27 @@ GEM activesupport (= 4.2.11) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (3.0.0) - raindrops (0.19.1) - rake (13.0.1) - rb-fsevent (0.10.4) + rainbow (3.1.1) + raindrops (0.20.1) + rake (13.1.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) + rbtree (0.4.6) rdoc (4.3.0) recaptcha (4.3.1) json redcarpet (3.4.0) - redis (4.1.4) + redis (4.8.1) redis-actionpack (5.1.0) actionpack (>= 4.0, < 7) redis-rack (>= 1, < 3) redis-store (>= 1.1.0, < 2) - redis-activesupport (5.2.0) - activesupport (>= 3, < 7) + redis-activesupport (5.3.0) + activesupport (>= 3, < 8) redis-store (>= 1.3, < 2) - redis-namespace (1.7.0) - redis (>= 3.0.4) + redis-namespace (1.11.0) + redis (>= 4) redis-rack (2.0.6) rack (>= 1.5, < 3) redis-store (>= 1.2, < 2) @@ -700,20 +713,18 @@ GEM redis-actionpack (>= 5.0, < 6) redis-activesupport (>= 5.0, < 6) redis-store (>= 1.2, < 2) - redis-store (1.8.2) - redis (>= 4, < 5) - ref (2.0.0) - regexp_parser (1.7.0) + redis-store (1.10.0) + redis (>= 4, < 6) + regexp_parser (1.8.2) responders (2.4.1) actionpack (>= 4.2.0, < 6.0) railties (>= 4.2.0, < 6.0) - resque (2.0.0) + resque (2.6.0) mono_logger (~> 1.0) multi_json (~> 1.0) redis-namespace (~> 1.6) sinatra (>= 0.9.2) - vegas (~> 0.1.2) - rexml (3.2.5) + rexml (3.2.6) roo (2.1.1) nokogiri (~> 1) rubyzip (~> 1.1, < 2.0.0) @@ -748,30 +759,30 @@ GEM rspec_junit_formatter (0.2.3) builder (< 4) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.92.0) + rubocop (1.31.0) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) - rexml - rubocop-ast (>= 0.5.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.18.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.5.0) - parser (>= 3.0.1.1) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) rubocop-git (0.1.3) rubocop (>= 0.24.1) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) ruby-saml (1.3.1) nokogiri (>= 1.5.10) - rubyXL (3.4.6) - nokogiri (>= 1.4.4) - rubyzip (>= 1.1.6) - ruby_parser (3.14.2) - sexp_processor (~> 4.9) + rubyXL (3.4.25) + nokogiri (>= 1.10.8) + rubyzip (>= 1.3.0) + ruby_parser (3.21.0) + racc (~> 1.5) + sexp_processor (~> 4.16) rubyzip (1.3.0) - safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -783,19 +794,22 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) + sassc (2.4.0) + ffi (~> 1.9) sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - selenium-webdriver (4.1.0) - childprocess (>= 0.5, < 5.0) + selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2) - serverengine (1.5.11) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + serverengine (2.0.7) sigdump (~> 0.2.2) - sexp_processor (4.14.1) + set (1.0.3) + sexp_processor (4.17.1) shoulda-matchers (3.1.1) activesupport (>= 4.0.0) - sigdump (0.2.4) + sigdump (0.2.5) simple_form (4.0.0) actionpack (> 4) activemodel (> 4) @@ -811,15 +825,19 @@ GEM slim (3.0.9) temple (>= 0.7.6, < 0.9) tilt (>= 1.3.3, < 2.1) - slim-rails (3.2.0) + slim-rails (3.6.3) actionpack (>= 3.1) railties (>= 3.1) - slim (>= 3.0, < 5.0) - sneakers (1.1.2) - bunny (>= 1.7.0, <= 2.0.0) - serverengine (~> 1.5.5) + slim (>= 3.0, < 6.0, != 5.0.0) + sneakers (2.11.0) + bunny (~> 2.12) + concurrent-ruby (~> 1.0) + rake + serverengine (~> 2.0.5) thor - thread (~> 0.1.7) + sorted_set (1.0.3) + rbtree + set (~> 1.0) spring (1.6.3) sprockets (2.12.5) hike (~> 1.2) @@ -830,9 +848,10 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sshkit (1.18.2) + sshkit (1.21.5) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) + ssrf_filter (1.0.8) state_machines (0.5.0) symmetric-encryption (3.6.0) coercible (>= 1.0.0) @@ -840,29 +859,23 @@ GEM terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) test-prof (0.5.0) - therubyracer (0.12.3) - libv8 (~> 3.16.14.15) - ref - thor (1.0.1) - thread (0.1.7) + thor (1.3.0) thread_safe (0.3.6) tilt (1.4.1) - timers (4.3.3) + timers (4.3.5) ttfunk (1.0.3) turbolinks (2.5.3) coffee-rails - tzinfo (1.2.7) + tzinfo (1.2.11) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.7.0) + unicode-display_width (2.5.0) unicorn (4.8.3) kgio (~> 2.6) rack raindrops (~> 0.7) unidecoder (1.1.2) - vegas (0.1.11) - rack (>= 1.0.0) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) @@ -870,9 +883,9 @@ GEM equalizer (~> 0.0, >= 0.0.9) warden (1.2.7) rack (>= 1.0) - watir (7.1.0) + watir (7.2.2) regexp_parser (>= 1.2, < 3) - selenium-webdriver (~> 4.0) + selenium-webdriver (~> 4.2) web-console (2.3.0) activemodel (>= 4.0) binding_of_caller (>= 0.7.2) @@ -882,24 +895,27 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0, < 4.11) - webmock (3.8.3) - addressable (>= 2.3.6) + webmock (3.19.1) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webpacker (4.2.2) + webpacker (4.3.0) activesupport (>= 4.2) rack-proxy (>= 0.6.1) railties (>= 4.2) + websocket (1.2.10) wicked_pdf (1.0.6) wkhtmltopdf-binary-edge (0.12.3.0) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.24) + yard (0.9.34) yard-mongoid (0.1.0) yard (>= 0.8.4) + zeitwerk (2.6.12) PLATFORMS ruby + x86_64-linux DEPENDENCIES aasm (~> 4.8.0) @@ -911,6 +927,7 @@ DEPENDENCIES bcrypt (~> 3.1) benefit_markets! benefit_sponsors! + bigdecimal (= 1.3.5) bootstrap-multiselect-rails (~> 0.9.9) bootstrap-slider-rails (= 6.0.17) brakeman @@ -918,7 +935,7 @@ DEPENDENCIES bson (~> 4.3.0) capistrano (= 3.3.5) capistrano-rails (= 1.1.6) - capybara + capybara (= 3.32.1) capybara-screenshot carrierwave-mongoid certified @@ -927,34 +944,39 @@ DEPENDENCIES climate_control (= 0.2.0) coffee-rails (~> 4.1.0) combine_pdf - config (~> 1.0.0) + config (~> 2.0) cucumber (= 3.1.2) cucumber-rails (= 1.6.0) curl database_cleaner (= 1.5.3) devise (~> 4.5) + dry-container (~> 0.7.2) effective_datatables! email_spec (= 2.0.0) eye (= 0.10.0) factory_girl_rails (= 4.6.0) fakeredis + ffi (= 1.14.0) forgery haml + haml-rails (~> 1.0) holidays (~> 8.6) httparty i18n (= 0.7.0) - interactor (= 3.1.0) - interactor-rails (= 2.0.2) + interactor (~> 3.1) + interactor-rails (~> 2.2) jbuilder (~> 2.0) jquery-datatables-rails (= 3.4.0) jquery-rails (= 4.0.5) jquery-turbolinks jquery-ui-rails kaminari (= 0.17.0) + kostya-sigar (= 2.0.10) language_list (~> 1.1.0) - less-rails-bootstrap (~> 3.3.1.0) + loofah (~> 2.19.1) mail (= 2.6.3) maskedinput-rails + mini_racer (= 0.6.4) money-rails (~> 1.10.0) mongo (= 2.5.1) mongo_session_store-rails4 (~> 6.0.0) @@ -967,7 +989,7 @@ DEPENDENCIES mongoid_rails_migrations! mongoid_userstamp newrelic_rpm - nokogiri (= 1.9.1) + nokogiri (~> 1.11) nokogiri-happymapper non-stupid-digest-assets (~> 1.0, >= 1.0.9) notifier! @@ -996,7 +1018,8 @@ DEPENDENCIES ruby-progressbar (~> 1.7) ruby-saml (~> 1.3.0) rubyXL - sass-rails (~> 5.0) + sass-rails (~> 5) + sassc (~> 2.0) sdoc (~> 0.4.0) shoulda-matchers (= 3.1.1) simple_calendar! @@ -1008,7 +1031,6 @@ DEPENDENCIES sprockets (~> 2.12.3) symmetric-encryption (~> 3.6.0) test-prof (= 0.5.0) - therubyracer transport_gateway! transport_profiles! turbolinks (= 2.5.3) @@ -1027,7 +1049,7 @@ DEPENDENCIES yard-mongoid (~> 0.1.0) RUBY VERSION - ruby 2.6.5p114 + ruby 2.7.6p219 BUNDLED WITH - 1.17.3 + 2.0.0.pre.3 diff --git a/components/benefit_markets/benefit_markets.gemspec b/components/benefit_markets/benefit_markets.gemspec index 165823bbe59..2cf3a9565b2 100644 --- a/components/benefit_markets/benefit_markets.gemspec +++ b/components/benefit_markets/benefit_markets.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |s| s.add_dependency 'virtus', '1.0.5' s.add_dependency 'i18n', '0.7.0' s.add_dependency 'nokogiri' - s.add_dependency 'mini_portile2', '2.4.0' + s.add_dependency 'mini_portile2', '~> 2.6.1' s.add_dependency 'dry-types' s.add_dependency 'dry-validation' s.add_dependency 'dry-struct' diff --git a/components/benefit_markets/spec/rails_helper.rb b/components/benefit_markets/spec/rails_helper.rb index 6403061ff3e..84a058b4d5d 100644 --- a/components/benefit_markets/spec/rails_helper.rb +++ b/components/benefit_markets/spec/rails_helper.rb @@ -86,17 +86,70 @@ end end -if RUBY_VERSION>='2.6.0' - if Rails.version < '5' - class ActionController::TestResponse < ActionDispatch::TestResponse - def recycle! - # hack to avoid MonitorMixin double-initialize error: - @mon_mutex_owner_object_id = nil - @mon_mutex = nil - initialize + +# error: ThreadError: already initialized +# solution found here https://github.com/rails/rails/issues/34790#issuecomment-450502805 +# In case there are still poor souls on Rails 4.2 with Ruby 2.6/2.7, this is the full file working for my team, required from rails_helper.rb. + +# From https://github.com/rails/rails/issues/34790 +# +# This is required because of an incompatibility between Ruby 2.6 and Rails 4.2, which the Rails team is not going to fix. + +rb_version = Gem::Version.new(RUBY_VERSION) + +if rb_version >= Gem::Version.new('2.6') && Gem::Version.new(Rails.version) < Gem::Version.new('5') + raise "Needed class is not defined yet, try requiring this file later." unless defined?(::ActionController::TestResponse) + + if rb_version >= Gem::Version.new('2.7') + puts "Using #{__FILE__} for Ruby 2.7." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end end end + else - puts "Monkeypatch for ActionController::TestResponse no longer needed" + puts "Using #{__FILE__} for Ruby 2.6." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + end +else + puts "#{__FILE__} no longer needed." end + diff --git a/components/benefit_sponsors/benefit_sponsors.gemspec b/components/benefit_sponsors/benefit_sponsors.gemspec index 27500a39d7f..587fa3d0b15 100644 --- a/components/benefit_sponsors/benefit_sponsors.gemspec +++ b/components/benefit_sponsors/benefit_sponsors.gemspec @@ -33,8 +33,10 @@ Gem::Specification.new do |s| s.add_dependency 'devise', '~> 4.5' s.add_dependency 'language_list', '~> 1.1.0' s.add_dependency 'mongoid-autoinc' - s.add_dependency 'interactor', '3.1.0' - s.add_dependency 'interactor-rails', '2.0.2' + # s.add_dependency 'interactor', '3.1.0' + # s.add_dependency 'interactor-rails', '2.0.2' + s.add_dependency 'interactor', '~> 3.1' + s.add_dependency 'interactor-rails', '~> 2.2' s.add_dependency 'browser', '2.7.0' s.add_dependency 'dry-schema', '~> 1.0' s.add_dependency 'dry-validation', '~> 1.0' diff --git a/components/benefit_sponsors/spec/rails_helper.rb b/components/benefit_sponsors/spec/rails_helper.rb index 988923daa0f..8eb74cbbca8 100644 --- a/components/benefit_sponsors/spec/rails_helper.rb +++ b/components/benefit_sponsors/spec/rails_helper.rb @@ -96,17 +96,69 @@ end end -if RUBY_VERSION>='2.6.0' - if Rails.version < '5' - class ActionController::TestResponse < ActionDispatch::TestResponse - def recycle! - # hack to avoid MonitorMixin double-initialize error: - @mon_mutex_owner_object_id = nil - @mon_mutex = nil - initialize + +# error: ThreadError: already initialized +# solution found here https://github.com/rails/rails/issues/34790#issuecomment-450502805 +# In case there are still poor souls on Rails 4.2 with Ruby 2.6/2.7, this is the full file working for my team, required from rails_helper.rb. + +# From https://github.com/rails/rails/issues/34790 +# +# This is required because of an incompatibility between Ruby 2.6 and Rails 4.2, which the Rails team is not going to fix. + +rb_version = Gem::Version.new(RUBY_VERSION) + +if rb_version >= Gem::Version.new('2.6') && Gem::Version.new(Rails.version) < Gem::Version.new('5') + raise "Needed class is not defined yet, try requiring this file later." unless defined?(::ActionController::TestResponse) + + if rb_version >= Gem::Version.new('2.7') + puts "Using #{__FILE__} for Ruby 2.7." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end end end + else - puts "Monkeypatch for ActionController::TestResponse no longer needed" + puts "Using #{__FILE__} for Ruby 2.6." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + end +else + puts "#{__FILE__} no longer needed." end diff --git a/components/sponsored_benefits/spec/rails_helper.rb b/components/sponsored_benefits/spec/rails_helper.rb index 6d1bdb90e4f..70e2478f465 100644 --- a/components/sponsored_benefits/spec/rails_helper.rb +++ b/components/sponsored_benefits/spec/rails_helper.rb @@ -72,17 +72,68 @@ end end -if RUBY_VERSION>='2.6.0' - if Rails.version < '5' - class ActionController::TestResponse < ActionDispatch::TestResponse - def recycle! - # hack to avoid MonitorMixin double-initialize error: - @mon_mutex_owner_object_id = nil - @mon_mutex = nil - initialize +# error: ThreadError: already initialized +# solution found here https://github.com/rails/rails/issues/34790#issuecomment-450502805 +# In case there are still poor souls on Rails 4.2 with Ruby 2.6/2.7, this is the full file working for my team, required from rails_helper.rb. + +# From https://github.com/rails/rails/issues/34790 +# +# This is required because of an incompatibility between Ruby 2.6 and Rails 4.2, which the Rails team is not going to fix. + +rb_version = Gem::Version.new(RUBY_VERSION) + +if rb_version >= Gem::Version.new('2.6') && Gem::Version.new(Rails.version) < Gem::Version.new('5') + raise "Needed class is not defined yet, try requiring this file later." unless defined?(::ActionController::TestResponse) + + if rb_version >= Gem::Version.new('2.7') + puts "Using #{__FILE__} for Ruby 2.7." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end end end + else - puts "Monkeypatch for ActionController::TestResponse no longer needed" + puts "Using #{__FILE__} for Ruby 2.6." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + end +else + puts "#{__FILE__} no longer needed." end diff --git a/components/transport_profiles/Gemfile.lock b/components/transport_profiles/Gemfile.lock index 05438c46efb..a0a6402f060 100644 --- a/components/transport_profiles/Gemfile.lock +++ b/components/transport_profiles/Gemfile.lock @@ -16,7 +16,7 @@ PATH mongoid (= 5.4.0) nokogiri (= 1.9.1) rails (>= 4.2.0, < 5.0) - rubyzip (= 1.2.1) + rubyzip (>= 1.3.0) symmetric-encryption (~> 3.6.0) transport_gateway @@ -76,7 +76,7 @@ GEM jmespath (~> 1.0) aws-sdk-resources (2.2.37) aws-sdk-core (= 2.2.37) - bson (4.15.0) + bson (4.12.0) builder (3.2.4) bunny (1.7.1) amq-protocol (~> 1.9.2) @@ -86,7 +86,6 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.6) - date (3.3.3) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.3) @@ -100,32 +99,20 @@ GEM loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.8.1) + mail (2.7.1) mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - mini_mime (1.1.5) + mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) - mongo (2.19.1) - bson (>= 4.14.1, < 5.0.0) + mongo (2.14.0) + bson (>= 4.8.2, < 5.0.0) mongoid (5.4.0) activemodel (~> 4.0) mongo (>= 2.5.1, < 3.0.0) origin (~> 2.3) tzinfo (>= 0.3.37) - net-imap (0.3.7) - date - net-protocol - net-pop (0.1.2) - net-protocol - net-protocol (0.2.1) - timeout net-sftp (2.1.2) net-ssh (>= 2.6.5) - net-smtp (0.3.3) - net-protocol net-ssh (4.2.0) nokogiri (1.9.1) mini_portile2 (~> 2.4.0) @@ -180,7 +167,7 @@ GEM rspec-mocks (~> 3.9.0) rspec-support (~> 3.9.0) rspec-support (3.9.2) - rubyzip (1.2.1) + rubyzip (1.3.0) safe_yaml (1.0.5) serverengine (1.5.11) sigdump (~> 0.2.2) @@ -192,7 +179,7 @@ GEM serverengine (~> 1.5.5) thor thread (~> 0.1.7) - sprockets (4.1.1) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.2) @@ -204,7 +191,6 @@ GEM thor (1.0.1) thread (0.1.7) thread_safe (0.3.6) - timeout (0.4.0) tzinfo (1.2.7) thread_safe (~> 0.1) webmock (3.8.3) diff --git a/components/transport_profiles/transport_profiles.gemspec b/components/transport_profiles/transport_profiles.gemspec index 8904414cd02..6c685aec631 100644 --- a/components/transport_profiles/transport_profiles.gemspec +++ b/components/transport_profiles/transport_profiles.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.add_dependency 'rails', '>= 4.2.0', '< 5.0' s.add_dependency 'mongoid', '5.4.0' s.add_dependency 'transport_gateway' - s.add_dependency 'nokogiri', '1.9.1' + s.add_dependency 'nokogiri', '~> 1.11' s.add_dependency 'acapi' s.add_dependency 'symmetric-encryption', '~> 3.6.0' s.add_dependency 'rubyzip', '>=1.3.0' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 72191b66d20..d8aa709042f 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -80,17 +80,66 @@ # error: ThreadError: already initialized # solution found here https://github.com/rails/rails/issues/34790#issuecomment-450502805 -if RUBY_VERSION>='2.6.0' - if Rails.version < '5' - class ActionController::TestResponse < ActionDispatch::TestResponse - def recycle! - # hack to avoid MonitorMixin double-initialize error: - @mon_mutex_owner_object_id = nil - @mon_mutex = nil - initialize +# In case there are still poor souls on Rails 4.2 with Ruby 2.6/2.7, this is the full file working for my team, required from rails_helper.rb. + +# From https://github.com/rails/rails/issues/34790 +# +# This is required because of an incompatibility between Ruby 2.6 and Rails 4.2, which the Rails team is not going to fix. + +rb_version = Gem::Version.new(RUBY_VERSION) + +if rb_version >= Gem::Version.new('2.6') && Gem::Version.new(Rails.version) < Gem::Version.new('5') + raise "Needed class is not defined yet, try requiring this file later." unless defined?(::ActionController::TestResponse) + + if rb_version >= Gem::Version.new('2.7') + puts "Using #{__FILE__} for Ruby 2.7." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_data = nil + @mon_data_owner_object_id = nil + initialize + end end end + else - puts "Monkeypatch for ActionController::TestResponse no longer needed" + puts "Using #{__FILE__} for Ruby 2.6." + + module ActionController + class TestResponse < ActionDispatch::TestResponse + def recycle! + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + + module ActionController + class LiveTestResponse < ActionController::Live::Response + def recycle! + @body = nil + @mon_mutex = nil + @mon_mutex_owner_object_id = nil + initialize + end + end + end + end +else + puts "#{__FILE__} no longer needed." end diff --git a/spec/support/acapi_vocabulary_spec_helpers.rb b/spec/support/acapi_vocabulary_spec_helpers.rb index 33b3deea3fb..fc47160f83b 100644 --- a/spec/support/acapi_vocabulary_spec_helpers.rb +++ b/spec/support/acapi_vocabulary_spec_helpers.rb @@ -1,7 +1,9 @@ +# frozen_string_literal: true + require 'open-uri' module AcapiVocabularySpecHelpers - ACAPI_SCHEMA_FILE_LIST = %w( + ACAPI_SCHEMA_FILE_LIST = %w[ assistance.xsd common.xsd config.xsd @@ -20,24 +22,36 @@ module AcapiVocabularySpecHelpers verification_services.xsd vocabulary.xsd verification_services.xsd - ) + ].freeze def download_vocabularies schema_directory = File.join(Rails.root, "spec", "vocabularies") - unless File.exist?(schema_directory) - Dir.mkdir(schema_directory) - ACAPI_SCHEMA_FILE_LIST.each do |item| - download_schema_file(item, schema_directory) - end + Dir.mkdir(schema_directory) unless File.exist?(schema_directory) + ACAPI_SCHEMA_FILE_LIST.each do |item| + download_schema_file(item, schema_directory) end end def download_schema_file(file, s_dir) f_name = File.join(s_dir, file) - unless File.exist?(f_name) - uri = "https://raw.githubusercontent.com/ideacrew/cv/trunk/#{file}" - download = open(uri) + return if File.exist?(f_name) + + uri = "https://raw.githubusercontent.com/ideacrew/cv/trunk/#{file}" + puts "Downloading schema for testing ... #{uri}" + begin + download = URI.parse(uri).open IO.copy_stream(download, f_name) + rescue Timeout::Error => e + puts "The request for a page at #{url} timed out...skipping." + puts "Error: #{e.message}" + rescue OpenURI::HTTPError => e + response = error.io + puts "Unable to download #{uri}" + puts response.status + puts response.string + puts e.message + rescue StandardError => e + puts "Catch all: #{e.message}" end end