mirage 3.0.12 → 3.0.13
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.
- checksums.yaml +8 -8
- data/HISTORY +2 -0
- data/VERSION +1 -1
- data/lib/mirage/client/helpers/method_builder.rb +4 -2
- data/mirage.gemspec +3 -3
- data/spec/mirage/client/helpers/method_builder_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODUxZjg2NGFkN2M4N2E5ZTVlYzRmMDQzODBlNzE3MjFkNWE2ZDFiYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjQ5ZWNmYTNiNzdiNDc1YmRiMGMxMjEzYjNjMTdhOTczN2NiYmE5Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGZlNjk5ZjkxYTRmYzE2MzE3ZWE3ZjU5OTcyZDM2MWU4YWYwNDdiNzQ2NDJi
|
10
|
+
NjVmZWMwOWQ1NTViZTFmMDI4NDNmN2NjYmFmN2JjY2YzZmJjMzI2NmI2MDEz
|
11
|
+
MWUyZmJhYTZlYzIxNjg1YzIxNTk3YTJkOTcyNzViODY5MGM0MzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTVjNzk5ODA3ZjBlYjkzM2ZiMjAwZDJhZjYzODhlN2MzZWRhZTBlMzMxNjlk
|
14
|
+
ZDM2ZDY1ODBjNzkyMDZjYjUwYjRjNjY5NWQ2MTI1NWNjY2RmZWQ4ZDc2MjU4
|
15
|
+
NzM1NmY4ZGZmM2I3MTc4YWU4NzZlYjRlNmM0MjIzZGFiZDNlNjM=
|
data/HISTORY
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
v3.0.12 - Merge of [pull request from @asehra](https://github.com/lashd/mirage/pull/17). Raises exception when trying to retrieve request information and request has not been received.
|
2
|
+
V3.0.11 - Implement waiting function within project and remove dependency on waitforit
|
1
3
|
V3.0.8 - bug fix for issue 13: https://github.com/lashd/mirage/issues/13 - match Content-Length header
|
2
4
|
V3.0.7 - bug fix for issue 13: https://github.com/lashd/mirage/issues/13 - match Content-Type header
|
3
5
|
V3.0.6 - bug fix
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.13
|
@@ -3,10 +3,12 @@ module Mirage
|
|
3
3
|
module MethodBuilder
|
4
4
|
def builder_methods *method_names
|
5
5
|
|
6
|
+
defaulted = Object.new
|
7
|
+
|
6
8
|
method_names.each do |method_name|
|
7
9
|
method_name = method_name.to_sym
|
8
|
-
define_method method_name do |arg=
|
9
|
-
return instance_variable_get("@#{method_name}".to_sym) if arg
|
10
|
+
define_method method_name do |arg = defaulted|
|
11
|
+
return instance_variable_get("@#{method_name}".to_sym) if arg == defaulted
|
10
12
|
instance_variable_set("@#{method_name}".to_sym, arg)
|
11
13
|
self
|
12
14
|
end
|
data/mirage.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mirage 3.0.
|
5
|
+
# stub: mirage 3.0.13 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mirage"
|
9
|
-
s.version = "3.0.
|
9
|
+
s.version = "3.0.13"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Leon Davis"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2017-10-11"
|
15
15
|
s.description = "Mirage aids testing of your applications by hosting mock responses so that your applications do not have to talk to real endpoints. Its accessible via HTTP and has a RESTful interface."
|
16
16
|
s.executables = ["mirage"]
|
17
17
|
s.extra_rdoc_files = [
|
@@ -12,6 +12,14 @@ describe Helpers::MethodBuilder do
|
|
12
12
|
model_class.new
|
13
13
|
end
|
14
14
|
|
15
|
+
context 'parameter is nil' do
|
16
|
+
it 'should set the value to nil' do
|
17
|
+
model.name(:joe)
|
18
|
+
model.name(nil)
|
19
|
+
expect(model.name).to be_nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
it 'should set a value' do
|
16
24
|
model.name(:joe)
|
17
25
|
model.name.should == :joe
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mirage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Davis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|