active_type 2.3.1 → 2.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fb9e61a389d591d9f8aa68590fcaeb22b5b8157faca7a9f96a137f409989ae1
4
- data.tar.gz: c6e6c8bf9fa8c07b78f88eaabeaad275981bba3cafa0c69467082f4a26507b0a
3
+ metadata.gz: f15d8ce260ae564caca7242e7801bc517ff776e32f8b5ba67cb65e950c8aac43
4
+ data.tar.gz: 2892bad1692f24850259959b33a771645bca4bac3b83315113e3cb2858fa3370
5
5
  SHA512:
6
- metadata.gz: a2423202104cfbad7da2237418cbffd5f1997d101e554f10c344d102f2ec38eaa4688ab83d98e8018ef6c8eeb656baba22b6e979b225c4efb0a40bb7e4e6f5da
7
- data.tar.gz: 97d85f6c61a92b3325ec58dc3bf490619e3541773c7ce8f57132e18971796a066014e0c46ec9a0195e6cfca7f7ac29a20875d68396f93fa78d51db69476217b6
6
+ metadata.gz: d7759832e65d623ea11efa5b71627ac67b987d08bdca2bb455c20acdea705a7e885d92095628c37ff734e4ca7c3fc99bca74c81ceef242edf32c0f36341c2d5d
7
+ data.tar.gz: 9abf87f31e81196bbc280402d0de9a230611f28ce18c8b86070aae07876396d706be467e39bda688e105c63b7c2d2890bbb3f70f8c27a3918d87e750c53fa7ab
@@ -2,9 +2,9 @@ name: Tests
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [master]
5
+ branches: [main]
6
6
  pull_request:
7
- branches: [master]
7
+ branches: [main]
8
8
 
9
9
  jobs:
10
10
  test_sqlite:
@@ -14,35 +14,18 @@ jobs:
14
14
  fail-fast: false
15
15
  matrix:
16
16
  include:
17
- - ruby: "2.5.5"
18
- gemfile: Gemfile.4.2.sqlite3
19
17
  - ruby: "2.5.5"
20
18
  gemfile: Gemfile.5.2.sqlite3
21
- - ruby: "2.5.5"
22
- gemfile: Gemfile.6.0.sqlite3
23
- - ruby: "2.5.5"
24
- gemfile: Gemfile.6.1.sqlite3
25
- - ruby: "2.6.3"
26
- gemfile: Gemfile.5.2.sqlite3
27
- - ruby: "2.6.3"
28
- gemfile: Gemfile.6.0.sqlite3
29
- - ruby: "2.6.3"
30
- gemfile: Gemfile.6.1.sqlite3
31
19
  - ruby: "2.7.4"
32
20
  gemfile: Gemfile.5.2.sqlite3
33
- - ruby: "2.7.4"
21
+ - ruby: "3.0.4"
34
22
  gemfile: Gemfile.6.0.sqlite3
35
- - ruby: "2.7.4"
23
+ - ruby: "3.0.4"
36
24
  gemfile: Gemfile.6.1.sqlite3
37
- - ruby: "2.7.4"
25
+ - ruby: "3.0.4"
38
26
  gemfile: Gemfile.7.0.sqlite3
39
- - ruby: "3.0.1"
40
- gemfile: Gemfile.6.0.sqlite3
41
- - ruby: "3.0.1"
42
- gemfile: Gemfile.6.1.sqlite3
43
- - ruby: "3.0.1"
27
+ - ruby: "3.1.2"
44
28
  gemfile: Gemfile.7.0.sqlite3
45
-
46
29
  env:
47
30
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
48
31
 
@@ -79,10 +62,6 @@ jobs:
79
62
  fail-fast: false
80
63
  matrix:
81
64
  include:
82
- - ruby: "2.5.5"
83
- gemfile: Gemfile.4.2.mysql2
84
- - ruby: "2.6.3"
85
- gemfile: Gemfile.5.2.mysql2
86
65
  - ruby: "2.7.4"
87
66
  gemfile: Gemfile.5.2.mysql2
88
67
 
@@ -126,21 +105,9 @@ jobs:
126
105
  matrix:
127
106
  include:
128
107
  - ruby: "2.5.5"
