mockserver-client 1.0.4 → 1.0.6.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mockserver/model/body.rb +1 -1
- data/lib/mockserver/model/enum.rb +1 -1
- data/lib/mockserver/model/request.rb +7 -3
- data/lib/mockserver/model/times.rb +8 -0
- data/lib/mockserver/version.rb +1 -1
- data/pom.xml +3 -2
- data/spec/fixtures/register_expectation.json +1 -1
- data/spec/fixtures/times_once.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb049f3c5af0f80da1a3a8f317d553f4b67c68c6
|
4
|
+
data.tar.gz: c37ae55ab3ed301a9c40f3c7c3705dbc6e6a1795
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cea9f1fe007d9f5f94a6994c05de9c11f5b387ae0fe7b84be1e2e46fbf6b87f5de927fcf8d278bfd4587ac9796a38c92092afcc6da43055342c2e8eee4806274
|
7
|
+
data.tar.gz: a1a925b8a65c9315452fad19903c99227f95455bd2a8090288f3209d96e985558f2e6eff75089a97e34e7be8cd53511c6abaae8027e641c00b0f4be4f86df87b
|
@@ -13,7 +13,7 @@ module MockServer::Model
|
|
13
13
|
# @raise [Exception] if the supplied value is not valid for this enum
|
14
14
|
def initialize(supplied_value)
|
15
15
|
supplied_value = pre_process_value(supplied_value)
|
16
|
-
fail "Supplied value: #{supplied_value} is not valid. Allowed values are: #{
|
16
|
+
fail "Supplied value: #{supplied_value} is not valid. Allowed values are: #{allowed_values.inspect}" unless allowed_values.include?(supplied_value)
|
17
17
|
@value = supplied_value
|
18
18
|
end
|
19
19
|
|
@@ -3,7 +3,7 @@ require 'hashie'
|
|
3
3
|
require_relative './parameter'
|
4
4
|
require_relative './body'
|
5
5
|
require_relative './enum'
|
6
|
-
|
6
|
+
require 'base64'
|
7
7
|
#
|
8
8
|
# A class to model a request in an expectation.
|
9
9
|
# @author:: Nayyara Samuel (mailto: nayyara.samuel@opower.com)
|
@@ -17,7 +17,7 @@ module MockServer::Model
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Request model
|
20
|
-
class Request < Hashie::
|
20
|
+
class Request < Hashie::Trash
|
21
21
|
include Hashie::Extensions::MethodAccess
|
22
22
|
include Hashie::Extensions::IgnoreUndeclared
|
23
23
|
include Hashie::Extensions::Coercion
|
@@ -29,7 +29,11 @@ module MockServer::Model
|
|
29
29
|
property :query_parameters, default: Parameters.new([])
|
30
30
|
property :cookies, default: Parameters.new([])
|
31
31
|
property :headers, default: Parameters.new([])
|
32
|
-
property :body
|
32
|
+
property :body, transform_with: (lambda do |body|
|
33
|
+
is_base_64_body = body && body.type == :BINARY
|
34
|
+
body_value = is_base_64_body ? Base64.decode64(body.value) : body.value
|
35
|
+
Body.new(type: :STRING, value: body_value)
|
36
|
+
end)
|
33
37
|
|
34
38
|
coerce_key :method, HTTPMethod
|
35
39
|
coerce_key :path, String
|
data/lib/mockserver/version.rb
CHANGED
data/pom.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<parent>
|
4
4
|
<groupId>org.mock-server</groupId>
|
5
5
|
<artifactId>mockserver</artifactId>
|
6
|
-
<version>3.9.
|
6
|
+
<version>3.9.17-SNAPSHOT</version>
|
7
7
|
</parent>
|
8
8
|
<modelVersion>4.0.0</modelVersion>
|
9
9
|
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<plugin>
|
23
23
|
<groupId>org.codehaus.mojo</groupId>
|
24
24
|
<artifactId>exec-maven-plugin</artifactId>
|
25
|
-
<version>1.
|
25
|
+
<version>1.4.0</version>
|
26
26
|
<executions>
|
27
27
|
<execution>
|
28
28
|
<id>bundle_install</id>
|
@@ -56,6 +56,7 @@
|
|
56
56
|
<argument>exec</argument>
|
57
57
|
<argument>rake</argument>
|
58
58
|
<argument>build</argument>
|
59
|
+
<argument>spec</argument>
|
59
60
|
</arguments>
|
60
61
|
<environmentVariables>
|
61
62
|
<BUNDLE_GEMFILE>${basedir}/Gemfile</BUNDLE_GEMFILE>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mockserver-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nayyara Samuel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|