mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Merge pull request #5645 from inspec/vasundhara/update-code-to-remove-2.4
Update code to remove ruby 2.4 support
This commit is contained in:
commit
19c1e39155
3 changed files with 2 additions and 5 deletions
|
@ -49,7 +49,6 @@ module Inspec
|
||||||
end
|
end
|
||||||
|
|
||||||
class Profile
|
class Profile
|
||||||
# Good candidate for keyword_init, but that is not in 2.4
|
|
||||||
Dependency = Struct.new(
|
Dependency = Struct.new(
|
||||||
:name, :path, :status, :status_message, :git, :url, :compliance, :supermarket, :branch, :tag, :commit, :version, :relative_path
|
:name, :path, :status, :status_message, :git, :url, :compliance, :supermarket, :branch, :tag, :commit, :version, :relative_path
|
||||||
) do
|
) do
|
||||||
|
@ -71,7 +70,6 @@ module Inspec
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Good candidate for keyword_init, but that is not in 2.4
|
|
||||||
Group = Struct.new(
|
Group = Struct.new(
|
||||||
:title, :controls, :id
|
:title, :controls, :id
|
||||||
) do
|
) do
|
||||||
|
|
|
@ -10,7 +10,7 @@ FIXTURE_BASE=test/fixtures/config_dirs
|
||||||
FIXTURE_VERSIONS="1 2"
|
FIXTURE_VERSIONS="1 2"
|
||||||
|
|
||||||
# The format here is "<actual_version>,<abi_version> <another_version><<another_abi_version>""
|
# The format here is "<actual_version>,<abi_version> <another_version><<another_abi_version>""
|
||||||
RUBY_VERSIONS="2.4.5,2.4.0 2.5.3,2.5.0 2.6.2,2.6.0"
|
RUBY_VERSIONS="2.5.3,2.5.0 2.6.2,2.6.0"
|
||||||
|
|
||||||
# Make two fresh gems
|
# Make two fresh gems
|
||||||
cd $PLUGIN_SRC_DIR
|
cd $PLUGIN_SRC_DIR
|
||||||
|
|
|
@ -962,8 +962,7 @@ Test Summary: 2 successful, 0 failures, 0 skipped\n"
|
||||||
describe "when specifying the execution target" do
|
describe "when specifying the execution target" do
|
||||||
let(:local_plat) do
|
let(:local_plat) do
|
||||||
json = run_inspec_process("detect --format json", {}).stdout
|
json = run_inspec_process("detect --format json", {}).stdout
|
||||||
# .slice is available in ruby 2.5+
|
JSON.parse(json).slice("name", "release")
|
||||||
JSON.parse(json).select { |k, v| %w{name release}.include? k }
|
|
||||||
end
|
end
|
||||||
let(:run_result) { run_inspec_process("exec " + File.join(profile_path, "simple-metadata") + " " + cli_args, json: true) }
|
let(:run_result) { run_inspec_process("exec " + File.join(profile_path, "simple-metadata") + " " + cli_args, json: true) }
|
||||||
let(:seen_platform) { run_result; @json["platform"].select { |k, v| %w{name release target_id}.include? k } }
|
let(:seen_platform) { run_result; @json["platform"].select { |k, v| %w{name release target_id}.include? k } }
|
||||||
|
|
Loading…
Reference in a new issue