a9n 0.4.7 → 0.4.8
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 -1
- data/lib/a9n/struct.rb +21 -9
- data/lib/a9n/version.rb +1 -1
- 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: 8d7b6f67761f28850dea8e4597faab3adca453c2
|
4
|
+
data.tar.gz: 2ef0b7f9f6c5bed14c886d47421766f9393153f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cdbf3cee8e569f20291055dc656121a4dc6370453c904c4fb2c4b470e87fdbc412dc441c15c71c54380c6fe834ce51c4dfd04e15ba994f0ebb933e7328b538f
|
7
|
+
data.tar.gz: 09abe59d61a6016e4a2e572430676380b5df99085b83c60f156d4d31751dce6b49294dd313d4c1c8fd0039823c45d224427f6fd1409e85fcfa357ec5fc13cb04
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0@a9n
|
data/.travis.yml
CHANGED
data/lib/a9n/struct.rb
CHANGED
@@ -1,19 +1,31 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
|
3
1
|
module A9n
|
4
|
-
class Struct
|
2
|
+
class Struct
|
5
3
|
extend Forwardable
|
6
4
|
|
7
|
-
def_delegators :@
|
5
|
+
def_delegators :@data, :empty?, :keys, :key?, :fetch, :[], :[]=
|
8
6
|
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
def initialize(data = {})
|
8
|
+
@data = data
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_hash
|
12
|
+
data
|
13
|
+
end
|
14
|
+
|
15
|
+
def merge(another_data)
|
16
|
+
data.merge!(another_data)
|
13
17
|
end
|
14
18
|
|
15
19
|
def method_missing(name, *args)
|
16
|
-
|
20
|
+
if data.key?(name)
|
21
|
+
fetch(name)
|
22
|
+
else
|
23
|
+
raise NoSuchConfigurationVariableError.new(name)
|
24
|
+
end
|
17
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_reader :data
|
18
30
|
end
|
19
31
|
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: 0.4.
|
4
|
+
version: 0.4.8
|
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-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a9n - ruby/rails apps configuration manager
|
14
14
|
email:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
71
|
rubyforge_project:
|
72
|
-
rubygems_version: 2.
|
72
|
+
rubygems_version: 2.5.1
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: a9n is a tool to keep ruby/rails apps extra configuration easily maintainable
|