129
- gemfile: Gemfile.4.2.pg
130
- - ruby: "2.5.5"
131
- gemfile: Gemfile.5.2.pg
132
- - ruby: "2.5.5"
133
- gemfile: Gemfile.6.1.pg
134
- - ruby: "2.6.3"
135
108
  gemfile: Gemfile.5.2.pg
136
- - ruby: "2.6.3"
137
- gemfile: Gemfile.6.1.pg
138
109
  - ruby: "2.7.4"
139
110
  gemfile: Gemfile.5.2.pg
140
- - ruby: "2.7.4"
141
- gemfile: Gemfile.6.1.pg
142
- - ruby: "2.7.4"
143
- gemfile: Gemfile.7.0.pg
144
111
  - ruby: "3.0.1"
145
112
  gemfile: Gemfile.6.1.pg
146
113
  - ruby: "3.0.1"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.0
data/CHANGELOG.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## Unreleased changes
5
+ ## 2.3.2 (2022-11-17)
6
+
7
+ * Fixed: Allowed some more attribute methods on casted objects without causing a UnmutableAttributes error.
6
8
 
7
9
  ## 2.3.1 (2022-10-06)
8
10
 
data/Gemfile CHANGED
@@ -1 +1 @@
1
- ./Gemfile.5.2.pg
1
+ ./Gemfile.7.0.sqlite3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.5.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.3)
11
- activesupport (= 7.0.3)
12
- activerecord (7.0.3)
13
- activemodel (= 7.0.3)
14
- activesupport (= 7.0.3)
15
- activesupport (7.0.3)
10
+ activemodel (7.0.4)
11
+ activesupport (= 7.0.4)
12
+ activerecord (7.0.4)
13
+ activemodel (= 7.0.4)
14
+ activesupport (= 7.0.4)
15
+ activesupport (7.0.4)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
@@ -20,9 +20,9 @@ GEM
20
20
  concurrent-ruby (1.1.10)
21
21
  diff-lcs (1.5.0)
22
22
  gemika (0.7.1)
23
- i18n (1.10.0)
23
+ i18n (1.12.0)
24
24
  concurrent-ruby (~> 1.0)
25
- minitest (5.15.0)
25
+ minitest (5.16.3)
26
26
  pg (1.3.5)
27
27
  rake (13.0.6)
28
28
  rspec (3.11.0)
@@ -38,7 +38,7 @@ GEM
38
38
  diff-lcs (>= 1.2.0, < 2.0)
39
39
  rspec-support (~> 3.11.0)
40
40
  rspec-support (3.11.0)
41
- tzinfo (2.0.4)
41
+ tzinfo (2.0.5)
42
42
  concurrent-ruby (~> 1.0)
43
43
 
44
44
  PLATFORMS
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  rspec (~> 3.4)
54
54
 
55
55
  BUNDLED WITH
56
- 2.1.4
56
+ 2.2.3
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.3.1)
4
+ active_type (2.3.2)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.3)
11
- activesupport (= 7.0.3)
12
- activerecord (7.0.3)
13
- activemodel (= 7.0.3)
14
- activesupport (= 7.0.3)
15
- activesupport (7.0.3)
10
+ activemodel (7.0.4)
11
+ activesupport (= 7.0.4)
12
+ activerecord (7.0.4)
13
+ activemodel (= 7.0.4)
14
+ activesupport (= 7.0.4)
15
+ activesupport (7.0.4)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
@@ -20,9 +20,9 @@ GEM
20
20
  concurrent-ruby (1.1.10)
21
21
  diff-lcs (1.5.0)
22
22
  gemika (0.7.1)
23
- i18n (1.10.0)
23
+ i18n (1.12.0)
24
24
  concurrent-ruby (~> 1.0)
25
- minitest (5.15.0)
25
+ minitest (5.16.3)
26
26
  rake (13.0.6)
27
27
  rspec (3.11.0)
28
28
  rspec-core (~> 3.11.0)
@@ -38,7 +38,7 @@ GEM
38
38
  rspec-support (~> 3.11.0)
39
39
  rspec-support (3.11.0)
40
40
  sqlite3 (1.4.2)
41
- tzinfo (2.0.4)
41
+ tzinfo (2.0.5)
42
42
  concurrent-ruby (~> 1.0)
43
43
 
44
44
  PLATFORMS
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  sqlite3
54
54
 
