apiaryio 0.11.0 → 0.14.1
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 +5 -5
- data/.circleci/config.yml +47 -0
- data/.github/workflows/release.yml +24 -0
- data/.github/workflows/test.yml +29 -0
- data/.gitignore +7 -0
- data/CHANGELOG.md +8 -0
- data/Dockerfile +1 -1
- data/README.md +0 -3
- data/apiary.gemspec +7 -7
- data/lib/apiary/cli.rb +3 -3
- data/lib/apiary/command/publish.rb +1 -4
- data/lib/apiary/command/styleguide.rb +1 -1
- data/lib/apiary/version.rb +1 -1
- metadata +27 -27
- data/.travis.yml +0 -19
- data/appveyor.yml +0 -32
- data/circle.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ecb88a84bcbd64fc778b76064828f9ee365b0e7037a5d354807821999aba8301
|
4
|
+
data.tar.gz: a4dd2fa6c417a193a6966f6fe9c25cb3c8af44312243b537947b0d97b7a3a619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f4fc4b653ca1ab334fd6713ecb1cb4c5cd5da2afef220d1d753419efe2782012146ec4ceac3df8251fefc10af88a323e9e6fe9c9ecb7dd1c86e57a95840898b
|
7
|
+
data.tar.gz: 94d0ea2e1d38dfeb4b0b46e348a2912149b8071613f94f0273e95a183d5f1ca65b521fee013556e23e111f0d5ca18fd28aed460e6a0e6ff5904524b247316676
|
@@ -0,0 +1,47 @@
|
|
1
|
+
version: 2
|
2
|
+
workflows:
|
3
|
+
version: 2
|
4
|
+
test:
|
5
|
+
jobs:
|
6
|
+
- test-2.4
|
7
|
+
- test-2.5
|
8
|
+
- test-2.6
|
9
|
+
- test-2.7
|
10
|
+
jobs:
|
11
|
+
test-2.4: &test-template
|
12
|
+
docker:
|
13
|
+
- image: circleci/ruby:2.4-browsers
|
14
|
+
steps:
|
15
|
+
- checkout
|
16
|
+
- run:
|
17
|
+
name: Install bundler
|
18
|
+
command: |
|
19
|
+
gem install bundler
|
20
|
+
- run:
|
21
|
+
name: Install deps
|
22
|
+
command: |
|
23
|
+
bundle install
|
24
|
+
- run:
|
25
|
+
name: Run rubocop
|
26
|
+
command: |
|
27
|
+
bundle exec rubocop --config .rubocop_todo.yml
|
28
|
+
- run:
|
29
|
+
name: Run rspec
|
30
|
+
command: |
|
31
|
+
bundle exec rspec spec
|
32
|
+
- run:
|
33
|
+
name: Run cucumber
|
34
|
+
command: |
|
35
|
+
bundle exec cucumber
|
36
|
+
test-2.5:
|
37
|
+
<<: *test-template
|
38
|
+
docker:
|
39
|
+
- image: circleci/ruby:2.5-browsers
|
40
|
+
test-2.6:
|
41
|
+
<<: *test-template
|
42
|
+
docker:
|
43
|
+
- image: circleci/ruby:2.6-browsers
|
44
|
+
test-2.7:
|
45
|
+
<<: *test-template
|
46
|
+
docker:
|
47
|
+
- image: circleci/ruby:2.7-browsers
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: release
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
tags: [v*]
|
5
|
+
jobs:
|
6
|
+
docker:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- name: Checkout
|
10
|
+
uses: actions/checkout@v2
|
11
|
+
- name: Login to docker
|
12
|
+
uses: azure/docker-login@v1
|
13
|
+
with:
|
14
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
15
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
16
|
+
- name: Get the version
|
17
|
+
id: version
|
18
|
+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
|
19
|
+
- name: Docker Build and Release
|
20
|
+
run: |
|
21
|
+
docker build . -t apiaryio/client
|
22
|
+
docker tag apiaryio/client apiaryio/client:${{ steps.version.outputs.VERSION }}
|
23
|
+
docker push apiaryio/client
|
24
|
+
docker push apiaryio/client:${{ steps.version.outputs.VERSION }}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [master]
|
5
|
+
pull_request:
|
6
|
+
branches: [master]
|
7
|
+
types: [opened, reopened, synchronize]
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ${{ matrix.os }}
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
os: ["windows-latest", "ubuntu-latest"]
|
14
|
+
ruby: ["2.7.x", "2.6.x", "2.5.x", "2.4.x"]
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: actions/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Set up Bundler
|
22
|
+
run: gem install bundler --no-document
|
23
|
+
- name: Install dependencies
|
24
|
+
run: bundle install
|
25
|
+
- name: Run test
|
26
|
+
run: bundle exec rspec spec
|
27
|
+
- name: Run cucumber tests
|
28
|
+
if: matrix.os != 'windows-latest'
|
29
|
+
run: bundle exec cucumber
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/Dockerfile
CHANGED
data/README.md
CHANGED
@@ -77,7 +77,6 @@ Usage:
|
|
77
77
|
|
78
78
|
Options:
|
79
79
|
--api-name=API_NAME
|
80
|
-
[--api-host=HOST] # Specify apiary host
|
81
80
|
[--output=FILE] # Write API Description Document into specified file
|
82
81
|
|
83
82
|
Fetch API Description Document from API_NAME.apiary.io
|
@@ -95,7 +94,6 @@ Options:
|
|
95
94
|
[--output=FILE] # Write generated HTML into specified file
|
96
95
|
[--path=PATH] # Specify path to API Description Document. When given a directory, it will look for `apiary.apib` and `swagger.yaml` file
|
97
96
|
[--json], [--no-json] # Specify that Swagger API Description Document is in json format. Document will be converted to yaml before processing
|
98
|
-
[--api-host=HOST] # Specify apiary host
|
99
97
|
[--server], [--no-server] # Start standalone web server on port 8080
|
100
98
|
[--port=PORT] # Set port for --server option
|
101
99
|
[--host=HOST] # Set host for --server option
|
@@ -115,7 +113,6 @@ Options:
|
|
115
113
|
[--message=COMMIT_MESSAGE] # Publish with custom commit message
|
116
114
|
[--path=PATH] # Specify path to API Description Document. When given a directory, it will look for `apiary.apib` and `swagger.yaml` file
|
117
115
|
[--json], [--no-json] # Specify that Swagger API Description Document is in json format. Document will be converted to yaml before processing
|
118
|
-
[--api-host=HOST] # Specify apiary host
|
119
116
|
[--push], [--no-push] # Push API Description to the GitHub when API Project is associated with GitHub repository in Apiary
|
120
117
|
# Default: true
|
121
118
|
--api-name=API_NAME
|
data/apiary.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'apiary/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |gem|
|
8
|
-
gem.required_ruby_version = '>= 2.
|
8
|
+
gem.required_ruby_version = '>= 2.3.0'
|
9
9
|
|
10
10
|
gem.name = 'apiaryio'
|
11
11
|
gem.version = Apiary::VERSION
|
@@ -24,14 +24,14 @@ 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', '
|
28
|
-
gem.add_runtime_dependency 'thor', '~> 0.
|
29
|
-
gem.add_runtime_dependency 'json', '~> 1
|
27
|
+
gem.add_runtime_dependency 'rack', '>= 2.1.4'
|
28
|
+
gem.add_runtime_dependency 'thor', '~> 0.20.3'
|
29
|
+
gem.add_runtime_dependency 'json', '~> 2.1'
|
30
30
|
gem.add_runtime_dependency 'launchy', '~> 2.4'
|
31
|
-
gem.add_runtime_dependency 'listen', '~>
|
31
|
+
gem.add_runtime_dependency 'listen', '~> 3.0'
|
32
32
|
|
33
|
-
gem.add_development_dependency 'bundler', '~>
|
34
|
-
gem.add_development_dependency 'rake', '
|
33
|
+
gem.add_development_dependency 'bundler', '~> 2.0'
|
34
|
+
gem.add_development_dependency 'rake', '>= 12.3.3'
|
35
35
|
gem.add_development_dependency 'rspec', '~> 3.4'
|
36
36
|
gem.add_development_dependency 'webmock', '>= 2.2.0'
|
37
37
|
gem.add_development_dependency 'aruba', '~> 0.14'
|
data/lib/apiary/cli.rb
CHANGED
@@ -10,7 +10,7 @@ module Apiary
|
|
10
10
|
class CLI < Thor
|
11
11
|
desc 'fetch', 'Fetch API Description Document from API_NAME.apiary.io'
|
12
12
|
method_option :api_name, type: :string, required: true
|
13
|
-
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host'
|
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'
|
15
15
|
|
16
16
|
def fetch
|
@@ -23,7 +23,7 @@ module Apiary
|
|
23
23
|
method_option :output, type: :string, banner: 'FILE', desc: 'Write generated HTML into specified file'
|
24
24
|
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'
|
25
25
|
method_option :json, type: :boolean, desc: 'Specify that Swagger API Description Document is in json format. Document will be converted to yaml before processing'
|
26
|
-
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host'
|
26
|
+
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host', hide: true
|
27
27
|
method_option :server, type: :boolean, desc: 'Start standalone web server on port 8080'
|
28
28
|
method_option :port, type: :numeric, banner: 'PORT', desc: 'Set port for --server option'
|
29
29
|
method_option :host, type: :string, desc: 'Set host for --server option'
|
@@ -38,7 +38,7 @@ module Apiary
|
|
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'
|
41
|
-
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host'
|
41
|
+
method_option :api_host, type: :string, banner: 'HOST', desc: 'Specify apiary host', hide: true
|
42
42
|
method_option :push, type: :boolean, default: true, desc: 'Push API Description to the GitHub when API Project is associated with GitHub repository in Apiary'
|
43
43
|
method_option :api_name, type: :string, required: true
|
44
44
|
|
@@ -58,11 +58,8 @@ module Apiary::Command
|
|
58
58
|
|
59
59
|
return if source.nil?
|
60
60
|
|
61
|
-
begin
|
62
|
-
JSON.parse(source)
|
63
|
-
abort('Did you forget the --json flag?') unless @options.json
|
64
|
-
rescue; end
|
65
61
|
source = convert_from_json(source) if @options.json
|
62
|
+
|
66
63
|
data = {
|
67
64
|
code: source,
|
68
65
|
messageToSave: @options.message,
|
@@ -22,7 +22,7 @@ module Apiary::Command
|
|
22
22
|
@options.api_key ||= ENV['APIARY_API_KEY']
|
23
23
|
@options.proxy ||= ENV['http_proxy']
|
24
24
|
@options.api_host ||= 'api.apiary.io'
|
25
|
-
@options.vk_url ||= 'https://voight-kampff
|
25
|
+
@options.vk_url ||= 'https://voight-kampff.apiary-services.com'
|
26
26
|
@options.headers ||= {
|
27
27
|
content_type: :json,
|
28
28
|
accept: :json,
|
data/lib/apiary/version.rb
CHANGED
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.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apiary Ltd.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -28,44 +28,44 @@ dependencies:
|
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.1.4
|
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.1.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.20.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.20.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1
|
61
|
+
version: '2.1'
|
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: '1
|
68
|
+
version: '2.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: launchy
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,42 +86,42 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '3.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '2.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '2.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 12.3.3
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 12.3.3
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,19 +200,20 @@ executables:
|
|
200
200
|
extensions: []
|
201
201
|
extra_rdoc_files: []
|
202
202
|
files:
|
203
|
+
- ".circleci/config.yml"
|
204
|
+
- ".github/workflows/release.yml"
|
205
|
+
- ".github/workflows/test.yml"
|
203
206
|
- ".gitignore"
|
204
207
|
- ".rspec"
|
205
208
|
- ".rubocop_todo.yml"
|
206
|
-
-
|
209
|
+
- CHANGELOG.md
|
207
210
|
- Dockerfile
|
208
211
|
- Gemfile
|
209
212
|
- LICENSE
|
210
213
|
- README.md
|
211
214
|
- Rakefile
|
212
215
|
- apiary.gemspec
|
213
|
-
- appveyor.yml
|
214
216
|
- bin/apiary
|
215
|
-
- circle.yml
|
216
217
|
- features/fetch.feature
|
217
218
|
- features/preview.feature
|
218
219
|
- features/publish.feature
|
@@ -259,7 +260,7 @@ homepage: http://apiary.io
|
|
259
260
|
licenses:
|
260
261
|
- MIT
|
261
262
|
metadata: {}
|
262
|
-
post_install_message:
|
263
|
+
post_install_message:
|
263
264
|
rdoc_options: []
|
264
265
|
require_paths:
|
265
266
|
- lib
|
@@ -267,16 +268,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
267
268
|
requirements:
|
268
269
|
- - ">="
|
269
270
|
- !ruby/object:Gem::Version
|
270
|
-
version: 2.
|
271
|
+
version: 2.3.0
|
271
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
272
273
|
requirements:
|
273
274
|
- - ">="
|
274
275
|
- !ruby/object:Gem::Version
|
275
276
|
version: '0'
|
276
277
|
requirements: []
|
277
|
-
|
278
|
-
|
279
|
-
signing_key:
|
278
|
+
rubygems_version: 3.0.3
|
279
|
+
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: Apiary.io CLI
|
282
282
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
rvm:
|
4
|
-
- "ruby-2.2.2"
|
5
|
-
- "ruby-2.3.1"
|
6
|
-
- "ruby-2.4.0"
|
7
|
-
- "ruby-2.5.0"
|
8
|
-
- "jruby-9.0.0.0"
|
9
|
-
|
10
|
-
matrix:
|
11
|
-
allow_failures:
|
12
|
-
- rvm: rbx-2
|
13
|
-
cache: bundler
|
14
|
-
before_install:
|
15
|
-
- gem update --system
|
16
|
-
- gem update bundler
|
17
|
-
script:
|
18
|
-
- bundle exec rspec spec
|
19
|
-
- bundle exec cucumber
|
data/appveyor.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
---
|
2
|
-
version: "{branch}-{build}"
|
3
|
-
|
4
|
-
clone_depth: 10
|
5
|
-
|
6
|
-
build: off
|
7
|
-
|
8
|
-
install:
|
9
|
-
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
10
|
-
- gem install bundler -f
|
11
|
-
- bundle config --local path vendor/bundle
|
12
|
-
- bundle install
|
13
|
-
|
14
|
-
before_test:
|
15
|
-
- ruby --version
|
16
|
-
- gem --version
|
17
|
-
- bundler --version
|
18
|
-
|
19
|
-
test_script:
|
20
|
-
- bundle exec rspec spec
|
21
|
-
|
22
|
-
artifacts:
|
23
|
-
- path: pkg\*.gem
|
24
|
-
|
25
|
-
cache:
|
26
|
-
- vendor/bundle
|
27
|
-
|
28
|
-
environment:
|
29
|
-
matrix:
|
30
|
-
- ruby_version: 22
|
31
|
-
- ruby_version: 23
|
32
|
-
- ruby_version: 24
|
data/circle.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
machine:
|
2
|
-
environment:
|
3
|
-
RUBY_VERSIONS: 2.2.2,2.3.1,2.4.0,2.5.0
|
4
|
-
|
5
|
-
dependencies:
|
6
|
-
override:
|
7
|
-
- rvm get head
|
8
|
-
- rvm install $RUBY_VERSIONS
|
9
|
-
- rvm $RUBY_VERSIONS --verbose do gem install bundler
|
10
|
-
- rvm $RUBY_VERSIONS --verbose do bundle install
|
11
|
-
|
12
|
-
test:
|
13
|
-
override:
|
14
|
-
- rvm $RUBY_VERSIONS --verbose do bundle exec rubocop --config .rubocop_todo.yml
|
15
|
-
- rvm $RUBY_VERSIONS --verbose do bundle exec rspec spec
|
16
|
-
- rvm $RUBY_VERSIONS --verbose do bundle exec cucumber
|