cnf 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cnf.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b920024e5d6c96e53af3404755603e12990bf69a
|
4
|
+
data.tar.gz: 5253465c96c49d6f3a36b118bfd935561595c81e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b90759a59acafdd6cc331da63422d06955e314cc144f2cfc015df9a5d6dcda185bc25c4ceb2781ec93201fb81f17841de4d05461503d45c1f6f0f80825480a6
|
7
|
+
data.tar.gz: 839ab0f0ab896093c149c1411f8fc9d5f97cd5276faaa76f31d8239eba133c4ffd77a23cc21934b380171efbbc345d845b709cacf8a7af9b687fa4d10a410088
|
data/lib/cnf.rb
CHANGED
@@ -9,13 +9,18 @@ module Cnf
|
|
9
9
|
def fetch_data
|
10
10
|
@_cnf ||= begin
|
11
11
|
res = Excon.get(url, headers: headers)
|
12
|
-
|
12
|
+
JSON.load(res.body)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
alias_method :all, :fetch_data
|
16
16
|
|
17
17
|
def method_missing(m, *args, &block)
|
18
|
-
|
18
|
+
data = RecursiveOpenStruct.new(fetch_data, recurse_over_arrays: true)
|
19
|
+
data.send(m)
|
20
|
+
end
|
21
|
+
|
22
|
+
def markups
|
23
|
+
fetch_data['markups']
|
19
24
|
end
|
20
25
|
|
21
26
|
def hosts
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacek Jakubik
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: excon
|