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 +4 -4
- data/lib/tomograph/tomogram.rb +8 -5
- data/lib/tomograph/version.rb +1 -1
- 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: 3289dd90efeda55988bc7c5093fb73ba35171351
|
4
|
+
data.tar.gz: 641dabca21ac092725565aa355602127ec5a3ada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a674bf19dfd0b1bcf1ba41fc0e0334ddda23caf5584d34127668e888776358dcc9d600c3cc1b475fa9992047ef6b228218acead51c196080995b6e4fcb67cc8b
|
7
|
+
data.tar.gz: 76707e3867da3284168c040a8985d476b2760f1a410f24fbc6de0c31d008c668d1d3c3e385f8f75de68404e59741c3b535a2bb1ae98db41ecc595925efffdd2e
|
data/lib/tomograph/tomogram.rb
CHANGED
@@ -4,12 +4,15 @@ module Tomograph
|
|
4
4
|
class Tomogram < String
|
5
5
|
class << self
|
6
6
|
def json
|
7
|
-
|
7
|
+
single_sharps = find_resource
|
8
8
|
|
9
|
-
result =
|
10
|
-
|
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
|
-
|
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'].
|
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
|
data/lib/tomograph/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|