swagger_docs_generator 0.3.4.pre.23 → 0.3.4.pre.26

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: 9f4348afead82d0b3416fb5d619edffe13244ab9
4
- data.tar.gz: 0777a1424f94be5989d255905a1f407de5d37afb
3
+ metadata.gz: 16439b96e401513da7c1b24f226900cc54f556f9
4
+ data.tar.gz: fe2b1a45da4edcfab260a90ed839cb09e242f6fb
5
5
  SHA512:
6
- metadata.gz: a71b2a07ea05e5564b5ccf4d685960a37132692e5a728da56ad080e06bfe52c2687e8905f249dcef0b141ce3bc7215e3b734f9550b2e5c5a004149bd7d5980ce
7
- data.tar.gz: 5fb002fafe33b3b32bebb6a2162d86706eefc9044fd1aaf109414912f0b9a408fd63fd8b848974be1852b1466daf96488a5df1bf1bde7c40466618098a74bec4
6
+ metadata.gz: a80ac277a707e95d491d80b46343727c04ba82f56065aaf453eba64e750c30d4e655a9a9b4fe6c15b40bf224126d4dd590a0dbf7706126cf248969535f1e3dab
7
+ data.tar.gz: c785fe4001142af3f2dae4aa479a1ace7c975a728d171df32712afe35c26cbcd69acc32052d395fab4cf61f3ea1058ca39961257132addf94df087724559e241
@@ -18,7 +18,7 @@ module SwaggerDocsGenerator
18
18
  # @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
19
19
  class Configuration
20
20
  # Accessors with default value
21
- attr_accessor :swagger, :cleanning, :base_path
21
+ attr_accessor :swagger, :cleanning, :base_path, :compress
22
22
 
23
23
  # Accessors without default value
24
24
  attr_accessor :schemes, :consumes, :produces, :host, :external_docs,
@@ -29,6 +29,7 @@ module SwaggerDocsGenerator
29
29
  @swagger = '2.0'
30
30
  @base_path = '/'
31
31
  @cleanning = true
32
+ @compress = false
32
33
  end
33
34
  end
34
35
 
@@ -26,8 +26,11 @@ module SwaggerDocsGenerator
26
26
  def generate_swagger_file
27
27
  delete_file_before
28
28
  File.open(@swagger_file, 'a+') do |file|
29
- # file.puts write_in_swagger_file.to_json
30
- file.puts JSON.pretty_generate write_in_swagger_file
29
+ file.puts = if SwaggerDocsGenerator.configure.compress
30
+ write_in_swagger_file.to_json
31
+ else
32
+ JSON.pretty_generate write_in_swagger_file
33
+ end
31
34
  end
32
35
  end
33
36
 
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.4.pre.23
4
+ version: 0.3.4.pre.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy