setting_accessors 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -3
- data/.travis.yml +1 -0
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/gemfiles/rails_4.2.gemfile.lock +48 -57
- data/gemfiles/rails_5.0.gemfile.lock +53 -62
- data/gemfiles/rails_5.1.gemfile.lock +54 -63
- data/gemfiles/rails_5.2.gemfile.lock +60 -69
- data/lib/generators/setting_accessors/install_generator.rb +0 -1
- data/lib/generators/setting_accessors/templates/migration.rb.erb +6 -4
- data/lib/generators/setting_accessors/templates/model.rb.erb +6 -2
- data/lib/setting_accessors/internal.rb +2 -2
- data/lib/setting_accessors/setting_scaffold.rb +3 -6
- data/lib/setting_accessors/version.rb +1 -1
- data/setting_accessors.gemspec +2 -5
- metadata +9 -65
- data/gemfiles/rails_4.1.gemfile +0 -7
- data/lib/generators/setting_accessors/templates/settings.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee5a9907251833eaa146db7fbac4a5018c2de9560ce5e6e20f3bea46f37fe24
|
4
|
+
data.tar.gz: 6bfa23385d8e0457139faf0965b0bf966cde9234145a86b10f9671bc4830b13b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a03c398cdc4458249af5ef3a5ca29742460e477d2c4c55df30e81ac3d8db539d20ae06859cef4462e2bc3805ae944083c0d488b219d251989752a99cf145fbbb
|
7
|
+
data.tar.gz: 340c2ea4add256ddd50c57868957c223feffbec345332fa4e5e7f5e7e310206724f896f143c200814a745ab785abd66d67f28c3dcccaea1dc327035806c02ece
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.2.0
|
4
|
+
|
5
|
+
This is a major bugfix release as the gem was basically broken when being installed in a fresh Rails 5 application.
|
6
|
+
|
7
|
+
### Removed
|
8
|
+
|
9
|
+
* The `config/settings.yml` file is no longer generated or referenced in the code
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
* The tests now actually use the files generated by the install generator. This should ensure that both
|
14
|
+
the migration and the model are always tested for compatibility with all supported Rails versions (#17)
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
|
18
|
+
* Adjusted the Gemspec to allow installation on Rails > 5.0 (#17)
|
19
|
+
* Fixed generated migration to include version information for Rails >= 5 (#17)
|
20
|
+
* Calls to `#as_json` as well as probably other parts of the AR API would fail if the gem was only included
|
21
|
+
but not used (#17)
|
22
|
+
|
3
23
|
## 1.1.0
|
4
24
|
|
5
25
|
A bugfix and slight refactoring release which takes care of several issues regarding
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ SettingAccessors
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/setting_accessors.svg)](http://badge.fury.io/rb/setting_accessors)
|
5
5
|
[![Build Status](https://travis-ci.org/Stex/setting_accessors.svg?branch=master)](https://travis-ci.org/Stex/setting_accessors)
|
6
6
|
[![Maintainability](https://api.codeclimate.com/v1/badges/78becd1d005aab2d1409/maintainability)](https://codeclimate.com/github/Stex/setting_accessors/maintainability)
|
7
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/
|
7
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/Stex/setting_accessors/test_coverage)
|
8
8
|
|
9
9
|
Sometimes it's handy to keep track of various settings or attributes in ActiveRecord instances and persist them through various requests (and sessions). An example would be to store a items-per-page value for multiple tables in the application per user or probably also set default sorting directions.
|
10
10
|
|
@@ -1,44 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
setting_accessors (1.
|
5
|
-
|
6
|
-
activerecord (>= 4.2, <= 5.2)
|
7
|
-
activesupport (>= 4.2, <= 5.2)
|
4
|
+
setting_accessors (1.2.0)
|
5
|
+
rails (>= 4.2, < 5.3)
|
8
6
|
|
9
7
|
GEM
|
10
8
|
remote: https://rubygems.org/
|
11
9
|
specs:
|
12
|
-
actionmailer (4.2.
|
13
|
-
actionpack (= 4.2.
|
14
|
-
actionview (= 4.2.
|
15
|
-
activejob (= 4.2.
|
10
|
+
actionmailer (4.2.11.1)
|
11
|
+
actionpack (= 4.2.11.1)
|
12
|
+
actionview (= 4.2.11.1)
|
13
|
+
activejob (= 4.2.11.1)
|
16
14
|
mail (~> 2.5, >= 2.5.4)
|
17
15
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
-
actionpack (4.2.
|
19
|
-
actionview (= 4.2.
|
20
|
-
activesupport (= 4.2.
|
16
|
+
actionpack (4.2.11.1)
|
17
|
+
actionview (= 4.2.11.1)
|
18
|
+
activesupport (= 4.2.11.1)
|
21
19
|
rack (~> 1.6)
|
22
20
|
rack-test (~> 0.6.2)
|
23
21
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
22
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
actionview (4.2.
|
26
|
-
activesupport (= 4.2.
|
23
|
+
actionview (4.2.11.1)
|
24
|
+
activesupport (= 4.2.11.1)
|
27
25
|
builder (~> 3.1)
|
28
26
|
erubis (~> 2.7.0)
|
29
27
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
28
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
31
|
-
activejob (4.2.
|
32
|
-
activesupport (= 4.2.
|
29
|
+
activejob (4.2.11.1)
|
30
|
+
activesupport (= 4.2.11.1)
|
33
31
|
globalid (>= 0.3.0)
|
34
|
-
activemodel (4.2.
|
35
|
-
activesupport (= 4.2.
|
32
|
+
activemodel (4.2.11.1)
|
33
|
+
activesupport (= 4.2.11.1)
|
36
34
|
builder (~> 3.1)
|
37
|
-
activerecord (4.2.
|
38
|
-
activemodel (= 4.2.
|
39
|
-
activesupport (= 4.2.
|
35
|
+
activerecord (4.2.11.1)
|
36
|
+
activemodel (= 4.2.11.1)
|
37
|
+
activesupport (= 4.2.11.1)
|
40
38
|
arel (~> 6.0)
|
41
|
-
activesupport (4.2.
|
39
|
+
activesupport (4.2.11.1)
|
42
40
|
i18n (~> 0.7)
|
43
41
|
minitest (~> 5.1)
|
44
42
|
thread_safe (~> 0.3, >= 0.3.4)
|
@@ -50,22 +48,21 @@ GEM
|
|
50
48
|
arel (6.0.4)
|
51
49
|
ast (2.4.0)
|
52
50
|
builder (3.2.3)
|
53
|
-
byebug (10.0.2)
|
54
51
|
coderay (1.1.2)
|
55
|
-
concurrent-ruby (1.1.
|
52
|
+
concurrent-ruby (1.1.5)
|
56
53
|
crass (1.0.4)
|
57
54
|
diff-lcs (1.3)
|
58
|
-
docile (1.1
|
55
|
+
docile (1.3.1)
|
59
56
|
erubis (2.7.0)
|
60
57
|
generator_spec (0.9.4)
|
61
58
|
activesupport (>= 3.0.0)
|
62
59
|
railties (>= 3.0.0)
|
63
|
-
globalid (0.4.
|
60
|
+
globalid (0.4.2)
|
64
61
|
activesupport (>= 4.2.0)
|
65
62
|
i18n (0.9.5)
|
66
63
|
concurrent-ruby (~> 1.0)
|
67
|
-
jaro_winkler (1.5.
|
68
|
-
json (2.
|
64
|
+
jaro_winkler (1.5.2)
|
65
|
+
json (2.2.0)
|
69
66
|
loofah (2.2.3)
|
70
67
|
crass (~> 1.0.2)
|
71
68
|
nokogiri (>= 1.5.9)
|
@@ -73,33 +70,29 @@ GEM
|
|
73
70
|
mini_mime (>= 0.1.1)
|
74
71
|
method_source (0.9.2)
|
75
72
|
mini_mime (1.0.1)
|
76
|
-
mini_portile2 (2.
|
73
|
+
mini_portile2 (2.4.0)
|
77
74
|
minitest (5.11.3)
|
78
|
-
nokogiri (1.
|
79
|
-
mini_portile2 (~> 2.
|
80
|
-
parallel (1.
|
81
|
-
parser (2.
|
75
|
+
nokogiri (1.10.3)
|
76
|
+
mini_portile2 (~> 2.4.0)
|
77
|
+
parallel (1.17.0)
|
78
|
+
parser (2.6.3.0)
|
82
79
|
ast (~> 2.4.0)
|
83
|
-
powerpack (0.1.2)
|
84
80
|
pry (0.12.2)
|
85
81
|
coderay (~> 1.1.0)
|
86
82
|
method_source (~> 0.9.0)
|
87
|
-
pry-byebug (3.6.0)
|
88
|
-
byebug (~> 10.0)
|
89
|
-
pry (~> 0.10)
|
90
83
|
rack (1.6.11)
|
91
84
|
rack-test (0.6.3)
|
92
85
|
rack (>= 1.0)
|
93
|
-
rails (4.2.
|
94
|
-
actionmailer (= 4.2.
|
95
|
-
actionpack (= 4.2.
|
96
|
-
actionview (= 4.2.
|
97
|
-
activejob (= 4.2.
|
98
|
-
activemodel (= 4.2.
|
99
|
-
activerecord (= 4.2.
|
100
|
-
activesupport (= 4.2.
|
86
|
+
rails (4.2.11.1)
|
87
|
+
actionmailer (= 4.2.11.1)
|
88
|
+
actionpack (= 4.2.11.1)
|
89
|
+
actionview (= 4.2.11.1)
|
90
|
+
activejob (= 4.2.11.1)
|
91
|
+
activemodel (= 4.2.11.1)
|
92
|
+
activerecord (= 4.2.11.1)
|
93
|
+
activesupport (= 4.2.11.1)
|
101
94
|
bundler (>= 1.3.0, < 2.0)
|
102
|
-
railties (= 4.2.
|
95
|
+
railties (= 4.2.11.1)
|
103
96
|
sprockets-rails
|
104
97
|
rails-deprecated_sanitizer (1.0.3)
|
105
98
|
activesupport (>= 4.2.0.alpha)
|
@@ -109,9 +102,9 @@ GEM
|
|
109
102
|
rails-deprecated_sanitizer (>= 1.0.1)
|
110
103
|
rails-html-sanitizer (1.0.4)
|
111
104
|
loofah (~> 2.2, >= 2.2.2)
|
112
|
-
railties (4.2.
|
113
|
-
actionpack (= 4.2.
|
114
|
-
activesupport (= 4.2.
|
105
|
+
railties (4.2.11.1)
|
106
|
+
actionpack (= 4.2.11.1)
|
107
|
+
activesupport (= 4.2.11.1)
|
115
108
|
rake (>= 0.8.7)
|
116
109
|
thor (>= 0.18.1, < 2.0)
|
117
110
|
rainbow (3.0.0)
|
@@ -122,22 +115,21 @@ GEM
|
|
122
115
|
rspec-mocks (~> 3.8.0)
|
123
116
|
rspec-core (3.8.0)
|
124
117
|
rspec-support (~> 3.8.0)
|
125
|
-
rspec-expectations (3.8.
|
118
|
+
rspec-expectations (3.8.3)
|
126
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
127
120
|
rspec-support (~> 3.8.0)
|
128
121
|
rspec-mocks (3.8.0)
|
129
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
130
123
|
rspec-support (~> 3.8.0)
|
131
124
|
rspec-support (3.8.0)
|
132
|
-
rubocop (0.
|
125
|
+
rubocop (0.71.0)
|
133
126
|
jaro_winkler (~> 1.5.1)
|
134
127
|
parallel (~> 1.10)
|
135
|
-
parser (>= 2.
|
136
|
-
powerpack (~> 0.1)
|
128
|
+
parser (>= 2.6)
|
137
129
|
rainbow (>= 2.2.2, < 4.0)
|
138
130
|
ruby-progressbar (~> 1.7)
|
139
|
-
unicode-display_width (
|
140
|
-
ruby-progressbar (1.10.
|
131
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
132
|
+
ruby-progressbar (1.10.1)
|
141
133
|
simplecov (0.16.1)
|
142
134
|
docile (~> 1.1)
|
143
135
|
json (>= 1.8, < 3)
|
@@ -155,7 +147,7 @@ GEM
|
|
155
147
|
thread_safe (0.3.6)
|
156
148
|
tzinfo (1.2.5)
|
157
149
|
thread_safe (~> 0.1)
|
158
|
-
unicode-display_width (1.
|
150
|
+
unicode-display_width (1.6.0)
|
159
151
|
with_model (2.1.2)
|
160
152
|
activerecord (>= 4.2, < 6.0)
|
161
153
|
|
@@ -167,14 +159,13 @@ DEPENDENCIES
|
|
167
159
|
bundler (~> 1.6)
|
168
160
|
generator_spec (~> 0.9)
|
169
161
|
pry (~> 0.12)
|
170
|
-
pry-byebug (~> 3.6)
|
171
162
|
rails (~> 4.2.0)
|
172
163
|
rake (~> 10.4)
|
173
164
|
rspec (~> 3.8)
|
174
165
|
rubocop (~> 0.60)
|
175
166
|
setting_accessors!
|
176
167
|
simplecov (~> 0.16)
|
177
|
-
sqlite3 (~> 1.3)
|
168
|
+
sqlite3 (~> 1.3.0)
|
178
169
|
with_model (~> 2.1)
|
179
170
|
|
180
171
|
BUNDLED WITH
|
@@ -1,47 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
setting_accessors (1.
|
5
|
-
|
6
|
-
activerecord (>= 4.2, <= 5.2)
|
7
|
-
activesupport (>= 4.2, <= 5.2)
|
4
|
+
setting_accessors (1.2.0)
|
5
|
+
rails (>= 4.2, < 5.3)
|
8
6
|
|
9
7
|
GEM
|
10
8
|
remote: https://rubygems.org/
|
11
9
|
specs:
|
12
|
-
actioncable (5.0.7)
|
13
|
-
actionpack (= 5.0.7)
|
10
|
+
actioncable (5.0.7.2)
|
11
|
+
actionpack (= 5.0.7.2)
|
14
12
|
nio4r (>= 1.2, < 3.0)
|
15
13
|
websocket-driver (~> 0.6.1)
|
16
|
-
actionmailer (5.0.7)
|
17
|
-
actionpack (= 5.0.7)
|
18
|
-
actionview (= 5.0.7)
|
19
|
-
activejob (= 5.0.7)
|
14
|
+
actionmailer (5.0.7.2)
|
15
|
+
actionpack (= 5.0.7.2)
|
16
|
+
actionview (= 5.0.7.2)
|
17
|
+
activejob (= 5.0.7.2)
|
20
18
|
mail (~> 2.5, >= 2.5.4)
|
21
19
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (5.0.7)
|
23
|
-
actionview (= 5.0.7)
|
24
|
-
activesupport (= 5.0.7)
|
20
|
+
actionpack (5.0.7.2)
|
21
|
+
actionview (= 5.0.7.2)
|
22
|
+
activesupport (= 5.0.7.2)
|
25
23
|
rack (~> 2.0)
|
26
24
|
rack-test (~> 0.6.3)
|
27
25
|
rails-dom-testing (~> 2.0)
|
28
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (5.0.7)
|
30
|
-
activesupport (= 5.0.7)
|
27
|
+
actionview (5.0.7.2)
|
28
|
+
activesupport (= 5.0.7.2)
|
31
29
|
builder (~> 3.1)
|
32
30
|
erubis (~> 2.7.0)
|
33
31
|
rails-dom-testing (~> 2.0)
|
34
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (5.0.7)
|
36
|
-
activesupport (= 5.0.7)
|
33
|
+
activejob (5.0.7.2)
|
34
|
+
activesupport (= 5.0.7.2)
|
37
35
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (5.0.7)
|
39
|
-
activesupport (= 5.0.7)
|
40
|
-
activerecord (5.0.7)
|
41
|
-
activemodel (= 5.0.7)
|
42
|
-
activesupport (= 5.0.7)
|
36
|
+
activemodel (5.0.7.2)
|
37
|
+
activesupport (= 5.0.7.2)
|
38
|
+
activerecord (5.0.7.2)
|
39
|
+
activemodel (= 5.0.7.2)
|
40
|
+
activesupport (= 5.0.7.2)
|
43
41
|
arel (~> 7.0)
|
44
|
-
activesupport (5.0.7)
|
42
|
+
activesupport (5.0.7.2)
|
45
43
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
46
44
|
i18n (>= 0.7, < 2)
|
47
45
|
minitest (~> 5.1)
|
@@ -53,22 +51,21 @@ GEM
|
|
53
51
|
arel (7.1.4)
|
54
52
|
ast (2.4.0)
|
55
53
|
builder (3.2.3)
|
56
|
-
byebug (10.0.2)
|
57
54
|
coderay (1.1.2)
|
58
|
-
concurrent-ruby (1.1.
|
55
|
+
concurrent-ruby (1.1.5)
|
59
56
|
crass (1.0.4)
|
60
57
|
diff-lcs (1.3)
|
61
|
-
docile (1.1
|
58
|
+
docile (1.3.1)
|
62
59
|
erubis (2.7.0)
|
63
60
|
generator_spec (0.9.4)
|
64
61
|
activesupport (>= 3.0.0)
|
65
62
|
railties (>= 3.0.0)
|
66
|
-
globalid (0.4.
|
63
|
+
globalid (0.4.2)
|
67
64
|
activesupport (>= 4.2.0)
|
68
|
-
i18n (1.0
|
65
|
+
i18n (1.6.0)
|
69
66
|
concurrent-ruby (~> 1.0)
|
70
|
-
jaro_winkler (1.5.
|
71
|
-
json (2.
|
67
|
+
jaro_winkler (1.5.2)
|
68
|
+
json (2.2.0)
|
72
69
|
loofah (2.2.3)
|
73
70
|
crass (~> 1.0.2)
|
74
71
|
nokogiri (>= 1.5.9)
|
@@ -76,44 +73,40 @@ GEM
|
|
76
73
|
mini_mime (>= 0.1.1)
|
77
74
|
method_source (0.9.2)
|
78
75
|
mini_mime (1.0.1)
|
79
|
-
mini_portile2 (2.
|
76
|
+
mini_portile2 (2.4.0)
|
80
77
|
minitest (5.11.3)
|
81
78
|
nio4r (2.3.1)
|
82
|
-
nokogiri (1.
|
83
|
-
mini_portile2 (~> 2.
|
84
|
-
parallel (1.
|
85
|
-
parser (2.
|
79
|
+
nokogiri (1.10.3)
|
80
|
+
mini_portile2 (~> 2.4.0)
|
81
|
+
parallel (1.17.0)
|
82
|
+
parser (2.6.3.0)
|
86
83
|
ast (~> 2.4.0)
|
87
|
-
powerpack (0.1.2)
|
88
84
|
pry (0.12.2)
|
89
85
|
coderay (~> 1.1.0)
|
90
86
|
method_source (~> 0.9.0)
|
91
|
-
|
92
|
-
byebug (~> 10.0)
|
93
|
-
pry (~> 0.10)
|
94
|
-
rack (2.0.6)
|
87
|
+
rack (2.0.7)
|
95
88
|
rack-test (0.6.3)
|
96
89
|
rack (>= 1.0)
|
97
|
-
rails (5.0.7)
|
98
|
-
actioncable (= 5.0.7)
|
99
|
-
actionmailer (= 5.0.7)
|
100
|
-
actionpack (= 5.0.7)
|
101
|
-
actionview (= 5.0.7)
|
102
|
-
activejob (= 5.0.7)
|
103
|
-
activemodel (= 5.0.7)
|
104
|
-
activerecord (= 5.0.7)
|
105
|
-
activesupport (= 5.0.7)
|
90
|
+
rails (5.0.7.2)
|
91
|
+
actioncable (= 5.0.7.2)
|
92
|
+
actionmailer (= 5.0.7.2)
|
93
|
+
actionpack (= 5.0.7.2)
|
94
|
+
actionview (= 5.0.7.2)
|
95
|
+
activejob (= 5.0.7.2)
|
96
|
+
activemodel (= 5.0.7.2)
|
97
|
+
activerecord (= 5.0.7.2)
|
98
|
+
activesupport (= 5.0.7.2)
|
106
99
|
bundler (>= 1.3.0)
|
107
|
-
railties (= 5.0.7)
|
100
|
+
railties (= 5.0.7.2)
|
108
101
|
sprockets-rails (>= 2.0.0)
|
109
102
|
rails-dom-testing (2.0.3)
|
110
103
|
activesupport (>= 4.2.0)
|
111
104
|
nokogiri (>= 1.6)
|
112
105
|
rails-html-sanitizer (1.0.4)
|
113
106
|
loofah (~> 2.2, >= 2.2.2)
|
114
|
-
railties (5.0.7)
|
115
|
-
actionpack (= 5.0.7)
|
116
|
-
activesupport (= 5.0.7)
|
107
|
+
railties (5.0.7.2)
|
108
|
+
actionpack (= 5.0.7.2)
|
109
|
+
activesupport (= 5.0.7.2)
|
117
110
|
method_source
|
118
111
|
rake (>= 0.8.7)
|
119
112
|
thor (>= 0.18.1, < 2.0)
|
@@ -125,22 +118,21 @@ GEM
|
|
125
118
|
rspec-mocks (~> 3.8.0)
|
126
119
|
rspec-core (3.8.0)
|
127
120
|
rspec-support (~> 3.8.0)
|
128
|
-
rspec-expectations (3.8.
|
121
|
+
rspec-expectations (3.8.3)
|
129
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
130
123
|
rspec-support (~> 3.8.0)
|
131
124
|
rspec-mocks (3.8.0)
|
132
125
|
diff-lcs (>= 1.2.0, < 2.0)
|
133
126
|
rspec-support (~> 3.8.0)
|
134
127
|
rspec-support (3.8.0)
|
135
|
-
rubocop (0.
|
128
|
+
rubocop (0.71.0)
|
136
129
|
jaro_winkler (~> 1.5.1)
|
137
130
|
parallel (~> 1.10)
|
138
|
-
parser (>= 2.
|
139
|
-
powerpack (~> 0.1)
|
131
|
+
parser (>= 2.6)
|
140
132
|
rainbow (>= 2.2.2, < 4.0)
|
141
133
|
ruby-progressbar (~> 1.7)
|
142
|
-
unicode-display_width (
|
143
|
-
ruby-progressbar (1.10.
|
134
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
135
|
+
ruby-progressbar (1.10.1)
|
144
136
|
simplecov (0.16.1)
|
145
137
|
docile (~> 1.1)
|
146
138
|
json (>= 1.8, < 3)
|
@@ -158,7 +150,7 @@ GEM
|
|
158
150
|
thread_safe (0.3.6)
|
159
151
|
tzinfo (1.2.5)
|
160
152
|
thread_safe (~> 0.1)
|
161
|
-
unicode-display_width (1.
|
153
|
+
unicode-display_width (1.6.0)
|
162
154
|
websocket-driver (0.6.5)
|
163
155
|
websocket-extensions (>= 0.1.0)
|
164
156
|
websocket-extensions (0.1.3)
|
@@ -173,14 +165,13 @@ DEPENDENCIES
|
|
173
165
|
bundler (~> 1.6)
|
174
166
|
generator_spec (~> 0.9)
|
175
167
|
pry (~> 0.12)
|
176
|
-
pry-byebug (~> 3.6)
|
177
168
|
rails (~> 5.0.0)
|
178
169
|
rake (~> 10.4)
|
179
170
|
rspec (~> 3.8)
|
180
171
|
rubocop (~> 0.60)
|
181
172
|
setting_accessors!
|
182
173
|
simplecov (~> 0.16)
|
183
|
-
sqlite3 (~> 1.3)
|
174
|
+
sqlite3 (~> 1.3.0)
|
184
175
|
with_model (~> 2.1)
|
185
176
|
|
186
177
|
BUNDLED WITH
|
@@ -1,47 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
setting_accessors (1.
|
5
|
-
|
6
|
-
activerecord (>= 4.2, <= 5.2)
|
7
|
-
activesupport (>= 4.2, <= 5.2)
|
4
|
+
setting_accessors (1.2.0)
|
5
|
+
rails (>= 4.2, < 5.3)
|
8
6
|
|
9
7
|
GEM
|
10
8
|
remote: https://rubygems.org/
|
11
9
|
specs:
|
12
|
-
actioncable (5.1.
|
13
|
-
actionpack (= 5.1.
|
10
|
+
actioncable (5.1.7)
|
11
|
+
actionpack (= 5.1.7)
|
14
12
|
nio4r (~> 2.0)
|
15
13
|
websocket-driver (~> 0.6.1)
|
16
|
-
actionmailer (5.1.
|
17
|
-
actionpack (= 5.1.
|
18
|
-
actionview (= 5.1.
|
19
|
-
activejob (= 5.1.
|
14
|
+
actionmailer (5.1.7)
|
15
|
+
actionpack (= 5.1.7)
|
16
|
+
actionview (= 5.1.7)
|
17
|
+
activejob (= 5.1.7)
|
20
18
|
mail (~> 2.5, >= 2.5.4)
|
21
19
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (5.1.
|
23
|
-
actionview (= 5.1.
|
24
|
-
activesupport (= 5.1.
|
20
|
+
actionpack (5.1.7)
|
21
|
+
actionview (= 5.1.7)
|
22
|
+
activesupport (= 5.1.7)
|
25
23
|
rack (~> 2.0)
|
26
24
|
rack-test (>= 0.6.3)
|
27
25
|
rails-dom-testing (~> 2.0)
|
28
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (5.1.
|
30
|
-
activesupport (= 5.1.
|
27
|
+
actionview (5.1.7)
|
28
|
+
activesupport (= 5.1.7)
|
31
29
|
builder (~> 3.1)
|
32
30
|
erubi (~> 1.4)
|
33
31
|
rails-dom-testing (~> 2.0)
|
34
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (5.1.
|
36
|
-
activesupport (= 5.1.
|
33
|
+
activejob (5.1.7)
|
34
|
+
activesupport (= 5.1.7)
|
37
35
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (5.1.
|
39
|
-
activesupport (= 5.1.
|
40
|
-
activerecord (5.1.
|
41
|
-
activemodel (= 5.1.
|
42
|
-
activesupport (= 5.1.
|
36
|
+
activemodel (5.1.7)
|
37
|
+
activesupport (= 5.1.7)
|
38
|
+
activerecord (5.1.7)
|
39
|
+
activemodel (= 5.1.7)
|
40
|
+
activesupport (= 5.1.7)
|
43
41
|
arel (~> 8.0)
|
44
|
-
activesupport (5.1.
|
42
|
+
activesupport (5.1.7)
|
45
43
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
46
44
|
i18n (>= 0.7, < 2)
|
47
45
|
minitest (~> 5.1)
|
@@ -53,22 +51,21 @@ GEM
|
|
53
51
|
arel (8.0.0)
|
54
52
|
ast (2.4.0)
|
55
53
|
builder (3.2.3)
|
56
|
-
byebug (10.0.2)
|
57
54
|
coderay (1.1.2)
|
58
|
-
concurrent-ruby (1.1.
|
55
|
+
concurrent-ruby (1.1.5)
|
59
56
|
crass (1.0.4)
|
60
57
|
diff-lcs (1.3)
|
61
|
-
docile (1.1
|
62
|
-
erubi (1.
|
58
|
+
docile (1.3.1)
|
59
|
+
erubi (1.8.0)
|
63
60
|
generator_spec (0.9.4)
|
64
61
|
activesupport (>= 3.0.0)
|
65
62
|
railties (>= 3.0.0)
|
66
|
-
globalid (0.4.
|
63
|
+
globalid (0.4.2)
|
67
64
|
activesupport (>= 4.2.0)
|
68
|
-
i18n (1.
|
65
|
+
i18n (1.6.0)
|
69
66
|
concurrent-ruby (~> 1.0)
|
70
|
-
jaro_winkler (1.5.
|
71
|
-
json (2.
|
67
|
+
jaro_winkler (1.5.2)
|
68
|
+
json (2.2.0)
|
72
69
|
loofah (2.2.3)
|
73
70
|
crass (~> 1.0.2)
|
74
71
|
nokogiri (>= 1.5.9)
|
@@ -76,44 +73,40 @@ GEM
|
|
76
73
|
mini_mime (>= 0.1.1)
|
77
74
|
method_source (0.9.2)
|
78
75
|
mini_mime (1.0.1)
|
79
|
-
mini_portile2 (2.
|
76
|
+
mini_portile2 (2.4.0)
|
80
77
|
minitest (5.11.3)
|
81
78
|
nio4r (2.3.1)
|
82
|
-
nokogiri (1.
|
83
|
-
mini_portile2 (~> 2.
|
84
|
-
parallel (1.
|
85
|
-
parser (2.
|
79
|
+
nokogiri (1.10.3)
|
80
|
+
mini_portile2 (~> 2.4.0)
|
81
|
+
parallel (1.17.0)
|
82
|
+
parser (2.6.3.0)
|
86
83
|
ast (~> 2.4.0)
|
87
|
-
powerpack (0.1.2)
|
88
84
|
pry (0.12.2)
|
89
85
|
coderay (~> 1.1.0)
|
90
86
|
method_source (~> 0.9.0)
|
91
|
-
|
92
|
-
byebug (~> 10.0)
|
93
|
-
pry (~> 0.10)
|
94
|
-
rack (2.0.6)
|
87
|
+
rack (2.0.7)
|
95
88
|
rack-test (1.1.0)
|
96
89
|
rack (>= 1.0, < 3)
|
97
|
-
rails (5.1.
|
98
|
-
actioncable (= 5.1.
|
99
|
-
actionmailer (= 5.1.
|
100
|
-
actionpack (= 5.1.
|
101
|
-
actionview (= 5.1.
|
102
|
-
activejob (= 5.1.
|
103
|
-
activemodel (= 5.1.
|
104
|
-
activerecord (= 5.1.
|
105
|
-
activesupport (= 5.1.
|
90
|
+
rails (5.1.7)
|
91
|
+
actioncable (= 5.1.7)
|
92
|
+
actionmailer (= 5.1.7)
|
93
|
+
actionpack (= 5.1.7)
|
94
|
+
actionview (= 5.1.7)
|
95
|
+
activejob (= 5.1.7)
|
96
|
+
activemodel (= 5.1.7)
|
97
|
+
activerecord (= 5.1.7)
|
98
|
+
activesupport (= 5.1.7)
|
106
99
|
bundler (>= 1.3.0)
|
107
|
-
railties (= 5.1.
|
100
|
+
railties (= 5.1.7)
|
108
101
|
sprockets-rails (>= 2.0.0)
|
109
102
|
rails-dom-testing (2.0.3)
|
110
103
|
activesupport (>= 4.2.0)
|
111
104
|
nokogiri (>= 1.6)
|
112
105
|
rails-html-sanitizer (1.0.4)
|
113
106
|
loofah (~> 2.2, >= 2.2.2)
|
114
|
-
railties (5.1.
|
115
|
-
actionpack (= 5.1.
|
116
|
-
activesupport (= 5.1.
|
107
|
+
railties (5.1.7)
|
108
|
+
actionpack (= 5.1.7)
|
109
|
+
activesupport (= 5.1.7)
|
117
110
|
method_source
|
118
111
|
rake (>= 0.8.7)
|
119
112
|
thor (>= 0.18.1, < 2.0)
|
@@ -125,22 +118,21 @@ GEM
|
|
125
118
|
rspec-mocks (~> 3.8.0)
|
126
119
|
rspec-core (3.8.0)
|
127
120
|
rspec-support (~> 3.8.0)
|
128
|
-
rspec-expectations (3.8.
|
121
|
+
rspec-expectations (3.8.3)
|
129
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
130
123
|
rspec-support (~> 3.8.0)
|
131
124
|
rspec-mocks (3.8.0)
|
132
125
|
diff-lcs (>= 1.2.0, < 2.0)
|
133
126
|
rspec-support (~> 3.8.0)
|
134
127
|
rspec-support (3.8.0)
|
135
|
-
rubocop (0.
|
128
|
+
rubocop (0.71.0)
|
136
129
|
jaro_winkler (~> 1.5.1)
|
137
130
|
parallel (~> 1.10)
|
138
|
-
parser (>= 2.
|
139
|
-
powerpack (~> 0.1)
|
131
|
+
parser (>= 2.6)
|
140
132
|
rainbow (>= 2.2.2, < 4.0)
|
141
133
|
ruby-progressbar (~> 1.7)
|
142
|
-
unicode-display_width (
|
143
|
-
ruby-progressbar (1.10.
|
134
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
135
|
+
ruby-progressbar (1.10.1)
|
144
136
|
simplecov (0.16.1)
|
145
137
|
docile (~> 1.1)
|
146
138
|
json (>= 1.8, < 3)
|
@@ -158,7 +150,7 @@ GEM
|
|
158
150
|
thread_safe (0.3.6)
|
159
151
|
tzinfo (1.2.5)
|
160
152
|
thread_safe (~> 0.1)
|
161
|
-
unicode-display_width (1.
|
153
|
+
unicode-display_width (1.6.0)
|
162
154
|
websocket-driver (0.6.5)
|
163
155
|
websocket-extensions (>= 0.1.0)
|
164
156
|
websocket-extensions (0.1.3)
|
@@ -173,14 +165,13 @@ DEPENDENCIES
|
|
173
165
|
bundler (~> 1.6)
|
174
166
|
generator_spec (~> 0.9)
|
175
167
|
pry (~> 0.12)
|
176
|
-
pry-byebug (~> 3.6)
|
177
168
|
rails (~> 5.1.0)
|
178
169
|
rake (~> 10.4)
|
179
170
|
rspec (~> 3.8)
|
180
171
|
rubocop (~> 0.60)
|
181
172
|
setting_accessors!
|
182
173
|
simplecov (~> 0.16)
|
183
|
-
sqlite3 (~> 1.3)
|
174
|
+
sqlite3 (~> 1.3.0)
|
184
175
|
with_model (~> 2.1)
|
185
176
|
|
186
177
|
BUNDLED WITH
|
@@ -1,51 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
setting_accessors (1.
|
5
|
-
|
6
|
-
activerecord (>= 4.2, <= 5.2)
|
7
|
-
activesupport (>= 4.2, <= 5.2)
|
4
|
+
setting_accessors (1.2.0)
|
5
|
+
rails (>= 4.2, < 5.3)
|
8
6
|
|
9
7
|
GEM
|
10
8
|
remote: https://rubygems.org/
|
11
9
|
specs:
|
12
|
-
actioncable (5.2.
|
13
|
-
actionpack (= 5.2.
|
10
|
+
actioncable (5.2.3)
|
11
|
+
actionpack (= 5.2.3)
|
14
12
|
nio4r (~> 2.0)
|
15
13
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailer (5.2.
|
17
|
-
actionpack (= 5.2.
|
18
|
-
actionview (= 5.2.
|
19
|
-
activejob (= 5.2.
|
14
|
+
actionmailer (5.2.3)
|
15
|
+
actionpack (= 5.2.3)
|
16
|
+
actionview (= 5.2.3)
|
17
|
+
activejob (= 5.2.3)
|
20
18
|
mail (~> 2.5, >= 2.5.4)
|
21
19
|
rails-dom-testing (~> 2.0)
|
22
|
-
actionpack (5.2.
|
23
|
-
actionview (= 5.2.
|
24
|
-
activesupport (= 5.2.
|
20
|
+
actionpack (5.2.3)
|
21
|
+
actionview (= 5.2.3)
|
22
|
+
activesupport (= 5.2.3)
|
25
23
|
rack (~> 2.0)
|
26
24
|
rack-test (>= 0.6.3)
|
27
25
|
rails-dom-testing (~> 2.0)
|
28
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
actionview (5.2.
|
30
|
-
activesupport (= 5.2.
|
27
|
+
actionview (5.2.3)
|
28
|
+
activesupport (= 5.2.3)
|
31
29
|
builder (~> 3.1)
|
32
30
|
erubi (~> 1.4)
|
33
31
|
rails-dom-testing (~> 2.0)
|
34
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
-
activejob (5.2.
|
36
|
-
activesupport (= 5.2.
|
33
|
+
activejob (5.2.3)
|
34
|
+
activesupport (= 5.2.3)
|
37
35
|
globalid (>= 0.3.6)
|
38
|
-
activemodel (5.2.
|
39
|
-
activesupport (= 5.2.
|
40
|
-
activerecord (5.2.
|
41
|
-
activemodel (= 5.2.
|
42
|
-
activesupport (= 5.2.
|
36
|
+
activemodel (5.2.3)
|
37
|
+
activesupport (= 5.2.3)
|
38
|
+
activerecord (5.2.3)
|
39
|
+
activemodel (= 5.2.3)
|
40
|
+
activesupport (= 5.2.3)
|
43
41
|
arel (>= 9.0)
|
44
|
-
activestorage (5.2.
|
45
|
-
actionpack (= 5.2.
|
46
|
-
activerecord (= 5.2.
|
42
|
+
activestorage (5.2.3)
|
43
|
+
actionpack (= 5.2.3)
|
44
|
+
activerecord (= 5.2.3)
|
47
45
|
marcel (~> 0.3.1)
|
48
|
-
activesupport (5.2.
|
46
|
+
activesupport (5.2.3)
|
49
47
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
48
|
i18n (>= 0.7, < 2)
|
51
49
|
minitest (~> 5.1)
|
@@ -57,22 +55,21 @@ GEM
|
|
57
55
|
arel (9.0.0)
|
58
56
|
ast (2.4.0)
|
59
57
|
builder (3.2.3)
|
60
|
-
byebug (10.0.2)
|
61
58
|
coderay (1.1.2)
|
62
|
-
concurrent-ruby (1.1.
|
59
|
+
concurrent-ruby (1.1.5)
|
63
60
|
crass (1.0.4)
|
64
61
|
diff-lcs (1.3)
|
65
|
-
docile (1.1
|
66
|
-
erubi (1.
|
62
|
+
docile (1.3.1)
|
63
|
+
erubi (1.8.0)
|
67
64
|
generator_spec (0.9.4)
|
68
65
|
activesupport (>= 3.0.0)
|
69
66
|
railties (>= 3.0.0)
|
70
|
-
globalid (0.4.
|
67
|
+
globalid (0.4.2)
|
71
68
|
activesupport (>= 4.2.0)
|
72
|
-
i18n (1.
|
69
|
+
i18n (1.6.0)
|
73
70
|
concurrent-ruby (~> 1.0)
|
74
|
-
jaro_winkler (1.5.
|
75
|
-
json (2.
|
71
|
+
jaro_winkler (1.5.2)
|
72
|
+
json (2.2.0)
|
76
73
|
loofah (2.2.3)
|
77
74
|
crass (~> 1.0.2)
|
78
75
|
nokogiri (>= 1.5.9)
|
@@ -81,50 +78,46 @@ GEM
|
|
81
78
|
marcel (0.3.3)
|
82
79
|
mimemagic (~> 0.3.2)
|
83
80
|
method_source (0.9.2)
|
84
|
-
mimemagic (0.3.
|
81
|
+
mimemagic (0.3.3)
|
85
82
|
mini_mime (1.0.1)
|
86
|
-
mini_portile2 (2.
|
83
|
+
mini_portile2 (2.4.0)
|
87
84
|
minitest (5.11.3)
|
88
85
|
nio4r (2.3.1)
|
89
|
-
nokogiri (1.
|
90
|
-
mini_portile2 (~> 2.
|
91
|
-
parallel (1.
|
92
|
-
parser (2.
|
86
|
+
nokogiri (1.10.3)
|
87
|
+
mini_portile2 (~> 2.4.0)
|
88
|
+
parallel (1.17.0)
|
89
|
+
parser (2.6.3.0)
|
93
90
|
ast (~> 2.4.0)
|
94
|
-
powerpack (0.1.2)
|
95
91
|
pry (0.12.2)
|
96
92
|
coderay (~> 1.1.0)
|
97
93
|
method_source (~> 0.9.0)
|
98
|
-
|
99
|
-
byebug (~> 10.0)
|
100
|
-
pry (~> 0.10)
|
101
|
-
rack (2.0.6)
|
94
|
+
rack (2.0.7)
|
102
95
|
rack-test (1.1.0)
|
103
96
|
rack (>= 1.0, < 3)
|
104
|
-
rails (5.2.
|
105
|
-
actioncable (= 5.2.
|
106
|
-
actionmailer (= 5.2.
|
107
|
-
actionpack (= 5.2.
|
108
|
-
actionview (= 5.2.
|
109
|
-
activejob (= 5.2.
|
110
|
-
activemodel (= 5.2.
|
111
|
-
activerecord (= 5.2.
|
112
|
-
activestorage (= 5.2.
|
113
|
-
activesupport (= 5.2.
|
97
|
+
rails (5.2.3)
|
98
|
+
actioncable (= 5.2.3)
|
99
|
+
actionmailer (= 5.2.3)
|
100
|
+
actionpack (= 5.2.3)
|
101
|
+
actionview (= 5.2.3)
|
102
|
+
activejob (= 5.2.3)
|
103
|
+
activemodel (= 5.2.3)
|
104
|
+
activerecord (= 5.2.3)
|
105
|
+
activestorage (= 5.2.3)
|
106
|
+
activesupport (= 5.2.3)
|
114
107
|
bundler (>= 1.3.0)
|
115
|
-
railties (= 5.2.
|
108
|
+
railties (= 5.2.3)
|
116
109
|
sprockets-rails (>= 2.0.0)
|
117
110
|
rails-dom-testing (2.0.3)
|
118
111
|
activesupport (>= 4.2.0)
|
119
112
|
nokogiri (>= 1.6)
|
120
113
|
rails-html-sanitizer (1.0.4)
|
121
114
|
loofah (~> 2.2, >= 2.2.2)
|
122
|
-
railties (5.2.
|
123
|
-
actionpack (= 5.2.
|
124
|
-
activesupport (= 5.2.
|
115
|
+
railties (5.2.3)
|
116
|
+
actionpack (= 5.2.3)
|
117
|
+
activesupport (= 5.2.3)
|
125
118
|
method_source
|
126
119
|
rake (>= 0.8.7)
|
127
|
-
thor (>= 0.
|
120
|
+
thor (>= 0.19.0, < 2.0)
|
128
121
|
rainbow (3.0.0)
|
129
122
|
rake (10.5.0)
|
130
123
|
rspec (3.8.0)
|
@@ -133,22 +126,21 @@ GEM
|
|
133
126
|
rspec-mocks (~> 3.8.0)
|
134
127
|
rspec-core (3.8.0)
|
135
128
|
rspec-support (~> 3.8.0)
|
136
|
-
rspec-expectations (3.8.
|
129
|
+
rspec-expectations (3.8.3)
|
137
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
138
131
|
rspec-support (~> 3.8.0)
|
139
132
|
rspec-mocks (3.8.0)
|
140
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
141
134
|
rspec-support (~> 3.8.0)
|
142
135
|
rspec-support (3.8.0)
|
143
|
-
rubocop (0.
|
136
|
+
rubocop (0.71.0)
|
144
137
|
jaro_winkler (~> 1.5.1)
|
145
138
|
parallel (~> 1.10)
|
146
|
-
parser (>= 2.
|
147
|
-
powerpack (~> 0.1)
|
139
|
+
parser (>= 2.6)
|
148
140
|
rainbow (>= 2.2.2, < 4.0)
|
149
141
|
ruby-progressbar (~> 1.7)
|
150
|
-
unicode-display_width (
|
151
|
-
ruby-progressbar (1.10.
|
142
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
143
|
+
ruby-progressbar (1.10.1)
|
152
144
|
simplecov (0.16.1)
|
153
145
|
docile (~> 1.1)
|
154
146
|
json (>= 1.8, < 3)
|
@@ -166,7 +158,7 @@ GEM
|
|
166
158
|
thread_safe (0.3.6)
|
167
159
|
tzinfo (1.2.5)
|
168
160
|
thread_safe (~> 0.1)
|
169
|
-
unicode-display_width (1.
|
161
|
+
unicode-display_width (1.6.0)
|
170
162
|
websocket-driver (0.7.0)
|
171
163
|
websocket-extensions (>= 0.1.0)
|
172
164
|
websocket-extensions (0.1.3)
|
@@ -181,14 +173,13 @@ DEPENDENCIES
|
|
181
173
|
bundler (~> 1.6)
|
182
174
|
generator_spec (~> 0.9)
|
183
175
|
pry (~> 0.12)
|
184
|
-
pry-byebug (~> 3.6)
|
185
176
|
rails (~> 5.2.0)
|
186
177
|
rake (~> 10.4)
|
187
178
|
rspec (~> 3.8)
|
188
179
|
rubocop (~> 0.60)
|
189
180
|
setting_accessors!
|
190
181
|
simplecov (~> 0.16)
|
191
|
-
sqlite3 (~> 1.3)
|
182
|
+
sqlite3 (~> 1.3.0)
|
192
183
|
with_model (~> 2.1)
|
193
184
|
|
194
185
|
BUNDLED WITH
|
@@ -20,7 +20,6 @@ module SettingAccessors
|
|
20
20
|
|
21
21
|
desc 'Installs everything necessary'
|
22
22
|
def create_install
|
23
|
-
template 'settings.yml', 'config/settings.yml'
|
24
23
|
template 'model.rb.erb', "app/models/#{model_name.classify.underscore}.rb"
|
25
24
|
migration_template 'migration.rb.erb', "db/migrate/create_#{model_name.classify.underscore.pluralize}.rb"
|
26
25
|
|
@@ -1,12 +1,14 @@
|
|
1
|
-
|
1
|
+
<%- ar_version = Gem.loaded_specs['activerecord'].version -%>
|
2
|
+
<%- version_information = ar_version >= Gem::Version.create('5.0') ? "[#{ar_version.segments.take(2).join('.')}]" : nil -%>
|
3
|
+
class Create<%= model_name.camelize.pluralize %> < ActiveRecord::Migration<%= version_information %>
|
2
4
|
def change
|
3
5
|
create_table :<%= model_name.underscore.pluralize %> do |t|
|
4
|
-
t.belongs_to :assignable, :
|
6
|
+
t.belongs_to :assignable, polymorphic: true
|
5
7
|
|
6
8
|
t.string :name
|
7
9
|
t.text :value
|
8
10
|
|
9
|
-
t.timestamps
|
11
|
+
t.timestamps null: false
|
10
12
|
end
|
11
13
|
end
|
12
|
-
end
|
14
|
+
end
|
@@ -17,7 +17,11 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
class <%= model_name.camelize %> < ActiveRecord::Base
|
20
|
-
|
20
|
+
<%- if Gem.loaded_specs['activerecord'].version >= Gem::Version.create('5.0') -%>
|
21
|
+
belongs_to :assignable, polymorphic: true, optional: true
|
22
|
+
<%- else -%>
|
23
|
+
belongs_to :assignable, polymorphic: true
|
24
|
+
<%- end -%>
|
21
25
|
|
22
26
|
include SettingAccessors::SettingScaffold
|
23
|
-
end
|
27
|
+
end
|
@@ -13,7 +13,6 @@ module SettingAccessors
|
|
13
13
|
|
14
14
|
#
|
15
15
|
# Sets a class-specific setting
|
16
|
-
# For global settings, this is done in config/settings.yml
|
17
16
|
# Please do not call this method yourself, it is done automatically
|
18
17
|
# by using setting_accessor in your model class
|
19
18
|
#
|
@@ -32,7 +31,6 @@ module SettingAccessors
|
|
32
31
|
#
|
33
32
|
# @return [Hash] configuration data regarding this setting
|
34
33
|
#
|
35
|
-
# - If it's a globally defined setting, the value is taken from config/settings.yml
|
36
34
|
# - If it's a setting defined in a setting_accessor call, the information is taken from this call
|
37
35
|
# - Otherwise, an empty hash is returned
|
38
36
|
#
|
@@ -83,6 +81,8 @@ module SettingAccessors
|
|
83
81
|
def self.setting_accessor_names(klass)
|
84
82
|
@@setting_accessor_names ||= {}
|
85
83
|
lookup_nested_hash(@@setting_accessor_names, klass.to_s) || []
|
84
|
+
rescue SettingAccessors::NestedHashKeyNotFoundError
|
85
|
+
[]
|
86
86
|
end
|
87
87
|
|
88
88
|
#
|
@@ -73,9 +73,6 @@ module SettingAccessors
|
|
73
73
|
# The optional record this setting belongs to. If not
|
74
74
|
# given, the setting is global.
|
75
75
|
#
|
76
|
-
# @param [Boolean] return_value
|
77
|
-
# If set to +true+, only the setting's value is returned
|
78
|
-
#
|
79
76
|
# @return [Object] The newly set value
|
80
77
|
#
|
81
78
|
# @toto: Bless the rains down in Africa!
|
@@ -158,15 +155,15 @@ module SettingAccessors
|
|
158
155
|
end
|
159
156
|
|
160
157
|
#
|
161
|
-
# @return [String] the setting's type as specified in
|
162
|
-
# If
|
158
|
+
# @return [String] the setting's type as specified in the setting_accessor call.
|
159
|
+
# If no type was specified, a polymorphic type is assumed
|
163
160
|
#
|
164
161
|
def value_type
|
165
162
|
data['type'] || 'polymorphic'
|
166
163
|
end
|
167
164
|
|
168
165
|
#
|
169
|
-
# @return [Object] the setting's value before it was type casted
|
166
|
+
# @return [Object] the setting's value before it was type casted.
|
170
167
|
# See #value_before_type_cast for ActiveRecord attributes
|
171
168
|
#
|
172
169
|
# We can't use the name #value_before_type_cast here as it would
|
data/setting_accessors.gemspec
CHANGED
@@ -29,15 +29,12 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
30
30
|
spec.add_development_dependency 'generator_spec', '~> 0.9'
|
31
31
|
spec.add_development_dependency 'pry', '~> 0.12'
|
32
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.6'
|
33
32
|
spec.add_development_dependency 'rake', '~> 10.4'
|
34
33
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
35
34
|
spec.add_development_dependency 'rubocop', '~> 0.60'
|
36
35
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
37
|
-
spec.add_development_dependency 'sqlite3', '~> 1.3'
|
36
|
+
spec.add_development_dependency 'sqlite3', '~> 1.3.0'
|
38
37
|
spec.add_development_dependency 'with_model', '~> 2.1'
|
39
38
|
|
40
|
-
spec.add_dependency '
|
41
|
-
spec.add_dependency 'activerecord', ['>= 4.2', '<= 5.2']
|
42
|
-
spec.add_dependency 'activesupport', ['>= 4.2', '<= 5.2']
|
39
|
+
spec.add_dependency 'rails', ['>= 4.2', '< 5.3']
|
43
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setting_accessors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Exner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.12'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry-byebug
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.6'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.6'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rake
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +128,14 @@ dependencies:
|
|
142
128
|
requirements:
|
143
129
|
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
131
|
+
version: 1.3.0
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
136
|
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
138
|
+
version: 1.3.0
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: with_model
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,55 +151,15 @@ dependencies:
|
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: '2.1'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '4.2'
|
174
|
-
- - "<="
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: '5.2'
|
177
|
-
type: :runtime
|
178
|
-
prerelease: false
|
179
|
-
version_requirements: !ruby/object:Gem::Requirement
|
180
|
-
requirements:
|
181
|
-
- - ">="
|
182
|
-
- !ruby/object:Gem::Version
|
183
|
-
version: '4.2'
|
184
|
-
- - "<="
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '5.2'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: activerecord
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - ">="
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '4.2'
|
194
|
-
- - "<="
|
195
|
-
- !ruby/object:Gem::Version
|
196
|
-
version: '5.2'
|
197
|
-
type: :runtime
|
198
|
-
prerelease: false
|
199
|
-
version_requirements: !ruby/object:Gem::Requirement
|
200
|
-
requirements:
|
201
|
-
- - ">="
|
202
|
-
- !ruby/object:Gem::Version
|
203
|
-
version: '4.2'
|
204
|
-
- - "<="
|
205
|
-
- !ruby/object:Gem::Version
|
206
|
-
version: '5.2'
|
207
|
-
- !ruby/object:Gem::Dependency
|
208
|
-
name: activesupport
|
154
|
+
name: rails
|
209
155
|
requirement: !ruby/object:Gem::Requirement
|
210
156
|
requirements:
|
211
157
|
- - ">="
|
212
158
|
- !ruby/object:Gem::Version
|
213
159
|
version: '4.2'
|
214
|
-
- - "
|
160
|
+
- - "<"
|
215
161
|
- !ruby/object:Gem::Version
|
216
|
-
version: '5.
|
162
|
+
version: '5.3'
|
217
163
|
type: :runtime
|
218
164
|
prerelease: false
|
219
165
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -221,9 +167,9 @@ dependencies:
|
|
221
167
|
- - ">="
|
222
168
|
- !ruby/object:Gem::Version
|
223
169
|
version: '4.2'
|
224
|
-
- - "
|
170
|
+
- - "<"
|
225
171
|
- !ruby/object:Gem::Version
|
226
|
-
version: '5.
|
172
|
+
version: '5.3'
|
227
173
|
description: |-
|
228
174
|
Adds a global key-value-store to Rails applications and allows adding typed columns
|
229
175
|
to model classes without having to change the database layout.
|
@@ -246,7 +192,6 @@ files:
|
|
246
192
|
- Rakefile
|
247
193
|
- bin/console
|
248
194
|
- bin/setup
|
249
|
-
- gemfiles/rails_4.1.gemfile
|
250
195
|
- gemfiles/rails_4.2.gemfile
|
251
196
|
- gemfiles/rails_4.2.gemfile.lock
|
252
197
|
- gemfiles/rails_5.0.gemfile
|
@@ -258,7 +203,6 @@ files:
|
|
258
203
|
- lib/generators/setting_accessors/install_generator.rb
|
259
204
|
- lib/generators/setting_accessors/templates/migration.rb.erb
|
260
205
|
- lib/generators/setting_accessors/templates/model.rb.erb
|
261
|
-
- lib/generators/setting_accessors/templates/settings.yml
|
262
206
|
- lib/setting_accessors.rb
|
263
207
|
- lib/setting_accessors/accessor_generator.rb
|
264
208
|
- lib/setting_accessors/converters/base.rb
|
data/gemfiles/rails_4.1.gemfile
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# This file specifies all globally defined settings used in the application.
|
3
|
-
#
|
4
|
-
# The keys are the setting names, the values are a hash
|
5
|
-
# containing validation options, type and default value
|
6
|
-
#
|
7
|
-
# Examples:
|
8
|
-
#
|
9
|
-
# a_string:
|
10
|
-
# type: string
|
11
|
-
# default: "I am a string!"
|
12
|
-
# validations:
|
13
|
-
# presence: true
|
14
|
-
#
|
15
|
-
# a_number:
|
16
|
-
# type: integer
|
17
|
-
# default: "I am a Number!"
|
18
|
-
#
|
19
|
-
# a_boolean:
|
20
|
-
# type: boolean
|
21
|
-
# default: true
|
22
|
-
# validations:
|
23
|
-
# boolean: true
|
24
|
-
|