app_config 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/Gemfile.lock +1 -1
- data/lib/app_config.rb +6 -1
- metadata +2 -2
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/app_config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'core_ext/hashish'
|
2
2
|
|
3
3
|
module AppConfig
|
4
|
-
VERSION = '1.1.
|
4
|
+
VERSION = '1.1.1'
|
5
5
|
|
6
6
|
autoload :Error, 'app_config/error'
|
7
7
|
autoload :Storage, 'app_config/storage'
|
@@ -15,6 +15,7 @@ module AppConfig
|
|
15
15
|
# * `:mongo` - {AppConfig::Storage::Mongo AppConfig::Storage::Mongo}
|
16
16
|
# * `:yaml` - {AppConfig::Storage::YAML AppConfig::Storage::YAML}
|
17
17
|
def setup(options = {}, &block)
|
18
|
+
warn "DEPRECATED: AppConfig.setup will be renamed to AppConfig.setup! in 2.0."
|
18
19
|
@@options = options
|
19
20
|
|
20
21
|
if @@options[:yaml]
|
@@ -47,17 +48,20 @@ module AppConfig
|
|
47
48
|
|
48
49
|
# Access the configured `key`'s value.
|
49
50
|
def [](key)
|
51
|
+
warn "DEPRECATED: AppConfig.[] is deprecated and will be removed in 2.0."
|
50
52
|
setup unless setup?
|
51
53
|
storage[key]
|
52
54
|
end
|
53
55
|
|
54
56
|
# Set a new `value` for `key` (persistence depends on the type of Storage).
|
55
57
|
def []=(key, value)
|
58
|
+
warn "DEPRECATED: AppConfig.[]= is deprecated and will be removed in 2.0."
|
56
59
|
setup unless setup?
|
57
60
|
storage[key] = value
|
58
61
|
end
|
59
62
|
|
60
63
|
def empty?
|
64
|
+
warn "DEPRECATED: AppConfig.empty? is deprecated and will be removed in 2.0."
|
61
65
|
storage.empty?
|
62
66
|
end
|
63
67
|
|
@@ -77,6 +81,7 @@ module AppConfig
|
|
77
81
|
end
|
78
82
|
|
79
83
|
def environment
|
84
|
+
warn "DEPRECATED: Environment mode will be removed in 2.0."
|
80
85
|
(@@options[:environment] || @@options[:env]) || nil
|
81
86
|
end
|
82
87
|
alias_method :env, :environment
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bson_ext
|