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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 451bcf6ce5445a6b1b6e82405f8c09e0a1c6a03d
4
- data.tar.gz: 911261ff25e1fca55e20c54a1f4aac62bb93fc6d
3
+ metadata.gz: 81522f7e806fe81f04d37a688fe8379914b03ce4
4
+ data.tar.gz: 712a2af09d2dd6cf64f36257f32ed9ac0bf2734f
5
5
  SHA512:
6
- metadata.gz: 7254c4134bd9cc4b0b16f26b7ce703c4854fe9a191fa98dcd3df59cba5777f0d282600d465af57063a18c5d58205b06dc2484bbcdf663e6f995d080d2d51f10f
7
- data.tar.gz: ac25fd2bbaa21def1c3833dba3aab9448ee9be2569bee23f3581a66a4e2060ce034579957a7381d2c21b5975fdc278fbe05533fba3485af3f029cefcb8cef791
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.4.8-brightgreen.svg)](https://github.com/apiaryio/dredd)
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.4.0' # see semver.org
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!
@@ -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, :only, :reporter, :output, :header,
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
@@ -1,5 +1,5 @@
1
1
  module Dredd
2
2
  module Rack
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
@@ -214,15 +214,19 @@ describe Dredd::Rack::Runner do
214
214
  end
215
215
  end
216
216
 
217
- Dredd::Rack::Runner::BOOLEAN_OPTIONS.each do |option|
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
 
@@ -0,0 +1,9 @@
1
+ RSpec.shared_examples 'a negatable boolean option' do |option|
2
+
3
+ it_behaves_like 'an option', option
4
+ it_behaves_like 'a boolean option', option
5
+
6
+ it 'is ended by a bang (!)' do
7
+ expect(option[-1]).to eq '!'
8
+ end
9
+ end
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.5.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-05-13 00:00:00.000000000 Z
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.6
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: