ledermann-rails-settings 2.4.3 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +39 -0
- data/MIT-LICENSE +1 -1
- data/README.md +29 -13
- data/Rakefile +1 -1
- data/{ci/Gemfile-rails-5-1 → gemfiles/rails_6_1.gemfile} +2 -1
- data/{ci/Gemfile-rails-3-1 → gemfiles/rails_7_0.gemfile} +2 -1
- data/gemfiles/rails_7_1.gemfile +6 -0
- data/lib/generators/rails_settings/migration/migration_generator.rb +5 -4
- data/lib/generators/rails_settings/migration/templates/migration.rb +6 -12
- data/lib/rails-settings/base.rb +19 -10
- data/lib/rails-settings/configuration.rb +31 -11
- data/lib/rails-settings/scopes.rb +10 -11
- data/lib/rails-settings/setting_object.rb +40 -11
- data/lib/rails-settings/version.rb +1 -1
- data/lib/rails-settings.rb +1 -3
- data/rails-settings.gemspec +16 -15
- data/spec/configuration_spec.rb +61 -48
- data/spec/database.yml +1 -1
- data/spec/queries_spec.rb +9 -17
- data/spec/scopes_spec.rb +18 -10
- data/spec/serialize_spec.rb +13 -11
- data/spec/setting_object_spec.rb +65 -46
- data/spec/settings_spec.rb +106 -47
- data/spec/spec_helper.rb +28 -22
- data/spec/support/matchers/perform_queries.rb +5 -4
- data/spec/support/query_counter.rb +2 -1
- metadata +15 -21
- data/.travis.yml +0 -74
- data/ci/Gemfile-rails-3-2 +0 -5
- data/ci/Gemfile-rails-4-0 +0 -6
- data/ci/Gemfile-rails-4-1 +0 -6
- data/ci/Gemfile-rails-4-2 +0 -6
- data/ci/Gemfile-rails-5-0 +0 -5
- data/ci/Gemfile-rails-5-2 +0 -5
data/spec/settings_spec.rb
CHANGED
@@ -1,24 +1,31 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
4
|
-
it
|
5
|
-
expect(Account.default_settings).to eq(:
|
3
|
+
describe 'Defaults' do
|
4
|
+
it 'should be stored for simple class' do
|
5
|
+
expect(Account.default_settings).to eq(portal: {})
|
6
6
|
end
|
7
7
|
|
8
|
-
it
|
9
|
-
|
10
|
-
|
8
|
+
# Modifying spec because it gives like this output on hash value
|
9
|
+
# "owner_name"=>#<Proc:0x00007f819b2b3210 /rails-settings/spec/spec_helper.rb:48 (lambda)>
|
10
|
+
it 'should be stored for parent class' do
|
11
|
+
expect(User.default_settings.keys).to eq(%i[dashboard calendar])
|
11
12
|
end
|
12
13
|
|
13
|
-
it
|
14
|
-
expect(GuestUser.default_settings).to eq(
|
14
|
+
it 'should be stored for child class' do
|
15
|
+
expect(GuestUser.default_settings).to eq(
|
16
|
+
dashboard: {
|
17
|
+
'theme' => 'red',
|
18
|
+
'view' => 'monthly',
|
19
|
+
'filter' => true,
|
20
|
+
},
|
21
|
+
)
|
15
22
|
end
|
16
23
|
end
|
17
24
|
|
18
|
-
describe
|
19
|
-
let(:account) { Account.new :
|
25
|
+
describe 'Getter/Setter' do
|
26
|
+
let(:account) { Account.new subdomain: 'foo' }
|
20
27
|
|
21
|
-
it
|
28
|
+
it 'should handle method syntax' do
|
22
29
|
account.settings(:portal).enabled = true
|
23
30
|
account.settings(:portal).template = 'black'
|
24
31
|
|
@@ -26,14 +33,14 @@ describe "Getter/Setter" do
|
|
26
33
|
expect(account.settings(:portal).template).to eq('black')
|
27
34
|
end
|
28
35
|
|
29
|
-
it
|
36
|
+
it 'should return nil for not existing key' do
|
30
37
|
expect(account.settings(:portal).foo).to eq(nil)
|
31
38
|
end
|
32
39
|
end
|
33
40
|
|
34
41
|
describe 'Objects' do
|
35
42
|
context 'without defaults' do
|
36
|
-
let(:account) { Account.new :
|
43
|
+
let(:account) { Account.new subdomain: 'foo' }
|
37
44
|
|
38
45
|
it 'should have blank settings' do
|
39
46
|
expect(account.settings(:portal).value).to eq({})
|
@@ -61,7 +68,7 @@ describe 'Objects' do
|
|
61
68
|
expect(RailsSettings::SettingObject.count).to eq(0)
|
62
69
|
end
|
63
70
|
|
64
|
-
it
|
71
|
+
it 'should save object with settings' do
|
65
72
|
account.settings(:portal).premium = true
|
66
73
|
account.settings(:portal).fee = 42.5
|
67
74
|
account.save!
|
@@ -71,10 +78,12 @@ describe 'Objects' do
|
|
71
78
|
expect(account.settings(:portal).fee).to eq(42.5)
|
72
79
|
|
73
80
|
expect(RailsSettings::SettingObject.count).to eq(1)
|
74
|
-
expect(RailsSettings::SettingObject.first.value).to eq(
|
81
|
+
expect(RailsSettings::SettingObject.first.value).to eq(
|
82
|
+
{ 'premium' => true, 'fee' => 42.5 },
|
83
|
+
)
|
75
84
|
end
|
76
85
|
|
77
|
-
it
|
86
|
+
it 'should save settings separated' do
|
78
87
|
account.save!
|
79
88
|
|
80
89
|
settings = account.settings(:portal)
|
@@ -89,11 +98,12 @@ describe 'Objects' do
|
|
89
98
|
end
|
90
99
|
|
91
100
|
context 'with defaults' do
|
92
|
-
let(:user) { User.new :
|
101
|
+
let(:user) { User.new name: 'Mr. Brown' }
|
93
102
|
|
94
103
|
it 'should have default settings' do
|
95
104
|
expect(user.settings(:dashboard).theme).to eq('blue')
|
96
105
|
expect(user.settings(:dashboard).view).to eq('monthly')
|
106
|
+
expect(user.settings(:dashboard).owner_name).to eq('Mr. Brown')
|
97
107
|
expect(user.settings(:dashboard).filter).to eq(true)
|
98
108
|
expect(user.settings(:calendar).scope).to eq('company')
|
99
109
|
end
|
@@ -103,23 +113,28 @@ describe 'Objects' do
|
|
103
113
|
|
104
114
|
expect(user.settings(:dashboard).theme).to eq('gray')
|
105
115
|
expect(user.settings(:dashboard).view).to eq('monthly')
|
116
|
+
expect(user.settings(:dashboard).owner_name).to eq('Mr. Brown')
|
106
117
|
expect(user.settings(:dashboard).filter).to eq(true)
|
107
118
|
expect(user.settings(:calendar).scope).to eq('company')
|
108
119
|
end
|
109
120
|
|
110
|
-
it
|
121
|
+
it 'should overwrite settings' do
|
111
122
|
user.settings(:dashboard).theme = 'brown'
|
112
123
|
user.settings(:dashboard).filter = false
|
124
|
+
user.settings(:dashboard).owner_name = 'Mr. Vishal'
|
113
125
|
user.save!
|
114
126
|
|
115
127
|
user.reload
|
116
128
|
expect(user.settings(:dashboard).theme).to eq('brown')
|
117
129
|
expect(user.settings(:dashboard).filter).to eq(false)
|
130
|
+
expect(user.settings(:dashboard).owner_name).to eq('Mr. Vishal')
|
118
131
|
expect(RailsSettings::SettingObject.count).to eq(1)
|
119
|
-
expect(RailsSettings::SettingObject.first.value).to eq(
|
132
|
+
expect(RailsSettings::SettingObject.first.value).to eq(
|
133
|
+
{ 'filter' => false, 'owner_name' => 'Mr. Vishal', 'theme' => 'brown' },
|
134
|
+
)
|
120
135
|
end
|
121
136
|
|
122
|
-
it
|
137
|
+
it 'should merge settings with defaults' do
|
123
138
|
user.settings(:dashboard).theme = 'brown'
|
124
139
|
user.save!
|
125
140
|
|
@@ -127,31 +142,55 @@ describe 'Objects' do
|
|
127
142
|
expect(user.settings(:dashboard).theme).to eq('brown')
|
128
143
|
expect(user.settings(:dashboard).filter).to eq(true)
|
129
144
|
expect(RailsSettings::SettingObject.count).to eq(1)
|
130
|
-
expect(RailsSettings::SettingObject.first.value).to eq(
|
145
|
+
expect(RailsSettings::SettingObject.first.value).to eq(
|
146
|
+
{ 'theme' => 'brown' },
|
147
|
+
)
|
148
|
+
end
|
149
|
+
|
150
|
+
context 'when default value is an Array' do
|
151
|
+
it 'should not mutate default_settings' do
|
152
|
+
expected_return_value = User.default_settings[:calendar]['events'].dup
|
153
|
+
|
154
|
+
user.settings(:calendar).events.push('new_value')
|
155
|
+
expect(User.default_settings[:calendar]['events']).to eq(
|
156
|
+
expected_return_value,
|
157
|
+
)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
context 'when default value is a Hash' do
|
162
|
+
it 'should not mutate default_settings' do
|
163
|
+
expected_return_value = User.default_settings[:calendar]['profile'].dup
|
164
|
+
|
165
|
+
user.settings(:calendar).profile.update('new_key' => 'new_value')
|
166
|
+
expect(User.default_settings[:calendar]['profile']).to eq(
|
167
|
+
expected_return_value,
|
168
|
+
)
|
169
|
+
end
|
131
170
|
end
|
132
171
|
end
|
133
172
|
end
|
134
173
|
|
135
|
-
describe
|
136
|
-
let!(:user) { User.create! :
|
174
|
+
describe 'Object without settings' do
|
175
|
+
let!(:user) { User.create! name: 'Mr. White' }
|
137
176
|
|
138
|
-
it
|
177
|
+
it 'should respond to #settings?' do
|
139
178
|
expect(user.settings?).to eq(false)
|
140
179
|
expect(user.settings?(:dashboard)).to eq(false)
|
141
180
|
end
|
142
181
|
|
143
|
-
it
|
182
|
+
it 'should have no setting objects' do
|
144
183
|
expect(RailsSettings::SettingObject.count).to eq(0)
|
145
184
|
end
|
146
185
|
|
147
|
-
it
|
148
|
-
user.settings(:dashboard).
|
186
|
+
it 'should add settings' do
|
187
|
+
user.settings(:dashboard).update! smart: true
|
149
188
|
|
150
189
|
user.reload
|
151
190
|
expect(user.settings(:dashboard).smart).to eq(true)
|
152
191
|
end
|
153
192
|
|
154
|
-
it
|
193
|
+
it 'should not save settings if assigned nil' do
|
155
194
|
expect {
|
156
195
|
user.settings = nil
|
157
196
|
user.save!
|
@@ -159,27 +198,27 @@ describe "Object without settings" do
|
|
159
198
|
end
|
160
199
|
end
|
161
200
|
|
162
|
-
describe
|
201
|
+
describe 'Object with settings' do
|
163
202
|
let!(:user) do
|
164
|
-
User.create! :
|
203
|
+
User.create! name: 'Mr. White' do |user|
|
165
204
|
user.settings(:dashboard).theme = 'white'
|
166
205
|
user.settings(:calendar).scope = 'all'
|
167
206
|
end
|
168
207
|
end
|
169
208
|
|
170
|
-
it
|
209
|
+
it 'should respond to #settings?' do
|
171
210
|
expect(user.settings?).to eq(true)
|
172
211
|
|
173
212
|
expect(user.settings?(:dashboard)).to eq(true)
|
174
213
|
expect(user.settings?(:calendar)).to eq(true)
|
175
214
|
end
|
176
215
|
|
177
|
-
it
|
216
|
+
it 'should have two setting objects' do
|
178
217
|
expect(RailsSettings::SettingObject.count).to eq(2)
|
179
218
|
end
|
180
219
|
|
181
|
-
it
|
182
|
-
user.settings(:dashboard).
|
220
|
+
it 'should update settings' do
|
221
|
+
user.settings(:dashboard).update! smart: true
|
183
222
|
user.reload
|
184
223
|
|
185
224
|
expect(user.settings(:dashboard).smart).to eq(true)
|
@@ -187,7 +226,7 @@ describe "Object with settings" do
|
|
187
226
|
expect(user.settings(:calendar).scope).to eq('all')
|
188
227
|
end
|
189
228
|
|
190
|
-
it
|
229
|
+
it 'should update settings by saving object' do
|
191
230
|
user.settings(:dashboard).smart = true
|
192
231
|
user.save!
|
193
232
|
|
@@ -195,7 +234,7 @@ describe "Object with settings" do
|
|
195
234
|
expect(user.settings(:dashboard).smart).to eq(true)
|
196
235
|
end
|
197
236
|
|
198
|
-
it
|
237
|
+
it 'should destroy settings with nil' do
|
199
238
|
expect {
|
200
239
|
user.settings = nil
|
201
240
|
user.save!
|
@@ -204,7 +243,7 @@ describe "Object with settings" do
|
|
204
243
|
expect(user.settings?).to eq(false)
|
205
244
|
end
|
206
245
|
|
207
|
-
it
|
246
|
+
it 'should raise exception on assigning other than nil' do
|
208
247
|
expect {
|
209
248
|
user.settings = :foo
|
210
249
|
user.save!
|
@@ -212,10 +251,10 @@ describe "Object with settings" do
|
|
212
251
|
end
|
213
252
|
end
|
214
253
|
|
215
|
-
describe
|
216
|
-
let(:project) { Project.create! :
|
254
|
+
describe 'Customized SettingObject' do
|
255
|
+
let(:project) { Project.create! name: 'Heist' }
|
217
256
|
|
218
|
-
it
|
257
|
+
it 'should not accept invalid attributes' do
|
219
258
|
project.settings(:info).owner_name = 42
|
220
259
|
expect(project.settings(:info)).not_to be_valid
|
221
260
|
|
@@ -223,26 +262,46 @@ describe "Customized SettingObject" do
|
|
223
262
|
expect(project.settings(:info)).not_to be_valid
|
224
263
|
end
|
225
264
|
|
226
|
-
it
|
265
|
+
it 'should accept valid attributes' do
|
227
266
|
project.settings(:info).owner_name = 'Mr. Brown'
|
228
267
|
expect(project.settings(:info)).to be_valid
|
229
268
|
end
|
230
269
|
end
|
231
270
|
|
232
|
-
describe
|
271
|
+
describe 'to_settings_hash' do
|
233
272
|
let(:user) do
|
234
|
-
User.new :
|
273
|
+
User.new name: 'Mrs. Fin' do |user|
|
235
274
|
user.settings(:dashboard).theme = 'green'
|
275
|
+
user.settings(:dashboard).owner_name = 'Mr. Vishal'
|
236
276
|
user.settings(:dashboard).sound = 11
|
237
277
|
user.settings(:calendar).scope = 'some'
|
238
278
|
end
|
239
279
|
end
|
240
280
|
|
241
|
-
it
|
242
|
-
|
281
|
+
# Modifying spec because it gives like this output on hash value
|
282
|
+
# "owner_name"=>#<Proc:0x00007f819b2b3210 /rails-settings/spec/spec_helper.rb:48 (lambda)>
|
283
|
+
it 'should return defaults' do
|
284
|
+
expect(User.new.to_settings_hash.keys).to eq(%i[dashboard calendar])
|
243
285
|
end
|
244
286
|
|
245
|
-
it
|
246
|
-
expect(user.to_settings_hash).to eq(
|
287
|
+
it 'should return merged settings' do
|
288
|
+
expect(user.to_settings_hash).to eq(
|
289
|
+
{
|
290
|
+
dashboard: {
|
291
|
+
'a' => 'b',
|
292
|
+
'filter' => true,
|
293
|
+
'owner_name' => 'Mr. Vishal',
|
294
|
+
'sound' => 11,
|
295
|
+
'theme' => 'green',
|
296
|
+
'view' => 'monthly',
|
297
|
+
},
|
298
|
+
calendar: {
|
299
|
+
'scope' => 'some',
|
300
|
+
'events' => [],
|
301
|
+
'profile' => {
|
302
|
+
},
|
303
|
+
},
|
304
|
+
},
|
305
|
+
)
|
247
306
|
end
|
248
307
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'coveralls'
|
3
3
|
|
4
|
-
SimpleCov.formatter =
|
5
|
-
SimpleCov::Formatter::
|
6
|
-
|
7
|
-
|
8
|
-
SimpleCov.start
|
9
|
-
add_filter '/spec/'
|
10
|
-
end
|
4
|
+
SimpleCov.formatter =
|
5
|
+
SimpleCov::Formatter::MultiFormatter.new(
|
6
|
+
[SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter],
|
7
|
+
)
|
8
|
+
SimpleCov.start { add_filter '/spec/' }
|
11
9
|
|
12
10
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
13
11
|
# in spec/support/ and its subdirectories.
|
14
|
-
Dir[
|
12
|
+
Dir[
|
13
|
+
File.expand_path(File.join(File.dirname(__FILE__), 'support', '**', '*.rb'))
|
14
|
+
].each { |f| require f }
|
15
15
|
|
16
16
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
17
17
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
@@ -26,9 +26,7 @@ RSpec.configure do |config|
|
|
26
26
|
# --seed 1234
|
27
27
|
# config.order = 'random'
|
28
28
|
|
29
|
-
config.before(:each)
|
30
|
-
clear_db
|
31
|
-
end
|
29
|
+
config.before(:each) { clear_db }
|
32
30
|
|
33
31
|
config.after :suite do
|
34
32
|
RailsSettingsMigration.migrate(:down)
|
@@ -45,14 +43,21 @@ end
|
|
45
43
|
|
46
44
|
class User < ActiveRecord::Base
|
47
45
|
has_settings do |s|
|
48
|
-
s.key :dashboard,
|
49
|
-
|
46
|
+
s.key :dashboard,
|
47
|
+
defaults: {
|
48
|
+
theme: 'blue',
|
49
|
+
view: 'monthly',
|
50
|
+
a: 'b',
|
51
|
+
filter: true,
|
52
|
+
owner_name: ->(target) { target.name },
|
53
|
+
}
|
54
|
+
s.key :calendar, defaults: { scope: 'company', events: [], profile: {} }
|
50
55
|
end
|
51
56
|
end
|
52
57
|
|
53
58
|
class GuestUser < User
|
54
59
|
has_settings do |s|
|
55
|
-
s.key :dashboard, :
|
60
|
+
s.key :dashboard, defaults: { theme: 'red', view: 'monthly', filter: true }
|
56
61
|
end
|
57
62
|
end
|
58
63
|
|
@@ -61,32 +66,33 @@ class Account < ActiveRecord::Base
|
|
61
66
|
end
|
62
67
|
|
63
68
|
class Project < ActiveRecord::Base
|
64
|
-
has_settings :info, :
|
69
|
+
has_settings :info, class_name: 'ProjectSettingObject'
|
65
70
|
end
|
66
71
|
|
67
72
|
class ProjectSettingObject < RailsSettings::SettingObject
|
68
73
|
validate do
|
69
74
|
unless self.owner_name.present? && self.owner_name.is_a?(String)
|
70
|
-
errors.add(:base,
|
75
|
+
errors.add(:base, 'Owner name is missing')
|
71
76
|
end
|
72
77
|
end
|
73
78
|
end
|
74
79
|
|
75
80
|
def setup_db
|
76
|
-
ActiveRecord::Base.configurations =
|
81
|
+
ActiveRecord::Base.configurations =
|
82
|
+
YAML.load_file(File.dirname(__FILE__) + '/database.yml')
|
77
83
|
ActiveRecord::Base.establish_connection(:sqlite)
|
78
84
|
ActiveRecord::Migration.verbose = false
|
79
85
|
|
80
86
|
print "Testing with ActiveRecord #{ActiveRecord::VERSION::STRING}"
|
81
|
-
if ActiveRecord::VERSION::MAJOR == 4
|
82
|
-
print " #{defined?(ProtectedAttributes) ? 'with' : 'without'} gem `protected_attributes`"
|
83
|
-
end
|
84
87
|
puts
|
85
88
|
|
86
|
-
require File.expand_path(
|
89
|
+
require File.expand_path(
|
90
|
+
'../../lib/generators/rails_settings/migration/templates/migration.rb',
|
91
|
+
__FILE__,
|
92
|
+
)
|
87
93
|
RailsSettingsMigration.migrate(:up)
|
88
94
|
|
89
|
-
ActiveRecord::Schema.define(:
|
95
|
+
ActiveRecord::Schema.define(version: 1) do
|
90
96
|
create_table :users do |t|
|
91
97
|
t.string :type
|
92
98
|
t.string :name
|
@@ -1,7 +1,5 @@
|
|
1
1
|
RSpec::Matchers.define :perform_queries do |expected|
|
2
|
-
match
|
3
|
-
query_count(&block) == expected
|
4
|
-
end
|
2
|
+
match { |block| query_count(&block) == expected }
|
5
3
|
|
6
4
|
failure_message do |actual|
|
7
5
|
"Expected to run #{expected} queries, got #{@counter.query_count}"
|
@@ -9,7 +7,10 @@ RSpec::Matchers.define :perform_queries do |expected|
|
|
9
7
|
|
10
8
|
def query_count(&block)
|
11
9
|
@counter = ActiveRecord::QueryCounter.new
|
12
|
-
ActiveSupport::Notifications.subscribe(
|
10
|
+
ActiveSupport::Notifications.subscribe(
|
11
|
+
'sql.active_record',
|
12
|
+
@counter.to_proc,
|
13
|
+
)
|
13
14
|
yield
|
14
15
|
ActiveSupport::Notifications.unsubscribe(@counter.to_proc)
|
15
16
|
|
@@ -11,7 +11,8 @@ module ActiveRecord
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def callback(name, start, finish, message_id, values)
|
14
|
-
@query_count += 1 unless %w
|
14
|
+
@query_count += 1 unless %w[CACHE SCHEMA].include?(values[:name]) ||
|
15
|
+
values[:sql] =~ /^begin/i || values[:sql] =~ /^commit/i
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ledermann-rails-settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: coveralls_reborn
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -96,25 +96,20 @@ dependencies:
|
|
96
96
|
version: 0.11.2
|
97
97
|
description: Settings gem for Ruby on Rails
|
98
98
|
email:
|
99
|
-
-
|
99
|
+
- georg@ledermann.dev
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/workflows/main.yml"
|
104
105
|
- ".gitignore"
|
105
|
-
- ".travis.yml"
|
106
106
|
- Gemfile
|
107
107
|
- MIT-LICENSE
|
108
108
|
- README.md
|
109
109
|
- Rakefile
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
- ci/Gemfile-rails-4-1
|
114
|
-
- ci/Gemfile-rails-4-2
|
115
|
-
- ci/Gemfile-rails-5-0
|
116
|
-
- ci/Gemfile-rails-5-1
|
117
|
-
- ci/Gemfile-rails-5-2
|
110
|
+
- gemfiles/rails_6_1.gemfile
|
111
|
+
- gemfiles/rails_7_0.gemfile
|
112
|
+
- gemfiles/rails_7_1.gemfile
|
118
113
|
- lib/generators/rails_settings/migration/migration_generator.rb
|
119
114
|
- lib/generators/rails_settings/migration/templates/migration.rb
|
120
115
|
- lib/ledermann-rails-settings.rb
|
@@ -139,7 +134,7 @@ homepage: https://github.com/ledermann/rails-settings
|
|
139
134
|
licenses:
|
140
135
|
- MIT
|
141
136
|
metadata: {}
|
142
|
-
post_install_message:
|
137
|
+
post_install_message:
|
143
138
|
rdoc_options: []
|
144
139
|
require_paths:
|
145
140
|
- lib
|
@@ -147,16 +142,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
142
|
requirements:
|
148
143
|
- - ">="
|
149
144
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
145
|
+
version: '3.0'
|
151
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
147
|
requirements:
|
153
148
|
- - ">="
|
154
149
|
- !ruby/object:Gem::Version
|
155
150
|
version: '0'
|
156
151
|
requirements: []
|
157
|
-
|
158
|
-
|
159
|
-
signing_key:
|
152
|
+
rubygems_version: 3.4.19
|
153
|
+
signing_key:
|
160
154
|
specification_version: 4
|
161
155
|
summary: Ruby gem to handle settings for ActiveRecord instances by storing them as
|
162
156
|
serialized Hash in a separate database table. Namespaces and defaults included.
|
data/.travis.yml
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 1.9.3
|
4
|
-
- 2.0.0
|
5
|
-
- 2.1.10
|
6
|
-
- 2.2.9
|
7
|
-
- 2.3.6
|
8
|
-
- 2.4.3
|
9
|
-
- 2.5.0
|
10
|
-
gemfile:
|
11
|
-
- ci/Gemfile-rails-3-1
|
12
|
-
- ci/Gemfile-rails-3-2
|
13
|
-
- ci/Gemfile-rails-4-0
|
14
|
-
- ci/Gemfile-rails-4-1
|
15
|
-
- ci/Gemfile-rails-4-2
|
16
|
-
- ci/Gemfile-rails-5-0
|
17
|
-
- ci/Gemfile-rails-5-1
|
18
|
-
- ci/Gemfile-rails-5-2
|
19
|
-
matrix:
|
20
|
-
include:
|
21
|
-
- rvm: 2.2.9
|
22
|
-
gemfile: ci/Gemfile-rails-4-0
|
23
|
-
env: PROTECTED_ATTRIBUTES=true
|
24
|
-
- rvm: 2.2.9
|
25
|
-
gemfile: ci/Gemfile-rails-4-1
|
26
|
-
env: PROTECTED_ATTRIBUTES=true
|
27
|
-
- rvm: 2.2.9
|
28
|
-
gemfile: ci/Gemfile-rails-4-2
|
29
|
-
env: PROTECTED_ATTRIBUTES=true
|
30
|
-
exclude:
|
31
|
-
- rvm: 1.9.3
|
32
|
-
gemfile: ci/Gemfile-rails-5-0
|
33
|
-
- rvm: 1.9.3
|
34
|
-
gemfile: ci/Gemfile-rails-5-1
|
35
|
-
- rvm: 1.9.3
|
36
|
-
gemfile: ci/Gemfile-rails-5-2
|
37
|
-
- rvm: 2.0.0
|
38
|
-
gemfile: ci/Gemfile-rails-5-0
|
39
|
-
- rvm: 2.0.0
|
40
|
-
gemfile: ci/Gemfile-rails-5-1
|
41
|
-
- rvm: 2.0.0
|
42
|
-
gemfile: ci/Gemfile-rails-5-2
|
43
|
-
- rvm: 2.1.10
|
44
|
-
gemfile: ci/Gemfile-rails-5-0
|
45
|
-
- rvm: 2.1.10
|
46
|
-
gemfile: ci/Gemfile-rails-5-1
|
47
|
-
- rvm: 2.1.10
|
48
|
-
gemfile: ci/Gemfile-rails-5-2
|
49
|
-
- rvm: 2.2.9
|
50
|
-
gemfile: ci/Gemfile-rails-3-1
|
51
|
-
- rvm: 2.3.6
|
52
|
-
gemfile: ci/Gemfile-rails-3-1
|
53
|
-
- rvm: 2.4.3
|
54
|
-
gemfile: ci/Gemfile-rails-3-1
|
55
|
-
- rvm: 2.5.0
|
56
|
-
gemfile: ci/Gemfile-rails-3-1
|
57
|
-
- rvm: 2.2.9
|
58
|
-
gemfile: ci/Gemfile-rails-3-2
|
59
|
-
- rvm: 2.3.6
|
60
|
-
gemfile: ci/Gemfile-rails-3-2
|
61
|
-
- rvm: 2.4.3
|
62
|
-
gemfile: ci/Gemfile-rails-3-2
|
63
|
-
- rvm: 2.4.3
|
64
|
-
gemfile: ci/Gemfile-rails-4-0
|
65
|
-
- rvm: 2.4.3
|
66
|
-
gemfile: ci/Gemfile-rails-4-1
|
67
|
-
- rvm: 2.5.0
|
68
|
-
gemfile: ci/Gemfile-rails-3-2
|
69
|
-
- rvm: 2.5.0
|
70
|
-
gemfile: ci/Gemfile-rails-4-0
|
71
|
-
- rvm: 2.5.0
|
72
|
-
gemfile: ci/Gemfile-rails-4-1
|
73
|
-
before_install: gem update bundler
|
74
|
-
sudo: false
|
data/ci/Gemfile-rails-3-2
DELETED
data/ci/Gemfile-rails-4-0
DELETED
data/ci/Gemfile-rails-4-1
DELETED
data/ci/Gemfile-rails-4-2
DELETED
data/ci/Gemfile-rails-5-0
DELETED