mirage 1.0.2 → 1.1.0
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/bin/mirage +5 -4
- data/features/support/env.rb +8 -8
- data/full_build.sh +1 -1
- data/lib/mirage/client.rb +3 -0
- data/mirage.gemspec +1 -1
- metadata +3 -3
data/bin/mirage
CHANGED
@@ -15,8 +15,10 @@ def start_mirage(args, mirage)
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def mirage_process_ids
|
18
|
-
|
19
|
-
|
18
|
+
process_ids = []
|
19
|
+
process_ids << `ps aux | grep "Mirage Server" | grep -v grep`.split(' ')[1]
|
20
|
+
process_ids << `ps aux | grep "start_mirage" | grep -v grep`.split(' ')[1]
|
21
|
+
return process_ids.compact
|
20
22
|
end
|
21
23
|
|
22
24
|
if ARGV.include?('start')
|
@@ -42,9 +44,8 @@ elsif ARGV.include?('stop')
|
|
42
44
|
begin
|
43
45
|
mirage_process_ids.each do |id|
|
44
46
|
puts "killing #{id}"
|
45
|
-
|
47
|
+
`kill -9 #{id}`
|
46
48
|
end
|
47
|
-
|
48
49
|
rescue
|
49
50
|
puts 'Mirage is not running'
|
50
51
|
end
|
data/features/support/env.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../../lib")
|
2
2
|
require 'rubygems'
|
3
|
-
require 'bundler/setup'
|
4
|
-
Bundler.setup(:test)
|
3
|
+
#require 'bundler/setup'
|
4
|
+
#Bundler.setup(:test)
|
5
5
|
require 'mirage'
|
6
6
|
require 'cucumber'
|
7
7
|
require 'rspec'
|
@@ -36,12 +36,12 @@ end
|
|
36
36
|
|
37
37
|
module Regression
|
38
38
|
def stop_mirage
|
39
|
-
|
39
|
+
system "export RUBYOPT='' && cd #{SCRATCH} && mirage stop"
|
40
40
|
end
|
41
41
|
|
42
42
|
def start_mirage
|
43
|
-
|
44
|
-
|
43
|
+
system "truncate mirage.log --size 0"
|
44
|
+
system "export RUBYOPT='' && cd #{SCRATCH} && mirage start"
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -57,7 +57,7 @@ module IntelliJ
|
|
57
57
|
|
58
58
|
def start_mirage
|
59
59
|
puts "starting mirage"
|
60
|
-
|
60
|
+
system "truncate mirage.log --size 0"
|
61
61
|
system "cd #{SCRATCH} && ../bin/mirage start"
|
62
62
|
|
63
63
|
wait_until do
|
@@ -81,8 +81,8 @@ Before do
|
|
81
81
|
start_mirage
|
82
82
|
end
|
83
83
|
|
84
|
-
|
85
|
-
|
84
|
+
system "cd #{SCRATCH}/ && ls | grep -v mirage.log | xargs rm -rf"
|
85
|
+
system "truncate -s 0 #{SCRATCH}/mirage.log"
|
86
86
|
end
|
87
87
|
|
88
88
|
at_exit do
|
data/full_build.sh
CHANGED
data/lib/mirage/client.rb
CHANGED
@@ -36,6 +36,9 @@ module Mirage
|
|
36
36
|
# If a response is not found a ResponseNotFound exception is thrown
|
37
37
|
#
|
38
38
|
# Examples:
|
39
|
+
# Getting a response without any parameters or body content
|
40
|
+
# Mirage::Client.get(endpoint)
|
41
|
+
#
|
39
42
|
# Getting a response, passing request parameters
|
40
43
|
# Mirage::Client.new.get('greeting', :param1 => 'value1', param2=>'value2')
|
41
44
|
#
|
data/mirage.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'mirage'
|
3
|
-
s.version = '1.0
|
3
|
+
s.version = '1.1.0'
|
4
4
|
s.authors = ["Leon Davis"]
|
5
5
|
s.homepage = 'https://github.com/lashd/mirage'
|
6
6
|
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.'
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mirage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0
|
5
|
+
version: 1.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Leon Davis
|
@@ -144,7 +144,7 @@ licenses: []
|
|
144
144
|
|
145
145
|
post_install_message: "\n\
|
146
146
|
===============================================================================\n\
|
147
|
-
Thanks you for installing mirage-1.0.
|
147
|
+
Thanks you for installing mirage-1.1.0. \n\n\
|
148
148
|
Run Mirage with:\n\n\
|
149
149
|
mirage start \n\n\
|
150
150
|
For more information go to: https://github.com/lashd/mirage/wiki\n\
|
@@ -171,7 +171,7 @@ rubyforge_project:
|
|
171
171
|
rubygems_version: 1.6.1
|
172
172
|
signing_key:
|
173
173
|
specification_version: 3
|
174
|
-
summary: mirage-1.0
|
174
|
+
summary: mirage-1.1.0
|
175
175
|
test_files:
|
176
176
|
- features/client/clear.feature
|
177
177
|
- features/client/get.feature
|