-
Notifications
You must be signed in to change notification settings - Fork 113
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
Conversation
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.14.0. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](sparklemotion/nokogiri@v1.13.8...v1.14.0) --- updated-dependencies: - dependency-name: nokogiri dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dheeraj Singh Dubey <dhsingh@progress.com>
👷 Deploy Preview for chef-supermarket processing.
|
Signed-off-by: Dheeraj Singh Dubey <dhsingh@progress.com>
6dc0fcf
to
e21c5e2
Compare
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.8 to 1.13.10. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.10/CHANGELOG.md) - [Commits](sparklemotion/nokogiri@v1.13.8...v1.13.10) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dheeraj Singh Dubey <dhsingh@progress.com>
Adhoc build is green https://buildkite.com/chef/chef-supermarket-main-omnibus-adhoc/builds/632 |
669d5f3
to
973ee4d
Compare
Signed-off-by: Dheeraj Singh Dubey <dhsingh@progress.com>
973ee4d
to
7e7012b
Compare
Signed-off-by: Dheeraj Singh Dubey <dhsingh@progress.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -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)} |
There was a problem hiding this comment.
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.
Description
-- Resolved brakeman failure
-- Update nokogiri as required dependency
-- Update regex to match mimetype for ubuntu 22 to match the any json file to resolve spec in ubuntu 22
ON UBUNTU 22.04
3.0.3 :004 > file_path = '/tmp/metadata.json' => "/tmp/metadata.json" 3.0.3 :005 > IO.popen(["file", "--mime-type", "--brief", file_path]) { |io| io.read.chomp } => "application/json" 3.0.3 :006 >
ON UBUNTU 20.04
3.0.3 :004 > file_path = '/tmp/metadata.json' => "/tmp/metadata.json" 3.0.3 :005 > IO.popen(["file", "--mime-type", "--brief", file_path]) { |io| io.read.chomp } => "text/plain" 3.0.3 :006 >
Issues Resolved
[List any existing issues this PR resolves, or any Discourse or
StackOverflow discussions that are relevant]
Check List