apiaryio 0.14.1 → 0.15.0
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 +4 -4
- data/.circleci/config.yml +5 -0
- data/.github/workflows/test.yml +1 -1
- data/.gitignore +3 -1
- data/CHANGELOG.md +6 -2
- data/README.md +16 -11
- data/apiary.gemspec +3 -3
- data/features/publish.feature +2 -2
- data/features/styleguide.feature +1 -1
- data/lib/apiary/cli.rb +2 -2
- data/lib/apiary/command/fetch.rb +1 -1
- data/lib/apiary/command/publish.rb +1 -1
- data/lib/apiary/version.rb +1 -1
- data/spec/apiary/command/fetch_spec.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d82d5213c6cf1b9ec2f14c30c6668d0477de794338df8387087805bbe1fa966
|
|
4
|
+
data.tar.gz: f3302452ee5dea3f53b70cfba39d94aab3eb99ae2c554c7e822ec7f6351e6e8c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad32626008932bf5e4b756d226e2cb393960de6972a41b320fa587374d54859091886732a0dfddb5d1b55a82c50b5c139d8f54b53a124c17fc298aaf888afc19
|
|
7
|
+
data.tar.gz: 995a9747c582fba4207bbd18b48319d9fc12a25973fc55b39daadbc04be364b1f893b40e496013ed4d4ab4328e870dc5924b7cb9f4b85a1d643956207c9f0c37
|
data/.circleci/config.yml
CHANGED
|
@@ -7,6 +7,7 @@ workflows:
|
|
|
7
7
|
- test-2.5
|
|
8
8
|
- test-2.6
|
|
9
9
|
- test-2.7
|
|
10
|
+
- test-3.0
|
|
10
11
|
jobs:
|
|
11
12
|
test-2.4: &test-template
|
|
12
13
|
docker:
|
|
@@ -45,3 +46,7 @@ jobs:
|
|
|
45
46
|
<<: *test-template
|
|
46
47
|
docker:
|
|
47
48
|
- image: circleci/ruby:2.7-browsers
|
|
49
|
+
test-3.0:
|
|
50
|
+
<<: *test-template
|
|
51
|
+
docker:
|
|
52
|
+
- image: circleci/ruby:3.0-browsers
|
data/.github/workflows/test.yml
CHANGED
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.15.0
|
|
4
|
+
* fix: change domain from docs.<subdomain>.apiary.io to <subdomain>.docs.apiary.io
|
|
5
|
+
* fix(security): [CVE-2020-10663](https://www.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663/) and [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184)
|
|
6
|
+
## 0.14.1
|
|
7
|
+
* fix: [update rack to 2.1.4](https://github.com/advisories/GHSA-j6w9-fv6q-3q52)
|
|
4
8
|
|
|
5
9
|
## 0.14.0
|
|
6
10
|
|
data/README.md
CHANGED
|
@@ -8,12 +8,12 @@ Apiary CLI Client
|
|
|
8
8
|
## Description
|
|
9
9
|
|
|
10
10
|
The Apiary CLI Client gem is a command line tool for developing and previewing
|
|
11
|
-
[API Blueprint](
|
|
11
|
+
[API Blueprint](https://apiblueprint.org) documents locally. It can also be
|
|
12
12
|
used for pushing updated documents to and fetching existing documents from
|
|
13
|
-
[Apiary](
|
|
13
|
+
[Apiary](https://apiary.io).
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
Please see the `apiary help` command and the [full documentation](
|
|
16
|
+
Please see the `apiary help` command and the [full documentation](https://client.apiary.io) for an in-depth look in how to use this tool.
|
|
17
17
|
|
|
18
18
|
For instructions on making your own changes, see [Hacking Apiary CLI Client](#hacking-apiary-cli-client), below.
|
|
19
19
|
|
|
@@ -45,7 +45,7 @@ docker build -t "apiaryio/client" .
|
|
|
45
45
|
*Required only for publish and fetch commands.*
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
1. Make sure you are a registered user of [Apiary](
|
|
48
|
+
1. Make sure you are a registered user of [Apiary](https://apiary.io).
|
|
49
49
|
2. Retrieve API key (token) on [this page](https://login.apiary.io/tokens).
|
|
50
50
|
3. Export it as an environment variable:
|
|
51
51
|
|
|
@@ -57,10 +57,10 @@ export APIARY_API_KEY=<your_token>
|
|
|
57
57
|
```
|
|
58
58
|
$ apiary help
|
|
59
59
|
Commands:
|
|
60
|
-
apiary fetch --api-name=API_NAME # Fetch API Description Document from API_NAME.apiary.io
|
|
60
|
+
apiary fetch --api-name=API_NAME # Fetch API Description Document from API_NAME.docs.apiary.io
|
|
61
61
|
apiary help [COMMAND] # Describe available commands or one specific command
|
|
62
62
|
apiary preview # Show API documentation in browser or write it to file
|
|
63
|
-
apiary publish --api-name=API_NAME # Publish API Description Document on docs.
|
|
63
|
+
apiary publish --api-name=API_NAME # Publish API Description Document on API_NAME.docs.apiary.io (API Description must exist on apiary.io)
|
|
64
64
|
apiary styleguide # Check API Description Document against styleguide rules (Apiary.io pro plan is required - https://apiary.io/plans )
|
|
65
65
|
apiary version # Show version
|
|
66
66
|
|
|
@@ -79,7 +79,7 @@ Options:
|
|
|
79
79
|
--api-name=API_NAME
|
|
80
80
|
[--output=FILE] # Write API Description Document into specified file
|
|
81
81
|
|
|
82
|
-
Fetch API Description Document from API_NAME.apiary.io
|
|
82
|
+
Fetch API Description Document from API_NAME.docs.apiary.io
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
#### preview
|
|
@@ -117,7 +117,7 @@ Options:
|
|
|
117
117
|
# Default: true
|
|
118
118
|
--api-name=API_NAME
|
|
119
119
|
|
|
120
|
-
Publish API Description Document on docs.
|
|
120
|
+
Publish API Description Document on API_NAME.docs.apiary.io (API Description must exist on apiary.io)
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
#### styleguide
|
|
@@ -192,9 +192,14 @@ Use `bundle install` to install your changes locally, for manual and ad-hock tes
|
|
|
192
192
|
|
|
193
193
|
Only gem owners `gem owner apiaryio` can publish new gem into [RubyGems](https://rubygems.org/gems/apiaryio).
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
1. bump version in `lib/apiary/version.rb`
|
|
196
|
+
2. update `CHANGELOG.md`
|
|
197
|
+
3. prepare Github Release with text in `CHANGELOG`
|
|
198
|
+
4. make gem release:
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
$ rake release
|
|
202
|
+
```
|
|
198
203
|
|
|
199
204
|
|
|
200
205
|
## License
|
data/apiary.gemspec
CHANGED
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
|
14
14
|
|
|
15
15
|
gem.description = 'Apiary.io CLI'
|
|
16
16
|
gem.summary = 'Apiary.io CLI'
|
|
17
|
-
gem.homepage = '
|
|
17
|
+
gem.homepage = 'https://apiary.io'
|
|
18
18
|
gem.license = 'MIT'
|
|
19
19
|
|
|
20
20
|
gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
|
@@ -24,9 +24,9 @@ Gem::Specification.new do |gem|
|
|
|
24
24
|
gem.require_paths = ['lib']
|
|
25
25
|
|
|
26
26
|
gem.add_runtime_dependency 'rest-client', '~> 2.0'
|
|
27
|
-
gem.add_runtime_dependency 'rack', '>= 2.
|
|
27
|
+
gem.add_runtime_dependency 'rack', '>= 2.2.3'
|
|
28
28
|
gem.add_runtime_dependency 'thor', '~> 0.20.3'
|
|
29
|
-
gem.add_runtime_dependency 'json', '
|
|
29
|
+
gem.add_runtime_dependency 'json', '>= 2.3.0'
|
|
30
30
|
gem.add_runtime_dependency 'launchy', '~> 2.4'
|
|
31
31
|
gem.add_runtime_dependency 'listen', '~> 3.0'
|
|
32
32
|
|
data/features/publish.feature
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Feature: Publish apiary.apib on docs.
|
|
1
|
+
Feature: Publish apiary.apib on API_NAME.docs.apiary.io
|
|
2
2
|
|
|
3
3
|
# This is integration testing you have to set APIARY_API_KEY
|
|
4
4
|
@needs_apiary_api_key
|
|
5
|
-
Scenario: Publish apiary.apib on docs.
|
|
5
|
+
Scenario: Publish apiary.apib on API_NAME.docs.apiary.io
|
|
6
6
|
|
|
7
7
|
# expected to fail
|
|
8
8
|
When I run `apiary publish --path=apiary.apib --api-name 1111apiaryclienttest`
|
data/features/styleguide.feature
CHANGED
data/lib/apiary/cli.rb
CHANGED
|
@@ -8,7 +8,7 @@ require 'apiary/command/styleguide'
|
|
|
8
8
|
|
|
9
9
|
module Apiary
|
|
10
10
|
class CLI < Thor
|
|
11
|
-
desc 'fetch', 'Fetch API Description Document from API_NAME.apiary.io'
|
|
11
|
+
desc 'fetch', 'Fetch API Description Document from API_NAME.docs.apiary.io'
|
|
12
12
|
method_option :api_name, type: :string, required: true
|
|
13
13
|
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host', hide: true
|
|
14
14
|
method_option :output, type: :string, banner: 'FILE', desc: 'Write API Description Document into specified file'
|
|
@@ -34,7 +34,7 @@ module Apiary
|
|
|
34
34
|
cmd.execute
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
desc 'publish', 'Publish API Description Document on docs.
|
|
37
|
+
desc 'publish', 'Publish API Description Document on API_NAME.docs.apiary.io (API Description must exist on apiary.io)'
|
|
38
38
|
method_option :message, type: :string, banner: 'COMMIT_MESSAGE', desc: 'Publish with custom commit message'
|
|
39
39
|
method_option :path, type: :string, desc: 'Specify path to API Description Document. When given a directory, it will look for `apiary.apib` and `swagger.yaml` file'
|
|
40
40
|
method_option :json, type: :boolean, desc: 'Specify that Swagger API Description Document is in json format. Document will be converted to yaml before processing'
|
data/lib/apiary/command/fetch.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Apiary::Command
|
|
|
32
32
|
|
|
33
33
|
def fetch_from_apiary
|
|
34
34
|
unless @options.api_name
|
|
35
|
-
abort 'Please provide an api-name option (subdomain part from your
|
|
35
|
+
abort 'Please provide an api-name option (subdomain part from your https://<api-name>.docs.apiary.io/)'
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
unless @options.api_key
|
|
@@ -42,7 +42,7 @@ module Apiary::Command
|
|
|
42
42
|
|
|
43
43
|
def publish_on_apiary
|
|
44
44
|
unless @options.api_name
|
|
45
|
-
abort 'Please provide an api-name option (subdomain part from your
|
|
45
|
+
abort 'Please provide an api-name option (subdomain part from your https://<api-name>.docs.apiary.io/)'
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
unless @options.api_key
|
data/lib/apiary/version.rb
CHANGED
|
@@ -4,7 +4,7 @@ describe Apiary::Command::Fetch do
|
|
|
4
4
|
it 'pass command without params' do
|
|
5
5
|
opts = {}
|
|
6
6
|
command = Apiary::Command::Fetch.new(opts)
|
|
7
|
-
expect { command.fetch_from_apiary }.to raise_error('Please provide an api-name option (subdomain part from your
|
|
7
|
+
expect { command.fetch_from_apiary }.to raise_error('Please provide an api-name option (subdomain part from your https://<api-name>.docs.apiary.io/)')
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
it 'pass command only with api_name', api_key: true do
|
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.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Apiary Ltd.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 2.
|
|
33
|
+
version: 2.2.3
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 2.
|
|
40
|
+
version: 2.2.3
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: thor
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -56,16 +56,16 @@ dependencies:
|
|
|
56
56
|
name: json
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 2.3.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: 2.3.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: launchy
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -256,7 +256,7 @@ files:
|
|
|
256
256
|
- spec/spec_helper.rb
|
|
257
257
|
- spec/support/aruba.rb
|
|
258
258
|
- spec/support/webmock.rb
|
|
259
|
-
homepage:
|
|
259
|
+
homepage: https://apiary.io
|
|
260
260
|
licenses:
|
|
261
261
|
- MIT
|
|
262
262
|
metadata: {}
|