active_type 1.4.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8df851b9ccff70450a523e1931011b42d52b026e29969dbfdde8924809bbc66
4
- data.tar.gz: dce25ae7f23167e775c23ebdd4cada8b2af476b2f153fdf38c388a8d78195cb8
3
+ metadata.gz: fc1d824f4bc8d16a858ad4264432940368081f7ff9dac1e6ab522e7a8e244385
4
+ data.tar.gz: 62a451171a9caab0a89901856746262cb0529b7b94df191baa7ee9d01a13a6e9
5
5
  SHA512:
6
- metadata.gz: f65ed1343e8d7e66cc6d98a716eca941e1ae9013a9c1012dee52c550837e1687a3fd71a398ec7c30d58b1e7b21612d8c9c988fb959b126f9bca636e0fc37dec3
7
- data.tar.gz: 3627b950fa8da92399300fcff7c735e97541b8c02311a9b33693883342a7c22cdb840dac4402108015687ba656e3d54df0e3f4b9680275c312f82782a4e9ab4f
6
+ metadata.gz: 8e9899a9e91e7150fb56a9a3e745c86966122f596b9ebe72ee23136c232fd8e77db9f9b670a13980021e57fd46dc8f8f46d899bf9fb7faa20ef261558eb44929
7
+ data.tar.gz: 66c4878918cb20e924f0c044e1ae6d862611622067eaca2608ce25caa1a67d081416a69e5e10a83dd4ce256c306cbea624860d3f699d53be5da8d0ecf21b3c15
@@ -0,0 +1,175 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test_sqlite:
11
+ runs-on: ubuntu-20.04
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ include:
17
+ - ruby: "2.3.8"
18
+ gemfile: Gemfile.3.2.sqlite3
19
+ - ruby: "2.3.8"
20
+ gemfile: Gemfile.4.2.sqlite3
21
+ - ruby: "2.3.8"
22
+ gemfile: Gemfile.5.2.sqlite3
23
+ - ruby: "2.5.5"
24
+ gemfile: Gemfile.5.2.sqlite3
25
+ - ruby: "2.5.5"
26
+ gemfile: Gemfile.6.0.sqlite3
27
+ - ruby: "2.5.5"
28
+ gemfile: Gemfile.6.1.sqlite3
29
+ - ruby: "2.6.3"
30
+ gemfile: Gemfile.5.2.sqlite3
31
+ - ruby: "2.6.3"
32
+ gemfile: Gemfile.6.0.sqlite3
33
+ - ruby: "2.6.3"
34
+ gemfile: Gemfile.6.1.sqlite3
35
+ - ruby: "2.7.2"
36
+ gemfile: Gemfile.5.2.sqlite3
37
+ - ruby: "2.7.2"
38
+ gemfile: Gemfile.6.0.sqlite3
39
+ - ruby: "2.7.2"
40
+ gemfile: Gemfile.6.1.sqlite3
41
+ - ruby: "3.0.1"
42
+ gemfile: Gemfile.6.0.sqlite3
43
+ - ruby: "3.0.1"
44
+ gemfile: Gemfile.6.1.sqlite3
45
+
46
+ env:
47
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
48
+
49
+ steps:
50
+ - uses: actions/checkout@v2
51
+ - name: Install ruby
52
+ uses: ruby/setup-ruby@v1
53
+ with:
54
+ ruby-version: ${{ matrix.ruby }}
55
+ - name: Bundle
56
+ run: |
57
+ gem install bundler:2.0.2
58
+ bundle install --no-deployment
59
+ - name: Run tests
60
+ run: bundle exec rake spec
61
+
62
+
63
+ test_mysql:
64
+ runs-on: ubuntu-20.04
65
+
66
+ services:
67
+ mysql:
68
+ image: mysql:5.6
69
+ env:
70
+ MYSQL_ROOT_PASSWORD: password
71
+ ports:
72
+ - 3306:3306
73
+ options: >-
74
+ --health-cmd="mysqladmin ping"
75
+ --health-interval=10s
76
+ --health-timeout=5s
77
+ --health-retries=3
78
+
79
+ strategy:
80
+ fail-fast: false
81
+ matrix:
82
+ include:
83
+ - ruby: "2.3.8"
84
+ gemfile: Gemfile.3.2.mysql2
85
+ - ruby: "2.3.8"
86
+ gemfile: Gemfile.4.2.mysql2
87
+ - ruby: "2.3.8"
88
+ gemfile: Gemfile.5.2.mysql2
89
+ - ruby: "2.6.3"
90
+ gemfile: Gemfile.5.2.mysql2
91
+ - ruby: "2.7.2"
92
+ gemfile: Gemfile.5.2.mysql2
93
+
94
+ env:
95
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
96
+
97
+ steps:
98
+ - uses: actions/checkout@v2
99
+ - name: Install ruby
100
+ uses: ruby/setup-ruby@v1
101
+ with:
102
+ ruby-version: ${{ matrix.ruby }}
103
+ - name: Install database client
104
+ run: |
105
+ sudo apt-get update
106
+ sudo apt-get install -y mysql-client libmariadbclient-dev
107
+ - name: Bundle
108
+ run: |
109
+ gem install bundler:2.0.2
110
+ bundle install --no-deployment
111
+ - name: Setup databases
112
+ run: |
113
+ mysql -e 'create database IF NOT EXISTS active_type_test;' -u root --password=password -P 3306 -h 127.0.0.1
114
+ - name: Run tests
115
+ run: bundle exec rake spec
116
+
117
+
118
+ test_pg:
119
+ runs-on: ubuntu-20.04
120
+
121
+ services:
122
+ postgres:
123
+ image: postgres
124
+ env:
125
+ POSTGRES_PASSWORD: postgres
126
+ options: >-
127
+ --health-cmd pg_isready
128
+ --health-interval 10s
129
+ --health-timeout 5s
130
+ --health-retries 5
131
+ ports:
132
+ - 5432:5432
133
+
134
+ strategy:
135
+ fail-fast: false
136
+ matrix:
137
+ include:
138
+ - ruby: "2.3.8"
139
+ gemfile: Gemfile.4.2.pg
140
+ - ruby: "2.3.8"
141
+ gemfile: Gemfile.5.2.pg
142
+ - ruby: "2.5.5"
143
+ gemfile: Gemfile.6.1.pg
144
+ - ruby: "2.6.3"
145
+ gemfile: Gemfile.5.2.pg
146
+ - ruby: "2.6.3"
147
+ gemfile: Gemfile.6.1.pg
148
+ - ruby: "2.7.2"
149
+ gemfile: Gemfile.5.2.pg
150
+ - ruby: "2.7.2"
151
+ gemfile: Gemfile.6.1.pg
152
+ - ruby: "3.0.1"
153
+ gemfile: Gemfile.6.1.pg
154
+
155
+ env:
156
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
157
+
158
+ steps:
159
+ - uses: actions/checkout@v2
160
+ - name: Install ruby
161
+ uses: ruby/setup-ruby@v1
162
+ with:
163
+ ruby-version: ${{ matrix.ruby }}
164
+ - name: Install database client
165
+ run: |
166
+ sudo apt-get install -y postgresql-client
167
+ - name: Bundle
168
+ run: |
169
+ gem install bundler:2.0.2
170
+ bundle install --no-deployment
171
+ - name: Setup databases
172
+ run: |
173
+ PGPASSWORD=postgres psql -c 'create database active_type_test;' -U postgres -p 5432 -h localhost
174
+ - name: Run tests
175
+ run: bundle exec rake spec
data/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased changes
6
6
 
