gorp 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gorp}
5
- s.version = "0.24.0"
5
+ s.version = "0.25.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Ruby"]
9
- s.date = %q{2010-04-28}
9
+ s.date = %q{2010-05-09}
10
10
  s.description = %q{ Enables the creation of scenarios that involve creating a rails project,
11
11
  starting and stoppping of servers, generating projects, editing files,
12
12
  issuing http requests, running of commands, etc. Output is captured as
@@ -186,6 +186,12 @@ module Gorp
186
186
  end
187
187
 
188
188
  def popen3 args, highlight=[]
189
+ echo = ''
190
+ if args =~ /echo\s+((["')])(.*?)\2)\s+\|\s+(.*)$/
191
+ args = "bash -c #{$4.inspect}"
192
+ echo = eval($1).gsub("\\n","\n")
193
+ $x.pre! args
194
+ end
189
195
  Open3.popen3(args) do |pin, pout, perr|
190
196
  terr = Thread.new do
191
197
  begin
@@ -193,7 +199,12 @@ module Gorp
193
199
  rescue EOFError
194
200
  end
195
201
  end
196
- pin.close
202
+ tin = Thread.new do
203
+ echo.split("\n").each do |line|
204
+ pin.puts line
205
+ end
206
+ pin.close
207
+ end
197
208
  until pout.eof?
198
209
  begin
199
210
  line = pout.readline
@@ -218,6 +229,7 @@ module Gorp
218
229
  end
219
230
  end
220
231
  terr.join
232
+ tin.join
221
233
  end
222
234
  end
223
235
 
@@ -1,7 +1,7 @@
1
1
  module Gorp
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 24
4
+ MINOR = 25
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 24
7
+ - 25
8
8
  - 0
9
- version: 0.24.0
9
+ version: 0.25.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Ruby
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-28 00:00:00 -04:00
17
+ date: 2010-05-09 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency