apiaryio 0.5.1 → 0.5.2

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: d21233e15d94d35249adb071f7151775748dc14a
4
- data.tar.gz: fb98acaed6c946211117b350f9e1bab39ca5e7b7
3
+ metadata.gz: 873f63f23317c10660a702e11bc1c489f8708d2a
4
+ data.tar.gz: 120fd21dde799a164288915e51ccabb95cc98b78
5
5
  SHA512:
6
- metadata.gz: f4689774c382446f4c0e69b6e330880b05d7897378d889fb4b810c5aca982b7bfe4c1d26727bf165323967a544c54c195d221c5b62ccd97f0d43a7106af3bacb
7
- data.tar.gz: ac7073c9354837367632c29cab95b8325364e1855c9ef400f861c7d87268f02defe6b91fb03bfeb2f50899f4eac9ae526b08b2f786219eef9ff8c2710673b024
6
+ metadata.gz: f6211eed03bb1e8cae4a0d0b50e244073e20a9a08d7008688356788cc2d2eb4c6e6bbe0c0e5955386b7bee804293c46429436131816f7bbbd94d94f4f1d593a1
7
+ data.tar.gz: 8ce67899902657078debff5e25f0f4de0ddd18cc23a0edf1b1cb0286a9ba8a37080ad7e666e32298c061d9238a3598a225d2c18708630ca8d4ddf32a16c97c2c
@@ -7,8 +7,10 @@ Lint/UnusedBlockArgument:
7
7
  - 'lib/apiary/command/preview.rb'
8
8
 
9
9
  Metrics/AbcSize:
10
- Max: 25
10
+ Max: 30
11
11
 
12
+ Metrics/PerceivedComplexity:
13
+ Max: 10
12
14
 
13
15
  Metrics/LineLength:
14
16
  Max: 180
data/README.md CHANGED
@@ -112,6 +112,8 @@ Options:
112
112
  [--message=COMMIT_MESSAGE] # Publish with custom commit message
113
113
  [--path=PATH] # Specify path to API Description Document. When given a directory, it will look for apiary.apib or swagger.yaml file
114
114
  [--api-host=HOST] # Specify apiary host
115
+ [--push], [--no-push] # Push API Description to the GitHub when API Project is associated with GitHub repository in Apiary
116
+ # Default: true
115
117
  --api-name=API_NAME
116
118
 
117
119
  Publish API Description Document on docs.API_NAME.apiary.io (API Description must exist on apiary.io)
@@ -34,6 +34,7 @@ module Apiary
34
34
  method_option :message, type: :string, banner: 'COMMIT_MESSAGE', desc: 'Publish with custom commit message'
35
35
  method_option :path, type: :string, desc: 'Specify path to API Description Document. When given a directory, it will look for apiary.apib or swagger.yaml file'
36
36
  method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host'
37
+ method_option :push, type: :boolean, default: true, desc: 'Push API Description to the GitHub when API Project is associated with GitHub repository in Apiary'
37
38
  method_option :api_name, type: :string, required: true
38
39
 
39
40
  def publish
@@ -57,9 +57,11 @@ module Apiary::Command
57
57
  source = api_description_source(@source_path)
58
58
 
59
59
  return if source.nil?
60
+
60
61
  data = {
61
62
  code: source,
62
- messageToSave: @options.message
63
+ messageToSave: @options.message,
64
+ shouldCommit: @options.push ? 'yes' : 'no'
63
65
  }
64
66
 
65
67
  RestClient.proxy = @options.proxy
@@ -1,3 +1,3 @@
1
1
  module Apiary
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiaryio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apiary Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-21 00:00:00.000000000 Z
11
+ date: 2016-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client