Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
strategy:
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
steps:
Expand Down
11 changes: 5 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Disabling due to conflict with Ruby 2.7/3.1
Layout/BlockAlignment:
Enabled: false
inherit_from: .rubocop_todo.yml

Layout/DotPosition:
EnforcedStyle: trailing
Layout/EmptyLineAfterMagicComment:
Enabled: false
Layout/EmptyLines:
Enabled: false
Layout/LineLength:
IgnoredPatterns:
AllowedPatterns:
- 'VCR\.use_cassette'
- '(\A|\s)/.*?/'
Metrics/BlockLength:
ExcludedMethods: ['describe', 'context', 'before', 'it']
AllowedMethods: ['describe', 'context', 'before', 'it']
Metrics/MethodLength:
Max: 30
Metrics/ModuleLength:
Expand All @@ -28,4 +27,4 @@ Style/TrailingCommaInArguments:
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'consistent_comma'
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.1
94 changes: 94 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-01-22 21:38:20 UTC using RuboCop version 1.71.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
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleAlignWith.
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
Exclude:
- 'spec/lib/workos/session_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Layout/EmptyLinesAroundMethodBody:
Exclude:
- 'lib/workos/mfa.rb'
- 'lib/workos/user_management.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Layout/SpaceAroundMethodCallOperator:
Exclude:
- 'spec/lib/workos/directory_sync_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/DuplicateRequire:
Exclude:
- 'lib/workos/session.rb'

# Offense count: 3
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'lib/workos/directory_group.rb'
- 'lib/workos/directory_user.rb'
- 'lib/workos/errors.rb'

# Offense count: 5
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 624

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: separated, grouped
Style/AccessorGrouping:
Exclude:
- 'lib/workos/errors.rb'

# Offense count: 34
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces
Style/HashAsLastArrayItem:
Exclude:
- 'spec/lib/workos/directory_sync_spec.rb'
- 'spec/lib/workos/event_spec.rb'
- 'spec/lib/workos/organizations_spec.rb'
- 'spec/lib/workos/sso_spec.rb'
- 'spec/lib/workos/user_management_spec.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/KeywordParametersOrder:
Exclude:
- 'lib/workos/organizations.rb'

# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SafeForConstants.
Style/RedundantFetchBlock:
Exclude:
- 'spec/lib/workos/cache_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'lib/workos/directory_user.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'lib/workos/deprecated_hash_wrapper.rb'
- 'lib/workos/session.rb'
33 changes: 19 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ GEM
diff-lcs (1.5.1)
encryptor (3.0.0)
hashdiff (1.1.0)
json (2.9.1)
jwt (2.10.1)
base64
parallel (1.24.0)
parser (3.3.0.5)
language_server-protocol (3.17.0.3)
parallel (1.26.3)
parser (3.3.7.0)
ast (~> 2.4.1)
racc
public_suffix (5.0.4)
racc (1.7.3)
racc (1.8.1)
rainbow (3.1.1)
regexp_parser (2.9.0)
regexp_parser (2.10.0)
rexml (3.2.6)
rspec (3.9.0)
rspec-core (~> 3.9.0)
Expand All @@ -43,19 +45,22 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.4)
rubocop (0.93.1)
rubocop (1.71.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
unicode-display_width (1.8.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
vcr (5.0.0)
webmock (3.23.0)
addressable (>= 2.8.0)
Expand All @@ -68,7 +73,7 @@ PLATFORMS
DEPENDENCIES
bundler (>= 2.0.1)
rspec (~> 3.9.0)
rubocop (~> 0.77)
rubocop (~> 1.71)
vcr (~> 5.0.0)
webmock
workos!
Expand Down
2 changes: 0 additions & 2 deletions lib/workos/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
module WorkOS
# The Session class provides helper methods for working with WorkOS sessions
# This class is not meant to be instantiated in a user space, and is instantiated internally but exposed.
# rubocop:disable Metrics/ClassLength
class Session
attr_accessor :jwks, :jwks_algorithms, :user_management, :cookie_password, :session_data, :client_id

Expand Down Expand Up @@ -180,5 +179,4 @@ def is_valid_jwt(token)
end
# rubocop:enable Naming/PredicateName
end
# rubocop:enable Metrics/ClassLength
end
4 changes: 2 additions & 2 deletions workos.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'bundler', '>= 2.0.1'
spec.add_development_dependency 'rspec', '~> 3.9.0'
spec.add_development_dependency 'rubocop', '~> 0.77'
spec.add_development_dependency 'rubocop', '~> 1.71'
spec.add_development_dependency 'vcr', '~> 5.0.0'
spec.add_development_dependency 'webmock'

spec.required_ruby_version = '>= 2.7'
spec.required_ruby_version = '>= 3.1'
end
Loading