7
+ ## 1.6.0 (2021-03-04)
8
+
9
+ * Fixed: Numerous issues with Rails 6.1. Thanks to @vr4b4c for some of the changes.
10
+
11
+ ## 1.5.0 (2020-11-06)
12
+
13
+ * Added: When serializing/deserializing `ActiveType::Record` or `ActiveType::Object` with YAML, virtual attributes are restored.
14
+ Credits to @chriscz.
15
+
16
+ ## 1.4.2 (2020-09-17)
17
+
18
+ * Fixed: Assigning values to virtual attributes through internal setter methods (e.g. `_write_attribute`) no longer results in "can't write unknown attribute" errors.
19
+
20
+ ## 1.4.1 (2020-08-05)
21
+
22
+ * Fixed: Avoid `Module#parents` deprecation warning on Rails 6. Thanks to @cilim.
23
+
7
24
  ## 1.4.0 (2020-07-27)
8
25
 
9
26
  * Extended records now use their own I18n namespace when looking up translations for models or attributes.
data/Gemfile.3.2.mysql2 CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 3.2.22.5'
4
4
  gem 'rspec', '~> 3.4'
5
- gem 'mysql2', '= 0.3.17'
5
+ gem 'mysql2', git: 'https://github.com/makandra/mysql2', branch: '0.3.x-lts'
6
6
  gem 'rake'
