cnf 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cnf.rb +7 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0be447ca1371b02e03647742a5f43ea44f684290
4
- data.tar.gz: 168bf46f1e70811be0da5267491ebdfb93f12e62
3
+ metadata.gz: b920024e5d6c96e53af3404755603e12990bf69a
4
+ data.tar.gz: 5253465c96c49d6f3a36b118bfd935561595c81e
5
5
  SHA512:
6
- metadata.gz: ead22cfa545185e5e0abc8a993af3a9e2db2b3a18017a349a25a9c96e7fbdd5c2bbcafe250a057053e9722abe125a371d8fcdb5d264844e15d53115174f253ed
7
- data.tar.gz: 4014641fa7d5ad89b50ba06298bb6d93d652c4c615a608182259770a37cfc15f2bb22d6d7cbd932756c760592f497573f0fb637c5cf24dfde56d2e0f12ca1c66
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
- RecursiveOpenStruct.new(JSON.load(res.body), recurse_over_arrays: true)
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
- fetch_data.send(m)
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.1
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-03-28 00:00:00.000000000 Z
14
+ date: 2017-06-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: excon