mirage 2.4.2 → 3.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.simplecov +6 -0
- data/Gemfile +11 -3
- data/Gemfile.lock +41 -14
- data/VERSION +1 -1
- data/features/client/clear.feature +41 -50
- data/features/client/configure.feature +2 -2
- data/features/client/put.feature +17 -6
- data/features/client/requests.feature +5 -9
- data/features/client/start.feature +19 -11
- data/features/client/stop.feature +10 -44
- data/features/server/commandline_interface/start.feature +2 -14
- data/features/server/commandline_interface/stop.feature +6 -4
- data/features/server/logging.feature +2 -2
- data/features/server/prime.feature +11 -66
- data/features/server/requests/delete.feature +34 -33
- data/features/server/requests/get.feature +21 -18
- data/features/server/save_and_revert.feature +24 -11
- data/features/server/templates/delete.feature +29 -32
- data/features/server/templates/get.feature +44 -25
- data/features/server/templates/put/put.feature +55 -78
- data/features/server/templates/put/put_with_substitutions.feature +12 -32
- data/features/server/templates/put/required_content.feature +118 -0
- data/features/step_definitions/my_steps.rb +51 -6
- data/features/support/env.rb +1 -1
- data/features/support/hooks.rb +2 -5
- data/{lib/mirage/client → features/support}/web.rb +14 -3
- data/lib/mirage/client.rb +5 -2
- data/lib/mirage/client/client.rb +22 -129
- data/lib/mirage/client/request.rb +25 -0
- data/lib/mirage/client/requests.rb +13 -0
- data/lib/mirage/client/runner.rb +4 -4
- data/lib/mirage/client/template.rb +108 -0
- data/lib/mirage/client/template_configuration.rb +22 -0
- data/lib/mirage/client/templates.rb +26 -0
- data/mirage.gemspec +42 -22
- data/mirage_server.rb +1 -135
- data/rakefile +22 -7
- data/server/app.rb +4 -0
- data/server/binary_data_checker.rb +15 -0
- data/server/helpers.rb +28 -0
- data/server/mock_response.rb +140 -58
- data/server/server.rb +167 -0
- data/spec/{cli_bridge_spec.rb → client/cli_bridge_spec.rb} +15 -11
- data/spec/client/client_spec.rb +139 -0
- data/spec/client/request_spec.rb +52 -0
- data/spec/client/requests_spec.rb +10 -0
- data/spec/{runner_spec.rb → client/runner_spec.rb} +3 -3
- data/spec/client/template_configuration_spec.rb +32 -0
- data/spec/client/template_spec.rb +241 -0
- data/spec/client/templates_spec.rb +79 -0
- data/spec/resources/binary.file +0 -0
- data/spec/server/binary_data_checker_spec.rb +22 -0
- data/spec/server/helpers_spec.rb +34 -0
- data/spec/server/mock_response_spec.rb +526 -0
- data/spec/server/server_spec.rb +132 -0
- data/spec/spec_helper.rb +61 -2
- data/test.html +12 -0
- data/test.rb +20 -17
- data/todo.lst +2 -0
- data/views/index.haml +22 -0
- data/views/response.haml +24 -0
- metadata +134 -49
- data/features/server/templates/put/put_as_default.feature +0 -42
- data/features/server/templates/put/put_with_delay.feature +0 -8
- data/features/server/templates/put/put_with_pattern.feature +0 -80
- data/lib/mirage/client/response.rb +0 -29
- data/spec/client_spec.rb +0 -38
- data/views/index.erb +0 -28
data/lib/mirage/client.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}"
|
2
|
-
require 'client/
|
2
|
+
require 'client/template_configuration'
|
3
3
|
require 'client/error'
|
4
4
|
require 'client/cli_bridge'
|
5
5
|
require 'client/runner'
|
6
|
-
require 'client/
|
6
|
+
require 'client/template'
|
7
|
+
require 'client/templates'
|
8
|
+
require 'client/requests'
|
9
|
+
require 'client/request'
|
7
10
|
require 'client/client'
|
data/lib/mirage/client/client.rb
CHANGED
@@ -1,20 +1,15 @@
|
|
1
1
|
require 'uri'
|
2
|
+
require 'httparty'
|
3
|
+
require 'base64'
|
4
|
+
require 'json'
|
5
|
+
|
2
6
|
module Mirage
|
3
7
|
class Client
|
4
|
-
|
5
|
-
include Mirage::Web
|
6
|
-
attr_reader :url
|
8
|
+
include HTTParty
|
7
9
|
|
10
|
+
attr_reader :url
|
8
11
|
|
9
|
-
|
10
|
-
#
|
11
|
-
# Client.new => a client that is configured to connect to Mirage on http://localhost:7001/mirage (the default settings for Mirage)
|
12
|
-
# Client.new(URL) => a client that is configured to connect to an instance of Mirage running on the specified url.
|
13
|
-
# Client.new(hash) => a client that is configured to connect to an instance of Mirage running on the specified url or localhost port.
|
14
|
-
# e.g: Client.new(:url => url) or Client.new(:port => port)
|
15
|
-
#
|
16
|
-
# a block can be passed to configure the client with defaults: see configure
|
17
|
-
def initialize options={:url => "http://localhost:7001/mirage"}, &block
|
12
|
+
def initialize options={:url => "http://localhost:7001/mirage"}
|
18
13
|
if options.is_a?(String) && options =~ URI.regexp
|
19
14
|
warn("Client.new(url): Deprecated usage, please use :url => url | :port => port")
|
20
15
|
@url = options
|
@@ -25,142 +20,40 @@ module Mirage
|
|
25
20
|
else
|
26
21
|
raise "specify a valid URL or port"
|
27
22
|
end
|
28
|
-
|
29
|
-
reset
|
30
|
-
configure &block if block_given?
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
# Configures default settings to be applied to all response templates put on to Mirage
|
35
|
-
#
|
36
|
-
# Example:
|
37
|
-
# Client.new.configure do
|
38
|
-
# defaults.method = :post
|
39
|
-
# defaults.status = 202
|
40
|
-
# defaults.default = true
|
41
|
-
# defaults.delay = 2
|
42
|
-
# defaults.content_type = "text/xml"
|
43
|
-
# end
|
44
|
-
def configure &block
|
45
|
-
yield @defaults
|
46
|
-
end
|
47
|
-
|
48
|
-
# Remove any defaults applied to this client
|
49
|
-
def reset
|
50
|
-
@defaults = Defaults.new
|
51
|
-
end
|
52
|
-
|
53
|
-
def stop
|
54
|
-
Mirage.stop :port => URI.parse(@url).port
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
# Set a text or file based response template, to be hosted at a given end point. A block can be specified to configure the template
|
59
|
-
# client.set(endpoint, response, &block) => unique id that can be used to call back to the server
|
60
|
-
#
|
61
|
-
# Examples:
|
62
|
-
# client.put('greeting', 'hello')
|
63
|
-
#
|
64
|
-
# client.put('greeting', 'hello') do |response|
|
65
|
-
# response.pattern = 'pattern' #regex or string literal applied against the request querystring and body
|
66
|
-
# response.method = :post #By default templates will respond to get requests
|
67
|
-
# response.content_type = 'text/html' #defaults text/plain
|
68
|
-
# response.default = true # defaults to false. setting to true will allow this template to respond to request made to sub resources should it match.
|
69
|
-
# end
|
70
|
-
def put endpoint, response_value, &block
|
71
|
-
response = Mirage::Response.new response_value
|
72
|
-
@defaults.each_pair { |key, value| response.send("#{key}=", value) if value }
|
73
|
-
yield response if block_given?
|
74
|
-
|
75
|
-
build_response(http_put("#{@url}/templates/#{endpoint}", response.value, response.headers))
|
76
23
|
end
|
77
24
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
response = build_response(http_get("#{@url}/templates/#{response_id}"))
|
82
|
-
case response
|
83
|
-
when String then
|
84
|
-
return response
|
85
|
-
when Mirage::Web::FileResponse then
|
86
|
-
return response.response.body
|
87
|
-
end
|
88
|
-
|
25
|
+
def templates id=nil
|
26
|
+
return Template.get("#{@url}/templates/#{id}") if id
|
27
|
+
Templates.new(@url)
|
89
28
|
end
|
90
29
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
#
|
95
|
-
# Example Usage:
|
96
|
-
# client.clear -> clear all responses and associated requests
|
97
|
-
# client.clear(response_id) -> Clear the response and tracked request for a given response id
|
98
|
-
# client.clear(:requests) -> Clear all tracked request information
|
99
|
-
# client.clear(:request => response_id) -> Clear the tracked request for a given response id
|
100
|
-
def clear thing=nil
|
101
|
-
|
102
|
-
case thing
|
103
|
-
when :requests
|
104
|
-
http_delete("#{@url}/requests")
|
105
|
-
when Numeric then
|
106
|
-
http_delete("#{@url}/templates/#{thing}")
|
107
|
-
when Hash then
|
108
|
-
puts "deleteing request #{thing[:request]}"
|
109
|
-
http_delete("#{@url}/requests/#{thing[:request]}") if thing[:request]
|
110
|
-
else
|
111
|
-
NilClass
|
112
|
-
http_delete("#{@url}/templates")
|
113
|
-
end
|
114
|
-
|
30
|
+
def requests id=nil
|
31
|
+
return Request.get "#{@url}/requests/#{id}" if id
|
32
|
+
Requests.new(@url)
|
115
33
|
end
|
116
34
|
|
117
|
-
|
118
|
-
|
119
|
-
# request did not have any content in its body then what ever was in the request query string is returned instead
|
120
|
-
#
|
121
|
-
# Example Usage
|
122
|
-
# client.request(response_id) -> Tracked request as a String
|
123
|
-
def request response_id
|
124
|
-
build_response(http_get("#{@url}/requests/#{response_id}"))
|
35
|
+
def prime
|
36
|
+
self.class.send(:put, "#{@url}/defaults", :body => "")
|
125
37
|
end
|
126
38
|
|
127
|
-
# Save the state of the Mirage server so that it can be reverted back to that exact state at a later time.
|
128
39
|
def save
|
129
|
-
|
40
|
+
self.class.send(:put, "#{@url}/backup", :body => "")
|
130
41
|
end
|
131
42
|
|
132
|
-
|
133
|
-
# Revert the state of Mirage back to the state that was last saved
|
134
|
-
# If there is no snapshot to rollback to, nothing happens
|
135
43
|
def revert
|
136
|
-
|
44
|
+
self.class.send(:put, @url, :body => "")
|
137
45
|
end
|
138
46
|
|
139
|
-
|
140
|
-
|
141
|
-
def running?
|
142
|
-
Mirage.running?(@url)
|
47
|
+
def put endpoint, value, &block
|
48
|
+
templates.put endpoint, value, &block
|
143
49
|
end
|
144
50
|
|
145
|
-
|
146
|
-
|
147
|
-
build_response(http_put("#{@url}/defaults", ''))
|
51
|
+
def clear
|
52
|
+
templates.delete_all
|
148
53
|
end
|
149
54
|
|
150
55
|
def == client
|
151
|
-
client.
|
152
|
-
end
|
153
|
-
|
154
|
-
private
|
155
|
-
def build_response response
|
156
|
-
case response.code.to_i
|
157
|
-
when 500 then
|
158
|
-
raise ::Mirage::InternalServerException.new(response.body, response.code.to_i)
|
159
|
-
when 404 then
|
160
|
-
raise ::Mirage::ResponseNotFound.new(response.body, response.code.to_i)
|
161
|
-
else
|
162
|
-
response.body
|
163
|
-
end
|
56
|
+
client.instance_of?(Client) && self.url == client.url
|
164
57
|
end
|
165
58
|
end
|
166
59
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'hashie/mash'
|
2
|
+
module Mirage
|
3
|
+
class Request
|
4
|
+
include HTTParty
|
5
|
+
|
6
|
+
class << self
|
7
|
+
alias_method :backedup_get, :get
|
8
|
+
def get url
|
9
|
+
result = Hashie::Mash.new(backedup_get(url, format: :json))
|
10
|
+
request = new
|
11
|
+
request.parameters = result.parameters
|
12
|
+
request.headers = result.headers
|
13
|
+
request.request_url = result.request_url
|
14
|
+
request.body = result.body
|
15
|
+
request
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
attr_accessor :parameters, :headers, :body, :request_url
|
20
|
+
|
21
|
+
def delete
|
22
|
+
self.class.delete(request_url)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/mirage/client/runner.rb
CHANGED
@@ -2,15 +2,16 @@ require 'thor'
|
|
2
2
|
require 'waitforit'
|
3
3
|
require 'childprocess'
|
4
4
|
require 'uri'
|
5
|
+
require 'httparty'
|
5
6
|
module Mirage
|
6
7
|
class << self
|
7
|
-
include Web
|
8
8
|
|
9
9
|
# Start Mirage locally on a given port
|
10
10
|
# Example Usage:
|
11
11
|
#
|
12
12
|
# Mirage.start :port => 9001 -> Configured MirageClient ready to use.
|
13
|
-
def start options={
|
13
|
+
def start options={}
|
14
|
+
options={:port => 7001}.merge(options)
|
14
15
|
Runner.new.invoke(:start, [], options)
|
15
16
|
Mirage::Client.new(options)
|
16
17
|
end
|
@@ -42,7 +43,7 @@ module Mirage
|
|
42
43
|
# Mirage.running? url -> boolean indicating whether Mirage is running on the given URL
|
43
44
|
def running? options_or_url = {:port => 7001}
|
44
45
|
url = options_or_url.kind_of?(Hash) ? "http://localhost:#{options_or_url[:port]}/mirage" : options_or_url
|
45
|
-
|
46
|
+
HTTParty.get(url) and return true
|
46
47
|
rescue Errno::ECONNREFUSED
|
47
48
|
return false
|
48
49
|
end
|
@@ -50,7 +51,6 @@ module Mirage
|
|
50
51
|
end
|
51
52
|
|
52
53
|
class Runner < Thor
|
53
|
-
include ::Mirage::Web
|
54
54
|
include CLIBridge
|
55
55
|
RUBY_CMD = ChildProcess.jruby? ? 'jruby' : 'ruby'
|
56
56
|
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'json'
|
3
|
+
require 'httparty'
|
4
|
+
require 'hashie/mash'
|
5
|
+
module Mirage
|
6
|
+
|
7
|
+
class Template
|
8
|
+
include HTTParty
|
9
|
+
|
10
|
+
class << self
|
11
|
+
alias_method :backedup_get, :get
|
12
|
+
|
13
|
+
def get url
|
14
|
+
response_hashie = Hashie::Mash.new backedup_get(url, :format => :json)
|
15
|
+
|
16
|
+
response_config = response_hashie.response
|
17
|
+
request_config = response_hashie.request
|
18
|
+
|
19
|
+
template = new(response_hashie.endpoint, response_config.body)
|
20
|
+
|
21
|
+
template.id = response_hashie.id
|
22
|
+
template.default = response_config['default']
|
23
|
+
template.delay = response_config.delay
|
24
|
+
template.content_type = response_config.content_type
|
25
|
+
template.status = response_config.status
|
26
|
+
|
27
|
+
template.required_parameters = request_config.parameters
|
28
|
+
template.required_body_content = request_config.body_content
|
29
|
+
template.http_method = request_config.http_method
|
30
|
+
template.url = url
|
31
|
+
template.requests_url = response_hashie.requests_url
|
32
|
+
template.required_headers = request_config.headers
|
33
|
+
|
34
|
+
template
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
format :json
|
39
|
+
|
40
|
+
attr_accessor :content_type, :http_method, :default, :status, :delay, :required_parameters, :required_body_content, :required_headers, :endpoint, :id, :url, :requests_url
|
41
|
+
attr_reader :value
|
42
|
+
|
43
|
+
|
44
|
+
def initialize endpoint, response, default_config=TemplateConfiguration.new
|
45
|
+
|
46
|
+
@endpoint = endpoint
|
47
|
+
@content_type = default_config.content_type
|
48
|
+
@value = response
|
49
|
+
@http_method = default_config.http_method
|
50
|
+
@status = default_config.status
|
51
|
+
@delay = default_config.delay
|
52
|
+
@required_parameters = {}
|
53
|
+
@required_headers = {}
|
54
|
+
@required_body_content = []
|
55
|
+
@default = default_config.default
|
56
|
+
end
|
57
|
+
|
58
|
+
def create
|
59
|
+
@id = self.class.put("#{@endpoint}", :body => self.to_json, :headers => {'content-type' => 'application/json'})['id']
|
60
|
+
self
|
61
|
+
end
|
62
|
+
|
63
|
+
def delete
|
64
|
+
self.class.delete(url)
|
65
|
+
Request.delete requests_url
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
def to_json
|
70
|
+
{
|
71
|
+
:response => {
|
72
|
+
:body => Base64.encode64(@value),
|
73
|
+
:status => status,
|
74
|
+
:default => default,
|
75
|
+
:content_type => content_type
|
76
|
+
|
77
|
+
},
|
78
|
+
:request => {
|
79
|
+
:parameters => encode_regexs(required_parameters),
|
80
|
+
:headers => encode_regexs(required_headers),
|
81
|
+
:body_content => encode_regexs(required_body_content),
|
82
|
+
:http_method => http_method
|
83
|
+
|
84
|
+
},
|
85
|
+
:delay => delay
|
86
|
+
}.to_json
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def encode_regexs hash_or_array
|
91
|
+
case hash_or_array
|
92
|
+
when Array
|
93
|
+
hash_or_array.collect { |value| encode(value) }
|
94
|
+
else
|
95
|
+
encoded = {}
|
96
|
+
hash_or_array.each do |key, value|
|
97
|
+
encoded[key] = encode(value)
|
98
|
+
end
|
99
|
+
encoded
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def encode(value)
|
104
|
+
value.is_a?(Regexp) ? "%r{#{value.source}}" : value
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Mirage
|
2
|
+
class TemplateConfiguration
|
3
|
+
attr_accessor :http_method, :status, :delay, :content_type, :default
|
4
|
+
DEFAULT_HTTP_METHOD=:get
|
5
|
+
DEFAULT_STATUS=200
|
6
|
+
DEFAULT_DELAY=0
|
7
|
+
DEFAULT_CONTENT_TYPE="text/plain"
|
8
|
+
DEFAULT_DEFAULT=false
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
reset
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset
|
15
|
+
@http_method = DEFAULT_HTTP_METHOD
|
16
|
+
@status = DEFAULT_STATUS
|
17
|
+
@delay = DEFAULT_DELAY
|
18
|
+
@content_type = DEFAULT_CONTENT_TYPE
|
19
|
+
@default = DEFAULT_DEFAULT
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Mirage
|
2
|
+
class Templates
|
3
|
+
include HTTParty
|
4
|
+
def initialize base_url
|
5
|
+
@url = "#{base_url}/templates"
|
6
|
+
@requests = Requests.new(base_url)
|
7
|
+
@default_config = TemplateConfiguration.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def default_config &block
|
11
|
+
return @default_config unless block_given?
|
12
|
+
yield @default_config
|
13
|
+
end
|
14
|
+
|
15
|
+
def delete_all
|
16
|
+
self.class.delete(@url)
|
17
|
+
@requests.delete_all
|
18
|
+
end
|
19
|
+
|
20
|
+
def put endpoint, response
|
21
|
+
template = Mirage::Template.new "#{@url}/#{endpoint}", response, @default_config
|
22
|
+
yield template if block_given?
|
23
|
+
template.create
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/mirage.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "mirage"
|
8
|
-
s.version = "
|
8
|
+
s.version = "3.0.0.alpha.1"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Leon Davis"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-04-01"
|
13
13
|
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."
|
14
14
|
s.executables = ["mirage"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
]
|
18
18
|
s.files = [
|
19
19
|
".rvmrc",
|
20
|
+
".simplecov",
|
20
21
|
"Gemfile",
|
21
22
|
"Gemfile.lock",
|
22
23
|
"HISTORY",
|
@@ -43,43 +44,62 @@ Gem::Specification.new do |s|
|
|
43
44
|
"features/server/templates/delete.feature",
|
44
45
|
"features/server/templates/get.feature",
|
45
46
|
"features/server/templates/put/put.feature",
|
46
|
-
"features/server/templates/put/put_as_default.feature",
|
47
|
-
"features/server/templates/put/put_with_delay.feature",
|
48
|
-
"features/server/templates/put/put_with_pattern.feature",
|
49
47
|
"features/server/templates/put/put_with_substitutions.feature",
|
48
|
+
"features/server/templates/put/required_content.feature",
|
50
49
|
"features/server/web_user_interface.feature",
|
51
50
|
"features/step_definitions/my_steps.rb",
|
52
51
|
"features/support/command_line.rb",
|
53
52
|
"features/support/env.rb",
|
54
53
|
"features/support/hooks.rb",
|
55
54
|
"features/support/mirage.rb",
|
55
|
+
"features/support/web.rb",
|
56
56
|
"full_build.sh",
|
57
57
|
"lib/mirage/client.rb",
|
58
58
|
"lib/mirage/client/cli_bridge.rb",
|
59
59
|
"lib/mirage/client/client.rb",
|
60
60
|
"lib/mirage/client/error.rb",
|
61
|
-
"lib/mirage/client/
|
61
|
+
"lib/mirage/client/request.rb",
|
62
|
+
"lib/mirage/client/requests.rb",
|
62
63
|
"lib/mirage/client/runner.rb",
|
63
|
-
"lib/mirage/client/
|
64
|
+
"lib/mirage/client/template.rb",
|
65
|
+
"lib/mirage/client/template_configuration.rb",
|
66
|
+
"lib/mirage/client/templates.rb",
|
64
67
|
"mirage.gemspec",
|
65
68
|
"mirage_server.rb",
|
66
69
|
"rakefile",
|
67
70
|
"responses/default_responses.rb",
|
71
|
+
"server/app.rb",
|
72
|
+
"server/binary_data_checker.rb",
|
68
73
|
"server/extensions/hash.rb",
|
69
74
|
"server/extensions/object.rb",
|
75
|
+
"server/helpers.rb",
|
70
76
|
"server/mock_response.rb",
|
71
|
-
"
|
72
|
-
"spec/
|
73
|
-
"spec/
|
77
|
+
"server/server.rb",
|
78
|
+
"spec/client/cli_bridge_spec.rb",
|
79
|
+
"spec/client/client_spec.rb",
|
80
|
+
"spec/client/request_spec.rb",
|
81
|
+
"spec/client/requests_spec.rb",
|
82
|
+
"spec/client/runner_spec.rb",
|
83
|
+
"spec/client/template_configuration_spec.rb",
|
84
|
+
"spec/client/template_spec.rb",
|
85
|
+
"spec/client/templates_spec.rb",
|
86
|
+
"spec/resources/binary.file",
|
87
|
+
"spec/server/binary_data_checker_spec.rb",
|
88
|
+
"spec/server/helpers_spec.rb",
|
89
|
+
"spec/server/mock_response_spec.rb",
|
90
|
+
"spec/server/server_spec.rb",
|
74
91
|
"spec/spec_helper.rb",
|
92
|
+
"test.html",
|
75
93
|
"test.rb",
|
76
|
-
"
|
94
|
+
"todo.lst",
|
95
|
+
"views/index.haml",
|
96
|
+
"views/response.haml"
|
77
97
|
]
|
78
98
|
s.homepage = "https://github.com/lashd/mirage"
|
79
99
|
s.licenses = ["MIT"]
|
80
100
|
s.post_install_message = "\n===============================================================================\nThanks you for installing mirage. \n\nRun Mirage with:\n\nmirage start \n\nFor more information go to: https://github.com/lashd/mirage/wiki\n===============================================================================\n"
|
81
101
|
s.require_paths = ["lib"]
|
82
|
-
s.rubygems_version = "1.8.
|
102
|
+
s.rubygems_version = "1.8.24"
|
83
103
|
s.summary = "Mirage is a easy mock server for testing your applications"
|
84
104
|
|
85
105
|
if s.respond_to? :specification_version then
|
@@ -90,10 +110,10 @@ Gem::Specification.new do |s|
|
|
90
110
|
s.add_runtime_dependency(%q<childprocess>, [">= 0"])
|
91
111
|
s.add_runtime_dependency(%q<waitforit>, [">= 0"])
|
92
112
|
s.add_runtime_dependency(%q<thor>, [">= 0"])
|
93
|
-
s.
|
113
|
+
s.add_runtime_dependency(%q<ptools>, [">= 0"])
|
114
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
115
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
94
116
|
s.add_development_dependency(%q<rake>, [">= 0"])
|
95
|
-
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
96
|
-
s.add_development_dependency(%q<rspec>, [">= 0"])
|
97
117
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
98
118
|
s.add_development_dependency(%q<sinatra-contrib>, [">= 0"])
|
99
119
|
s.add_development_dependency(%q<mechanize>, [">= 0"])
|
@@ -104,10 +124,10 @@ Gem::Specification.new do |s|
|
|
104
124
|
s.add_dependency(%q<childprocess>, [">= 0"])
|
105
125
|
s.add_dependency(%q<waitforit>, [">= 0"])
|
106
126
|
s.add_dependency(%q<thor>, [">= 0"])
|
107
|
-
s.add_dependency(%q<
|
127
|
+
s.add_dependency(%q<ptools>, [">= 0"])
|
128
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
129
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
108
130
|
s.add_dependency(%q<rake>, [">= 0"])
|
109
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
110
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
111
131
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
112
132
|
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
113
133
|
s.add_dependency(%q<mechanize>, [">= 0"])
|
@@ -119,10 +139,10 @@ Gem::Specification.new do |s|
|
|
119
139
|
s.add_dependency(%q<childprocess>, [">= 0"])
|
120
140
|
s.add_dependency(%q<waitforit>, [">= 0"])
|
121
141
|
s.add_dependency(%q<thor>, [">= 0"])
|
122
|
-
s.add_dependency(%q<
|
142
|
+
s.add_dependency(%q<ptools>, [">= 0"])
|
143
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
144
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
123
145
|
s.add_dependency(%q<rake>, [">= 0"])
|
124
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
125
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
126
146
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
127
147
|
s.add_dependency(%q<sinatra-contrib>, [">= 0"])
|
128
148
|
s.add_dependency(%q<mechanize>, [">= 0"])
|