7
7
  gem 'gemika'
8
8
 
@@ -1,7 +1,14 @@
1
+ GIT
2
+ remote: https://github.com/makandra/mysql2
3
+ revision: c920d41e43c4722d4c065d2ea9d21494c560bd85
4
+ branch: 0.3.x-lts
5
+ specs:
6
+ mysql2 (0.3.21)
7
+
1
8
  PATH
2
9
  remote: .
3
10
  specs:
4
- active_type (1.3.2)
11
+ active_type (1.6.0)
5
12
  activerecord (>= 3.2)
6
13
 
7
14
  GEM
@@ -21,10 +28,9 @@ GEM
21
28
  arel (3.0.3)
22
29
  builder (3.0.4)
23
30
  diff-lcs (1.2.5)
24
- gemika (0.3.4)
31
+ gemika (0.4.1)
25
32
  i18n (0.6.11)
26
33
  multi_json (1.13.1)
27
- mysql2 (0.3.17)
28
34
  rake (10.4.2)
29
35
  rspec (3.4.0)
30
36
  rspec-core (~> 3.4.0)
@@ -49,9 +55,9 @@ DEPENDENCIES
49
55
  activerecord (~> 3.2.22.5)
50
56
  gemika
51
57
  i18n (= 0.6.11)
52
- mysql2 (= 0.3.17)
58
+ mysql2!
53
59
  rake
54
60
  rspec (~> 3.4)
55
61
 
56
62
  BUNDLED WITH
