Skip to content
Merged
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
14 changes: 7 additions & 7 deletions lib/annotate/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ def parse

private

def commit
env.each_pair do |key, value|
ENV[key] = value
end
end

def parser
OptionParser.new do |option_parser|
add_options_to_parser(option_parser)
end
end

def commit
env.each_pair do |key, value|
ENV[key] = value
end
end

def add_options_to_parser(option_parser) # rubocop:disable Metrics/MethodLength
has_set_position = {}
positions = ANNOTATION_POSITIONS
Expand Down Expand Up @@ -184,7 +184,7 @@ def add_options_to_parser(option_parser) # rubocop:disable Metrics/MethodLength

option_parser.on('-R', '--require path',
"Additional file to require before loading models, may be used multiple times") do |path|
env['require'] = if !env['require'].blank?
env['require'] = if env['require'].present?
env['require'] + ",#{path}"
else
path
Expand Down