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: ad79a19617b69695b657e11e36a3df0d06c4f003
4
- data.tar.gz: f181e4ef7ee94eb0ab296bb70e52bf26465d1fb9
3
+ metadata.gz: 779131cf76829eebd09f4f1f0bd04f8bbafca85c
4
+ data.tar.gz: 06df17e47785b6075f5c3f82d8db59b100297b7a
5
5
  SHA512:
6
- metadata.gz: 8a846dbbd1fea9ea0ca1492088d92cee3287d94c2ca31cce05c21839f5e3e030b51c9f57d9f6b101416194aa60979dbd05f8f261e480cfda027aebe4f57606af
7
- data.tar.gz: fcf2383e74d2dac42a9abf7eb9de661ddcdd698f8aae159ed77b702ce3e3f64c6b54634500eb94b500ffd9dbaa644a2a830e394933e15980afada6bd38f1dba2
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
- if options[:overwrite] == false
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!
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSettings
2
- VERSION = "0.7.5"
2
+ VERSION = "0.7.6"
3
3
  end
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.5
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-21 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid