Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerluan committed Oct 21, 2023
1 parent 86ba9dc commit 27d0c54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/arkana/models/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def all_keys

def include_environments(environments)
return unless environments

@environments = @environments.select { |e| environments.map(&:downcase).include?(e.downcase) }
end
end
4 changes: 2 additions & 2 deletions spec/config_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

describe "#include_environments" do
describe "when include_environments is specified" do
let(:include_environments) { ["debug", "debugPlusMore"] }
let(:include_environments) { %w[debug debugPlusMore] }
before { ARGV << "--include-environments" << include_environments.join(",") }

it "should include the environments specified, case insensitive" do
Expand All @@ -94,7 +94,7 @@

describe "when include_environments is not specified" do
it "should include all environments" do
all_environments = ["debug", "release", "debugPlusMore", "ReleasePlusMore"]
all_environments = %w[debug release debugPlusMore ReleasePlusMore]
expect(subject.environments.map(&:downcase)).to match_array(all_environments.map(&:downcase))
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/arguments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
end

context "when the option is passed in ARGV" do
let(:expected_environments) { ["first_env", "second_env"] }
let(:expected_environments) { %w[first_env second_env] }
before { ARGV.replace(["--include-environments", expected_environments.join(",")]) }

it "should return the environments passed as an array, not as a comma-separated string" do
Expand Down

0 comments on commit 27d0c54

Please sign in to comment.