a9n 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec.example +2 -0
- data/lib/a9n.rb +4 -2
- data/lib/a9n/version.rb +1 -1
- data/spec/integration/a9n_spec.rb +7 -0
- data/test_app/config/a9n/mailer.yml.example +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f995c7f50ba67e72854fae222d3f3d1d56954e5d
|
4
|
+
data.tar.gz: 85396eed16848d240fab8ede3ac86054bcb9078d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa210dc6b9944ee7c4e33fa06b0cc95f63d8393e2fb6c5eed6dcf687af48ce161454cfda0cce1029bf42b048e70a1544c42044912a5f96dea9a9b38015a77905
|
7
|
+
data.tar.gz: a31bb71f27ba83c90106a1138582b40c6fb695df20a14307772bcf04c4fc0a7e22bc255f57b07b14a9f05138ae0a87125d617de803081740bf977cd597a0c00c
|
data/.gitignore
CHANGED
data/.rspec.example
ADDED
data/lib/a9n.rb
CHANGED
@@ -12,7 +12,7 @@ module A9n
|
|
12
12
|
class NoSuchConfigurationVariable < StandardError; end
|
13
13
|
|
14
14
|
DEFAULT_SCOPE = :configuration
|
15
|
-
|
15
|
+
EXTENSION_LIST = "{yml,yml.erb,yml.example,yml.erb.example}"
|
16
16
|
|
17
17
|
class << self
|
18
18
|
def env
|
@@ -61,7 +61,9 @@ module A9n
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def default_files
|
64
|
-
[root.join("config/#{DEFAULT_SCOPE}
|
64
|
+
files = Dir[root.join("config/#{DEFAULT_SCOPE}.#{EXTENSION_LIST}").to_s]
|
65
|
+
files += Dir[root.join("config/a9n/*.#{EXTENSION_LIST}")]
|
66
|
+
files.map{ |f| f.sub(/.example$/,'') }.uniq
|
65
67
|
end
|
66
68
|
|
67
69
|
def load(*files)
|
data/lib/a9n/version.rb
CHANGED
@@ -46,4 +46,11 @@ describe A9n do
|
|
46
46
|
expect(subject.cloud.password).to eq("qwerty")
|
47
47
|
}
|
48
48
|
end
|
49
|
+
|
50
|
+
context "extra config file with example" do
|
51
|
+
it {
|
52
|
+
expect(subject.mailer).to be_kind_of(A9n::Struct)
|
53
|
+
expect(subject.mailer.delivery_method).to eq("test")
|
54
|
+
}
|
55
|
+
end
|
49
56
|
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.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a9n is a tool to keep ruby/rails apps extra configuration easily maintainable
|
14
14
|
and verifiable
|
@@ -19,6 +19,7 @@ extensions: []
|
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
21
|
- ".gitignore"
|
22
|
+
- ".rspec.example"
|
22
23
|
- ".ruby-version"
|
23
24
|
- ".travis.yml"
|
24
25
|
- Gemfile
|
@@ -40,6 +41,7 @@ files:
|
|
40
41
|
- spec/unit/loader_spec.rb
|
41
42
|
- spec/unit/struct_spec.rb
|
42
43
|
- test_app/config/a9n/cloud.yml.erb
|
44
|
+
- test_app/config/a9n/mailer.yml.example
|
43
45
|
- test_app/config/a9n/mandrill.yml
|
44
46
|
- test_app/config/configuration.yml
|
45
47
|
- test_app/config/configuration.yml.example
|