From 3022f560c8fce72c74cb5b508eb4d4c8eeb4f754 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 5 Jan 2021 21:03:02 +0300 Subject: [PATCH 1/2] Allow embedded newlines in arguments --- lib/dpl/cli.rb | 2 +- spec/cli_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpl/cli.rb b/lib/dpl/cli.rb index 65e6868a6..fdfebfa8d 100644 --- a/lib/dpl/cli.rb +++ b/lib/dpl/cli.rb @@ -7,7 +7,7 @@ def self.run(*args) new(args).run end - OPTION_PATTERN = /\A--([a-z][a-z_\-]*)(?:=(.+))?\z/ + OPTION_PATTERN = /\A--([a-z][a-z_\-]*)(?:=(.+))?\z/m attr_accessor :options, :fold_count def initialize(*args) diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index d41ae5c09..b20002acb 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -5,7 +5,7 @@ describe "#options" do example { expect(described_class.new.options[:app]) .to eq(File.basename(Dir.pwd)) } example { expect(described_class.new(:app => 'foo') .options[:app]).to eq('foo') } - example { expect(described_class.new("--app=foo") .options[:app]).to eq('foo') } + example { expect(described_class.new("--app=foo\nbar") .options[:app]).to eq("foo\nbar") } example { expect(described_class.new("--app") .options[:app]).to eq(true) } example { expect(described_class.new("--app=foo", "--app=bar") .options[:app]).to eq(['foo', 'bar']) } From 04714a5d28bf9debb664f438e2a3075afe609621 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 5 Jan 2021 22:43:23 +0300 Subject: [PATCH 2/2] Fix chef transient requirement for Ruby 2.4 "The last version of chef-utils (>= 0) to support your Ruby & RubyGems was 16.6.14. <...> chef-utils requires Ruby version >= 2.6.0. The current ruby version is 2.4.10.364." --- dpl-chef_supermarket.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpl-chef_supermarket.gemspec b/dpl-chef_supermarket.gemspec index 5ab2ca0c2..cc7800234 100644 --- a/dpl-chef_supermarket.gemspec +++ b/dpl-chef_supermarket.gemspec @@ -12,7 +12,7 @@ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.3.0") elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.0") gemspec_for 'chef_supermarket', (deps << ['chef', '~> 13.0']) elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0") - gemspec_for 'chef_supermarket', (deps << ['chef', '~> 14.0']) + gemspec_for 'chef_supermarket', (deps << ['chef', '~> 14.0'] << ['chef-utils', '<= 16.6.14']) elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0") gemspec_for 'chef_supermarket', (deps << ['chef', '~> 15.0'] << ['chef-zero', '<= 14.0.17']) else