rails-settings-cached 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rails-settings/settings.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fabc2834f742715e6895cf947912ed2163091c
|
4
|
+
data.tar.gz: 5ce1fe34a973c18775c7d1f174b075fd915ad95e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bc45ee680505b1f3e90a199ad9c6e19ef9b474909aa35f7299bab8e434ad88a750e5a43c99c99ef15320cd36f20577aca74c7df4b071956fd2c3eb7a0d181f6
|
7
|
+
data.tar.gz: 978f411bf5670ee779c55eded8d36f05f2d3d804f423884496ead9c3cc6d8929da99d3e89349617db9fd4dcf392a58ca0a673f1e0f068600a277454427cb4476
|
data/README.md
CHANGED
@@ -117,7 +117,7 @@ Setting.some_setting
|
|
117
117
|
=> "footastic"
|
118
118
|
```
|
119
119
|
|
120
|
-
Init
|
120
|
+
Init default value in database, this has indifferent with `Setting.defaults[:some_setting]`, this will **save the value into database**:
|
121
121
|
|
122
122
|
```ruby
|
123
123
|
Setting.save_default(:some_key, "123")
|
@@ -60,7 +60,9 @@ module RailsSettings
|
|
60
60
|
vars.each do |record|
|
61
61
|
result[record.var] = record.value
|
62
62
|
end
|
63
|
-
|
63
|
+
default_keys = @@defaults.keys
|
64
|
+
default_keys = default_keys.select {|k| k.start_with? starting_with } if starting_with
|
65
|
+
result.merge! @@defaults.slice(*(default_keys - result.keys))
|
64
66
|
|
65
67
|
result.with_indifferent_access
|
66
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-settings-cached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Squeegy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: This is improved from rails-settings, added caching. Settings is a plugin
|