active_attr 0.17.1 → 0.17.2
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/test.yaml +47 -3
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -3
- data/README.md +2 -5
- data/active_attr.gemspec +4 -4
- data/gemfiles/rails_6_0.gemfile +1 -0
- data/gemfiles/rails_6_1.gemfile +1 -0
- data/gemfiles/rails_8_0.gemfile +10 -0
- data/lib/active_attr/version.rb +1 -1
- data/spec/functional/active_attr/model_spec.rb +2 -1
- metadata +12 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 111e71d69c4df1d29580b964c418dbdd0a03619cbf1805b22cff7633d228060e
|
|
4
|
+
data.tar.gz: 44daad135da8a80060d246ae14d38ee6c9a1a08c4e64ec4107605f0280b7f95d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d5914c9951be56d7f1cbe16af900c2fec7ae0aeea27428098fc97508f25ca2dd580dc2260cd1e7ddc0edb451abec10e405cecba4b95c20f8f4a4fd660291627
|
|
7
|
+
data.tar.gz: a036b17ae9093131aba17988645836a4a63b5fcf3b0a74c7830d80bad36d7d5d4ece607f6716633088233f681019cc5ae97831b869510c7cc977821151f29485
|
data/.github/workflows/test.yaml
CHANGED
|
@@ -9,7 +9,7 @@ on:
|
|
|
9
9
|
jobs:
|
|
10
10
|
test:
|
|
11
11
|
name: Ruby ${{ matrix.ruby }} with ${{ matrix.gemfile }}
|
|
12
|
-
runs-on: ubuntu-
|
|
12
|
+
runs-on: ubuntu-24.04
|
|
13
13
|
continue-on-error: ${{ contains(matrix.ruby, 'head') || contains(matrix.gemfile, 'head') }}
|
|
14
14
|
strategy:
|
|
15
15
|
fail-fast: false
|
|
@@ -26,6 +26,7 @@ jobs:
|
|
|
26
26
|
- "3.1"
|
|
27
27
|
- "3.2"
|
|
28
28
|
- "3.3"
|
|
29
|
+
- "3.4"
|
|
29
30
|
- truffleruby-head
|
|
30
31
|
gemfile:
|
|
31
32
|
- gemfiles/rails_3_0.gemfile
|
|
@@ -42,6 +43,7 @@ jobs:
|
|
|
42
43
|
- gemfiles/rails_7_0.gemfile
|
|
43
44
|
- gemfiles/rails_7_1.gemfile
|
|
44
45
|
- gemfiles/rails_7_2.gemfile
|
|
46
|
+
- gemfiles/rails_8_0.gemfile
|
|
45
47
|
- Gemfile
|
|
46
48
|
- gemfiles/rails_head.gemfile
|
|
47
49
|
exclude:
|
|
@@ -61,6 +63,8 @@ jobs:
|
|
|
61
63
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
62
64
|
- ruby: "2.1"
|
|
63
65
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
66
|
+
- ruby: "2.1"
|
|
67
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
64
68
|
- ruby: "2.1"
|
|
65
69
|
gemfile: Gemfile
|
|
66
70
|
- ruby: "2.1"
|
|
@@ -75,6 +79,8 @@ jobs:
|
|
|
75
79
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
76
80
|
- ruby: "2.2"
|
|
77
81
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
82
|
+
- ruby: "2.2"
|
|
83
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
78
84
|
- ruby: "2.2"
|
|
79
85
|
gemfile: Gemfile
|
|
80
86
|
- ruby: "2.2"
|
|
@@ -89,6 +95,8 @@ jobs:
|
|
|
89
95
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
90
96
|
- ruby: "2.3"
|
|
91
97
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
98
|
+
- ruby: "2.3"
|
|
99
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
92
100
|
- ruby: "2.3"
|
|
93
101
|
gemfile: Gemfile
|
|
94
102
|
- ruby: "2.3"
|
|
@@ -103,6 +111,8 @@ jobs:
|
|
|
103
111
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
104
112
|
- ruby: "2.4"
|
|
105
113
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
114
|
+
- ruby: "2.4"
|
|
115
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
106
116
|
- ruby: "2.4"
|
|
107
117
|
gemfile: Gemfile
|
|
108
118
|
- ruby: "2.4"
|
|
@@ -117,6 +127,8 @@ jobs:
|
|
|
117
127
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
118
128
|
- ruby: "2.5"
|
|
119
129
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
130
|
+
- ruby: "2.5"
|
|
131
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
120
132
|
- ruby: "2.5"
|
|
121
133
|
gemfile: Gemfile
|
|
122
134
|
- ruby: "2.5"
|
|
@@ -131,6 +143,8 @@ jobs:
|
|
|
131
143
|
gemfile: gemfiles/rails_7_1.gemfile
|
|
132
144
|
- ruby: "2.6"
|
|
133
145
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
146
|
+
- ruby: "2.6"
|
|
147
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
134
148
|
- ruby: "2.6"
|
|
135
149
|
gemfile: Gemfile
|
|
136
150
|
- ruby: "2.6"
|
|
@@ -149,6 +163,8 @@ jobs:
|
|
|
149
163
|
gemfile: gemfiles/rails_4_2.gemfile
|
|
150
164
|
- ruby: "2.7"
|
|
151
165
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
166
|
+
- ruby: "2.7"
|
|
167
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
152
168
|
- ruby: "2.7"
|
|
153
169
|
gemfile: Gemfile
|
|
154
170
|
- ruby: "2.7"
|
|
@@ -173,6 +189,8 @@ jobs:
|
|
|
173
189
|
gemfile: gemfiles/rails_5_2.gemfile
|
|
174
190
|
- ruby: "3.0"
|
|
175
191
|
gemfile: gemfiles/rails_7_2.gemfile
|
|
192
|
+
- ruby: "3.0"
|
|
193
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
176
194
|
- ruby: "3.0"
|
|
177
195
|
gemfile: Gemfile
|
|
178
196
|
- ruby: "3.0"
|
|
@@ -195,6 +213,8 @@ jobs:
|
|
|
195
213
|
gemfile: gemfiles/rails_5_1.gemfile
|
|
196
214
|
- ruby: "3.1"
|
|
197
215
|
gemfile: gemfiles/rails_5_2.gemfile
|
|
216
|
+
- ruby: "3.1"
|
|
217
|
+
gemfile: gemfiles/rails_8_0.gemfile
|
|
198
218
|
- ruby: "3.1"
|
|
199
219
|
gemfile: Gemfile
|
|
200
220
|
- ruby: "3.1"
|
|
@@ -235,6 +255,30 @@ jobs:
|
|
|
235
255
|
gemfile: gemfiles/rails_5_1.gemfile
|
|
236
256
|
- ruby: "3.3"
|
|
237
257
|
gemfile: gemfiles/rails_5_2.gemfile
|
|
258
|
+
- ruby: "3.4"
|
|
259
|
+
gemfile: gemfiles/rails_3_0.gemfile
|
|
260
|
+
- ruby: "3.4"
|
|
261
|
+
gemfile: gemfiles/rails_3_1.gemfile
|
|
262
|
+
- ruby: "3.4"
|
|
263
|
+
gemfile: gemfiles/rails_3_2.gemfile
|
|
264
|
+
- ruby: "3.4"
|
|
265
|
+
gemfile: gemfiles/rails_4_0.gemfile
|
|
266
|
+
- ruby: "3.4"
|
|
267
|
+
gemfile: gemfiles/rails_4_1.gemfile
|
|
268
|
+
- ruby: "3.4"
|
|
269
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
|
270
|
+
- ruby: "3.4"
|
|
271
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
|
272
|
+
- ruby: "3.4"
|
|
273
|
+
gemfile: gemfiles/rails_5_1.gemfile
|
|
274
|
+
- ruby: "3.4"
|
|
275
|
+
gemfile: gemfiles/rails_5_2.gemfile
|
|
276
|
+
- ruby: "3.4"
|
|
277
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
|
278
|
+
- ruby: "3.4"
|
|
279
|
+
gemfile: gemfiles/rails_6_1.gemfile
|
|
280
|
+
- ruby: "3.4"
|
|
281
|
+
gemfile: gemfiles/rails_7_0.gemfile
|
|
238
282
|
- ruby: truffleruby-head
|
|
239
283
|
gemfile: gemfiles/rails_3_0.gemfile
|
|
240
284
|
- ruby: truffleruby-head
|
|
@@ -260,7 +304,7 @@ jobs:
|
|
|
260
304
|
|
|
261
305
|
steps:
|
|
262
306
|
- name: Checkout code
|
|
263
|
-
uses: actions/checkout@
|
|
307
|
+
uses: actions/checkout@v5
|
|
264
308
|
- name: Nokogiri support for TruffleRuby
|
|
265
309
|
run: sudo apt-get -yqq install libxml2-dev libxslt-dev
|
|
266
310
|
if: ${{ matrix.ruby == 'truffleruby-head' }}
|
|
@@ -268,7 +312,7 @@ jobs:
|
|
|
268
312
|
uses: ruby/setup-ruby@v1
|
|
269
313
|
with:
|
|
270
314
|
ruby-version: ${{ matrix.ruby }}
|
|
271
|
-
bundler:
|
|
315
|
+
bundler: 2
|
|
272
316
|
bundler-cache: true
|
|
273
317
|
- name: Run tests
|
|
274
318
|
run: bundle exec rake --trace
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -2,9 +2,9 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec :development_group => :test
|
|
4
4
|
|
|
5
|
-
gem "activemodel", "~> 8.
|
|
6
|
-
gem "activesupport", "~> 8.
|
|
7
|
-
gem "actionpack", "~> 8.
|
|
5
|
+
gem "activemodel", "~> 8.1.0"
|
|
6
|
+
gem "activesupport", "~> 8.1.0"
|
|
7
|
+
gem "actionpack", "~> 8.1.0"
|
|
8
8
|
gem "activemodel-serializers-xml", :group => :test
|
|
9
9
|
gem "rexml", :group => :test
|
|
10
10
|
gem "protected_attributes_continued", :group => :test
|
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# ActiveAttr #
|
|
2
2
|
|
|
3
3
|
[![Build History][build badge]][build history]
|
|
4
|
-
[![Code Climate][codeclimate badge]][codeclimate]
|
|
5
4
|
|
|
6
5
|
ActiveAttr is a set of modules that makes it easy to create plain old Ruby
|
|
7
6
|
models with functionality found in ORMs, like ActiveRecord, without
|
|
@@ -17,8 +16,6 @@ ActiveAttr is distributed as a Ruby gem [on rubygems.org][rubygems].
|
|
|
17
16
|
* [Contributors][contributors]
|
|
18
17
|
|
|
19
18
|
[api]: http://rubydoc.info/gems/active_attr
|
|
20
|
-
[codeclimate badge]: https://codeclimate.com/github/cgriego/active_attr.svg
|
|
21
|
-
[codeclimate]: https://codeclimate.com/github/cgriego/active_attr
|
|
22
19
|
[contributors]: https://github.com/cgriego/active_attr/contributors
|
|
23
20
|
[railscast poster]: http://railscasts.com/static/episodes/stills/326-activeattr.png
|
|
24
21
|
[railscast]: http://railscasts.com/episodes/326-activeattr
|
|
@@ -26,8 +23,8 @@ ActiveAttr is distributed as a Ruby gem [on rubygems.org][rubygems].
|
|
|
26
23
|
[protected_attributes]: https://github.com/westonganger/protected_attributes_continued
|
|
27
24
|
[strong_parameters]: https://github.com/rails/strong_parameters
|
|
28
25
|
[speakerdeck]: https://speakerdeck.com/u/cgriego/p/models-models-every-where
|
|
29
|
-
[build badge]: https://github.com/cgriego/active_attr/workflows/
|
|
30
|
-
[build history]: https://github.com/cgriego/active_attr/actions
|
|
26
|
+
[build badge]: https://github.com/cgriego/active_attr/actions/workflows/test.yaml/badge.svg
|
|
27
|
+
[build history]: https://github.com/cgriego/active_attr/actions/workflows/test.yaml
|
|
31
28
|
|
|
32
29
|
## Modules ##
|
|
33
30
|
|
data/active_attr.gemspec
CHANGED
|
@@ -22,14 +22,14 @@ Gem::Specification.new do |gem|
|
|
|
22
22
|
|
|
23
23
|
gem.required_ruby_version = ">= 2.1.0"
|
|
24
24
|
|
|
25
|
-
gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 8.
|
|
26
|
-
gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 8.
|
|
27
|
-
gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 8.
|
|
25
|
+
gem.add_runtime_dependency "actionpack", ">= 3.0.2", "< 8.2"
|
|
26
|
+
gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 8.2"
|
|
27
|
+
gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 8.2"
|
|
28
28
|
|
|
29
29
|
gem.add_development_dependency "bundler"
|
|
30
30
|
gem.add_development_dependency "factory_bot", "< 7.0"
|
|
31
31
|
gem.add_development_dependency "minitest"
|
|
32
|
-
gem.add_development_dependency "rake", ">= 0.9.0", "< 13.
|
|
32
|
+
gem.add_development_dependency "rake", ">= 0.9.0", "< 13.3"
|
|
33
33
|
gem.add_development_dependency "rspec", "~> 3.0"
|
|
34
34
|
gem.add_development_dependency "tzinfo"
|
|
35
35
|
end
|
data/gemfiles/rails_6_0.gemfile
CHANGED
|
@@ -9,3 +9,4 @@ gem "activemodel-serializers-xml", :group => :test
|
|
|
9
9
|
gem "rexml", :group => :test
|
|
10
10
|
gem "protected_attributes_continued", :group => :test
|
|
11
11
|
gem "factory_bot", "< 6", :group => :test if RUBY_VERSION < "2.7"
|
|
12
|
+
gem "concurrent-ruby", "< 1.3.5" # as https://github.com/rails/rails/pull/49372 was never backported
|
data/gemfiles/rails_6_1.gemfile
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
3
|
+
gemspec :development_group => :test, :path => ".."
|
|
4
|
+
|
|
5
|
+
gem "activemodel", "~> 8.0.0"
|
|
6
|
+
gem "activesupport", "~> 8.0.0"
|
|
7
|
+
gem "actionpack", "~> 8.0.0"
|
|
8
|
+
gem "activemodel-serializers-xml", :group => :test
|
|
9
|
+
gem "rexml", :group => :test
|
|
10
|
+
gem "protected_attributes_continued", :group => :test
|
data/lib/active_attr/version.rb
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
1
2
|
require "spec_helper"
|
|
2
3
|
require "active_attr/model"
|
|
3
4
|
require "active_model/mass_assignment_security"
|
|
@@ -141,7 +142,7 @@ module ActiveAttr
|
|
|
141
142
|
private
|
|
142
143
|
|
|
143
144
|
def remove_whitespaces
|
|
144
|
-
name.strip
|
|
145
|
+
self.name = name.strip
|
|
145
146
|
end
|
|
146
147
|
|
|
147
148
|
def set_status
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_attr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.17.
|
|
4
|
+
version: 0.17.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Griego
|
|
8
8
|
- Ben Poweski
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: actionpack
|
|
@@ -20,7 +19,7 @@ dependencies:
|
|
|
20
19
|
version: 3.0.2
|
|
21
20
|
- - "<"
|
|
22
21
|
- !ruby/object:Gem::Version
|
|
23
|
-
version: '8.
|
|
22
|
+
version: '8.2'
|
|
24
23
|
type: :runtime
|
|
25
24
|
prerelease: false
|
|
26
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -30,7 +29,7 @@ dependencies:
|
|
|
30
29
|
version: 3.0.2
|
|
31
30
|
- - "<"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '8.
|
|
32
|
+
version: '8.2'
|
|
34
33
|
- !ruby/object:Gem::Dependency
|
|
35
34
|
name: activemodel
|
|
36
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -40,7 +39,7 @@ dependencies:
|
|
|
40
39
|
version: 3.0.2
|
|
41
40
|
- - "<"
|
|
42
41
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: '8.
|
|
42
|
+
version: '8.2'
|
|
44
43
|
type: :runtime
|
|
45
44
|
prerelease: false
|
|
46
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -50,7 +49,7 @@ dependencies:
|
|
|
50
49
|
version: 3.0.2
|
|
51
50
|
- - "<"
|
|
52
51
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '8.
|
|
52
|
+
version: '8.2'
|
|
54
53
|
- !ruby/object:Gem::Dependency
|
|
55
54
|
name: activesupport
|
|
56
55
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -60,7 +59,7 @@ dependencies:
|
|
|
60
59
|
version: 3.0.2
|
|
61
60
|
- - "<"
|
|
62
61
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '8.
|
|
62
|
+
version: '8.2'
|
|
64
63
|
type: :runtime
|
|
65
64
|
prerelease: false
|
|
66
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -70,7 +69,7 @@ dependencies:
|
|
|
70
69
|
version: 3.0.2
|
|
71
70
|
- - "<"
|
|
72
71
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '8.
|
|
72
|
+
version: '8.2'
|
|
74
73
|
- !ruby/object:Gem::Dependency
|
|
75
74
|
name: bundler
|
|
76
75
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -122,7 +121,7 @@ dependencies:
|
|
|
122
121
|
version: 0.9.0
|
|
123
122
|
- - "<"
|
|
124
123
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '13.
|
|
124
|
+
version: '13.3'
|
|
126
125
|
type: :development
|
|
127
126
|
prerelease: false
|
|
128
127
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -132,7 +131,7 @@ dependencies:
|
|
|
132
131
|
version: 0.9.0
|
|
133
132
|
- - "<"
|
|
134
133
|
- !ruby/object:Gem::Version
|
|
135
|
-
version: '13.
|
|
134
|
+
version: '13.3'
|
|
136
135
|
- !ruby/object:Gem::Dependency
|
|
137
136
|
name: rspec
|
|
138
137
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -194,6 +193,7 @@ files:
|
|
|
194
193
|
- gemfiles/rails_7_0.gemfile
|
|
195
194
|
- gemfiles/rails_7_1.gemfile
|
|
196
195
|
- gemfiles/rails_7_2.gemfile
|
|
196
|
+
- gemfiles/rails_8_0.gemfile
|
|
197
197
|
- gemfiles/rails_head.gemfile
|
|
198
198
|
- lib/active_attr.rb
|
|
199
199
|
- lib/active_attr/attribute_defaults.rb
|
|
@@ -272,7 +272,6 @@ licenses:
|
|
|
272
272
|
- MIT
|
|
273
273
|
metadata:
|
|
274
274
|
changelog_uri: https://github.com/cgriego/active_attr/blob/master/CHANGELOG.md
|
|
275
|
-
post_install_message:
|
|
276
275
|
rdoc_options: []
|
|
277
276
|
require_paths:
|
|
278
277
|
- lib
|
|
@@ -287,8 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
287
286
|
- !ruby/object:Gem::Version
|
|
288
287
|
version: '0'
|
|
289
288
|
requirements: []
|
|
290
|
-
rubygems_version: 3.
|
|
291
|
-
signing_key:
|
|
289
|
+
rubygems_version: 3.6.9
|
|
292
290
|
specification_version: 4
|
|
293
291
|
summary: What ActiveModel left out
|
|
294
292
|
test_files:
|