rspec_api_blueprint 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -8,7 +8,7 @@ You can find more about Blueprint at http://apiblueprint.org
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'rspec_api_blueprint'
11
+ gem 'rspec_api_blueprint', require: false
12
12
 
13
13
  And then execute:
14
14
 
@@ -1,3 +1,3 @@
1
1
  module RspecApiBlueprint
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -33,15 +33,15 @@ RSpec.configure do |config|
33
33
  f.write "+ Request #{request.content_type}\n\n"
34
34
 
35
35
  # Request Headers
36
- if authorization_header
36
+ if authorization_header.present?
37
37
  f.write "+ Headers\n\n".indent(4)
38
- f.write "Authorization: #{authorization_header}\n\n".indent(8)
38
+ f.write "Authorization: #{authorization_header}\n\n".indent(12)
39
39
  end
40
40
 
41
41
  # Request Body
42
42
  if request_body.present?
43
- f.write "+ Body\n\n".indent(4)
44
- f.write "#{JSON.pretty_generate(JSON.parse(request_body))}\n\n".indent(8)
43
+ f.write "+ Body\n\n".indent(4) if authorization_header
44
+ f.write "#{JSON.pretty_generate(JSON.parse(request_body))}\n\n".indent(authorization_header ? 12 : 8)
45
45
  end
46
46
  end
47
47
 
@@ -49,7 +49,7 @@ RSpec.configure do |config|
49
49
  f.write "+ Response #{response.status} #{response.content_type}\n\n"
50
50
 
51
51
  if response.body.present?
52
- f.write "#{JSON.pretty_generate(JSON.parse(response.body))}\n\n".indent(4)
52
+ f.write "#{JSON.pretty_generate(JSON.parse(response.body))}\n\n".indent(8)
53
53
  end
54
54
  end unless response.status == 401 || response.status == 403 || response.status == 301
55
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_api_blueprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-24 00:00:00.000000000 Z
12
+ date: 2013-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 1961368386880728741
92
+ hash: 2955463937644059294
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  segments:
100
100
  - 0
101
- hash: 1961368386880728741
101
+ hash: 2955463937644059294
102
102
  requirements: []
103
103
  rubyforge_project:
104
104
  rubygems_version: 1.8.24