a9n 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/.ruby-version +1 -1
- data/.travis.yml +2 -3
- data/README.md +7 -1
- data/lib/a9n.rb +5 -1
- data/lib/a9n/version.rb +1 -1
- data/spec/unit/a9n_spec.rb +39 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c22d5e7310407cb2773dc933fadaec4edeb9cc29
|
4
|
+
data.tar.gz: 074a49169e7a1c25ae6123f8b6fe82a3326da2d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b473d6dd3647dff4a443d80b86604cfb30268f18a46429d4d559267b77917c99b75ee0596bb3325e5a6615626949d1365d5bb31c5c872645fb9956052494688
|
7
|
+
data.tar.gz: 942b478f1f5fe7f76d686de2e2852d5290183c9ed79613803bf65018f43d220fff9cca161a51b9d00864616ec622306e7e830c78285cf4e914b82e758382f43c
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3@a9n
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
[codeclimate]: https://codeclimate.com/github/knapo/a9n
|
11
11
|
[coverage]: https://codeclimate.com/github/knapo/a9n
|
12
12
|
|
13
|
-
A9n is a simple tool to keep ruby/rails apps configuration maintanable and verifiable. It supports Rails
|
13
|
+
A9n is a simple tool to keep ruby/rails apps configuration maintanable and verifiable. It supports Rails 3.x, 4.x and Ruby 2.0. 2.1, 2.2. Ruby 1.8 and Rails 2.x are not supported since version 0.1.2. Ruby 1.9 is not supported since version 0.4.0.
|
14
14
|
|
15
15
|
Why it's named a9n? It's a numeronym for application (where 9 stands for the number of letters between the first **a** and last **n**, similar to i18n or l10n).
|
16
16
|
|
@@ -75,6 +75,12 @@ You can access it by:
|
|
75
75
|
A9n.mandrill.username # => `joe`
|
76
76
|
A9n.mandrill.api_key # => `1234asdf`
|
77
77
|
|
78
|
+
## Mapping ENV variables
|
79
|
+
|
80
|
+
Sometimes, you don't want to store a single secret value in the repo and you prefer having it in ENV variable. You can easily map it using `:env` symbol as a value:
|
81
|
+
|
82
|
+
production:
|
83
|
+
access_token: :env
|
78
84
|
|
79
85
|
## Capistrano
|
80
86
|
|
data/lib/a9n.rb
CHANGED
data/lib/a9n/version.rb
CHANGED
data/spec/unit/a9n_spec.rb
CHANGED
@@ -72,25 +72,53 @@ describe A9n do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
describe ".root" do
|
75
|
-
|
76
|
-
|
77
|
-
before do
|
78
|
-
subject.app = app
|
79
|
-
end
|
75
|
+
context "when app is set" do
|
76
|
+
let(:app) { double(env: "test", root: "/apps/a9n") }
|
80
77
|
|
81
|
-
context "with custom path" do
|
82
78
|
before do
|
83
|
-
subject.
|
79
|
+
subject.app = app
|
84
80
|
end
|
85
81
|
|
86
|
-
|
87
|
-
|
82
|
+
context "with custom path" do
|
83
|
+
before do
|
84
|
+
subject.root = "/home/knapo/workspace/a9n"
|
85
|
+
end
|
86
|
+
|
87
|
+
it do
|
88
|
+
expect(subject.root).to eq(Pathname.new("/home/knapo/workspace/a9n"))
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context "with local app path" do
|
93
|
+
it do
|
94
|
+
expect(subject.root).to eq("/apps/a9n")
|
95
|
+
end
|
88
96
|
end
|
89
97
|
end
|
90
98
|
|
91
|
-
context "
|
99
|
+
context "when app is not set" do
|
92
100
|
it do
|
93
|
-
expect(subject.root).to eq(
|
101
|
+
expect(subject.root).to eq(nil)
|
102
|
+
end
|
103
|
+
|
104
|
+
context "when setting a custom path when is falsy" do
|
105
|
+
before do
|
106
|
+
subject.root ||= "/home/knapo/workspace/a9n"
|
107
|
+
end
|
108
|
+
|
109
|
+
it do
|
110
|
+
expect(subject.root).to eq(Pathname.new("/home/knapo/workspace/a9n"))
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
context "when setting a custom path" do
|
115
|
+
before do
|
116
|
+
subject.root = "/home/knapo/workspace/a9n"
|
117
|
+
end
|
118
|
+
|
119
|
+
it do
|
120
|
+
expect(subject.root).to eq(Pathname.new("/home/knapo/workspace/a9n"))
|
121
|
+
end
|
94
122
|
end
|
95
123
|
end
|
96
124
|
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.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a9n - ruby/rails apps configuration manager
|
14
14
|
email:
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.4.
|
69
|
+
rubygems_version: 2.4.5.1
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: a9n is a tool to keep ruby/rails apps extra configuration easily maintainable
|