rspec_api_blueprint 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/rspec_api_blueprint/version.rb +1 -1
- data/lib/rspec_api_blueprint.rb +5 -5
- metadata +4 -4
data/README.md
CHANGED
data/lib/rspec_api_blueprint.rb
CHANGED
@@ -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(
|
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(
|
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.
|
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-
|
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:
|
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:
|
101
|
+
hash: 2955463937644059294
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
104
|
rubygems_version: 1.8.24
|