Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
magni- committed Jul 14, 2022
1 parent 03de534 commit b417562
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ruby RUBY_VERSION

gemspec

gem 'grape', case version = ENV['GRAPE_VERSION'] || '>= 1.5.0'
gem 'grape', case version = ENV.fetch('GRAPE_VERSION', '>= 1.5.0')
when 'HEAD'
{ git: 'https://github.com/ruby-grape/grape' }
else
Expand Down
1 change: 0 additions & 1 deletion grape-swagger.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'grape', '~> 1.3'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec}/*`.split("\n")
s.require_paths = ['lib']
end
2 changes: 1 addition & 1 deletion lib/grape-swagger/rake/oapi_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def urls_for(api_class)
.select { |e| e.include?('doc') }
.reject { |e| e.include?(':name') }
.map { |e| format_path(e) }
.map { |e| [e, ENV['resource']].join('/').chomp('/') }
.map { |e| [e, ENV.fetch('resource', nil)].join('/').chomp('/') }
end

def format_path(path)
Expand Down

0 comments on commit b417562

Please sign in to comment.