55
55
  BUNDLED WITH
56
- 2.1.4
56
+ 2.2.3
data/Gemfile.lock CHANGED
@@ -1 +1 @@
1
- ./Gemfile.5.2.pg.lock
1
+ ./Gemfile.7.0.sqlite3.lock
data/README.md CHANGED
@@ -51,7 +51,7 @@ end
51
51
  ```
52
52
 
53
53
 
54
- ### A note on Rails 5+
54
+ ### A note on Rails's own .attribute
55
55
 
56
56
  Rails 5+ comes with its own implementation of `.attribute`. This implementation is functionally very
57
57
  similar, but not identical to ActiveType's.
@@ -407,14 +407,14 @@ Now, if you load `credentials`, you will automatically receive records of type `
407
407
  Supported Rails versions
408
408
  ------------------------
409
409
 
410
- ActiveType is tested against ActiveRecord 4.2, 5.1, 5.2, 6.0 and 6.1.
410
+ ActiveType is tested against ActiveRecord 5.2, 6.0, 6.1, and 7.0.
411
411
 
412
412
  Later versions might work, earlier will not.
413
413
 
414
414
  Supported Ruby versions
415
415
  ------------------------
416
416
 
417
- ActiveType is tested against 2.5, 2.6, 2.7 and 3.0.
417
+ ActiveType is tested against 2.5, 2.7, 3.0, and 3.1.
418
418
 
419
419
 
420
420
  Installation
@@ -19,6 +19,10 @@ module ActiveType
19
19
  original_attributes.fetch_value(key)
20
20
  end
21
21
 
22
+ def [](key)
23
+ original_attributes[key]
24
+ end
25
+
22
26
  def key?(key)
23
27
  original_attributes.key?(key)
24
28
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveType
2
- VERSION = '2.3.1'
2
+ VERSION = '2.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-06 00:00:00.000000000 Z
12
+ date: 2022-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -65,12 +65,6 @@ files:
65
65
  - ".ruby-version"
66
66
  - CHANGELOG.md
67
67
  - Gemfile
68
- - Gemfile.4.2.mysql2
69
- - Gemfile.4.2.mysql2.lock
70
- - Gemfile.4.2.pg
71
- - Gemfile.4.2.pg.lock
72
- - Gemfile.4.2.sqlite3
73
- - Gemfile.4.2.sqlite3.lock
74
68
  - Gemfile.5.2.mysql2
75
69
  - Gemfile.5.2.mysql2.lock
76
70
  - Gemfile.5.2.pg
@@ -131,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
125
  - !ruby/object:Gem::Version
132
126
  version: '0'
133
127
  requirements: []
134
- rubygems_version: 3.2.15
128
+ rubygems_version: 3.2.3
135
129
  signing_key:
136
130
  specification_version: 4
137
131
  summary: Make any Ruby object quack like ActiveRecord
