Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ruby with nokogiri #3009

Merged
merged 7 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/brakeman-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ctl-cookbook-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/supermarket/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.1.2
1 change: 1 addition & 0 deletions src/supermarket/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions src/supermarket/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -802,6 +806,7 @@ GEM
zeitwerk (2.6.1)

PLATFORMS
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
Expand Down Expand Up @@ -849,6 +854,7 @@ DEPENDENCIES
omniauth-rails_csrf_protection
pg
pg_search
phantomjs
poltergeist
premailer-rails
pry-byebug
Expand Down Expand Up @@ -888,4 +894,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.3.8
2.4.3
2 changes: 1 addition & 1 deletion src/supermarket/engines/fieri/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.1.2
9 changes: 5 additions & 4 deletions src/supermarket/engines/fieri/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -256,6 +256,7 @@ GEM

PLATFORMS
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
Expand All @@ -270,4 +271,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.3.3
2.4.3
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Ubuntu 22.04 MIME TYPE of any json file is being picked up perfectly (as application/json) but not in Ubuntu 20.04 (as text/plain) so we need to include application\/json here in order to decide whether the file passed in this method is binary or not.

end

def too_big?(filepath)
Expand Down
2 changes: 2 additions & 0 deletions src/supermarket/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require "capybara/poltergeist"
require "capybara-screenshot/rspec"
require "factory_bot_rails"
require "phantomjs"
require "simplecov"
SimpleCov.start

Expand All @@ -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
Expand Down