apiaryio 0.10.1 → 0.10.2

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
  SHA1:
3
- metadata.gz: 3007546160a6dea1800e9169dcc6c5bf5d7b922a
4
- data.tar.gz: d680b08d8dfa134439d995f1ebde24b34c68dc51
3
+ metadata.gz: 1d7b421e749c1bd1307e63b1bc23ebb2caaceed4
4
+ data.tar.gz: aa8f2ae6ed17b14d1988b60239c1bc4c78c875d9
5
5
  SHA512:
6
- metadata.gz: 8bbd3db0eefbb44e76e8ac31db64cce8808ba707a297c246fbaefd17a46840f97867d288de24e8de25d2020777e1bd07aa8be08801077eda6d8876cfbbb42410
7
- data.tar.gz: 28e0a1c207101776b32f20c1fda40065cc3ea0e0eceeebd8fb8fa81690468ebb2262bfcf64945276805fbe7634efdfd0f65a220800d45b3d1ab735dc0590d27b
6
+ metadata.gz: 8e1246cca1c28cc2593f74dcc9acd81e7bc0a9158b54ebbf452ae590d66ed7fa9cd015e9c80f34e57b1d0f527d150c98a531435e4fa5b9e7e32c9084fa2efa86
7
+ data.tar.gz: 853bf679a6b669b389d4b8eeafb726cb0ae6025e3ce03f4ab2056b15a337e04d3a44f1b22a26feac19c9b01152d08b4e3c14d80d74bc06ae2177cdb9aff299f4
@@ -9,6 +9,9 @@ Lint/UnusedBlockArgument:
9
9
  Metrics/AbcSize:
10
10
  Max: 33
11
11
 
12
+ Metrics/BlockLength:
13
+ Max: 150
14
+
12
15
  Metrics/ClassLength:
13
16
  Max: 190 # or whatever ends up being appropriate
14
17
 
@@ -40,6 +43,9 @@ Style/Documentation:
40
43
  Lint/HandleExceptions:
41
44
  Enabled: false
42
45
 
46
+ Lint/AmbiguousBlockAssociation: #https://github.com/bbatsov/rubocop/issues/4345
47
+ Enabled: false
48
+
43
49
  Style/RegexpLiteral:
44
50
  Enabled: false
45
51
  EnforcedStyle: slashes
@@ -1,17 +1,18 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - "ruby-2.1.10"
5
4
  - "ruby-2.2.2"
6
5
  - "ruby-2.3.1"
6
+ - "ruby-2.4.0"
7
+ - "ruby-2.5.0"
7
8
  - "jruby-9.0.0.0"
8
- - "rbx-2"
9
9
 
10
10
  matrix:
11
11
  allow_failures:
12
12
  - rvm: rbx-2
13
13
  cache: bundler
14
14
  before_install:
15
+ - gem update --system
15
16
  - gem update bundler
16
17
  script:
17
18
  - bundle exec rspec spec
@@ -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.0.0'
8
+ gem.required_ruby_version = '>= 2.2.0'
9
9
 
10
10
  gem.name = 'apiaryio'
11
11
  gem.version = Apiary::VERSION
@@ -23,8 +23,8 @@ Gem::Specification.new do |gem|
23
23
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
24
24
  gem.require_paths = ['lib']
25
25
 
26
- gem.add_runtime_dependency 'rest-client', '~> 1.8'
27
- gem.add_runtime_dependency 'rack', '~> 1.6.4'
26
+ gem.add_runtime_dependency 'rest-client', '~> 2.0'
27
+ gem.add_runtime_dependency 'rack', '~> 2.0.0'
28
28
  gem.add_runtime_dependency 'thor', '~> 0.19.1'
29
29
  gem.add_runtime_dependency 'json', '~> 1.8'
30
30
  gem.add_runtime_dependency 'launchy', '~> 2.4'
@@ -33,9 +33,8 @@ Gem::Specification.new do |gem|
33
33
  gem.add_development_dependency 'bundler', '~> 1.12'
34
34
  gem.add_development_dependency 'rake', '~> 10.0'
35
35
  gem.add_development_dependency 'rspec', '~> 3.4'
36
- gem.add_development_dependency 'webmock', '~> 2.2.0'
37
- gem.add_development_dependency 'yard', '~> 0.8'
36
+ gem.add_development_dependency 'webmock', '>= 2.2.0'
38
37
  gem.add_development_dependency 'aruba', '~> 0.14'
39
- gem.add_development_dependency 'cucumber', '~> 2.0'
40
- gem.add_development_dependency 'rubocop', '~> 0.41.2'
38
+ gem.add_development_dependency 'cucumber', '>= 2.0'
39
+ gem.add_development_dependency 'rubocop', '~> 0.49.0'
41
40
  end
@@ -7,7 +7,7 @@ build: off
7
7
 
8
8
  install:
9
9
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
10
- - gem update bundler
10
+ - gem install bundler -f
11
11
  - bundle config --local path vendor/bundle
12
12
  - bundle install
13
13
 
@@ -27,6 +27,6 @@ cache:
27
27
 
28
28
  environment:
29
29
  matrix:
30
- - ruby_version: 21
31
30
  - ruby_version: 22
32
31
  - ruby_version: 23
32
+ - ruby_version: 24
data/circle.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  machine:
2
2
  environment:
3
- RUBY_VERSIONS: 2.0.0,2.2.0,2.3.1
3
+ RUBY_VERSIONS: 2.2.2,2.3.1,2.4.0,2.5.0
4
4
 
