rails_admin_settings 0.7.5 → 0.7.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 779131cf76829eebd09f4f1f0bd04f8bbafca85c
|
4
|
+
data.tar.gz: 06df17e47785b6075f5c3f82d8db59b100297b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75735c68fb5dab8d93d4e6024be5e3024d71ede07543427cfe321db24a35c86f70181776b97bb0c516aa20612519033b503017b7425528b7c435c9b235537336
|
7
|
+
data.tar.gz: 207430f9456d8cc36cabc5f194a91af60aa20490c266a981815e5e6c77334663e8a05af31269e3771e88b25c1f54faa8d1b8bf3d988992d895772f3392d2c399
|
@@ -183,7 +183,8 @@ module RailsAdminSettings
|
|
183
183
|
@settings[key] = v
|
184
184
|
else
|
185
185
|
opts = options.dup
|
186
|
-
|
186
|
+
#::Kernel.p options, key, @settings[key].value, @settings[key].value.blank?
|
187
|
+
if options[:overwrite] == false && !@settings[key].value.blank?
|
187
188
|
opts.delete(:raw)
|
188
189
|
opts.delete(:value)
|
189
190
|
opts.delete(:enabled)
|
@@ -57,6 +57,7 @@ class Settings < BasicObject
|
|
57
57
|
|
58
58
|
def apply_defaults!(file)
|
59
59
|
if File.file?(file)
|
60
|
+
puts "[settings] Loading from #{file}"
|
60
61
|
yaml = YAML.load(File.read(file), safe: true)
|
61
62
|
yaml.each_pair do |namespace, vals|
|
62
63
|
vals.symbolize_keys!
|
@@ -71,6 +72,7 @@ class Settings < BasicObject
|
|
71
72
|
else
|
72
73
|
value = val.delete(:value)
|
73
74
|
end
|
75
|
+
puts "#{key} - default '#{value}' current '#{Settings.get(key).raw}'"
|
74
76
|
n.set(key, value, val.merge(overwrite: false))
|
75
77
|
end
|
76
78
|
n.unload!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Tv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|