57
- 2.0.2
63
+ 2.1.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.3.2)
4
+ active_type (1.6.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -21,7 +21,7 @@ GEM
21
21
  arel (3.0.3)
22
22
  builder (3.0.4)
23
23
  diff-lcs (1.2.5)
24
- gemika (0.3.4)
24
+ gemika (0.4.1)
25
25
  i18n (0.6.11)
26
26
  multi_json (1.13.1)
27
27
  rake (10.4.2)
@@ -54,4 +54,4 @@ DEPENDENCIES
54
54
  sqlite3
55
55
 
56
56
  BUNDLED WITH
57
- 2.0.2
57
+ 2.1.4
data/Gemfile.4.2.mysql2 CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~>4.2.1'
4
4
  gem 'rspec', '~>3.4'
5
- gem 'mysql2', '~> 0.3.17'
5
+ gem 'mysql2'
6
6
  gem 'rake'
7
7
  gem 'gemika'
8
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.3.2)
4
+ active_type (1.6.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -23,11 +23,11 @@ GEM
23
23
  builder (3.2.3)
24
24
  concurrent-ruby (1.1.4)
25
25
  diff-lcs (1.2.5)
26
- gemika (0.3.4)
26
+ gemika (0.4.1)
27
27
  i18n (0.9.5)
28
28
  concurrent-ruby (~> 1.0)
29
29
  minitest (5.11.3)
30
- mysql2 (0.3.20)
30
+ mysql2 (0.5.3)
31
31
  rake (10.4.2)
32
32
  rspec (3.4.0)
33
33
  rspec-core (~> 3.4.0)
@@ -53,9 +53,9 @@ DEPENDENCIES
53
53
  active_type!
54
54
  activerecord (~> 4.2.1)
55
55
  gemika
56
- mysql2 (~> 0.3.17)
56
+ mysql2
57
57
  rake
58
58
  rspec (~> 3.4)
59
59
 
60
60
  BUNDLED WITH
61
- 2.0.2
61
+ 2.1.4
data/Gemfile.4.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.3.2)
4
+ active_type (1.6.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -23,7 +23,7 @@ GEM
23
23
  builder (3.2.3)
24
24
  concurrent-ruby (1.1.4)
25
25
  diff-lcs (1.2.5)
26
- gemika (0.3.4)
26
+ gemika (0.4.1)
27
27
  i18n (0.9.5)
28
28
  concurrent-ruby (~> 1.0)
29
29
  minitest (5.11.3)
@@ -58,4 +58,4 @@ DEPENDENCIES
58
58
  rspec (~> 3.4)
59
59
 
60
60
  BUNDLED WITH
61
- 2.0.2
61
+ 2.1.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.3.2)
4
+ active_type (1.6.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -23,7 +23,7 @@ GEM
23
23
  builder (3.2.3)
24
24
  concurrent-ruby (1.1.4)
25
25
  diff-lcs (1.2.5)
26
- gemika (0.3.4)
26
+ gemika (0.4.1)
27
27
  i18n (0.9.5)
28
28
  concurrent-ruby (~> 1.0)
29
29
  minitest (5.11.3)
@@ -58,4 +58,4 @@ DEPENDENCIES
58
58
  sqlite3
59
59
 
60
60
  BUNDLED WITH
61
- 2.0.2
61
+ 2.1.4
@@ -1,47 +1,47 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.3.2)
4
+ active_type (1.7.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (5.1.6.1)
11
- activesupport (= 5.1.6.1)
12
- activerecord (5.1.6.1)
13
- activemodel (= 5.1.6.1)
14
- activesupport (= 5.1.6.1)
10
+ activemodel (5.1.7)
11
+ activesupport (= 5.1.7)
12
+ activerecord (5.1.7)
13
+ activemodel (= 5.1.7)
14
+ activesupport (= 5.1.7)
15
15
  arel (~> 8.0)
16
- activesupport (5.1.6.1)
16
+ activesupport (5.1.7)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 0.7, < 2)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
21
  arel (8.0.0)
22
- concurrent-ruby (1.1.4)
23
- diff-lcs (1.3)
24
- gemika (0.3.4)
25
- i18n (1.5.3)
22
+ concurrent-ruby (1.1.7)
23
+ diff-lcs (1.4.4)
24
+ gemika (0.5.0)
25
+ i18n (1.8.5)
26
26
  concurrent-ruby (~> 1.0)
27
- minitest (5.11.3)
28
- mysql2 (0.4.6)
29
- rake (12.0.0)
30
- rspec (3.6.0)
31
- rspec-core (~> 3.6.0)
32
- rspec-expectations (~> 3.6.0)
33
- rspec-mocks (~> 3.6.0)
34
- rspec-core (3.6.0)
35
- rspec-support (~> 3.6.0)
36
- rspec-expectations (3.6.0)
27
+ minitest (5.14.2)
28
+ mysql2 (0.5.3)
29
+ rake (13.0.1)
30
+ rspec (3.10.0)
31
+ rspec-core (~> 3.10.0)
32
+ rspec-expectations (~> 3.10.0)
33
+ rspec-mocks (~> 3.10.0)
34
+ rspec-core (3.10.0)
35
+ rspec-support (~> 3.10.0)
36
+ rspec-expectations (3.10.0)
37
37
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.6.0)
39
- rspec-mocks (3.6.0)
38
+ rspec-support (~> 3.10.0)
39
+ rspec-mocks (3.10.0)
40
40
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.6.0)
42
- rspec-support (3.6.0)
41
+ rspec-support (~> 3.10.0)
42
+ rspec-support (3.10.0)
43
43
  thread_safe (0.3.6)
44
- tzinfo (1.2.5)
44
+ tzinfo (1.2.8)
45
45
  thread_safe (~> 0.1)
46
46
 
47
47
  PLATFORMS
@@ -56,4 +56,4 @@ DEPENDENCIES
56
56
  rspec (~> 3.4)
57
57
 
58
58
  BUNDLED WITH
59
- 2.0.2
59
+ 2.1.4