active_record_encrypted_string 1.1.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yaml +71 -0
- data/.gitignore +2 -0
- data/Appraisals +8 -4
- data/CHANGELOG.md +25 -0
- data/active_record_encrypted_string.gemspec +2 -1
- data/gemfiles/6_1_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 +23 -9
- data/.circleci/config.yml +0 -68
- 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: 8564a98b7b647fb032692e270473c6d19c0e2cd5626fa59534a9f5d3c301c0eb
|
|
4
|
+
data.tar.gz: 7b3667d88a6ac94ae0b02ff29ff828848f86d3be9797352a7beb33b0c33681e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6af9f83abe4f6fd3961789ecf95a1857eebf03c06dff99d6b8e3bc7c9e0ada85c0550563d630694ffa75a4e45ed893e72f60b80e409fcd6c28c670999f2e5bfb
|
|
7
|
+
data.tar.gz: 201e28e19c55dfda1e5eb560b7fd4e9d6bd68165c7ac4995b807077f3de1be973d17ef2032c7e96509305b4a7bc17262f6f7a8a131cddad294406dd128bb0179
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
18
|
+
name: Rails ${{ matrix.rails }} on Ruby 2.7
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v2
|
|
22
|
+
|
|
23
|
+
- uses: ruby/setup-ruby@v1
|
|
24
|
+
with:
|
|
25
|
+
ruby-version: 2.7
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
bundle lock
|
|
30
|
+
bundle config --local path '.bundle'
|
|
31
|
+
bundle check || bundle install --jobs 4
|
|
32
|
+
|
|
33
|
+
bundle exec appraisal ${{ matrix.rails }} bundle lock
|
|
34
|
+
bundle exec appraisal ${{ matrix.rails }} bundle install --jobs 4
|
|
35
|
+
|
|
36
|
+
- name: Run rspec
|
|
37
|
+
env:
|
|
38
|
+
CI: 1
|
|
39
|
+
run: bundle exec appraisal ${{ matrix.rails }} rspec
|
|
40
|
+
|
|
41
|
+
rspec-on-ruby3:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
|
|
44
|
+
strategy:
|
|
45
|
+
matrix:
|
|
46
|
+
rails:
|
|
47
|
+
- 6_0_stable
|
|
48
|
+
- 6_1_stable
|
|
49
|
+
|
|
50
|
+
name: Rails ${{ matrix.rails }} on Ruby 3
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v2
|
|
54
|
+
|
|
55
|
+
- uses: ruby/setup-ruby@v1
|
|
56
|
+
with:
|
|
57
|
+
ruby-version: 3.0
|
|
58
|
+
|
|
59
|
+
- name: Install dependencies
|
|
60
|
+
run: |
|
|
61
|
+
bundle lock
|
|
62
|
+
bundle config --local path '.bundle'
|
|
63
|
+
bundle check || bundle install --jobs 4
|
|
64
|
+
|
|
65
|
+
bundle exec appraisal ${{ matrix.rails }} bundle lock
|
|
66
|
+
bundle exec appraisal ${{ matrix.rails }} bundle install --jobs 4
|
|
67
|
+
|
|
68
|
+
- name: Run rspec
|
|
69
|
+
env:
|
|
70
|
+
CI: 1
|
|
71
|
+
run: bundle exec appraisal ${{ matrix.rails }} rspec
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
appraise '5_0_stable' do
|
|
4
|
-
gem 'activerecord', '~> 5
|
|
4
|
+
gem 'activerecord', '~> 5-0-stable'
|
|
5
5
|
gem 'sqlite3', '~> 1.3.6'
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
appraise '5_1_stable' do
|
|
9
|
-
gem 'activerecord', '~> 5
|
|
9
|
+
gem 'activerecord', '~> 5-1-stable'
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
appraise '5_2_stable' do
|
|
13
|
-
gem 'activerecord', '~> 5
|
|
13
|
+
gem 'activerecord', '~> 5-2-stable'
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
appraise '6_0_stable' do
|
|
17
|
-
gem 'activerecord', '~> 6
|
|
17
|
+
gem 'activerecord', '~> 6-0-stable'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
appraise '6_1_stable' do
|
|
21
|
+
gem 'activerecord', '~> 6-1-stable'
|
|
18
22
|
end
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## Unreleased
|
|
2
|
+
|
|
3
|
+
- [#x](https://github.com/kamillle/active_record_encrypted_string/pull/x) Please describe
|
|
4
|
+
|
|
5
|
+
## 1.3.1
|
|
6
|
+
|
|
7
|
+
- [#23](https://github.com/kamillle/active_record_encrypted_string/pull/23) Testing by Ruby3
|
|
8
|
+
- [#20](https://github.com/kamillle/active_record_encrypted_string/pull/20) Run tests by GitHub Actions
|
|
9
|
+
|
|
10
|
+
## 1.3.0
|
|
11
|
+
|
|
12
|
+
- [#13](https://github.com/kamillle/active_record_encrypted_string/pull/16) Override changed_in_place? for handling changes
|
|
13
|
+
|
|
14
|
+
Thanks @ericproulx :heart:
|
|
15
|
+
|
|
16
|
+
## 1.2.1
|
|
17
|
+
|
|
18
|
+
- [#13](https://github.com/kamillle/active_record_encrypted_string/pull/13) Replace to rspec-parameterized-context
|
|
19
|
+
- [#12](https://github.com/kamillle/active_record_encrypted_string/pull/12) Introduce pry-byebug
|
|
20
|
+
- [#11](https://github.com/kamillle/active_record_encrypted_string/pull/11) Ignore Gemfile.lock
|
|
21
|
+
|
|
22
|
+
## 1.2.0
|
|
23
|
+
|
|
24
|
+
- [#7](https://github.com/kamillle/active_record_encrypted_string/pull/7) Support Rails v6.1.0rc1
|
|
25
|
+
|
|
1
26
|
## 1.1.0
|
|
2
27
|
|
|
3
28
|
- Support encrypt with other salts
|
|
@@ -32,7 +32,8 @@ Gem::Specification.new do |spec|
|
|
|
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
|
|
@@ -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.1
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kamillle
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -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
|
|
@@ -169,6 +182,7 @@ files:
|
|
|
169
182
|
- gemfiles/5_1_stable.gemfile
|
|
170
183
|
- gemfiles/5_2_stable.gemfile
|
|
171
184
|
- gemfiles/6_0_stable.gemfile
|
|
185
|
+
- gemfiles/6_1_stable.gemfile
|
|
172
186
|
- lib/active_record_encrypted_string.rb
|
|
173
187
|
- lib/active_record_encrypted_string/configuration.rb
|
|
174
188
|
- lib/active_record_encrypted_string/type.rb
|
|
@@ -179,7 +193,7 @@ metadata:
|
|
|
179
193
|
homepage_uri: https://github.com/kamillle/active_record_encrypted_string
|
|
180
194
|
source_code_uri: https://github.com/kamillle/active_record_encrypted_string
|
|
181
195
|
changelog_uri: https://github.com/kamillle/active_record_encrypted_string/CHANGELOG.md
|
|
182
|
-
post_install_message:
|
|
196
|
+
post_install_message:
|
|
183
197
|
rdoc_options: []
|
|
184
198
|
require_paths:
|
|
185
199
|
- lib
|
|
@@ -194,8 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
194
208
|
- !ruby/object:Gem::Version
|
|
195
209
|
version: '0'
|
|
196
210
|
requirements: []
|
|
197
|
-
rubygems_version: 3.
|
|
198
|
-
signing_key:
|
|
211
|
+
rubygems_version: 3.2.15
|
|
212
|
+
signing_key:
|
|
199
213
|
specification_version: 4
|
|
200
214
|
summary: Generates encrypted_string type that transparently encrypt and decrypt string
|
|
201
215
|
value to ActiveRecord.
|
data/.circleci/config.yml
DELETED
|
@@ -1,68 +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
|
-
|
|
38
|
-
version: 2.1
|
|
39
|
-
jobs:
|
|
40
|
-
build_and_test_rails_5_0:
|
|
41
|
-
<<: *common
|
|
42
|
-
environment:
|
|
43
|
-
RAILS_VERSION: 5_0_stable
|
|
44
|
-
|
|
45
|
-
build_and_test_rails_5_1:
|
|
46
|
-
<<: *common
|
|
47
|
-
environment:
|
|
48
|
-
RAILS_VERSION: 5_1_stable
|
|
49
|
-
|
|
50
|
-
build_and_test_rails_5_2:
|
|
51
|
-
<<: *common
|
|
52
|
-
environment:
|
|
53
|
-
RAILS_VERSION: 5_2_stable
|
|
54
|
-
|
|
55
|
-
build_and_test_rails_6_0:
|
|
56
|
-
<<: *common
|
|
57
|
-
environment:
|
|
58
|
-
RAILS_VERSION: 6_0_stable
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
workflows:
|
|
62
|
-
version: 2
|
|
63
|
-
build-and-test:
|
|
64
|
-
jobs:
|
|
65
|
-
- build_and_test_rails_5_0
|
|
66
|
-
- build_and_test_rails_5_1
|
|
67
|
-
- build_and_test_rails_5_2
|
|
68
|
-
- build_and_test_rails_6_0
|
data/Gemfile.lock
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
active_record_encrypted_string (1.1.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
|