tomograph 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 207c274dea45b01a52e1f334ae5ffff33a37030b
4
- data.tar.gz: 70e94ec412396908ba3aaff0885c53e5e458ed43
3
+ metadata.gz: 3289dd90efeda55988bc7c5093fb73ba35171351
4
+ data.tar.gz: 641dabca21ac092725565aa355602127ec5a3ada
5
5
  SHA512:
6
- metadata.gz: ff7f894599ab4faa348e7c17327f88ceb7766bfb0f476975c6785132b0b177855ecbb0ec2d0ea82a1b704b0454f4c318994f7eb273a2ec2ac5023d39435790a9
7
- data.tar.gz: adcd0502914565b4b19e2b6802c8133a92ee8c57c21f9afe454c3f6ab4b74cf108ae574183eaebe390ba5b6a5c9df2e024fd50cb897cec47af660f1592167bb1
6
+ metadata.gz: a674bf19dfd0b1bcf1ba41fc0e0334ddda23caf5584d34127668e888776358dcc9d600c3cc1b475fa9992047ef6b228218acead51c196080995b6e4fcb67cc8b
7
+ data.tar.gz: 76707e3867da3284168c040a8985d476b2760f1a410f24fbc6de0c31d008c668d1d3c3e385f8f75de68404e59741c3b535a2bb1ae98db41ecc595925efffdd2e
@@ -4,12 +4,15 @@ module Tomograph
4
4
  class Tomogram < String
5
5
  class << self
6
6
  def json
7
- single_sharp = find_resource
7
+ single_sharps = find_resource
8
8
 
9
- result = single_sharp['content'].inject([]) do |result, resource|
10
- next result if text_node?(resource)
9
+ result = []
10
+ single_sharps.map do |single_sharp|
11
+ result += single_sharp['content'].inject([]) do |result, resource|
12
+ next result if text_node?(resource)
11
13
 
12
- result.concat(extract_actions(resource))
14
+ result.concat(extract_actions(resource))
15
+ end
13
16
  end
14
17
  MultiJson.dump(result)
15
18
  end
@@ -53,7 +56,7 @@ module Tomograph
53
56
  end
54
57
 
55
58
  def find_resource
56
- documentation['content'][0]['content'].find do |resource|
59
+ documentation['content'][0]['content'].find_all do |resource|
57
60
  !text_node?(resource) &&
58
61
  resource['meta']['classes'][0] == 'resourceGroup' # skip Data Structures
59
62
  end
@@ -1,3 +1,3 @@
1
1
  module Tomograph
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomograph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.efimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json