dredd-rack 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/doc/runner.md +7 -0
- data/lib/dredd/rack/runner.rb +3 -3
- data/lib/dredd/rack/version.rb +1 -1
- data/spec/lib/dredd/rack/runner_spec.rb +6 -2
- data/spec/support/specs_for_negatable_boolean_options.rb +9 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81522f7e806fe81f04d37a688fe8379914b03ce4
|
4
|
+
data.tar.gz: 712a2af09d2dd6cf64f36257f32ed9ac0bf2734f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f3f0d0c3eb69db6e059f1eb0d52d49a395aee1fb8fba8bd53e34a3ccdf074aa37851c93b95d92e9345399238c1fbd7dd06280c9c78ae26ab2f3c5c04c6706bf
|
7
|
+
data.tar.gz: 53a84bcc0059b0fb5a331ac5d5942f240d6ea946e9fc707deb3388aed700ba369f655371f207dc072817543d2db9bd47267bf93e7775a9cb5fa07ec07019922d
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Dredd::Rack
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/dredd-rack.svg)](http://badge.fury.io/rb/dredd-rack)
|
5
5
|
[![Build Status](https://travis-ci.org/gonzalo-bulnes/dredd-rack.svg?branch=master)](https://travis-ci.org/gonzalo-bulnes/dredd-rack)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/gonzalo-bulnes/dredd-rack.svg)](https://codeclimate.com/github/gonzalo-bulnes/dredd-rack)
|
7
|
-
[![Dredd Reference Version](https://img.shields.io/badge/dredd_reference_version-0.
|
7
|
+
[![Dredd Reference Version](https://img.shields.io/badge/dredd_reference_version-1.0.0-brightgreen.svg)](https://github.com/apiaryio/dredd)
|
8
8
|
[![Inline docs](http://inch-ci.org/github/gonzalo-bulnes/dredd-rack.svg?branch=master)](http://inch-ci.org/github/gonzalo-bulnes/dredd-rack)
|
9
9
|
|
10
10
|
> **DISCLAIMER**: This is an early version of Dredd::Rack, please be aware that it will not be stable until `v1.0.0`. At any moment, [feedback][issues] is more than welcome! : ) -- [GB][gonzalo-bulnes]
|
@@ -28,7 +28,7 @@ Add the gem to your `Gemfile`:
|
|
28
28
|
```ruby
|
29
29
|
# Gemfile
|
30
30
|
|
31
|
-
gem 'dredd-rack', '~> 0.
|
31
|
+
gem 'dredd-rack', '~> 0.6.0' # see semver.org
|
32
32
|
```
|
33
33
|
|
34
34
|
Define which application Dredd::Rack must serve automatically:
|
data/doc/runner.md
CHANGED
@@ -60,6 +60,11 @@ dredd = Dredd::Rack::Runner.new do |options|
|
|
60
60
|
|
61
61
|
options.hookfiles 'doc/hooks/*_hooks.coffee'
|
62
62
|
|
63
|
+
options.language 'ruby'
|
64
|
+
options.server 'rails server'
|
65
|
+
options.server_wait '3'
|
66
|
+
options.custom 'a:b'
|
67
|
+
|
63
68
|
options.only 'Machines > Machines Collection > List all Machines',
|
64
69
|
'Machines > Machine > Retrieve a Machine'
|
65
70
|
|
@@ -78,7 +83,9 @@ dredd = Dredd::Rack::Runner.new do |options|
|
|
78
83
|
options.method('POST').method('PUT')
|
79
84
|
|
80
85
|
options.dry_run! # no_dry_run!
|
86
|
+
options.sandbox! # no_sandbox!
|
81
87
|
options.names! # no_names!
|
88
|
+
options.init! # no_init!
|
82
89
|
options.sorted! # no_sorted!
|
83
90
|
options.inline_errors! # no_inline_errors!
|
84
91
|
options.details! # no_details!
|
data/lib/dredd/rack/runner.rb
CHANGED
@@ -26,13 +26,13 @@ module Dredd
|
|
26
26
|
|
27
27
|
undef_method :method
|
28
28
|
|
29
|
-
NEGATABLE_BOOLEAN_OPTIONS = [:dry_run!, :names!, :sorted!, :inline_errors!,
|
29
|
+
NEGATABLE_BOOLEAN_OPTIONS = [:dry_run!, :sandbox!, :names!, :init!, :sorted!, :inline_errors!,
|
30
30
|
:details!, :color!, :timestamp!, :silent!]
|
31
31
|
META_OPTIONS = [:help, :version]
|
32
32
|
BOOLEAN_OPTIONS = NEGATABLE_BOOLEAN_OPTIONS + META_OPTIONS
|
33
33
|
|
34
|
-
SINGLE_ARGUMENT_OPTIONS = [:hookfiles, :
|
35
|
-
:user, :method, :level, :path]
|
34
|
+
SINGLE_ARGUMENT_OPTIONS = [:hookfiles, :language, :server, :server_wait, :custom, :only,
|
35
|
+
:reporter, :output, :header, :user, :method, :level, :path]
|
36
36
|
OPTIONS = BOOLEAN_OPTIONS + SINGLE_ARGUMENT_OPTIONS
|
37
37
|
|
38
38
|
# Store the Dredd command line options
|
data/lib/dredd/rack/version.rb
CHANGED
@@ -214,15 +214,19 @@ describe Dredd::Rack::Runner do
|
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|
217
|
-
Dredd::Rack::Runner::
|
217
|
+
Dredd::Rack::Runner::META_OPTIONS.each do |option|
|
218
218
|
describe "##{option}", public: true do
|
219
219
|
it_behaves_like 'a boolean option', option, ['some argument']
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
223
|
Dredd::Rack::Runner::NEGATABLE_BOOLEAN_OPTIONS.each do |option|
|
224
|
+
describe "##{option}", public: true do
|
225
|
+
it_behaves_like 'a negatable boolean option', option.to_sym, ['some argument']
|
226
|
+
end
|
227
|
+
|
224
228
|
describe "#no_#{option}", public: true do
|
225
|
-
it_behaves_like 'a boolean option', "no_#{option}".to_sym, ['some argument']
|
229
|
+
it_behaves_like 'a negatable boolean option', "no_#{option}".to_sym, ['some argument']
|
226
230
|
end
|
227
231
|
end
|
228
232
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dredd-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Bulnes Guilpain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- spec/spec_helper.rb
|
106
106
|
- spec/support/spec_for_configuration_option_interface.rb
|
107
107
|
- spec/support/specs_for_boolean_options.rb
|
108
|
+
- spec/support/specs_for_negatable_boolean_options.rb
|
108
109
|
- spec/support/specs_for_options.rb
|
109
110
|
- spec/support/specs_for_single_argument_options.rb
|
110
111
|
homepage: https://github.com/gonzalo-bulnes/dredd-rack
|
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
128
|
version: '0'
|
128
129
|
requirements: []
|
129
130
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.4.
|
131
|
+
rubygems_version: 2.4.7
|
131
132
|
signing_key:
|
132
133
|
specification_version: 4
|
133
134
|
summary: Convenient API blueprint testing with Apiary Dredd for Rack applications.
|
@@ -139,6 +140,7 @@ test_files:
|
|
139
140
|
- spec/spec_helper.rb
|
140
141
|
- spec/support/specs_for_single_argument_options.rb
|
141
142
|
- spec/support/specs_for_boolean_options.rb
|
143
|
+
- spec/support/specs_for_negatable_boolean_options.rb
|
142
144
|
- spec/support/specs_for_options.rb
|
143
145
|
- spec/support/spec_for_configuration_option_interface.rb
|
144
146
|
has_rdoc:
|