active_record_encrypted_string 1.2.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yaml +73 -0
- data/.gitignore +2 -0
- data/Appraisals +4 -0
- data/CHANGELOG.md +21 -0
- data/active_record_encrypted_string.gemspec +4 -3
- data/gemfiles/5_0_stable.gemfile +1 -1
- data/gemfiles/5_1_stable.gemfile +1 -1
- data/gemfiles/5_2_stable.gemfile +1 -1
- data/gemfiles/6_0_stable.gemfile +1 -1
- data/gemfiles/6_1_stable.gemfile +1 -1
- data/gemfiles/7_0_stable.gemfile +9 -0
- data/lib/active_record_encrypted_string/type.rb +4 -0
- data/lib/active_record_encrypted_string/version.rb +1 -1
- metadata +24 -10
- data/.circleci/config.yml +0 -72
- data/Gemfile.lock +0 -118
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a11432892b4764dc623de4f728e010d2a1bc44e392e501e21159d254514f7460
|
4
|
+
data.tar.gz: 175ef7094df6164e79b5b26e1ba222cecdd68c53aa2d1a2a61da1a7a5faa93b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4596115a52431e30d165622395ebefd8987f3f81271ac423de300a28215da338b13a43832b1c09b73aac488bea1178dc18351c4d8a054144ac6e0486ac69e5e6
|
7
|
+
data.tar.gz: 78aeb9cbc2febad109a34ff36e832b8d27a78994c887a7787c830990e2ece4944cc8ae00e1dd888ffbb13a0a40dc37d98477c956574c9c43b33913531705678a
|
@@ -0,0 +1,73 @@
|
|
1
|
+
name: Rspec
|
2
|
+
|
3
|
+
on: pull_request
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
rspec-on-ruby2:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
rails:
|
12
|
+
- 5_0_stable
|
13
|
+
- 5_1_stable
|
14
|
+
- 5_2_stable
|
15
|
+
- 6_0_stable
|
16
|
+
- 6_1_stable
|
17
|
+
- 7_0_stable
|
18
|
+
|
19
|
+
name: Rails ${{ matrix.rails }} on Ruby 2.7
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
|
24
|
+
- uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: 2.7
|
27
|
+
|
28
|
+
- name: Install dependencies
|
29
|
+
run: |
|
30
|
+
bundle lock
|
31
|
+
bundle config --local path '.bundle'
|
32
|
+
bundle check || bundle install --jobs 4
|
33
|
+
|
34
|
+
bundle exec appraisal ${{ matrix.rails }} bundle lock
|
35
|
+
bundle exec appraisal ${{ matrix.rails }} bundle install --jobs 4
|
36
|
+
|
37
|
+
- name: Run rspec
|
38
|
+
env:
|
39
|
+
CI: 1
|
40
|
+
run: bundle exec appraisal ${{ matrix.rails }} rspec
|
41
|
+
|
42
|
+
rspec-on-ruby3:
|
43
|
+
runs-on: ubuntu-latest
|
44
|
+
|
45
|
+
strategy:
|
46
|
+
matrix:
|
47
|
+
rails:
|
48
|
+
- 6_0_stable
|
49
|
+
- 6_1_stable
|
50
|
+
- 7_0_stable
|
51
|
+
|
52
|
+
name: Rails ${{ matrix.rails }} on Ruby 3
|
53
|
+
|
54
|
+
steps:
|
55
|
+
- uses: actions/checkout@v2
|
56
|
+
|
57
|
+
- uses: ruby/setup-ruby@v1
|
58
|
+
with:
|
59
|
+
ruby-version: 3.0
|
60
|
+
|
61
|
+
- name: Install dependencies
|
62
|
+
run: |
|
63
|
+
bundle lock
|
64
|
+
bundle config --local path '.bundle'
|
65
|
+
bundle check || bundle install --jobs 4
|
66
|
+
|
67
|
+
bundle exec appraisal ${{ matrix.rails }} bundle lock
|
68
|
+
bundle exec appraisal ${{ matrix.rails }} bundle install --jobs 4
|
69
|
+
|
70
|
+
- name: Run rspec
|
71
|
+
env:
|
72
|
+
CI: 1
|
73
|
+
run: bundle exec appraisal ${{ matrix.rails }} rspec
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
|
3
3
|
- [#x](https://github.com/kamillle/active_record_encrypted_string/pull/x) Please describe
|
4
4
|
|
5
|
+
## 1.4.0
|
6
|
+
|
7
|
+
- [#24](https://github.com/kamillle/active_record_encrypted_string/pull/24) Support Rails7
|
8
|
+
|
9
|
+
## 1.3.1
|
10
|
+
|
11
|
+
- [#23](https://github.com/kamillle/active_record_encrypted_string/pull/23) Testing by Ruby3
|
12
|
+
- [#20](https://github.com/kamillle/active_record_encrypted_string/pull/20) Run tests by GitHub Actions
|
13
|
+
|
14
|
+
## 1.3.0
|
15
|
+
|
16
|
+
- [#13](https://github.com/kamillle/active_record_encrypted_string/pull/16) Override changed_in_place? for handling changes
|
17
|
+
|
18
|
+
Thanks @ericproulx :heart:
|
19
|
+
|
20
|
+
## 1.2.1
|
21
|
+
|
22
|
+
- [#13](https://github.com/kamillle/active_record_encrypted_string/pull/13) Replace to rspec-parameterized-context
|
23
|
+
- [#12](https://github.com/kamillle/active_record_encrypted_string/pull/12) Introduce pry-byebug
|
24
|
+
- [#11](https://github.com/kamillle/active_record_encrypted_string/pull/11) Ignore Gemfile.lock
|
25
|
+
|
5
26
|
## 1.2.0
|
6
27
|
|
7
28
|
- [#7](https://github.com/kamillle/active_record_encrypted_string/pull/7) Support Rails v6.1.0rc1
|
@@ -26,13 +26,14 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ['lib']
|
28
28
|
|
29
|
-
spec.add_dependency 'activerecord', '>= 5.0', '<
|
30
|
-
spec.add_dependency 'activesupport', '<
|
29
|
+
spec.add_dependency 'activerecord', '>= 5.0', '< 8'
|
30
|
+
spec.add_dependency 'activesupport', '< 8'
|
31
31
|
spec.add_development_dependency 'appraisal'
|
32
32
|
spec.add_development_dependency 'bundler'
|
33
33
|
spec.add_development_dependency 'rake'
|
34
34
|
spec.add_development_dependency 'rspec'
|
35
|
-
spec.add_development_dependency 'rspec-parameterized'
|
35
|
+
spec.add_development_dependency 'rspec-parameterized-context'
|
36
36
|
spec.add_development_dependency 'rubocop'
|
37
37
|
spec.add_development_dependency 'sqlite3'
|
38
|
+
spec.add_development_dependency 'pry-byebug'
|
38
39
|
end
|
data/gemfiles/5_0_stable.gemfile
CHANGED
data/gemfiles/5_1_stable.gemfile
CHANGED
data/gemfiles/5_2_stable.gemfile
CHANGED
data/gemfiles/6_0_stable.gemfile
CHANGED
data/gemfiles/6_1_stable.gemfile
CHANGED
@@ -28,6 +28,10 @@ module ActiveRecordEncryptedString
|
|
28
28
|
v.present? ? encryptor.decrypt_and_verify(v) : v
|
29
29
|
end
|
30
30
|
|
31
|
+
def changed_in_place?(raw_old_value, new_value)
|
32
|
+
deserialize(raw_old_value) != new_value if new_value.is_a?(::String)
|
33
|
+
end
|
34
|
+
|
31
35
|
private
|
32
36
|
|
33
37
|
def encryptor
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_encrypted_string
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kamillle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,21 +29,21 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "<"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '8'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '8'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: appraisal
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,7 +101,7 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: rspec-parameterized
|
104
|
+
name: rspec-parameterized-context
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
@@ -142,6 +142,20 @@ dependencies:
|
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: pry-byebug
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
145
159
|
description: Generates encrypted_string type that transparently encrypt and decrypt
|
146
160
|
string value to ActiveRecord.
|
147
161
|
email:
|
@@ -150,7 +164,7 @@ executables: []
|
|
150
164
|
extensions: []
|
151
165
|
extra_rdoc_files: []
|
152
166
|
files:
|
153
|
-
- ".
|
167
|
+
- ".github/workflows/rspec.yaml"
|
154
168
|
- ".gitignore"
|
155
169
|
- ".rspec"
|
156
170
|
- ".rubocop.yml"
|
@@ -159,7 +173,6 @@ files:
|
|
159
173
|
- CHANGELOG.md
|
160
174
|
- CODE_OF_CONDUCT.md
|
161
175
|
- Gemfile
|
162
|
-
- Gemfile.lock
|
163
176
|
- README.md
|
164
177
|
- Rakefile
|
165
178
|
- active_record_encrypted_string.gemspec
|
@@ -170,6 +183,7 @@ files:
|
|
170
183
|
- gemfiles/5_2_stable.gemfile
|
171
184
|
- gemfiles/6_0_stable.gemfile
|
172
185
|
- gemfiles/6_1_stable.gemfile
|
186
|
+
- gemfiles/7_0_stable.gemfile
|
173
187
|
- lib/active_record_encrypted_string.rb
|
174
188
|
- lib/active_record_encrypted_string/configuration.rb
|
175
189
|
- lib/active_record_encrypted_string/type.rb
|
@@ -195,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
209
|
- !ruby/object:Gem::Version
|
196
210
|
version: '0'
|
197
211
|
requirements: []
|
198
|
-
rubygems_version: 3.1.
|
212
|
+
rubygems_version: 3.1.4
|
199
213
|
signing_key:
|
200
214
|
specification_version: 4
|
201
215
|
summary: Generates encrypted_string type that transparently encrypt and decrypt string
|
data/.circleci/config.yml
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
common: &common
|
2
|
-
working_directory: ~/workspace
|
3
|
-
parallelism: 1
|
4
|
-
resource_class: small
|
5
|
-
environment:
|
6
|
-
CI: 1
|
7
|
-
docker:
|
8
|
-
- image: circleci/ruby:2.7.1
|
9
|
-
steps:
|
10
|
-
- checkout
|
11
|
-
|
12
|
-
- restore_cache:
|
13
|
-
keys:
|
14
|
-
- bundle-v1-{{ checksum "active_record_encrypted_string.gemspec" }}
|
15
|
-
- bundle-v1-
|
16
|
-
|
17
|
-
- run:
|
18
|
-
name: Build gem dependencies
|
19
|
-
command: |
|
20
|
-
bundle lock
|
21
|
-
bundle config --local path '.bundle'
|
22
|
-
bundle check || bundle install --jobs 4
|
23
|
-
|
24
|
-
bundle exec appraisal ${RAILS_VERSION} bundle lock
|
25
|
-
bundle exec appraisal ${RAILS_VERSION} bundle install --jobs 4
|
26
|
-
bundle exec appraisal ${RAILS_VERSION} bundle clean
|
27
|
-
|
28
|
-
- save_cache:
|
29
|
-
key: bundle-v1-{{ checksum "active_record_encrypted_string.gemspec" }}
|
30
|
-
paths:
|
31
|
-
- active_record_encrypted_string/gemfiles/.bundle
|
32
|
-
|
33
|
-
- run:
|
34
|
-
name: Run tests
|
35
|
-
command: bundle exec appraisal ${RAILS_VERSION} rspec
|
36
|
-
|
37
|
-
version: 2.1
|
38
|
-
jobs:
|
39
|
-
build_and_test_rails_5_0:
|
40
|
-
<<: *common
|
41
|
-
environment:
|
42
|
-
RAILS_VERSION: 5_0_stable
|
43
|
-
|
44
|
-
build_and_test_rails_5_1:
|
45
|
-
<<: *common
|
46
|
-
environment:
|
47
|
-
RAILS_VERSION: 5_1_stable
|
48
|
-
|
49
|
-
build_and_test_rails_5_2:
|
50
|
-
<<: *common
|
51
|
-
environment:
|
52
|
-
RAILS_VERSION: 5_2_stable
|
53
|
-
|
54
|
-
build_and_test_rails_6_0:
|
55
|
-
<<: *common
|
56
|
-
environment:
|
57
|
-
RAILS_VERSION: 6_0_stable
|
58
|
-
|
59
|
-
build_and_test_rails_6_1:
|
60
|
-
<<: *common
|
61
|
-
environment:
|
62
|
-
RAILS_VERSION: 6_1_stable
|
63
|
-
|
64
|
-
workflows:
|
65
|
-
version: 2
|
66
|
-
build-and-test:
|
67
|
-
jobs:
|
68
|
-
- build_and_test_rails_5_0
|
69
|
-
- build_and_test_rails_5_1
|
70
|
-
- build_and_test_rails_5_2
|
71
|
-
- build_and_test_rails_6_0
|
72
|
-
- build_and_test_rails_6_1
|
data/Gemfile.lock
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
active_record_encrypted_string (1.2.0)
|
5
|
-
activerecord (>= 5.0, < 7)
|
6
|
-
activesupport (< 7)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
abstract_type (0.0.7)
|
12
|
-
activemodel (6.0.3.1)
|
13
|
-
activesupport (= 6.0.3.1)
|
14
|
-
activerecord (6.0.3.1)
|
15
|
-
activemodel (= 6.0.3.1)
|
16
|
-
activesupport (= 6.0.3.1)
|
17
|
-
activesupport (6.0.3.1)
|
18
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
-
i18n (>= 0.7, < 2)
|
20
|
-
minitest (~> 5.1)
|
21
|
-
tzinfo (~> 1.1)
|
22
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
23
|
-
adamantium (0.2.0)
|
24
|
-
ice_nine (~> 0.11.0)
|
25
|
-
memoizable (~> 0.4.0)
|
26
|
-
appraisal (2.3.0)
|
27
|
-
bundler
|
28
|
-
rake
|
29
|
-
thor (>= 0.14.0)
|
30
|
-
ast (2.4.0)
|
31
|
-
binding_ninja (0.2.3)
|
32
|
-
coderay (1.1.3)
|
33
|
-
concord (0.1.5)
|
34
|
-
adamantium (~> 0.2.0)
|
35
|
-
equalizer (~> 0.0.9)
|
36
|
-
concurrent-ruby (1.1.6)
|
37
|
-
diff-lcs (1.3)
|
38
|
-
equalizer (0.0.11)
|
39
|
-
i18n (1.8.3)
|
40
|
-
concurrent-ruby (~> 1.0)
|
41
|
-
ice_nine (0.11.2)
|
42
|
-
memoizable (0.4.2)
|
43
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
44
|
-
minitest (5.14.1)
|
45
|
-
parallel (1.19.1)
|
46
|
-
parser (2.7.1.3)
|
47
|
-
ast (~> 2.4.0)
|
48
|
-
proc_to_ast (0.1.0)
|
49
|
-
coderay
|
50
|
-
parser
|
51
|
-
unparser
|
52
|
-
procto (0.0.3)
|
53
|
-
rainbow (3.0.0)
|
54
|
-
rake (12.3.3)
|
55
|
-
regexp_parser (1.7.1)
|
56
|
-
rexml (3.2.4)
|
57
|
-
rspec (3.9.0)
|
58
|
-
rspec-core (~> 3.9.0)
|
59
|
-
rspec-expectations (~> 3.9.0)
|
60
|
-
rspec-mocks (~> 3.9.0)
|
61
|
-
rspec-core (3.9.2)
|
62
|
-
rspec-support (~> 3.9.3)
|
63
|
-
rspec-expectations (3.9.2)
|
64
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.9.0)
|
66
|
-
rspec-mocks (3.9.1)
|
67
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.9.0)
|
69
|
-
rspec-parameterized (0.4.2)
|
70
|
-
binding_ninja (>= 0.2.3)
|
71
|
-
parser
|
72
|
-
proc_to_ast
|
73
|
-
rspec (>= 2.13, < 4)
|
74
|
-
unparser
|
75
|
-
rspec-support (3.9.3)
|
76
|
-
rubocop (0.85.1)
|
77
|
-
parallel (~> 1.10)
|
78
|
-
parser (>= 2.7.0.1)
|
79
|
-
rainbow (>= 2.2.2, < 4.0)
|
80
|
-
regexp_parser (>= 1.7)
|
81
|
-
rexml
|
82
|
-
rubocop-ast (>= 0.0.3)
|
83
|
-
ruby-progressbar (~> 1.7)
|
84
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
85
|
-
rubocop-ast (0.0.3)
|
86
|
-
parser (>= 2.7.0.1)
|
87
|
-
ruby-progressbar (1.10.1)
|
88
|
-
sqlite3 (1.4.2)
|
89
|
-
thor (1.0.1)
|
90
|
-
thread_safe (0.3.6)
|
91
|
-
tzinfo (1.2.7)
|
92
|
-
thread_safe (~> 0.1)
|
93
|
-
unicode-display_width (1.7.0)
|
94
|
-
unparser (0.4.7)
|
95
|
-
abstract_type (~> 0.0.7)
|
96
|
-
adamantium (~> 0.2.0)
|
97
|
-
concord (~> 0.1.5)
|
98
|
-
diff-lcs (~> 1.3)
|
99
|
-
equalizer (~> 0.0.9)
|
100
|
-
parser (>= 2.6.5)
|
101
|
-
procto (~> 0.0.2)
|
102
|
-
zeitwerk (2.3.0)
|
103
|
-
|
104
|
-
PLATFORMS
|
105
|
-
ruby
|
106
|
-
|
107
|
-
DEPENDENCIES
|
108
|
-
active_record_encrypted_string!
|
109
|
-
appraisal
|
110
|
-
bundler
|
111
|
-
rake
|
112
|
-
rspec
|
113
|
-
rspec-parameterized
|
114
|
-
rubocop
|
115
|
-
sqlite3
|
116
|
-
|
117
|
-
BUNDLED WITH
|
118
|
-
2.1.4
|