configurable_engine 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/models/configurable.rb +6 -4
- data/lib/configurable_engine/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f02a18fcb303b5b130db98893a3d0e5977fb2017
|
4
|
+
data.tar.gz: 8cd584d266b1a2824c62c74f519567194cf42acd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4984b350d139195314f8749eb82833c9232fb37ef2322f4fc3b3a2a98d28c5e52f6529f0b0aaf065c232a32b664f9cfbbb93abf5ab301ba9229e92bbc629d752
|
7
|
+
data.tar.gz: e64e0fa495ee59fbe59d7acb99eb835b8004401d4850cded6636a218d463a3db0e427b4145aaefd30f34065fe944f1d8932c1a17c47c61289274c359ebf5f874
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/app/models/configurable.rb
CHANGED
@@ -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
|
-
|
35
|
+
config = if ConfigurableEngine::Engine.config.use_cache
|
36
36
|
Rails.cache.fetch("configurable_engine:#{key}") {
|
37
|
-
find_by_name(key)
|
37
|
+
find_by_name(key)
|
38
38
|
}
|
39
39
|
else
|
40
|
-
find_by_name(key)
|
40
|
+
find_by_name(key)
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
return parse_value key, defaults[key][:default] unless config
|
44
|
+
|
45
|
+
config.value
|
44
46
|
end
|
45
47
|
|
46
48
|
def value
|
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
|
+
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:
|
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
|
28
|
-
in a config file, specifying default values for all environmentspec. These
|
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.
|
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.
|