rspec_api_documentation-open_api 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 8c7c05a5783d583a175dce72a50e2b20ee2bc267f0061607d1d27138c7796240
4
- data.tar.gz: 2cdf8135cdb8db72ced74d6ca6d07a7feec63cf5d2ed6b338f6fd0a823d496ff
3
+ metadata.gz: '08c1be1065742c4ce2f1d1d8e26f225cd8dcd664a8433a81a1da5392dd4ae74c'
4
+ data.tar.gz: 64a2fb1e193248d5d5eeaa777d528fb3a800afd7fd047d4f7d1a71f878614d12
5
5
  SHA512:
6
- metadata.gz: c7eb930e06a697d4e9de7ca97edbc0a632782c76bfe562a80693f82c4ce77f0bf16ebe7ac61465e9190578c79139fa755509043b5d4999d9d9e4f290f446e87a
7
- data.tar.gz: 38d23559d1035da50fd4ea9c9c3c75d3eff2d1044cb0ec0c4e6506a9e8d373d4e9678a2da4e71a8fa4793cc4c6e068121a1173fe667a592eed0079f2db2ac5c1
6
+ metadata.gz: d1c9995f8be046c821e2c8782ca1502473b023a1536783440558e33b42c10b3b0f25ba95c6ec585288cf1c21ea229cd473de6887a4dc1b92d8ebd0ef565b1e72
7
+ data.tar.gz: 16abf0d6889783983dfbb3661dab7cb5fe9cc218bcf222de68ccbf59c6f80ce26397a683acaf065531865cdfcb766f35dc942e166f740367ad659415f3c87488
data/.gitignore CHANGED
@@ -6,4 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- .rubocop-https*
9
+ .rubocop-https*
10
+ *.gem
@@ -1,5 +1,5 @@
1
1
  module RspecApiDocumentation
2
2
  module OpenApi
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -8,6 +8,8 @@ module RspecApiDocumentation
8
8
  class OpenApiWriter < Writer
9
9
  attr_writer :types, :swagger
10
10
 
11
+ RspecApiDocumentation::Configuration.add_setting :open_api, default: {}
12
+
11
13
  def write
12
14
  File.open(configuration.docs_dir.join("open_api.json"), "w") do |f|
13
15
  f.write JSON.pretty_generate(get_hash)
@@ -241,7 +243,7 @@ module RspecApiDocumentation
241
243
  end
242
244
 
243
245
  def info
244
- RspecApiDocumentation.configuration.open_api&["host"] || {
246
+ RspecApiDocumentation.configuration.open_api["host"] || {
245
247
  "version" => "1.0.0",
246
248
  "title" => "Open API",
247
249
  "description" => "Open API",
@@ -252,7 +254,7 @@ module RspecApiDocumentation
252
254
  end
253
255
 
254
256
  def servers
255
- RspecApiDocumentation.configuration.open_api&["server"] || [
257
+ RspecApiDocumentation.configuration.open_api["server"] || [
256
258
  {
257
259
  "url" => "http://localhost:{port}",
258
260
  "description" => "Development server",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_api_documentation-open_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaditya Taparia