bump-cli 0.4.0 → 0.4.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: 00a05336bed7f3a4f81e5b59a102950d067acb25cfe6d4bbdb057c0bf83f2265
4
- data.tar.gz: 2f08c89b6ec3fbad5a85e1325309cf85da94cd7ded892ae06615c440c4623df5
3
+ metadata.gz: 037f50e1dc85f791e29b7d04610c536d5c5de55465129218036508f7dc9b4f23
4
+ data.tar.gz: a88fcc165c82445b31447194f4156479793294519327b7a37e0f253a532043d3
5
5
  SHA512:
6
- metadata.gz: c4686dc55a271061d849af7a4aa778c7e6f4a93a3c7bfd38667f0f72dab7dc137e050aa73fe3ba1062c838193accc0613bbc5452ab55e949bf85a99aa8258b60
7
- data.tar.gz: 34c42d4756f1dc1199af1a16d706298f07f8dc01723988322f58131d4312b8ffd624b25464152e294a999f870f9bea7499aa19f494b72f957fde9c098f41f857
6
+ metadata.gz: 62985d280a33db74d42a6afafde570231aca07a18fbae7a492756352f9315ea38b7fc7fa97b188d0dd2823d65a82e6cc8b639449b1064746f831d7c3de1a5e2f
7
+ data.tar.gz: 6179fc9f2b65c33c4416f869a1c7c1e41b825d81a1e77533bb3d84e6a319f870c79ffbd45b5ac53b4d4a9f54fd23d841959fd40f83cac77457124dd82defa438
@@ -14,10 +14,11 @@ module Bump
14
14
  .post(url, body: body)
15
15
  end
16
16
 
17
- def body(file, specification)
17
+ def body(file, specification, validation)
18
18
  {
19
19
  definition: open(file).read,
20
- specification: specification
20
+ specification: specification,
21
+ validation: validation
21
22
  }
22
23
  end
23
24
 
@@ -9,12 +9,13 @@ module Bump
9
9
  option :id, default: ENV.fetch("BUMP_ID", ""), desc: "Documentation public id"
10
10
  option :token, default: ENV.fetch("BUMP_TOKEN", ""), desc: "Documentation private token"
11
11
  option :specification, desc: "Specification of the definition"
12
+ option :validation, desc: "Validation mode", values: %w(basic strict), default: 'basic'
12
13
 
13
- def call(file:, id:, token:, specification: nil)
14
+ def call(file:, id:, token:, validation:, specification: nil)
14
15
  with_errors_rescued do
15
16
  response = post(
16
17
  url: API_URL + "/docs/#{id}/versions",
17
- body: body(file, specification).to_json,
18
+ body: body(file, specification, validation).to_json,
18
19
  token: token
19
20
  )
20
21
 
@@ -5,12 +5,13 @@ module Bump
5
5
  desc "Create a documentation preview for the given file"
6
6
  argument :file, required: true, desc: "Path or URL to your API documentation file. OpenAPI (2.0 to 3.0.2) and AsyncAPI (2.0) specifications are currently supported."
7
7
  option :specification, desc: "Specification of the definition"
8
+ option :validation, desc: "Validation mode", values: %w(basic strict), default: 'basic'
8
9
 
9
- def call(file:, specification: nil)
10
+ def call(file:, validation:, specification: nil)
10
11
  with_errors_rescued do
11
12
  response = post(
12
13
  url: API_URL + "/previews",
13
- body: body(file, specification).to_json
14
+ body: body(file, specification, validation).to_json
14
15
  )
15
16
 
16
17
  if response.code == 201
@@ -9,12 +9,13 @@ module Bump
9
9
  option :id, default: ENV.fetch("BUMP_ID", ""), desc: "Documentation public id"
10
10
  option :token, default: ENV.fetch("BUMP_TOKEN", ""), desc: "Documentation private token"
11
11
  option :specification, desc: "Specification of the definition"
12
+ option :validation, desc: "Validation mode", values: %w(basic strict), default: 'basic'
12
13
 
13
- def call(file:, id:, token:, specification: nil)
14
+ def call(file:, id:, token:, validation:, specification: nil)
14
15
  with_errors_rescued do
15
16
  response = post(
16
17
  url: API_URL + "/docs/#{id}/validations",
17
- body: body(file, specification).to_json,
18
+ body: body(file, specification, validation).to_json,
18
19
  token: token
19
20
  )
20
21
 
@@ -1,5 +1,5 @@
1
1
  module Bump
2
2
  class CLI
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bump-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehdi Lahmam
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-10-31 00:00:00.000000000 Z
12
+ date: 2020-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hanami-cli