Skip to content

Commit

Permalink
🚨 Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed Nov 14, 2024
1 parent bd5649e commit 6bc834e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
23 changes: 10 additions & 13 deletions .rubocop_gradual.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"README.md:3252916395": [
"README.md:3623317309": [
[143, 3, 100, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3592044714]
],
"lib/omniauth/identity/model.rb:3893215304": [
Expand All @@ -14,8 +14,8 @@
[19, 9, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2104861380],
[24, 9, 189, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3443171851]
],
"lib/omniauth/identity/models/couch_potato.rb:4139265970": [
[14, 9, 674, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2599559599],
"lib/omniauth/identity/models/couch_potato.rb:2051092700": [
[14, 9, 663, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2599559599],
[22, 13, 125, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3604044426],
[27, 13, 83, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 902334745]
],
Expand All @@ -29,10 +29,8 @@
[20, 13, 125, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3604044426],
[25, 13, 83, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 902334745]
],
"lib/omniauth/identity/models/sequel.rb:2998546304": [
[15, 9, 1815, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 496918361],
[32, 13, 126, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2564660912],
[42, 13, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 851742457]
"lib/omniauth/identity/models/sequel.rb:3343978269": [
[15, 9, 1972, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 496918361]
],
"lib/omniauth/identity/secure_password.rb:2767570368": [
[13, 7, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 353293128],
Expand Down Expand Up @@ -144,9 +142,8 @@
[20, 5, 368, "RSpec/ExampleLength: Example has too many lines. [7/5]", 2117829356],
[21, 25, 47, "RSpec/VerifiedDoubles: Prefer using verifying doubles over normal doubles.", 1295072297]
],
"spec/support/shared_contexts/persistable_model.rb:1560791438": [
[3, 22, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3037799226],
[19, 7, 54, "RSpec/NoExpectationExample: No expectation found in this example.", 3311828801]
"spec/support/shared_contexts/persistable_model.rb:4102269984": [
[3, 22, 19, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3037799226]
],
"spec_ignored/nobrainer_spec.rb:3191134947": [
[19, 1, 65, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/models/no_brainer*_spec.rb`.", 1527957824],
Expand All @@ -158,10 +155,10 @@
[33, 7, 321, "RSpec/ExampleLength: Example has too many lines. [7/5]", 3315623106],
[39, 9, 71, "RSpec/SubjectStub: Do not stub methods of the object under test.", 399334056]
],
"spec_orms/couch_potato_spec.rb:1795075645": [
"spec_orms/couch_potato_spec.rb:1215064168": [
[5, 1, 71, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/models/couch_potato_module*_spec.rb`.", 3681175308],
[27, 7, 290, "RSpec/ExampleLength: Example has too many lines. [6/5]", 3358628882],
[32, 9, 71, "RSpec/SubjectStub: Do not stub methods of the object under test.", 399334056]
[29, 7, 290, "RSpec/ExampleLength: Example has too many lines. [6/5]", 3358628882],
[34, 9, 71, "RSpec/SubjectStub: Do not stub methods of the object under test.", 399334056]
],
"spec_orms/mongoid_spec.rb:1857267992": [
[7, 1, 61, "RSpec/SpecFilePathFormat: Spec path should end with `omni_auth/identity/models/mongoid*_spec.rb`.", 2184534986],
Expand Down
28 changes: 15 additions & 13 deletions lib/omniauth/identity/models/sequel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ def self.included(base)
# at which point the default (for Sequel ORM only) will change to `validations: false`
has_secure_password(validations: OmniAuth::Identity::Version.major < 4)

def self.auth_key=(key)
super
# Sequel version of validates_uniqueness_of! Does not incur ActiveRecord dependency!
validates_uniqueness_of(:key, case_sensitive: false)
end

# @param arguments [any] -
# Filtering is probably the most common dataset modifying action done in Sequel.
# Both the where and filter methods filter the dataset by modifying the dataset’s WHERE clause.
# Both accept a wide variety of input formats, which are passed as arguments below.
# See: https://sequel.jeremyevans.net/rdoc/files/doc/querying_rdoc.html#label-Filters
def self.locate(arguments)
where(arguments).first
class << self
def auth_key=(key)
super
# Sequel version of validates_uniqueness_of! Does not incur ActiveRecord dependency!
validates_uniqueness_of(:key, case_sensitive: false)
end

# @param arguments [any] -
# Filtering is probably the most common dataset modifying action done in Sequel.
# Both the where and filter methods filter the dataset by modifying the dataset’s WHERE clause.
# Both accept a wide variety of input formats, which are passed as arguments below.
# See: https://sequel.jeremyevans.net/rdoc/files/doc/querying_rdoc.html#label-Filters
def locate(arguments)
where(arguments).first
end
end

def persisted?
Expand Down
2 changes: 1 addition & 1 deletion spec/support/shared_contexts/persistable_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
end

it "is valid" do
expect(is_valid).to eq(true)
expect(is_valid).to be(true)
end
end

Expand Down

0 comments on commit 6bc834e

Please sign in to comment.