rails-settings-cached 2.1.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -2
- data/README.md +82 -97
- data/lib/generators/settings/install_generator.rb +10 -5
- data/lib/rails-settings/base.rb +104 -66
- data/lib/rails-settings/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a7bc508cf14fd62288de455806b11c39f5894fc0830ea89523e9a4f9ca3d09b
|
4
|
+
data.tar.gz: 9d4affefb02823cf0a73344c7356f2e416d6cb6fb78dc0e25ad94a21cb4b1646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c023a86676cd5f41c5479e8c671df1946076de4167f8fe40c437e69d69e27d1d46a5d5e5a97ad35f950f6b477a0c14ab6de0c4e4fbd3210df46d0c091ac6c312
|
7
|
+
data.tar.gz: 16ed2df3231c5379847c25c97f3950a8692ce51a36d5b1ffc7e1973a11786de820f8264e628f3f7df5e6689018a91e3849a4749c5757eb7f1b076a5b041f538b
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# Rails Settings Cached
|
2
2
|
|
3
3
|
This a plugin that makes managing a table of
|
4
4
|
а global key, value pairs easy. Think of it like a global Hash stored in your database,
|
@@ -6,39 +6,23 @@ that uses simple ActiveRecord like methods for manipulation. Keep track of any g
|
|
6
6
|
setting that you don't want to hard code into your rails app. You can store any kind
|
7
7
|
of object. Strings, numbers, arrays, or any object.
|
8
8
|
|
9
|
-
|
10
|
-
> rails-settings-cached 2.x has redesigned the API, the new version will compatible with the stored setting values by an older version.
|
11
|
-
> When you want to upgrade 2.x, you must read the README again, and follow guides to change your Setting model.
|
12
|
-
> 0.x stable branch: https://github.com/huacnlee/rails-settings-cached/tree/0.x
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/rails-settings-cached.svg)](https://rubygems.org/gems/rails-settings-cached) [![CI Status](https://travis-ci.org/huacnlee/rails-settings-cached.svg)](http://travis-ci.org/huacnlee/rails-settings-cached) [![codecov.io](https://codecov.io/github/huacnlee/rails-settings-cached/coverage.svg?branch=master)](https://codecov.io/github/huacnlee/rails-settings-cached?branch=master)
|
13
10
|
|
14
|
-
##
|
15
|
-
|
16
|
-
[![Gem Version](https://badge.fury.io/rb/rails-settings-cached.svg)](https://rubygems.org/gems/rails-settings-cached) [![CI Status](https://travis-ci.org/huacnlee/rails-settings-cached.svg)](http://travis-ci.org/huacnlee/rails-settings-cached) [![Code Climate](https://codeclimate.com/github/huacnlee/rails-settings-cached/badges/gpa.svg)](https://codeclimate.com/github/huacnlee/rails-settings-cached) [![codecov.io](https://codecov.io/github/huacnlee/rails-settings-cached/coverage.svg?branch=master)](https://codecov.io/github/huacnlee/rails-settings-cached?branch=master)
|
17
|
-
|
18
|
-
## Setup
|
11
|
+
## Installation
|
19
12
|
|
20
13
|
Edit your Gemfile:
|
21
14
|
|
22
|
-
```ruby
|
23
|
-
gem "rails-settings-cached", "~> 2.0"
|
24
|
-
```
|
25
|
-
|
26
|
-
Generate your settings:
|
27
|
-
|
28
15
|
```bash
|
29
|
-
$
|
16
|
+
$ bundle add rails-settings-cached
|
30
17
|
```
|
31
18
|
|
32
|
-
|
19
|
+
Generate your settings:
|
33
20
|
|
34
21
|
```bash
|
35
22
|
$ rails g settings:install
|
36
|
-
```
|
37
23
|
|
38
|
-
Or use a custom name:
|
39
|
-
|
40
|
-
```bash
|
41
|
-
$ rails g settings:install SiteConfig
|
24
|
+
# Or use a custom name:
|
25
|
+
$ rails g settings:install AppConfig
|
42
26
|
```
|
43
27
|
|
44
28
|
You will get `app/models/setting.rb`
|
@@ -46,19 +30,26 @@ You will get `app/models/setting.rb`
|
|
46
30
|
```rb
|
47
31
|
class Setting < RailsSettings::Base
|
48
32
|
# cache_prefix { "v1" }
|
49
|
-
|
50
|
-
field :host, default: "http://example.com"
|
33
|
+
field :app_name, default: "Rails Settings"
|
34
|
+
field :host, default: "http://example.com", readonly: true
|
35
|
+
field :default_locale, default: "zh-CN"
|
51
36
|
field :readonly_item, type: :integer, default: 100, readonly: true
|
52
37
|
field :user_limits, type: :integer, default: 20
|
38
|
+
field :exchange_rate, type: :float, default: 0.123
|
53
39
|
field :admin_emails, type: :array, default: %w[admin@rubyonrails.org]
|
40
|
+
field :captcha_enable, type: :boolean, default: true
|
41
|
+
|
54
42
|
# Override array separator, default: /[\n,]/ split with \n or comma.
|
55
43
|
field :tips, type: :array, separator: /[\n]+/
|
56
|
-
|
44
|
+
|
57
45
|
field :notification_options, type: :hash, default: {
|
58
46
|
send_all: true,
|
59
47
|
logging: true,
|
60
48
|
sender_email: "foo@bar.com"
|
61
49
|
}
|
50
|
+
|
51
|
+
# lambda default value
|
52
|
+
field :welcome_message, type: :string, default: -> { "welcome to #{self.app_name}" }
|
62
53
|
end
|
63
54
|
```
|
64
55
|
|
@@ -67,19 +58,21 @@ You must use `field` method to statement the setting keys, otherwise you can't u
|
|
67
58
|
Now just put that migration in the database with:
|
68
59
|
|
69
60
|
```bash
|
70
|
-
|
61
|
+
$ rails db:migrate
|
71
62
|
```
|
72
63
|
|
73
64
|
## Usage
|
74
65
|
|
75
|
-
The syntax is easy.
|
66
|
+
The syntax is easy. First, let's create some settings to keep track of:
|
76
67
|
|
77
68
|
```ruby
|
78
69
|
irb > Setting.host
|
79
70
|
"http://example.com"
|
80
|
-
irb > Setting.
|
81
|
-
|
82
|
-
|
71
|
+
irb > Setting.app_name
|
72
|
+
"Rails Settings"
|
73
|
+
irb > Setting.app_name = "Rails Settings Cached"
|
74
|
+
irb > Setting.app_name
|
75
|
+
"Rails Settings Cached"
|
83
76
|
|
84
77
|
irb > Setting.user_limits
|
85
78
|
20
|
@@ -133,6 +126,31 @@ irb > Setting.notification_options
|
|
133
126
|
}
|
134
127
|
```
|
135
128
|
|
129
|
+
|
130
|
+
### Get defined fields
|
131
|
+
|
132
|
+
> version 2.3+
|
133
|
+
|
134
|
+
```rb
|
135
|
+
# Get all keys
|
136
|
+
Setting.keys
|
137
|
+
=> ["app_name", "host", "default_locale", "readonly_item"]
|
138
|
+
|
139
|
+
# Get editable keys
|
140
|
+
Settng.editable_keys
|
141
|
+
=> ["app_name", "default_locale"]
|
142
|
+
|
143
|
+
# Get readonly keys
|
144
|
+
Setting.readonly_keys
|
145
|
+
=> ["host", "readonly_item"]
|
146
|
+
|
147
|
+
# Get options of field
|
148
|
+
Setting.get_field("host")
|
149
|
+
=> { key: "host", type: :string, default: "http://example.com", readonly: true }
|
150
|
+
Setting.get_field("app_name")
|
151
|
+
=> { key: "app_name", type: :string, default: "Rails Settings", readonly: false }
|
152
|
+
```
|
153
|
+
|
136
154
|
## Readonly field
|
137
155
|
|
138
156
|
Sometimes you may need to use Setting before Rails is initialized, for example `config/devise.rb`
|
@@ -200,7 +218,7 @@ config/routes.rb
|
|
200
218
|
|
201
219
|
```rb
|
202
220
|
namespace :admin do
|
203
|
-
|
221
|
+
resource :settings
|
204
222
|
end
|
205
223
|
```
|
206
224
|
|
@@ -212,18 +230,13 @@ module Admin
|
|
212
230
|
class SettingsController < ApplicationController
|
213
231
|
before_action :get_setting, only: [:edit, :update]
|
214
232
|
|
215
|
-
def show
|
216
|
-
end
|
217
|
-
|
218
233
|
def create
|
219
234
|
setting_params.keys.each do |key|
|
220
|
-
next if key.to_s == "site_logo"
|
221
235
|
Setting.send("#{key}=", setting_params[key].strip) unless setting_params[key].nil?
|
222
236
|
end
|
223
|
-
redirect_to
|
237
|
+
redirect_to settings_path, notice: "Setting was successfully updated."
|
224
238
|
end
|
225
239
|
|
226
|
-
|
227
240
|
private
|
228
241
|
def setting_params
|
229
242
|
params.require(:setting).permit(:host, :user_limits, :admin_emails,
|
@@ -259,80 +272,52 @@ app/views/admin/settings/show.html.erb
|
|
259
272
|
<%= f.text_area :notification_options, value: YAML.dump(Setting.notification_options), class: "form-control", style: "height: 180px;" %>
|
260
273
|
<div class="form-text">
|
261
274
|
Use YAML format to config the SMTP_html
|
262
|
-
</
|
263
|
-
|
264
|
-
```
|
265
|
-
|
266
|
-
## Backward compatible to support 0.x scoped settings
|
267
|
-
|
268
|
-
You may used the scoped setting feature in 0.x version. Before you upgrade rails-settings-cached 2.x, you must follow this guide to backward compatible it.
|
269
|
-
|
270
|
-
For example:
|
271
|
-
|
272
|
-
```rb
|
273
|
-
class User < ApplicationRecord
|
274
|
-
include RailsSettings::Extend
|
275
|
-
end
|
275
|
+
</div>
|
276
|
+
</div>
|
276
277
|
|
277
|
-
|
278
|
-
|
278
|
+
<div>
|
279
|
+
<%= f.submit 'Update Settings' %>
|
280
|
+
</div>
|
281
|
+
<% end %>
|
279
282
|
```
|
280
283
|
|
281
|
-
|
284
|
+
## Scoped Settings
|
282
285
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
+
> 🚨 BREAK CHANGES WARNING:
|
287
|
+
> rails-settings-cached 2.x has redesigned the API, the new version will compatible with the stored setting values by an older version.
|
288
|
+
> When you want to upgrade 2.x, you must read the README again, and follow guides to change your Setting model.
|
289
|
+
> 0.x stable branch: https://github.com/huacnlee/rails-settings-cached/tree/0.x
|
286
290
|
|
287
|
-
|
288
|
-
has_many :settings, as: :thing
|
289
|
-
end
|
291
|
+
- [Backward compatible to support 0.x scoped settings](docs/backward-compatible-to-scoped-settings.md)
|
290
292
|
|
291
|
-
|
292
|
-
def scoped_field(name, default: nil)
|
293
|
-
define_method(name) do
|
294
|
-
obj = settings.where(var: name).take || settings.new(var: name, value: default)
|
295
|
-
obj.value
|
296
|
-
end
|
293
|
+
For new project / new user of rails-settings-cached. The [ActiveRecord::AttributeMethods::Serialization](https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html#method-i-serialize) is best choice.
|
297
294
|
|
298
|
-
|
299
|
-
record = settings.where(var: name).take || settings.new(var: name)
|
300
|
-
record.value = val
|
301
|
-
record.save!
|
295
|
+
> This is reason of why rails-settings-cached 2.x removed **Scoped Settings** feature.
|
302
296
|
|
303
|
-
|
304
|
-
end
|
305
|
-
end
|
306
|
-
end
|
307
|
-
end
|
308
|
-
```
|
297
|
+
For example:
|
309
298
|
|
310
|
-
|
299
|
+
We wants a preferences setting for user.
|
311
300
|
|
312
301
|
```rb
|
313
|
-
class User <
|
314
|
-
|
315
|
-
|
316
|
-
scoped_field :color, default: ""
|
317
|
-
scoped_field :foo, default: 0
|
302
|
+
class User < ActiveRecord::Base
|
303
|
+
serialize :preferences
|
318
304
|
end
|
319
|
-
```
|
320
|
-
|
321
|
-
Now you must to find project with ".setting." for replace with:
|
322
305
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
@user.
|
327
|
-
@user.color # => "red"
|
328
|
-
@user.foo = 123
|
329
|
-
@user.foo # =>
|
306
|
+
@user = User.new
|
307
|
+
@user.preferences[:receive_emails] = true
|
308
|
+
@user.preferences[:public_email] = true
|
309
|
+
@user.save
|
330
310
|
```
|
331
311
|
|
332
312
|
## Use cases:
|
333
313
|
|
334
|
-
- [ruby-china/
|
335
|
-
- [
|
336
|
-
- [
|
337
|
-
- [
|
314
|
+
- [ruby-china/homeland](https://github.com/ruby-china/homeland) - master
|
315
|
+
- [forem/forem](https://github.com/forem/forem) - 2.x
|
316
|
+
- [siwapp/siwapp](https://github.com/siwapp/siwapp) - 2.x
|
317
|
+
- [aidewoode/black_candy](https://github.com/aidewoode/black_candy) - 2.x
|
318
|
+
- [thebluedoc/bluedoc](https://github.com/thebluedoc/bluedoc/blob/master/app/models/setting.rb) - 2.x
|
319
|
+
- [tootsuite/mastodon](https://github.com/tootsuite/mastodon) - 0.6.x
|
320
|
+
- [helpyio/helpy](https://github.com/helpyio/helpy) - 0.5.x
|
321
|
+
|
338
322
|
|
323
|
+
And more than [1K repositories](https://github.com/huacnlee/rails-settings-cached/network/dependents) used.
|
@@ -3,14 +3,15 @@
|
|
3
3
|
require "rails/generators"
|
4
4
|
require "rails/generators/migration"
|
5
5
|
|
6
|
-
module
|
6
|
+
module RailsSettings
|
7
7
|
class InstallGenerator < Rails::Generators::NamedBase
|
8
|
+
namespace "settings:install"
|
8
9
|
desc "Generate RailsSettings files."
|
9
10
|
include Rails::Generators::Migration
|
10
11
|
|
11
12
|
argument :name, type: :string, default: "setting"
|
12
13
|
|
13
|
-
source_root File.expand_path("
|
14
|
+
source_root File.expand_path("templates", __dir__)
|
14
15
|
|
15
16
|
@@migrations = false
|
16
17
|
|
@@ -32,12 +33,16 @@ module Settings
|
|
32
33
|
migration_template "migration.rb", "db/migrate/create_settings.rb", migration_version: migration_version
|
33
34
|
end
|
34
35
|
|
35
|
-
def
|
36
|
-
Rails
|
36
|
+
def rails_version_major
|
37
|
+
Rails::VERSION::MAJOR
|
38
|
+
end
|
39
|
+
|
40
|
+
def rails_version_minor
|
41
|
+
Rails::VERSION::MINOR
|
37
42
|
end
|
38
43
|
|
39
44
|
def migration_version
|
40
|
-
"[#{
|
45
|
+
"[#{rails_version_major}.#{rails_version_minor}]" if rails_version_major >= 5
|
41
46
|
end
|
42
47
|
end
|
43
48
|
end
|
data/lib/rails-settings/base.rb
CHANGED
@@ -6,7 +6,7 @@ module RailsSettings
|
|
6
6
|
class Base < ActiveRecord::Base
|
7
7
|
class SettingNotFound < RuntimeError; end
|
8
8
|
|
9
|
-
SEPARATOR_REGEXP = /[\n
|
9
|
+
SEPARATOR_REGEXP = /[\n,;]+/.freeze
|
10
10
|
self.table_name = table_name_prefix + "settings"
|
11
11
|
|
12
12
|
# get the value field, YAML decoded
|
@@ -26,13 +26,17 @@ module RailsSettings
|
|
26
26
|
class << self
|
27
27
|
def clear_cache
|
28
28
|
RequestStore.store[:rails_settings_all_settings] = nil
|
29
|
-
Rails.cache.delete(
|
29
|
+
Rails.cache.delete(cache_key)
|
30
30
|
end
|
31
31
|
|
32
32
|
def field(key, **opts)
|
33
33
|
_define_field(key, default: opts[:default], type: opts[:type], readonly: opts[:readonly], separator: opts[:separator])
|
34
34
|
end
|
35
35
|
|
36
|
+
def get_field(key)
|
37
|
+
@defined_fields.find { |field| field[:key] == key.to_s } || {}
|
38
|
+
end
|
39
|
+
|
36
40
|
def cache_prefix(&block)
|
37
41
|
@cache_prefix = block
|
38
42
|
end
|
@@ -43,88 +47,122 @@ module RailsSettings
|
|
43
47
|
scope.join("/")
|
44
48
|
end
|
45
49
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
define_singleton_method(key) do
|
50
|
-
self.send(:_covert_string_to_typeof_value, type, default, separator: separator)
|
51
|
-
end
|
52
|
-
else
|
53
|
-
define_singleton_method(key) do
|
54
|
-
val = self.send(:_value_of, key)
|
55
|
-
result = nil
|
56
|
-
if !val.nil?
|
57
|
-
result = val
|
58
|
-
else
|
59
|
-
result = default
|
60
|
-
result = default.call if default.is_a?(Proc)
|
61
|
-
end
|
62
|
-
|
63
|
-
result = self.send(:_covert_string_to_typeof_value, type, result, separator: separator)
|
64
|
-
|
65
|
-
result
|
66
|
-
end
|
50
|
+
def keys
|
51
|
+
@defined_fields.map { |field| field[:key] }
|
52
|
+
end
|
67
53
|
|
68
|
-
|
69
|
-
|
54
|
+
def editable_keys
|
55
|
+
@defined_fields.reject { |field| field[:readonly] }.map { |field| field[:key] }
|
56
|
+
end
|
70
57
|
|
71
|
-
|
72
|
-
|
58
|
+
def readonly_keys
|
59
|
+
@defined_fields.select { |field| field[:readonly] }.map { |field| field[:key] }
|
60
|
+
end
|
73
61
|
|
74
|
-
|
75
|
-
record.save!
|
62
|
+
private
|
76
63
|
|
77
|
-
|
78
|
-
|
64
|
+
def _define_field(key, default: nil, type: :string, readonly: false, separator: nil)
|
65
|
+
@defined_fields ||= []
|
66
|
+
@defined_fields << {
|
67
|
+
key: key.to_s,
|
68
|
+
default: default,
|
69
|
+
type: type || :string,
|
70
|
+
readonly: readonly.nil? ? false : readonly
|
71
|
+
}
|
72
|
+
|
73
|
+
if readonly
|
74
|
+
define_singleton_method(key) do
|
75
|
+
send(:_convert_string_to_typeof_value, type, default, separator: separator)
|
79
76
|
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
77
|
+
else
|
78
|
+
define_singleton_method(key) do
|
79
|
+
val = send(:_value_of, key)
|
80
|
+
result = nil
|
81
|
+
if !val.nil?
|
82
|
+
result = val
|
83
|
+
else
|
84
|
+
result = default
|
85
|
+
result = default.call if default.is_a?(Proc)
|
84
86
|
end
|
87
|
+
|
88
|
+
result = send(:_convert_string_to_typeof_value, type, result, separator: separator)
|
89
|
+
|
90
|
+
result
|
85
91
|
end
|
86
|
-
end
|
87
92
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
value = YAML.load(value).to_hash rescue {}
|
98
|
-
value.deep_stringify_keys!
|
99
|
-
return value
|
100
|
-
when :integer
|
101
|
-
return value.to_i
|
102
|
-
else
|
93
|
+
define_singleton_method("#{key}=") do |value|
|
94
|
+
var_name = key.to_s
|
95
|
+
|
96
|
+
record = find_by(var: var_name) || new(var: var_name)
|
97
|
+
value = send(:_convert_string_to_typeof_value, type, value, separator: separator)
|
98
|
+
|
99
|
+
record.value = value
|
100
|
+
record.save!
|
101
|
+
|
103
102
|
value
|
104
103
|
end
|
105
104
|
end
|
106
105
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
if type == :boolean
|
107
|
+
define_singleton_method("#{key}?") do
|
108
|
+
send(key)
|
109
|
+
end
|
111
110
|
end
|
111
|
+
end
|
112
112
|
|
113
|
-
|
114
|
-
|
113
|
+
def _convert_string_to_typeof_value(type, value, separator: nil)
|
114
|
+
return value unless [String, Integer, Float, BigDecimal].include?(value.class)
|
115
|
+
|
116
|
+
case type
|
117
|
+
when :boolean
|
118
|
+
value == "true" || value == "1" || value == 1 || value == true
|
119
|
+
when :array
|
120
|
+
value.split(separator || SEPARATOR_REGEXP).reject { |str| str.empty? }.map(&:strip)
|
121
|
+
when :hash
|
122
|
+
value = begin
|
123
|
+
begin
|
124
|
+
YAML.load(value).to_h
|
125
|
+
rescue StandardError
|
126
|
+
eval(value).to_h
|
127
|
+
end
|
128
|
+
rescue StandardError
|
129
|
+
{}
|
130
|
+
end
|
131
|
+
value.deep_stringify_keys!
|
132
|
+
value
|
133
|
+
when :integer
|
134
|
+
value.to_i
|
135
|
+
when :float
|
136
|
+
value.to_f
|
137
|
+
when :big_decimal
|
138
|
+
value.to_d
|
139
|
+
else
|
140
|
+
value
|
115
141
|
end
|
142
|
+
end
|
116
143
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
144
|
+
def _value_of(var_name)
|
145
|
+
raise "#{table_name} does not exist." unless table_exists?
|
146
|
+
|
147
|
+
_all_settings[var_name.to_s]
|
148
|
+
end
|
149
|
+
|
150
|
+
def rails_initialized?
|
151
|
+
Rails.application&.initialized?
|
152
|
+
end
|
153
|
+
|
154
|
+
def _all_settings
|
155
|
+
raise "You cannot use settings before Rails initialize." unless rails_initialized?
|
156
|
+
|
157
|
+
RequestStore.store[:rails_settings_all_settings] ||= begin
|
158
|
+
Rails.cache.fetch(cache_key, expires_in: 1.week) do
|
159
|
+
vars = unscoped.select("var, value")
|
160
|
+
result = {}
|
161
|
+
vars.each { |record| result[record.var] = record.value }
|
162
|
+
result.with_indifferent_access
|
126
163
|
end
|
127
164
|
end
|
165
|
+
end
|
128
166
|
end
|
129
167
|
end
|
130
168
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-settings-cached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: codecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -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: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: sqlite3
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -130,9 +130,10 @@ files:
|
|
130
130
|
- lib/rails-settings/railtie.rb
|
131
131
|
- lib/rails-settings/version.rb
|
132
132
|
homepage: https://github.com/huacnlee/rails-settings-cached
|
133
|
-
licenses:
|
133
|
+
licenses:
|
134
|
+
- MIT
|
134
135
|
metadata: {}
|
135
|
-
post_install_message:
|
136
|
+
post_install_message:
|
136
137
|
rdoc_options: []
|
137
138
|
require_paths:
|
138
139
|
- lib
|
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
149
|
version: '0'
|
149
150
|
requirements: []
|
150
151
|
rubygems_version: 3.0.3
|
151
|
-
signing_key:
|
152
|
+
signing_key:
|
152
153
|
specification_version: 4
|
153
154
|
summary: Settings plugin for Rails that makes managing a table of global keys.
|
154
155
|
test_files: []
|