Skip to content

Commit

Permalink
Updating to use new rubocop rules (#670)
Browse files Browse the repository at this point in the history
Co-authored-by: Bess Sadler <bess.sadler@princeton.edu>
  • Loading branch information
carolyncole and bess authored May 1, 2024
1 parent cc911df commit 1699caf
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 13 deletions.
81 changes: 81 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,84 @@ RSpec/ExampleLength:

Style/NumericPredicate:
Enabled: false

Rails/ActionControllerTestCase: # new in 2.14
Enabled: true
Rails/ActiveRecordCallbacksOrder: # new in 2.7
Enabled: true
Rails/AddColumnIndex: # new in 2.11
Enabled: true
Rails/AfterCommitOverride: # new in 2.8
Enabled: true
Rails/AttributeDefaultBlockValue: # new in 2.9
Enabled: true
Rails/CompactBlank: # new in 2.13
Enabled: true
Rails/DeprecatedActiveModelErrorsMethods: # new in 2.14
Enabled: true
Rails/DotSeparatedKeys: # new in 2.15
Enabled: true
Rails/DuplicateAssociation: # new in 2.14
Enabled: true
Rails/DuplicateScope: # new in 2.14
Enabled: true
Rails/DurationArithmetic: # new in 2.13
Enabled: true
Rails/EagerEvaluationLogMessage: # new in 2.11
Enabled: true
Rails/ExpandedDateRange: # new in 2.11
Enabled: true
Rails/FindById: # new in 2.7
Enabled: true
Rails/I18nLazyLookup: # new in 2.14
Enabled: true
Rails/I18nLocaleAssignment: # new in 2.11
Enabled: true
Rails/I18nLocaleTexts: # new in 2.14
Enabled: true
Rails/Inquiry: # new in 2.7
Enabled: true
Rails/MailerName: # new in 2.7
Enabled: true
Rails/MatchRoute: # new in 2.7
Enabled: true
Rails/MigrationClassName: # new in 2.14
Enabled: true
Rails/NegateInclude: # new in 2.7
Enabled: true
Rails/Pluck: # new in 2.7
Enabled: true
Rails/PluckInWhere: # new in 2.7
Enabled: true
Rails/RedundantPresenceValidationOnBelongsTo: # new in 2.13
Enabled: true
Rails/RedundantTravelBack: # new in 2.12
Enabled: true
Rails/RenderInline: # new in 2.7
Enabled: true
Rails/RenderPlainText: # new in 2.7
Enabled: true
Rails/RootJoinChain: # new in 2.13
Enabled: true
Rails/RootPublicPath: # new in 2.15
Enabled: true
Rails/ShortI18n: # new in 2.7
Enabled: true
Rails/SquishedSQLHeredocs: # new in 2.8
Enabled: true
Rails/StripHeredoc: # new in 2.15
Enabled: true
Rails/TimeZoneAssignment: # new in 2.10
Enabled: true
Rails/ToFormattedS: # new in 2.15
Enabled: true
Rails/TransactionExitStatement: # new in 2.14
Enabled: true
Rails/UnusedIgnoredColumns: # new in 2.11
Enabled: true
Rails/WhereEquals: # new in 2.9
Enabled: true
Rails/WhereExists: # new in 2.7
Enabled: true
Rails/WhereNot: # new in 2.8
Enabled: true
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ GEM
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
coveralls_reborn (0.28.0)
simplecov (~> 0.22.0)
Expand Down Expand Up @@ -210,7 +210,7 @@ GEM
health-monitor-rails (11.1.0)
railties (>= 6.1)
honeybadger (5.4.1)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
importmap-rails (1.2.1)
Expand Down Expand Up @@ -254,7 +254,7 @@ GEM
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.5)
minitest (5.20.0)
minitest (5.22.3)
msgpack (1.7.2)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
Expand Down Expand Up @@ -287,8 +287,8 @@ GEM
nokogiri (~> 1.5)
omniauth (~> 1.2)
orm_adapter (0.5.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
pg (1.5.3)
Expand All @@ -305,7 +305,7 @@ GEM
puma (5.6.7)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.8)
rack (2.2.9)
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-proxy (0.7.7)
Expand Down Expand Up @@ -349,7 +349,7 @@ GEM
redis (4.8.1)
redis-client (0.19.1)
connection_pool
regexp_parser (2.8.1)
regexp_parser (2.9.0)
reline (0.3.8)
io-console (~> 0.5)
responders (3.1.0)
Expand Down Expand Up @@ -386,9 +386,9 @@ GEM
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.19.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.15.2)
Expand Down Expand Up @@ -468,7 +468,7 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
virtus (2.0.0)
axiom-types (~> 0.1)
coercible (~> 1.0)
Expand Down
4 changes: 2 additions & 2 deletions spec/models/mediaflux/http/namespace_destroy_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
mediaflux_id = ProjectMediaflux.create!(project: valid_project, session_id: session_id)
expect(mediaflux_id).not_to be_nil
namespace_list = Mediaflux::Http::NamespaceListRequest.new(session_token: session_id, parent_namespace: "/td-test-001/tigerdataNS").namespaces
namespace_names = namespace_list.map { |a| a[:name] }
namespace_names = namespace_list.pluck(:name)
expect(namespace_names).to include(namespace)

# Destroy the namespace of the project and everything in it
described_class.new(session_token: session_id, namespace: "/td-test-001/tigerdataNS/#{namespace}").destroy
namespace_list = Mediaflux::Http::NamespaceListRequest.new(session_token: session_id, parent_namespace: "/td-test-001/tigerdataNS").namespaces
namespace_names = namespace_list.map { |a| a[:name] }
namespace_names = namespace_list.pluck(:name)
expect(namespace_names).not_to include(namespace)
response = described_class.new(session_token: session_id, namespace: "/td-test-001/tigerdataNS/#{namespace}").destroy
expect(response[:message]).to include("The namespace '/td-test-001/tigerdataNS/#{namespace}' does not exist or is not accessible")
Expand Down

0 comments on commit 1699caf

Please sign in to comment.