service_mock 0.5.2 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/lib/service_mock.rb +1 -1
- data/lib/service_mock/{render_subtemplate.rb → erb_methods.rb} +6 -1
- data/lib/service_mock/server.rb +2 -2
- data/lib/service_mock/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b891d952ac8245a9333fba17e4600dbf404a46dc
|
4
|
+
data.tar.gz: 9912ed6df33f2f6a743fd2f56120d1fc23bf5b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd9407b2f66e52be507e5f07538da001dc35869c5ef6e9049afc3e98c22a35a8881cfe6a01cb27888f2f63c16f56c07d4a0a9c4b084a9244c60a147f7bcafc90
|
7
|
+
data.tar.gz: 228ff0302d8406083c42bcf0b6da97750bffe469ccd6cd5983d0019e67532492f5bf30a11572f80e863427d665176f93ff82ade81fbc2d2f3ee060d1eabe3104
|
data/ChangeLog
CHANGED
data/lib/service_mock.rb
CHANGED
@@ -2,7 +2,7 @@ require 'service_mock/core_ext/string'
|
|
2
2
|
require 'service_mock/version'
|
3
3
|
require 'service_mock/command_line_options'
|
4
4
|
require 'service_mock/server'
|
5
|
-
require 'service_mock/
|
5
|
+
require 'service_mock/erb_methods'
|
6
6
|
require 'service_mock/stub_creator'
|
7
7
|
require 'service_mock/rake/rake_tasks'
|
8
8
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'erb'
|
2
2
|
|
3
3
|
module ServiceMock
|
4
|
-
module
|
4
|
+
module ErbMethods
|
5
5
|
|
6
6
|
def render(path)
|
7
7
|
content = File.read(File.expand_path(path))
|
@@ -9,5 +9,10 @@ module ServiceMock
|
|
9
9
|
template.result(binding)
|
10
10
|
end
|
11
11
|
|
12
|
+
def value_with_default(value, default)
|
13
|
+
return value if value
|
14
|
+
default
|
15
|
+
end
|
16
|
+
|
12
17
|
end
|
13
18
|
end
|
data/lib/service_mock/server.rb
CHANGED
@@ -2,7 +2,7 @@ require 'childprocess'
|
|
2
2
|
require 'net/http'
|
3
3
|
require 'erb'
|
4
4
|
require 'ostruct'
|
5
|
-
require 'service_mock/
|
5
|
+
require 'service_mock/erb_methods'
|
6
6
|
|
7
7
|
#
|
8
8
|
# All interaction with the WireMock services is via calls to an instance of
|
@@ -160,7 +160,7 @@ module ServiceMock
|
|
160
160
|
private
|
161
161
|
|
162
162
|
def data_binding(hsh)
|
163
|
-
OpenStruct.include ::ServiceMock::
|
163
|
+
OpenStruct.include ::ServiceMock::ErbMethods
|
164
164
|
OpenStruct.new(hsh).instance_eval { binding }
|
165
165
|
end
|
166
166
|
|
data/lib/service_mock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey S. Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -88,11 +88,11 @@ files:
|
|
88
88
|
- lib/service_mock.rb
|
89
89
|
- lib/service_mock/command_line_options.rb
|
90
90
|
- lib/service_mock/core_ext/string.rb
|
91
|
+
- lib/service_mock/erb_methods.rb
|
91
92
|
- lib/service_mock/rake/base_task.rb
|
92
93
|
- lib/service_mock/rake/rake_tasks.rb
|
93
94
|
- lib/service_mock/rake/start_server_task.rb
|
94
95
|
- lib/service_mock/rake/stop_server_task.rb
|
95
|
-
- lib/service_mock/render_subtemplate.rb
|
96
96
|
- lib/service_mock/server.rb
|
97
97
|
- lib/service_mock/stub_creator.rb
|
98
98
|
- lib/service_mock/version.rb
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.5.
|
119
|
+
rubygems_version: 2.5.2
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Simple wrapper over WireMock
|