swagger_docs_generator 0.3.1 → 0.3.2.pre.21

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: d60488ac43d23670505afb661e0f470745cb447c
4
- data.tar.gz: adcfecd7d711573edc7ef29bec514b4e5838ae5c
3
+ metadata.gz: a222e34482aa3f9449327f26b6425252e8d99064
4
+ data.tar.gz: b37172edc0e46cc2477f54ee4db82dd501d9e350
5
5
  SHA512:
6
- metadata.gz: bb416f8c7fbc37500ea09684baaa0c8c6619d4477d51db701a5aa1e2433da1f03a1bc3971695b506b695339815d4bfd2cfc251ddbd91ae49b548441cf9878d98
7
- data.tar.gz: 1ef4b535c89d629270cf2ba20fff3fac3df29f9ad21fe15462506148e2a0fbf6bd95f24697ff6b5a8720464132c5f6911a933c77b0cabd98790af145023e978f
6
+ metadata.gz: 27565bd443fda794c010c80867ffa21ad7bbbe2babbf690c5df3dc4796bac5320820f5bbdc6230f0a3b98dbf4f836b2b2f5e109c89cd8644b384df880dc76aaa
7
+ data.tar.gz: 2d6e65e4ee16c5177f85328f5aa626d60cdec21363958bc6fb1da8c24d39e318113b258aa15c35a71dfc5b31071fa66bcacd7339be47ffa7fb727516b189328a
@@ -5,7 +5,7 @@ module SwaggerDocsGenerator
5
5
  # Name to gem
6
6
  GEM = 'swagger_docs_generator'
7
7
  # Version to gem
8
- VERSION = '0.3.1'
8
+ VERSION = '0.3.2'
9
9
  # Authors contributed to gem
10
10
  AUTHORS = ['VAILLANT Jeremy'].freeze
11
11
  # Email to ahuthors
@@ -22,6 +22,7 @@ module SwaggerDocsGenerator
22
22
  end
23
23
 
24
24
  def adding_path
25
+ create_file unless File.exist?(temporary_file)
25
26
  json = JSON.parse(File.read(temporary_file))
26
27
  File.open(temporary_file, 'w') do |file|
27
28
  path_exist(json, construct_routes)
@@ -30,6 +30,11 @@ module SwaggerDocsGenerator
30
30
  def tmp_json
31
31
  "#{@tag_name}.json"
32
32
  end
33
+
34
+ def create_file
35
+ base_file = { paths: {}, tags: {}, definitions: {} }
36
+ File.open(temporary_file, 'a+') { |file| file.puts(base_file.to_json) }
37
+ end
33
38
  end
34
39
  end
35
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger_docs_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2.pre.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
@@ -324,12 +324,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
324
324
  version: '0'
325
325
  required_rubygems_version: !ruby/object:Gem::Requirement
326
326
  requirements:
327
- - - ">="
327
+ - - ">"
328
328
  - !ruby/object:Gem::Version
329
- version: '0'
329
+ version: 1.3.1
330
330
  requirements: []
331
331
  rubyforge_project:
332
- rubygems_version: 2.5.1
332
+ rubygems_version: 2.4.5
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: Swagger UI json file