Skip to content

Commit

Permalink
Apply rubocop offences and remove bundler usage in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei committed Apr 11, 2024
1 parent e834fea commit 1f8270b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/rspec/openapi/shared_hooks.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
module SharedHooks

Check notice

Code scanning / Rubocop

Document classes and non-namespace modules. Note

Style/Documentation: Missing top-level documentation comment for module SharedHooks.

Check notice

Code scanning / Rubocop

Add the frozen_string_literal comment to the top of files to help transition to frozen string literals by default. Note

Style/FrozenStringLiteralComment: Missing frozen string literal comment.
def self.find_extractor
names = Bundler.load.specs.map(&:name)

if names.include?('rails') && defined?(Rails) &&
Rails.respond_to?(:application) && Rails.application
if defined?(Rails) && Rails.respond_to?(:application) && Rails.application
RSpec::OpenAPI::Extractors::Rails
elsif names.include?('hanami') && defined?(Hanami) &&
Hanami.respond_to?(:app) && Hanami.app?
elsif defined?(Hanami) && Hanami.respond_to?(:app) && Hanami.app?
RSpec::OpenAPI::Extractors::Hanami
# elsif defined?(Roda)
# some Roda extractor
Expand Down

0 comments on commit 1f8270b

Please sign in to comment.