poisol 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/poisol/stub_config/stub_config_builder.rb +1 -1
- data/lib/poisol/stub_mapper/response_mapper.rb +9 -2
- data/spec/data/domain/first/first.yml +1 -1
- data/spec/data/domain/second/second.yml +1 -1
- data/spec/data/main/key_value/explicit.yml +1 -1
- data/spec/data/main/key_value/key_value.yml +1 -1
- data/spec/data/main/query/book.yml +1 -1
- data/spec/data/main/query/book_explicit.yml +1 -1
- data/spec/data/main/response/array/columns.yml +1 -1
- data/spec/data/main/response/array/rows.yml +1 -1
- data/spec/data/main/response/nested_array.yml +1 -1
- data/spec/data/main/response/simple_response.yml +1 -1
- data/spec/data/main/url.yml +1 -1
- data/spec/data/main/user/config.yml +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: f9b12b86f96c1412fe9a3fefa32dbec07848f7fb
|
4
|
+
data.tar.gz: 5aae04149e21e61f90c02aaac26bbb5a50965a65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55aa39cba2680ee3b4b7a75b95c42da992cc837f78dab5495523b2e5eb41e77b11505e743ebc2ae6f89eca8e2799160aa7aed46703c0810bc1c0edf040325728
|
7
|
+
data.tar.gz: e370d4550c402f7d9dc5153e1afcb09cf9df40cad25a472563d050d0de096d63f829ea8ccd334a39049081cd2379de321ea5748557eb4b906d46f5a7e2e3988b
|
@@ -22,13 +22,20 @@ module Poisol
|
|
22
22
|
def get_stub_response stub_request
|
23
23
|
stub = Stubs.get_match stub_request
|
24
24
|
if stub.blank?
|
25
|
-
|
26
|
-
PoisolLog.error "Registered requests are: #{Stubs.all.map{|stub| "\n#{stub.request.to_s}"}.join}\n--end--"
|
25
|
+
log_error stub_request
|
27
26
|
raise "No match found for request: #{stub_request.to_s} "
|
28
27
|
end
|
29
28
|
PoisolLog.info JSON.pretty_generate(stub.response.body)
|
30
29
|
return stub.response if stub.present?
|
31
30
|
end
|
32
31
|
|
32
|
+
def log_error request
|
33
|
+
Kernel.puts request.to_s
|
34
|
+
Kernel.puts "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^No match found for above request"
|
35
|
+
Kernel.puts "Registered requests are: #{Stubs.all.map{|stub| "\n#{stub.request.to_s}"}.join}\n--end--"
|
36
|
+
PoisolLog.error "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^No match found for above request"
|
37
|
+
PoisolLog.error "Registered requests are: #{Stubs.all.map{|stub| "\n#{stub.request.to_s}"}.join}\n--end--"
|
38
|
+
end
|
39
|
+
|
33
40
|
end
|
34
41
|
end
|
data/spec/data/main/url.yml
CHANGED