rspec_api_blueprint 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec_api_blueprint.rb +2 -2
- data/lib/rspec_api_blueprint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189633a2bf6a9f70c01f639f6376ea34f62a5ef9
|
4
|
+
data.tar.gz: 58bd6ede750ef9d458403fa0db1c4fdb428dc6c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7d972c3258eba2d0b4a0d0741119d6bb5cb4af994d5f88a4d45405fd365613f0e214ddc094819146b998c7ec8dcd1fb11658174d9d6c8150b828c0adb1e7c9f
|
7
|
+
data.tar.gz: 20e26df78c7dffcd4bf70bac8322d2e8788937627c013f31955eb2110b3c5b878cc30e0892256b16019ddf311c27088a2299530d3236fd9a0b00fc3a5672290b
|
data/lib/rspec_api_blueprint.rb
CHANGED
@@ -36,7 +36,7 @@ RSpec.configure do |config|
|
|
36
36
|
|
37
37
|
if defined? Rails
|
38
38
|
file = File.join(Rails.root, "/api_docs/#{file_name}.txt")
|
39
|
-
else
|
39
|
+
else
|
40
40
|
file = File.join(File.expand_path('.'), "/api_docs/#{file_name}.txt")
|
41
41
|
end
|
42
42
|
|
@@ -67,7 +67,7 @@ RSpec.configure do |config|
|
|
67
67
|
# Response
|
68
68
|
f.write "+ Response #{response.status} #{response.content_type}\n\n"
|
69
69
|
|
70
|
-
if response.body.present? && response.content_type
|
70
|
+
if response.body.present? && response.content_type =~ /application\/json/
|
71
71
|
f.write "#{JSON.pretty_generate(JSON.parse(response.body))}\n\n".indent(8)
|
72
72
|
end
|
73
73
|
end unless response.status == 401 || response.status == 403 || response.status == 301
|