tomograph 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/CHANGELOG.md +6 -1
- data/README.md +9 -3
- data/lib/tomograph/api_blueprint/crafter/yaml/action.rb +4 -2
- data/lib/tomograph/api_blueprint/drafter_3/yaml/action.rb +4 -2
- data/lib/tomograph/api_blueprint/drafter_4/yaml/action.rb +4 -2
- data/lib/tomograph/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c4366a0176b71d1c6b51227c8e26f1828c5fb26
|
|
4
|
+
data.tar.gz: 5cf804f81867664329fdc601e3adfd98166cfe7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7bdcd5d49e4c51da0ea79c5b007eeb59dd02f19f72ef027471d807b9ef542c0bfc5bb7f8346b4176e8161f0a1bf93936d553356d6a4b06e3118ba2bc5a1c13d2
|
|
7
|
+
data.tar.gz: a43ea3338ce88798374d835a98ebd5084055f07cbab91dd3f49bbc4f893d0595031d1efb3cf4cd1f3f238dbdb2dc8dd7239760e99695532f7f3e38f197eed7ab
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.2.
|
|
1
|
+
2.2.0
|
data/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby 2.2.0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -8,7 +8,9 @@ Convert API Blueprint to JSON Schema and search.
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
First you need to install [drafter](https://github.com/apiaryio/drafter).
|
|
12
|
+
|
|
13
|
+
Second add this line to your application's Gemfile:
|
|
12
14
|
|
|
13
15
|
```ruby
|
|
14
16
|
gem 'tomograph'
|
|
@@ -38,7 +40,7 @@ The command line tool allows you to convert files from API Blueprint or API Elem
|
|
|
38
40
|
```
|
|
39
41
|
tomograph doc.apib doc.json
|
|
40
42
|
```
|
|
41
|
-
Now there is support for documents pre-parsed by [drafter](https://github.com/apiaryio/drafter) versions 3 and 4. To select the handler version, use the -d key and specify the required version. For example:
|
|
43
|
+
Now there is support for documents pre-parsed by [drafter](https://github.com/apiaryio/drafter) versions 3 and 4, or crafter. To select the handler version, use the -d key and specify the required version. For example:
|
|
42
44
|
```
|
|
43
45
|
tomograph -d 4 doc_by_drafter4.yaml doc.json
|
|
44
46
|
```
|
|
@@ -234,7 +236,11 @@ Path to API Blueprint documentation pre-parsed with `drafter` and saved to a YAM
|
|
|
234
236
|
|
|
235
237
|
Drafter v.4
|
|
236
238
|
|
|
237
|
-
If you are using a `drafter v.4`, then you need to use the following parameters`drafter_4_apib_path` and `drafter_4_yaml_path` respectively.
|
|
239
|
+
If you are using a `drafter v.4`, then you need to use the following parameters`drafter_4_apib_path` and `drafter_4_yaml_path` respectively.
|
|
240
|
+
|
|
241
|
+
Crafter
|
|
242
|
+
|
|
243
|
+
In case when you want to use `сrafter`, then you need to specify these parameters `crafter_apib_path`, `crafter_yaml_path`.
|
|
238
244
|
|
|
239
245
|
### tomogram_json_path
|
|
240
246
|
|
|
@@ -18,8 +18,10 @@ module Tomograph
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def content_type
|
|
21
|
-
|
|
22
|
-
@content.first['attributes']['headers']['content'][0]['content']['
|
|
21
|
+
if @content.first['attributes'].has_key?('headers')
|
|
22
|
+
@content.first['attributes']['headers']['content'][0]['content']['key']['content'] == 'Content-Type' ?
|
|
23
|
+
@content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
|
|
24
|
+
end
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
def request
|
|
@@ -18,8 +18,10 @@ module Tomograph
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def content_type
|
|
21
|
-
|
|
22
|
-
@content.first['attributes']['headers']['content'][0]['content']['
|
|
21
|
+
if @content.first['attributes'].has_key?('headers')
|
|
22
|
+
@content.first['attributes']['headers']['content'][0]['content']['key']['content'] == 'Content-Type' ?
|
|
23
|
+
@content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
|
|
24
|
+
end
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
def request
|
|
@@ -18,8 +18,10 @@ module Tomograph
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def content_type
|
|
21
|
-
|
|
22
|
-
@content.first['attributes']['headers']['content'][0]['content']['
|
|
21
|
+
if @content.first['attributes'].has_key?('headers')
|
|
22
|
+
@content.first['attributes']['headers']['content'][0]['content']['key']['content'] == 'Content-Type' ?
|
|
23
|
+
@content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
|
|
24
|
+
end
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
def request
|
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: 2.5.
|
|
4
|
+
version: 2.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- d.efimov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: methadone
|
|
@@ -169,6 +169,7 @@ files:
|
|
|
169
169
|
- ".gitignore"
|
|
170
170
|
- ".rubocop.yml"
|
|
171
171
|
- ".ruby-version"
|
|
172
|
+
- ".tool-versions"
|
|
172
173
|
- ".travis.yml"
|
|
173
174
|
- CHANGELOG.md
|
|
174
175
|
- CODE_OF_CONDUCT.md
|
|
@@ -213,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
213
214
|
version: '0'
|
|
214
215
|
requirements: []
|
|
215
216
|
rubyforge_project:
|
|
216
|
-
rubygems_version: 2.4.5
|
|
217
|
+
rubygems_version: 2.4.5
|
|
217
218
|
signing_key:
|
|
218
219
|
specification_version: 4
|
|
219
220
|
summary: Convert API Blueprint to Tomogram
|