a9n 0.3.3 → 0.3.4

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: 1bc1f0f1add367dbf4d699062435857f876e5d0e
4
- data.tar.gz: 89d0a68d3960fcb05326c88c86c1ad3e1bad671c
3
+ metadata.gz: f995c7f50ba67e72854fae222d3f3d1d56954e5d
4
+ data.tar.gz: 85396eed16848d240fab8ede3ac86054bcb9078d
5
5
  SHA512:
6
- metadata.gz: b916f7334a6806e541a3e26b3fdc4b895db2cc3fefb931fc1dc07cc0f486c4fafece467725d5549a71cd967d79821fd508c754cc28e008f8948f4bbb94bbd418
7
- data.tar.gz: 2700af59f2b572a92b9c4980cbb53f49c350d5fa8534dd506e32771653085107e696c8ecce536cc10fbb3b18f593814fa53fbece9a984bd9c067f97bbf5371a7
6
+ metadata.gz: fa210dc6b9944ee7c4e33fa06b0cc95f63d8393e2fb6c5eed6dcf687af48ce161454cfda0cce1029bf42b048e70a1544c42044912a5f96dea9a9b38015a77905
7
+ data.tar.gz: a31bb71f27ba83c90106a1138582b40c6fb695df20a14307772bcf04c4fc0a7e22bc255f57b07b14a9f05138ae0a87125d617de803081740bf977cd597a0c00c
data/.gitignore CHANGED
@@ -12,3 +12,4 @@ rdoc
12
12
  spec/reports
13
13
  tmp
14
14
  .coveralls.yml
15
+ .rspec
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
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
- DEFAULT_FILE = "#{DEFAULT_SCOPE}.yml"
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}.yml").to_s] + Dir[root.join("config/a9n/*.{yml,yml.erb}")]
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)
@@ -1,3 +1,3 @@
1
1
  module A9n
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -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
@@ -0,0 +1,2 @@
1
+ defaults:
2
+ delivery_method: test
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.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: 2014-12-23 00:00:00.000000000 Z
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