5
5
  dependencies:
6
6
  override:
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'thor'
3
4
  require 'apiary/command/fetch'
4
5
  require 'apiary/command/preview'
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'rest-client'
3
- require 'rack'
4
- require 'ostruct'
5
4
  require 'json'
6
5
 
7
6
  require 'apiary/agent'
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'rest-client'
3
4
  require 'rack'
4
- require 'ostruct'
5
5
  require 'json'
6
6
  require 'tmpdir'
7
7
  require 'erb'
@@ -58,13 +58,11 @@ module Apiary::Command
58
58
  end
59
59
 
60
60
  def watch
61
- if @options.watch
62
- listener = Listen.to(File.dirname(@source_path), only: /#{File.basename(@source_path)}/) do |modified|
63
- @changed = timestamp
64
- end
65
-
66
- listener.start
61
+ return unless @options.watch
62
+ listener = Listen.to(File.dirname(@source_path), only: /#{File.basename(@source_path)}/) do |modified|
63
+ @changed = timestamp
67
64
  end
65
+ listener.start
68
66
  end
69
67
 
70
68
  def timestamp
@@ -133,7 +131,6 @@ module Apiary::Command
133
131
  JSON.parse(source)
134
132
  abort('Did you forget the --json flag') unless @options.json
135
133
  rescue; end
136
-
137
134
  source = convert_from_json(source) if @options.json
138
135
 
139
136
  data = {
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'rest-client'
3
- require 'rack'
4
- require 'ostruct'
5
4
  require 'json'
6
5
 
7
6
  require 'apiary/agent'
@@ -63,7 +62,6 @@ module Apiary::Command
63
62
  JSON.parse(source)
64
63
  abort('Did you forget the --json flag?') unless @options.json
65
64
  rescue; end
66
-
67
65
  source = convert_from_json(source) if @options.json
68
66
  data = {
69
67
  code: source,
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'rest-client'
3
- require 'rack'
4
- require 'ostruct'
5
4
  require 'json'
6
5
 
7
6
  require 'apiary/agent'
@@ -192,9 +191,8 @@ module Apiary::Command
192
191
  end
193
192
 
194
193
  def check_api_key
195
- unless @options.api_key && @options.api_key != ''
196
- abort 'Error: API key must be provided through environment variable APIARY_API_KEY. \Please go to https://login.apiary.io/tokens to obtain it.'
197
- end
194
+ return if @options.api_key && @options.api_key != ''
195
+ abort 'Error: API key must be provided through environment variable APIARY_API_KEY. \Please go to https://login.apiary.io/tokens to obtain it.'
198
196
  end
199
197
 
200
198
  def load
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Apiary::Helpers::JavascriptHelper
3
4
  JS_ESCAPE_MAP = {
4
5
  '\\' => '\\\\',
@@ -1,3 +1,3 @@
1
1
  module Apiary
2
- VERSION = '0.10.1'.freeze
2
+ VERSION = '0.10.2'.freeze
3
3
  end
@@ -38,7 +38,7 @@ describe Apiary::Command::Publish do
38
38
 
39
39
  it 'sends the message when publishing' do
40
40
  expect(WebMock).to have_requested(:post, 'https://api.apiary.io/blueprint/publish/myapi')
41
- .with { |request| request.body.include? 'messageToSave=Custom%20message' }
41
+ .with { |request| request.body.include? 'messageToSave=Custom+message' }
42
42
  end
43
43
  end
44
44
  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.10.1
4
+ version: 0.10.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: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2018-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.4
33
+ version: 2.0.0
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: 1.6.4
40
+ version: 2.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -140,30 +140,16 @@ dependencies:
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: 2.2.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: 2.2.0
153
- - !ruby/object:Gem::Dependency
154
- name: yard
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '0.8'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '0.8'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: aruba
169
155
  requirement: !ruby/object:Gem::Requirement
@@ -182,14 +168,14 @@ dependencies:
182
168
  name: cucumber
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
- - - "~>"
171
+ - - ">="
186
172
  - !ruby/object:Gem::Version
187
173
  version: '2.0'
188
174
  type: :development
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
- - - "~>"
178
+ - - ">="
193
179
  - !ruby/object:Gem::Version
194
180
  version: '2.0'
195
181
  - !ruby/object:Gem::Dependency
@@ -198,14 +184,14 @@ dependencies:
198
184
  requirements:
199
185
  - - "~>"
200
186
  - !ruby/object:Gem::Version
201
- version: 0.41.2
187
+ version: 0.49.0
202
188
  type: :development
203
189
  prerelease: false
204
190
  version_requirements: !ruby/object:Gem::Requirement
205
191
  requirements:
206
192
  - - "~>"
207
193
  - !ruby/object:Gem::Version
208
- version: 0.41.2
194
+ version: 0.49.0
209
195
  description: Apiary.io CLI
210
196
  email:
211
197
  - team@apiary.io
@@ -281,7 +267,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
267
  requirements:
282
268
  - - ">="
283
269
  - !ruby/object:Gem::Version
284
- version: 2.0.0
270
+ version: 2.2.0
285
271
  required_rubygems_version: !ruby/object:Gem::Requirement
286
272
  requirements:
287
273
  - - ">="
@@ -289,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
289
275
  version: '0'
290
276
  requirements: []
291
277
  rubyforge_project:
292
- rubygems_version: 2.5.2.1
278
+ rubygems_version: 2.4.8
293
279
  signing_key:
294
280
  specification_version: 4
295
281
  summary: Apiary.io CLI