configurable_engine 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 578bcc2a45822abd17223d78f7c7fde6a0dfe3ab
4
- data.tar.gz: bc4d2f6a418728cbb09b0753127f7e97469a6c4e
3
+ metadata.gz: f02a18fcb303b5b130db98893a3d0e5977fb2017
4
+ data.tar.gz: 8cd584d266b1a2824c62c74f519567194cf42acd
5
5
  SHA512:
6
- metadata.gz: f0a4fb4d57e46d36329fc96650bf8f3be1b970978fc4594acf3bba0b1faf1a4a8dfb70ffa3332a6771db6e54d50e6e2b5e5be5e5b0ad97a4bb804785b6414c1f
7
- data.tar.gz: bea51a20af9715fa5feea6a294fdd0008bc222abc4a8c6bf37e86eeb52ab9441996da5d573b7713591c6b4a0753cce5c2e36d194b8829d4829429404a512614b
6
+ metadata.gz: 4984b350d139195314f8749eb82833c9232fb37ef2322f4fc3b3a2a98d28c5e52f6529f0b0aaf065c232a32b664f9cfbbb93abf5ab301ba9229e92bbc629d752
7
+ data.tar.gz: e64e0fa495ee59fbe59d7acb99eb835b8004401d4850cded6636a218d463a3db0e427b4145aaefd30f34065fe944f1d8932c1a17c47c61289274c359ebf5f874
@@ -1,3 +1,7 @@
1
+ ### v0.4.5 - October 13, 2014
2
+ **bug fixes**
3
+ Configurable can store false values when the default is true (https://github.com/paulca/configurable_engine/pull/24, thanks @lilliealbert)
4
+
1
5
  ### v0.4.4 - May 21, 2014
2
6
  **bug fixes**
3
7
  list types can *actually* deserialize comma delimeted nested and non-nested lists
@@ -32,15 +32,17 @@ class Configurable < ActiveRecord::Base
32
32
  def self.[](key)
33
33
  return parse_value key, defaults[key][:default] unless table_exists?
34
34
 
35
- val = if ConfigurableEngine::Engine.config.use_cache
35
+ config = if ConfigurableEngine::Engine.config.use_cache
36
36
  Rails.cache.fetch("configurable_engine:#{key}") {
37
- find_by_name(key).try(:value)
37
+ find_by_name(key)
38
38
  }
39
39
  else
40
- find_by_name(key).try(:value)
40
+ find_by_name(key)
41
41
  end
42
42
 
43
- val ||= parse_value key, defaults[key][:default]
43
+ return parse_value key, defaults[key][:default] unless config
44
+
45
+ config.value
44
46
  end
45
47
 
46
48
  def value
@@ -1,3 +1,3 @@
1
1
  module ConfigurableEngine
2
- VERSION = '0.4.4'
2
+ VERSION = '0.4.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configurable_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Campbell
8
+ - Michael Glass
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-09-29 00:00:00.000000000 Z
12
+ date: 2014-10-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails
@@ -24,9 +25,9 @@ dependencies:
24
25
  - - ">"
25
26
  - !ruby/object:Gem::Version
26
27
  version: 3.1.0
27
- description: 'Configurable is a Rails 3 engine that allows you to set up config variables
28
- in a config file, specifying default values for all environmentspec. These variables
29
- can then be set on a per-app basis using a user facing configuration screen. '
28
+ description: 'Configurable is a Rails 3/4 engine that allows you to set up config
29
+ variables in a config file, specifying default values for all environmentspec. These
30
+ variables can then be set on a per-app basis using a user facing configuration screen. '
30
31
  email: paul@rslw.com
31
32
  executables: []
32
33
  extensions: []
@@ -68,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
69
  version: '0'
69
70
  requirements: []
70
71
  rubyforge_project:
71
- rubygems_version: 2.2.2
72
+ rubygems_version: 2.4.2
72
73
  signing_key:
73
74
  specification_version: 4
74
75
  summary: Database-backed configuration for Rails 3, with defaults from config file.