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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7aba7edfebe094b6ccaa51c55ae0dd5c0e92842a
4
- data.tar.gz: c44c2f40800e342d85b22bffc81d776be03de2a4
3
+ metadata.gz: 74fabc2834f742715e6895cf947912ed2163091c
4
+ data.tar.gz: 5ce1fe34a973c18775c7d1f174b075fd915ad95e
5
5
  SHA512:
6
- metadata.gz: c806f24c84ccc62eac1c5e3324dcdd9cf9f57ee9598f1414243e7e8b56dc9c9e6f328f58ced6c2fe8daf629febec87b2dbb40a244494d7b58a7b1efae1673d84
7
- data.tar.gz: a1d3b9d9696423ac2d96b82143f5b5c83d11f3d93a4fed76f2c9275fbe05cbb1ee9635431d6fb49bd5cec55ceb150a93b0f3e420066e3cae995555ff2326887e
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 defualt value in database, this has indifferent with `Setting.defaults[:some_setting]`, this will **save the value into database**:
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
- result.merge! @@defaults.slice(*(@@defaults.keys - result.keys))
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.2
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: 2015-11-02 00:00:00.000000000 Z
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.4.8
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