diff --git a/.github/workflows/brakeman-analysis.yml b/.github/workflows/brakeman-analysis.yml index 069fb46c5d..67f862bf6d 100644 --- a/.github/workflows/brakeman-analysis.yml +++ b/.github/workflows/brakeman-analysis.yml @@ -24,9 +24,9 @@ jobs: # Customize the ruby version depending on your needs - name: Setup Ruby - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' + ruby-version: '3.1.2' - name: Setup Brakeman env: diff --git a/.github/workflows/ctl-cookbook-testing.yml b/.github/workflows/ctl-cookbook-testing.yml index 5ee3e8fd7e..3c102112b4 100644 --- a/.github/workflows/ctl-cookbook-testing.yml +++ b/.github/workflows/ctl-cookbook-testing.yml @@ -17,7 +17,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: working-directory: omnibus - ruby-version: 3.0.3 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: run cookstyle @@ -31,7 +31,7 @@ jobs: with: # once we move the -ctl command to its own gemspec this can be changed back to omnibus like above working-directory: omnibus/cookbooks/omnibus-supermarket - ruby-version: 3.0.3 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: run chefspec diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 74f6c13028..5162ae62fe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: working-directory: src/supermarket - ruby-version: 3.0.3 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: run chefstyle @@ -31,7 +31,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: working-directory: src/supermarket/engines/fieri - ruby-version: 3.0.3 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: run chefstyle diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 36546ef0a7..cf6176fd5f 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -27,11 +27,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up ruby 3.0 + - name: Set up ruby 3.1 uses: ruby/setup-ruby@v1 with: working-directory: src/supermarket - ruby-version: 3.0 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: create database schema @@ -67,11 +67,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up ruby 3.0 + - name: Set up ruby 3.1 uses: ruby/setup-ruby@v1 with: working-directory: src/supermarket/engines/fieri - ruby-version: 3.0 + ruby-version: 3.1.2 bundler-cache: true - uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR - name: run specs diff --git a/src/supermarket/.ruby-version b/src/supermarket/.ruby-version index 75a22a26ac..ef538c2810 100644 --- a/src/supermarket/.ruby-version +++ b/src/supermarket/.ruby-version @@ -1 +1 @@ -3.0.3 +3.1.2 diff --git a/src/supermarket/Gemfile b/src/supermarket/Gemfile index 83aef811fd..c3dfc1c349 100644 --- a/src/supermarket/Gemfile +++ b/src/supermarket/Gemfile @@ -79,6 +79,7 @@ group :test do gem "capybara-screenshot" gem "database_cleaner" gem "poltergeist" + gem "phantomjs", require: "phantomjs/poltergeist" gem "rails-controller-testing" gem "shoulda-matchers" gem "vcr", require: false diff --git a/src/supermarket/Gemfile.lock b/src/supermarket/Gemfile.lock index bcb794ca75..f624a16e21 100644 --- a/src/supermarket/Gemfile.lock +++ b/src/supermarket/Gemfile.lock @@ -212,7 +212,6 @@ GEM msgpack debase-ruby_core_source (0.10.15) diff-lcs (1.5.0) - digest (3.1.0) docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) @@ -386,6 +385,8 @@ GEM letter_opener (~> 1.7) railties (>= 5.2) rexml + libddwaf (1.3.0.0.0-x86_64-darwin) + ffi (~> 1.0) libddwaf (1.3.0.0.0-x86_64-linux) ffi (~> 1.0) libhoney (2.2.0) @@ -457,7 +458,9 @@ GEM net-protocol net-ssh (6.1.0) nio4r (2.5.8) - nokogiri (1.13.8-x86_64-linux) + nokogiri (1.14.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.14.0-x86_64-linux) racc (~> 1.4) nori (2.6.0) notiffany (0.1.3) @@ -511,6 +514,7 @@ GEM pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) + phantomjs (2.1.1.0) plist (3.6.0) poltergeist (1.18.1) capybara (>= 2.1, < 4) @@ -538,7 +542,7 @@ GEM pundit (2.2.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.6.0) + racc (1.6.2) rack (2.2.4) rack-protection (2.2.0) rack @@ -802,6 +806,7 @@ GEM zeitwerk (2.6.1) PLATFORMS + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -849,6 +854,7 @@ DEPENDENCIES omniauth-rails_csrf_protection pg pg_search + phantomjs poltergeist premailer-rails pry-byebug @@ -888,4 +894,4 @@ DEPENDENCIES yard BUNDLED WITH - 2.3.8 \ No newline at end of file + 2.4.3 diff --git a/src/supermarket/engines/fieri/.ruby-version b/src/supermarket/engines/fieri/.ruby-version index 75a22a26ac..ef538c2810 100644 --- a/src/supermarket/engines/fieri/.ruby-version +++ b/src/supermarket/engines/fieri/.ruby-version @@ -1 +1 @@ -3.0.3 +3.1.2 diff --git a/src/supermarket/engines/fieri/Gemfile.lock b/src/supermarket/engines/fieri/Gemfile.lock index f89ec4b542..681471ce4d 100644 --- a/src/supermarket/engines/fieri/Gemfile.lock +++ b/src/supermarket/engines/fieri/Gemfile.lock @@ -140,9 +140,9 @@ GEM net-protocol timeout nio4r (2.5.8) - nokogiri (1.13.8-x86_64-darwin) + nokogiri (1.13.10-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.8-x86_64-linux) + nokogiri (1.13.10-x86_64-linux) racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) @@ -154,7 +154,7 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.0) - racc (1.6.0) + racc (1.6.1) rack (2.2.4) rack-test (2.0.2) rack (>= 1.3) @@ -256,6 +256,7 @@ GEM PLATFORMS x86_64-darwin-20 + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -270,4 +271,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.3.3 + 2.4.3 diff --git a/src/supermarket/engines/fieri/app/models/cookbook_artifact.rb b/src/supermarket/engines/fieri/app/models/cookbook_artifact.rb index 20e81586ef..ca71a1297a 100644 --- a/src/supermarket/engines/fieri/app/models/cookbook_artifact.rb +++ b/src/supermarket/engines/fieri/app/models/cookbook_artifact.rb @@ -107,7 +107,8 @@ def binary?(filepath) # need to check for application/xml explicitly because only versions of # libmagic < 5.26 are available on Ubuntu 14.04 and 16.04 which are our # CI (Travis and Automate) node platforms - Utils::FileFormat.get_mime_type(file_path: filepath) !~ %r{^(text\/|inode\/x-empty|application\/xml)} + # For ubuntu 22.04 we need to include 'application\/json' to match the json file + Utils::FileFormat.get_mime_type(file_path: filepath) !~ %r{^(text\/|inode\/x-empty|application\/xml|application\/json)} end def too_big?(filepath) diff --git a/src/supermarket/spec/spec_helper.rb b/src/supermarket/spec/spec_helper.rb index 429ad6cd4f..bfa241af3e 100644 --- a/src/supermarket/spec/spec_helper.rb +++ b/src/supermarket/spec/spec_helper.rb @@ -9,6 +9,7 @@ require "capybara/poltergeist" require "capybara-screenshot/rspec" require "factory_bot_rails" +require "phantomjs" require "simplecov" SimpleCov.start @@ -34,6 +35,7 @@ app, phantomjs_logger: error_logger, timeout: 90, + phantomjs: Phantomjs.path, # set to a width larger than the medium range defined in variables.scss # so that tests the navmenu appears at the top of the window, otherwise # capybara will complain about