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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 937a82ea94c38bdfbb1a92a6710936c7d525e228
4
- data.tar.gz: 33cf0b7e2a4643acf32175e22c9ade017e3db49d
3
+ metadata.gz: 6c4366a0176b71d1c6b51227c8e26f1828c5fb26
4
+ data.tar.gz: 5cf804f81867664329fdc601e3adfd98166cfe7b
5
5
  SHA512:
6
- metadata.gz: a88be0b668cce03d6c6b2a13fca948bc620cd92c21936de32189db078f1872fe67b1a63c7a3e93da3352d9eeee755583f2406aac92691e268676dff65b6ac050
7
- data.tar.gz: 9d07f3e96dfd6ba0c7075682c048719072c2cb6c3df22754703de42371f3bc5c6bed63af18c069076f0d80ca47f82dc3221db3d8e4c45064ec0607d4e5954a4d
6
+ metadata.gz: 7bdcd5d49e4c51da0ea79c5b007eeb59dd02f19f72ef027471d807b9ef542c0bfc5bb7f8346b4176e8161f0a1bf93936d553356d6a4b06e3118ba2bc5a1c13d2
7
+ data.tar.gz: a43ea3338ce88798374d835a98ebd5084055f07cbab91dd3f49bbc4f893d0595031d1efb3cf4cd1f3f238dbdb2dc8dd7239760e99695532f7f3e38f197eed7ab
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.10
1
+ 2.2.0
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.2.0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change log
2
2
 
3
- ### 2.5.0 - 2018-05-28
3
+ ### 2.5.1 - 2019-12-09
4
+
5
+ * bug fixes
6
+ * fix content_type parsing.
7
+
8
+ ### 2.5.0 - 2019-05-28
4
9
 
5
10
  * features
6
11
  * аdded support for documents with pre-parsed by drafter 4.
data/README.md CHANGED
@@ -8,7 +8,9 @@ Convert API Blueprint to JSON Schema and search.
8
8
 
9
9
  ## Installation
10
10
 
11
- Add this line to your application's Gemfile:
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
- @content_type ||= @content.first['attributes'].has_key?('headers') ?
22
- @content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
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
- @content_type ||= @content.first['attributes'].has_key?('headers') ?
22
- @content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
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
- @content_type ||= @content.first['attributes'].has_key?('headers') ?
22
- @content.first['attributes']['headers']['content'][0]['content']['value']['content'] : nil
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
@@ -1,3 +1,3 @@
1
1
  module Tomograph
2
- VERSION = '2.5.0'.freeze
2
+ VERSION = '2.5.1'.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: 2.5.0
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-05-29 00:00:00.000000000 Z
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.5
217
+ rubygems_version: 2.4.5
217
218
  signing_key:
218
219
  specification_version: 4
219
220
  summary: Convert API Blueprint to Tomogram