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: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.4', '3.3.0']
ruby-version: ['3.3.10', '3.4.1', '3.4.9']

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 3.1
TargetRubyVersion: 3.3
NewCops: enable
Exclude:
- 'vendor/**/*'
- '_ignore/**/*'

Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec

Gemspec/RequireMFA:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0
3.3.10
2 changes: 1 addition & 1 deletion encrypted_strings.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Gem::Specification.new do |s|

s.add_development_dependency("maxitest")
s.add_development_dependency("rake")
s.add_development_dependency "rubocop", '1.30.0'
s.add_development_dependency "rubocop", '1.59.0'
s.add_development_dependency("shoulda-matchers")
end
14 changes: 7 additions & 7 deletions lib/encrypted_strings/extensions/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def self.included(base) #:nodoc:
#
# password = 'shhhh'
# password.encrypt(:sha, :salt => 'secret') # => "3b22cbe4acde873c3efc82681096f3ae69aff828"
def encrypt(*args)
cipher = cipher_from_args(*args)
def encrypt(*)
cipher = cipher_from_args(*)
encrypted_string = cipher.encrypt(self)
encrypted_string.cipher = cipher

Expand All @@ -58,8 +58,8 @@ def encrypt(*args)
# password = 'shhhh'
# password.encrypt!(:symmetric, :password => 'secret') # => "qSg8vOo6QfU=\n"
# password # => "qSg8vOo6QfU=\n"
def encrypt!(*args)
encrypted_string = encrypt(*args)
def encrypt!(*)
encrypted_string = encrypt(*)
self.cipher = encrypted_string.cipher

replace(encrypted_string)
Expand Down Expand Up @@ -113,8 +113,8 @@ def decrypt(*args)
# password = "qSg8vOo6QfU=\n"
# password.decrypt!(:symmetric, :password => 'secret') # => "shhhh"
# password # => "shhhh"
def decrypt!(*args)
value = replace(decrypt(*args))
def decrypt!(*)
value = replace(decrypt(*))
self.cipher = nil
value
end
Expand Down Expand Up @@ -201,6 +201,6 @@ def cipher_from_args(*args) #:nodoc:
end
end

::String.class_eval do
String.class_eval do
include EncryptedStrings::Extensions::String
end
Loading