a9n 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +8 -8
- data/lib/a9n/exceptions.rb +9 -7
- data/lib/a9n/struct.rb +8 -4
- data/lib/a9n/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca032540da11055ed22e392e1c2024cda311a6785c4046837fd5b9732d4bfb1
|
4
|
+
data.tar.gz: 5aa10ab6b540ccfbb44bfc043de67a4e6f5a4baa0027063af5b06d123b8cb6bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d916422540256299c914740bef44289464c5ae259c46dddfb864d579279e7f43fe869071c724b3cf7d4b406b227ef529c48b3440c6fa02473890ceab71a5f623
|
7
|
+
data.tar.gz: 75ebd13b032d9132c0c565a3309e93792cf297a5fc0ddaa8634fba7afac4620b7abca91ee5e32b5c3b2095d03218686e41696c5f01f647fb19e869afb59a9740
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
a9n (1.
|
4
|
+
a9n (1.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,16 +13,16 @@ GEM
|
|
13
13
|
diff-lcs (1.3)
|
14
14
|
docile (1.3.2)
|
15
15
|
jaro_winkler (1.5.4)
|
16
|
-
json (2.3.0)
|
17
16
|
method_source (0.9.2)
|
18
17
|
parallel (1.19.1)
|
19
|
-
parser (2.7.0.
|
18
|
+
parser (2.7.0.4)
|
20
19
|
ast (~> 2.4.0)
|
21
20
|
pry (0.12.2)
|
22
21
|
coderay (~> 1.1.0)
|
23
22
|
method_source (~> 0.9.0)
|
24
23
|
rainbow (3.0.0)
|
25
24
|
rake (13.0.1)
|
25
|
+
rexml (3.2.4)
|
26
26
|
rspec (3.9.0)
|
27
27
|
rspec-core (~> 3.9.0)
|
28
28
|
rspec-expectations (~> 3.9.0)
|
@@ -36,19 +36,19 @@ GEM
|
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
37
|
rspec-support (~> 3.9.0)
|
38
38
|
rspec-support (3.9.2)
|
39
|
-
rubocop (0.
|
39
|
+
rubocop (0.80.1)
|
40
40
|
jaro_winkler (~> 1.5.1)
|
41
41
|
parallel (~> 1.10)
|
42
42
|
parser (>= 2.7.0.1)
|
43
43
|
rainbow (>= 2.2.2, < 4.0)
|
44
|
+
rexml
|
44
45
|
ruby-progressbar (~> 1.7)
|
45
46
|
unicode-display_width (>= 1.4.0, < 1.7)
|
46
47
|
ruby-progressbar (1.10.1)
|
47
|
-
simplecov (0.
|
48
|
+
simplecov (0.18.5)
|
48
49
|
docile (~> 1.1)
|
49
|
-
|
50
|
-
|
51
|
-
simplecov-html (0.10.2)
|
50
|
+
simplecov-html (~> 0.11)
|
51
|
+
simplecov-html (0.12.2)
|
52
52
|
unicode-display_width (1.6.1)
|
53
53
|
|
54
54
|
PLATFORMS
|
data/lib/a9n/exceptions.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
module A9n
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
Error = Class.new(StandardError)
|
3
|
+
ConfigurationNotLoadedError = Class.new(Error)
|
4
|
+
MissingConfigurationDataError = Class.new(Error)
|
5
|
+
MissingConfigurationVariablesError = Class.new(Error)
|
6
|
+
NoSuchConfigurationVariableError = Class.new(Error)
|
7
|
+
KeyNotFoundError = Class.new(NoSuchConfigurationVariableError)
|
8
|
+
MissingEnvVariableError = Class.new(Error)
|
9
|
+
UnknownEnvError = Class.new(Error)
|
10
|
+
RootNotSetError = Class.new(Error)
|
9
11
|
end
|
data/lib/a9n/struct.rb
CHANGED
@@ -17,14 +17,18 @@ module A9n
|
|
17
17
|
data.merge!(another_data)
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
if data.key?(
|
22
|
-
fetch(
|
20
|
+
def find(key)
|
21
|
+
if data.key?(key)
|
22
|
+
fetch(key)
|
23
23
|
else
|
24
|
-
raise
|
24
|
+
raise KeyNotFoundError.new, "Could not find #{key} in #{data.keys.inspect}"
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
def method_missing(key, *_args)
|
29
|
+
find(key)
|
30
|
+
end
|
31
|
+
|
28
32
|
def set(key, value)
|
29
33
|
data[key.to_sym] = value
|
30
34
|
end
|
data/lib/a9n/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codeclimate-test-reporter
|