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

Parameter --additional-file-patterns is fixed #1019

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion lib/annotate/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def add_options_to_parser(option_parser) # rubocop:disable Metrics/MethodLength,
option_parser.on('--additional-file-patterns path1,path2,path3',
Array,
"Additional file paths or globs to annotate, separated by commas (e.g. `/foo/bar/%model_name%/*.rb,/baz/%model_name%.rb`)") do |additional_file_patterns|
ENV['additional_file_patterns'] = additional_file_patterns
env['additional_file_patterns'] = additional_file_patterns.join(',')
end

option_parser.on('-d',
Expand Down
2 changes: 1 addition & 1 deletion lib/annotate/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Annotate
def self.version
'3.2.0'
'3.2.1'
end
end
2 changes: 1 addition & 1 deletion spec/lib/annotate/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Annotate # rubocop:disable Metrics/ModuleLength
paths = 'foo/bar,baz'
allow(ENV).to receive(:[]=)
Parser.parse([option, paths])
expect(ENV).to have_received(:[]=).with('additional_file_patterns', ['foo/bar', 'baz'])
expect(ENV).to have_received(:[]=).with('additional_file_patterns', 'foo/bar,baz')
end
end
end
Expand Down
Loading