data/Gemfile.4.2.mysql2 DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~>4.2.1'
4
- gem 'rspec', '~>3.4'
5
- gem 'mysql2'
6
- gem 'rake'
7
- gem 'gemika'
8
-
9
- gem 'active_type', :path => '.'
@@ -1,61 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- active_type (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.11)
11
- activesupport (= 4.2.11)
12
- builder (~> 3.1)
13
- activerecord (4.2.11)
14
- activemodel (= 4.2.11)
15
- activesupport (= 4.2.11)
16
- arel (~> 6.0)
17
- activesupport (4.2.11)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.4)
23
- builder (3.2.3)
24
- concurrent-ruby (1.1.4)
25
- diff-lcs (1.2.5)
26
- gemika (0.4.1)
27
- i18n (0.9.5)
28
- concurrent-ruby (~> 1.0)
29
- minitest (5.11.3)
30
- mysql2 (0.5.3)
31
- rake (10.4.2)
32
- rspec (3.4.0)
33
- rspec-core (~> 3.4.0)
34
- rspec-expectations (~> 3.4.0)
35
- rspec-mocks (~> 3.4.0)
36
- rspec-core (3.4.1)
37
- rspec-support (~> 3.4.0)
38
- rspec-expectations (3.4.0)
39
- diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.4.0)
41
- rspec-mocks (3.4.1)
42
- diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.4.0)
44
- rspec-support (3.4.1)
45
- thread_safe (0.3.6)
46
- tzinfo (1.2.5)
47
- thread_safe (~> 0.1)
48
-
49
- PLATFORMS
50
- ruby
51
-
52
- DEPENDENCIES
53
- active_type!
54
- activerecord (~> 4.2.1)
55
- gemika
56
- mysql2
57
- rake
58
- rspec (~> 3.4)
59
-
60
- BUNDLED WITH
61
- 2.2.17
data/Gemfile.4.2.pg DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~>4.2.1'
4
- gem 'rspec', '~>3.4'
5
- gem 'pg'
6
- gem 'rake'
7
- gem 'gemika'
8
-
9
- gem 'active_type', :path => '.'
data/Gemfile.4.2.pg.lock DELETED
@@ -1,61 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- active_type (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.11)
11
- activesupport (= 4.2.11)
12
- builder (~> 3.1)
13
- activerecord (4.2.11)
14
- activemodel (= 4.2.11)
15
- activesupport (= 4.2.11)
16
- arel (~> 6.0)
17
- activesupport (4.2.11)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.4)
23
- builder (3.2.3)
24
- concurrent-ruby (1.1.4)
25
- diff-lcs (1.2.5)
26
- gemika (0.4.1)
27
- i18n (0.9.5)
28
- concurrent-ruby (~> 1.0)
29
- minitest (5.11.3)
30
- pg (0.18.4)
31
- rake (10.4.2)
32
- rspec (3.4.0)
33
- rspec-core (~> 3.4.0)
34
- rspec-expectations (~> 3.4.0)
35
- rspec-mocks (~> 3.4.0)
36
- rspec-core (3.4.1)
37
- rspec-support (~> 3.4.0)
38
- rspec-expectations (3.4.0)
39
- diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.4.0)
41
- rspec-mocks (3.4.1)
42
- diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.4.0)
44
- rspec-support (3.4.1)
45
- thread_safe (0.3.6)
46
- tzinfo (1.2.5)
47
- thread_safe (~> 0.1)
48
-
49
- PLATFORMS
50
- ruby
51
-
52
- DEPENDENCIES
53
- active_type!
54
- activerecord (~> 4.2.1)
55
- gemika
56
- pg
57
- rake
58
- rspec (~> 3.4)
59
-
60
- BUNDLED WITH
61
- 2.2.17
data/Gemfile.4.2.sqlite3 DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~>4.2.1'
4
- gem 'rspec', '~> 3.4'
5
- gem 'sqlite3'
6
- gem 'rake'
7
- gem 'gemika'
8
-
9
- gem 'active_type', :path => '.'
@@ -1,61 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- active_type (2.3.1)
5
- activerecord (>= 3.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.11)
11
- activesupport (= 4.2.11)
12
- builder (~> 3.1)
13
- activerecord (4.2.11)
14
- activemodel (= 4.2.11)
15
- activesupport (= 4.2.11)
16
- arel (~> 6.0)
17
- activesupport (4.2.11)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- arel (6.0.4)
23
- builder (3.2.3)
24
- concurrent-ruby (1.1.4)
25
- diff-lcs (1.2.5)
26
- gemika (0.4.1)
27
- i18n (0.9.5)
28
- concurrent-ruby (~> 1.0)
29
- minitest (5.11.3)
30
- rake (10.4.2)
31
- rspec (3.4.0)
32
- rspec-core (~> 3.4.0)
33
- rspec-expectations (~> 3.4.0)
34
- rspec-mocks (~> 3.4.0)
35
- rspec-core (3.4.1)
36
- rspec-support (~> 3.4.0)
37
- rspec-expectations (3.4.0)
38
- diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.4.0)
40
- rspec-mocks (3.4.1)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.4.0)
43
- rspec-support (3.4.1)
44
- sqlite3 (1.3.11)
45
- thread_safe (0.3.6)
46
- tzinfo (1.2.5)
47
- thread_safe (~> 0.1)
48
-
49
- PLATFORMS
50
- ruby
51
-
52
- DEPENDENCIES
53
- active_type!
54
- activerecord (~> 4.2.1)
55
- gemika
56
- rake
57
- rspec (~> 3.4)
58
- sqlite3
59
-
60
- BUNDLED WITH
61
- 2.2.17