a9n 0.5.0 → 0.5.1

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: efda03efcb194e7720d81afa0731990446726ba4
4
- data.tar.gz: c72073f46b01592b6fc6572fdd52313f07bda10a
3
+ metadata.gz: dbf4ab99216d8cf49c732fa56314636c329dfeff
4
+ data.tar.gz: 8885decf147813e39ed9ffb8d7e9c22e99b93ca0
5
5
  SHA512:
6
- metadata.gz: 9bf73e16dcf7ed482a18d3b50f40bc01e2911093b147eb5ecc711a584af60d8fef0168b98dc8d4276b93968d1b9283fca25895f8763124db924bbd5355bec436
7
- data.tar.gz: 56294aa29df213670e96f1abf1c76fb783b17ee5d071adb342fe829f9e36d283b6c253fdaa128345c80ce2fa63fce7dc8ef11585ac07e2e7b8c5c1c8a3fe3d60
6
+ metadata.gz: 0ceb41589adaed4632455fd256e668e61911338cb20f6be328a332a8d91a83d134d9b4d9527a7e35df1adfc4dedc94d34c475ac945942bc91e2e5e51e119b354
7
+ data.tar.gz: 612afaaa354bf1809c5c433f87b83c1524fd785016fa1d837620f594b607e2ba1b0b896282de3f6e864679cd7659b3fe95435510086a31e83b610bc49767baab
@@ -1 +1 @@
1
- 2.4.0
1
+ 2.4.1
@@ -3,7 +3,7 @@ rvm:
3
3
  - 2.1.10
4
4
  - 2.2.5
5
5
  - 2.3.3
6
- - 2.4.0
6
+ - 2.4.1
7
7
  addons:
8
8
  code_climate:
9
9
  repo_token: 9aa2aa2432639c57772b6917ad9da468709e5536b75617575b02b35201a2eaf8
data/lib/a9n.rb CHANGED
@@ -12,6 +12,7 @@ module A9n
12
12
  extend SingleForwardable
13
13
 
14
14
  EXTENSION_LIST = "{yml,yml.erb,yml.example,yml.erb.example}"
15
+ STRICT_MODE = "strict"
15
16
 
16
17
  class << self
17
18
  def env
@@ -67,6 +68,14 @@ module A9n
67
68
  @storage ||= A9n::Struct.new
68
69
  end
69
70
 
71
+ def mode
72
+ @mode ||= ENV['A9N_MODE'] || STRICT_MODE
73
+ end
74
+
75
+ def strict?
76
+ mode == STRICT_MODE
77
+ end
78
+
70
79
  def method_missing(name, *args)
71
80
  load if storage.empty?
72
81
  storage.send(name, *args)
@@ -19,7 +19,7 @@ module A9n
19
19
  if value.is_a?(::Hash)
20
20
  deep_prepare(value, scope)
21
21
  elsif value.is_a?(Symbol) && value == :env
22
- A9n.env_var(scope.env_key_name(key), strict: true)
22
+ A9n.env_var(scope.env_key_name(key), strict: A9n.strict?)
23
23
  else
24
24
  value
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module A9n
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a9n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-12 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.6.8
129
+ rubygems_version: 2.6.11
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: a9n is a tool to keep ruby/rails apps extra configuration easily maintainable