http_stub 0.5.6 → 0.5.7
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.
- data/lib/http_stub/rake/start_server_task.rb +21 -0
- data/lib/http_stub/rake/task_generators.rb +4 -0
- data/lib/http_stub/version.rb +1 -1
- data/spec/lib/http_stub/{start_server_rake_task_integration_spec.rb → rake/start_server_rake_integration_spec.rb} +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +7 -6
- data/lib/http_stub/start_server_rake_task.rb +0 -20
@@ -0,0 +1,21 @@
|
|
1
|
+
module HttpStub
|
2
|
+
|
3
|
+
module Rake
|
4
|
+
|
5
|
+
class StartServerTask < ::Rake::TaskLib
|
6
|
+
|
7
|
+
def initialize(options)
|
8
|
+
desc "Starts stub #{options[:name]}"
|
9
|
+
task "start_#{options[:name]}" do
|
10
|
+
HttpStub::Server.instance_eval do
|
11
|
+
set :port, options[:port]
|
12
|
+
run!
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/lib/http_stub/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -9,7 +9,7 @@ require 'rack/test'
|
|
9
9
|
require 'httparty'
|
10
10
|
require 'nokogiri'
|
11
11
|
|
12
|
-
require File.expand_path('../../lib/http_stub/
|
12
|
+
require File.expand_path('../../lib/http_stub/rake/task_generators', __FILE__)
|
13
13
|
require File.expand_path('../../lib/http_stub', __FILE__)
|
14
14
|
require File.expand_path('../../examples/configurer_with_class_activator', __FILE__)
|
15
15
|
require File.expand_path('../../examples/configurer_with_class_stub', __FILE__)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_stub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sinatra
|
@@ -210,8 +210,9 @@ files:
|
|
210
210
|
- ./lib/http_stub/models/stub_activator.rb
|
211
211
|
- ./lib/http_stub/models/stub_headers.rb
|
212
212
|
- ./lib/http_stub/models/stub_parameters.rb
|
213
|
+
- ./lib/http_stub/rake/start_server_task.rb
|
214
|
+
- ./lib/http_stub/rake/task_generators.rb
|
213
215
|
- ./lib/http_stub/server.rb
|
214
|
-
- ./lib/http_stub/start_server_rake_task.rb
|
215
216
|
- ./lib/http_stub/version.rb
|
216
217
|
- ./lib/http_stub/views/_stub.haml
|
217
218
|
- ./lib/http_stub/views/application.sass
|
@@ -236,9 +237,9 @@ files:
|
|
236
237
|
- ./spec/lib/http_stub/models/stub_headers_spec.rb
|
237
238
|
- ./spec/lib/http_stub/models/stub_parameters_spec.rb
|
238
239
|
- ./spec/lib/http_stub/models/stub_spec.rb
|
240
|
+
- ./spec/lib/http_stub/rake/start_server_rake_integration_spec.rb
|
239
241
|
- ./spec/lib/http_stub/server_integration_spec.rb
|
240
242
|
- ./spec/lib/http_stub/server_spec.rb
|
241
|
-
- ./spec/lib/http_stub/start_server_rake_task_integration_spec.rb
|
242
243
|
- ./spec/spec_helper.rb
|
243
244
|
- ./spec/support/server_integration.rb
|
244
245
|
homepage: http://github.com/MYOB-Technology/http_stub
|
@@ -262,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
263
|
version: '0'
|
263
264
|
segments:
|
264
265
|
- 0
|
265
|
-
hash:
|
266
|
+
hash: 1104906034138605574
|
266
267
|
requirements: []
|
267
268
|
rubyforge_project: http_stub
|
268
269
|
rubygems_version: 1.8.25
|
@@ -287,8 +288,8 @@ test_files:
|
|
287
288
|
- ./spec/lib/http_stub/models/stub_headers_spec.rb
|
288
289
|
- ./spec/lib/http_stub/models/stub_parameters_spec.rb
|
289
290
|
- ./spec/lib/http_stub/models/stub_spec.rb
|
291
|
+
- ./spec/lib/http_stub/rake/start_server_rake_integration_spec.rb
|
290
292
|
- ./spec/lib/http_stub/server_integration_spec.rb
|
291
293
|
- ./spec/lib/http_stub/server_spec.rb
|
292
|
-
- ./spec/lib/http_stub/start_server_rake_task_integration_spec.rb
|
293
294
|
- ./spec/spec_helper.rb
|
294
295
|
- ./spec/support/server_integration.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require File.expand_path('../../http_stub', __FILE__)
|
2
|
-
require 'rake/tasklib' unless defined? (::Rake::TaskLib)
|
3
|
-
|
4
|
-
module HttpStub
|
5
|
-
|
6
|
-
class StartServerRakeTask < ::Rake::TaskLib
|
7
|
-
|
8
|
-
def initialize(options)
|
9
|
-
desc "Starts stub #{options[:name]}"
|
10
|
-
task "start_#{options[:name]}" do
|
11
|
-
HttpStub::Server.instance_eval do
|
12
|
-
set :port, options[:port]
|
13
|
-
run!
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|