Skip to content

Commit

Permalink
style: remove rubocop exclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessa-passage committed Nov 14, 2024
1 parent e7bdd80 commit 0df970a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 46 deletions.
27 changes: 1 addition & 26 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,9 @@ AllCops:
- 'lib/models/update_otp_auth_method.rb'
- 'lib/models/update_passkeys_auth_method.rb'

Naming/AccessorMethodName:
Enabled: false

Style/GlobalVars:
Enabled: false

Metrics/ClassLength:
Max: 300

Metrics/MethodLength:
Enabled: false

Metrics/AbcSize:
Enabled: false

Layout/LineLength:
Exclude:
- 'passageidentity.gemspec'

ParameterLists:
Exclude:
- 'lib/passageidentity/client.rb'

Metrics/CyclomaticComplexity:
Exclude:
- 'lib/passageidentity/client.rb'

Metrics/PerceivedComplexity:
Exclude:
- 'lib/passageidentity/client.rb'
Max: 120

7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ ruby tests/all.rb
ruby tests/*_test.rb
```

Run Formatting:

```
gem install rubocop
rubocop --format github
```

Run Linter:

```
Expand Down
21 changes: 10 additions & 11 deletions lib/passageidentity/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

module Passage
# The Passage::Auth class provides methods for authenticating requests and tokens
# using the Passage authentication service. It supports fetching and caching
# JSON Web Keys (JWKS) for token verification, and provides methods for
# validating JWTs and revoking user refresh tokens.
class Auth
def initialize(app_id, auth_strategy)
@app_cache = {}
Expand All @@ -20,14 +17,6 @@ def initialize(app_id, auth_strategy)
fetch_jwks
end

def get_cache(key)
@app_cache[key]
end

def set_cache(key, value)
@app_cache[key] = value
end

def fetch_app
client = OpenapiClient::AppsApi.new
response = client.get_app(@app_id)
Expand Down Expand Up @@ -145,5 +134,15 @@ def revoke_user_refresh_tokens(user_id)
body: e.response[:body]
)
end

private

Check failure on line 139 in lib/passageidentity/auth.rb

View workflow job for this annotation

GitHub Actions / Format

Layout/TrailingWhitespace: Trailing whitespace detected.
def get_cache(key)
@app_cache[key]
end

def set_cache(key, value)
@app_cache[key] = value
end
end
end
2 changes: 1 addition & 1 deletion lib/passageidentity/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Passage
EMAIL_CHANNEL = 'email'
PHONE_CHANNEL = 'phone'

# The Passage::Client class provides methods for interacting with the Passage
# The Passage::Client class provides methods for interacting with Passage
class Client
attr_reader :auth, :user

Expand Down
2 changes: 1 addition & 1 deletion lib/passageidentity/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'net/http'

module Passage
# PassageError is a custom error class for handling errors in the PassageIdentity gem.
# PassageError is a custom error class for handling errors
class PassageError < StandardError
attr_reader :status_code, :status_text, :message, :error

Expand Down

0 comments on commit 0df970a

Please sign in to comment.