Skip to content

Commit

Permalink
Style/RedundantConstantBase-20230403233322 (#858)
Browse files Browse the repository at this point in the history
* 🚓 regenerate rubocop todo

* 🚓 Style/RedundantConstantBase

* 🚓 regenerate rubocop todo

---------

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>
  • Loading branch information
github-actions[bot] and Rubocop Challenger authored Apr 6, 2023
1 parent 8f14191 commit 5fc1bf5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 34 deletions.
26 changes: 1 addition & 25 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 180`
# on 2023-03-22 23:33:34 UTC using RuboCop version 1.48.1.
# on 2023-04-03 23:33:58 UTC using RuboCop version 1.49.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -1725,20 +1725,6 @@ Style/IfWithBooleanLiteralBranches:
- 'lib/apipie/validator.rb'
- 'lib/tasks/apipie.rake'

# Offense count: 13
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: InverseMethods, InverseBlocks.
Style/InverseMethods:
Exclude:
- 'lib/apipie/configuration.rb'
- 'lib/apipie/extractor/collector.rb'
- 'lib/apipie/extractor/writer.rb'
- 'lib/apipie/generator/swagger/warning.rb'
- 'lib/apipie/method_description.rb'
- 'lib/apipie/param_description.rb'
- 'lib/apipie/swagger_generator.rb'
- 'spec/spec_helper.rb'

# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -1912,16 +1898,6 @@ Style/RedundantConditional:
- 'lib/apipie/validator.rb'
- 'lib/tasks/apipie.rake'

# Offense count: 9
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantConstantBase:
Exclude:
- 'lib/tasks/apipie.rake'
- 'spec/dummy/config.ru'
- 'spec/lib/rake_spec.rb'
- 'spec/lib/swagger/rake_swagger_spec.rb'
- 'spec/spec_helper.rb'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/RedundantInterpolation:
Expand Down
8 changes: 4 additions & 4 deletions lib/tasks/apipie.rake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace :apipie do
task :static, [:version] => :environment do |t, args|
with_loaded_documentation do
args.with_defaults(:version => Apipie.configuration.default_version)
out = ENV["OUT"] || File.join(::Rails.root, Apipie.configuration.doc_path, 'apidoc')
out = ENV["OUT"] || File.join(Rails.root, Apipie.configuration.doc_path, 'apidoc')
subdir = File.basename(out)
copy_jscss(out)
Apipie.configuration.version_in_url = false
Expand All @@ -44,7 +44,7 @@ namespace :apipie do
task :static_json, [:version] => :environment do |t, args|
with_loaded_documentation do
args.with_defaults(:version => Apipie.configuration.default_version)
out = ENV["OUT"] || File.join(::Rails.root, Apipie.configuration.doc_path, 'apidoc')
out = ENV["OUT"] || File.join(Rails.root, Apipie.configuration.doc_path, 'apidoc')
([nil] + Apipie.configuration.languages).each do |lang|
doc = Apipie.to_json(args[:version], nil, nil, lang)
generate_json_page(out, doc, lang)
Expand All @@ -55,7 +55,7 @@ namespace :apipie do
desc "Generate static swagger json"
task :static_swagger_json, [:version, :swagger_content_type_input, :filename_suffix] => :environment do |t, args|
with_loaded_documentation do
out = ENV["OUT"] || File.join(::Rails.root, Apipie.configuration.doc_path, 'apidoc')
out = ENV["OUT"] || File.join(Rails.root, Apipie.configuration.doc_path, 'apidoc')
generate_swagger_using_args(args, out)
end
end
Expand All @@ -68,7 +68,7 @@ namespace :apipie do
desc "Did swagger output change since the last execution of this task?"
task :did_swagger_change, [:version, :swagger_content_type_input, :filename_suffix] => :environment do |t, args|
with_loaded_documentation do
out = ENV["OUT_REF"] || File.join(::Rails.root, Apipie.configuration.doc_path, 'apidoc_ref')
out = ENV["OUT_REF"] || File.join(Rails.root, Apipie.configuration.doc_path, 'apidoc_ref')
paths = generate_swagger_using_args(args, out)
paths.each {|path|
existing_files_in_dir = Pathname(out).children(true)
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('config/environment', __dir__)
require File.expand_path('config/environment', __dir__)
run Dummy::Application
2 changes: 1 addition & 1 deletion spec/lib/rake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end

let(:doc_output) do
File.join(::Rails.root, doc_path, 'apidoc')
File.join(Rails.root, doc_path, 'apidoc')
end

after do
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/swagger/rake_swagger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
end

let(:doc_output) do
File.join(::Rails.root, doc_path, 'apidoc')
File.join(Rails.root, doc_path, 'apidoc')
end

let(:ref_output) do
File.join(::Rails.root, doc_path, 'apidoc_ref')
File.join(Rails.root, doc_path, 'apidoc_ref')
end


Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def fail(msg)
config.mock_with :rspec

# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.fixture_path = "#{Rails.root}/spec/fixtures"

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
Expand Down

0 comments on commit 5fc1bf5

Please sign in to comment.