gorp 0.25.0 → 0.25.1

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/gorp.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gorp}
5
- s.version = "0.25.0"
5
+ s.version = "0.25.1"
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-05-09}
9
+ s.date = %q{2010-06-07}
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
data/lib/gorp/commands.rb CHANGED
@@ -84,7 +84,7 @@ module Gorp
84
84
  end
85
85
  $todos.li do
86
86
  section = $section.split(' ').first
87
- $todos.a "Section #{section}:", :href => "#section-#{$section}"
87
+ $todos.a "Section #{section}:", :href => "#section-#{section}"
88
88
  $todos.a "#{text}", :href => "#issue-#{$issue}"
89
89
  end
90
90
  end
@@ -108,13 +108,15 @@ module Gorp
108
108
  cmd "rake #{args}"
109
109
  end
110
110
 
111
- def console script
111
+ def console script, env=nil
112
112
  if File.exist? 'script/rails'
113
113
  console_cmd = 'script/rails console'
114
114
  else
115
115
  console_cmd = 'script/console'
116
116
  end
117
117
 
118
+ console_cmd = "#{console_cmd} #{env}" if env
119
+
118
120
  open('tmp/irbrc','w') {|fh| fh.write('IRB.conf[:PROMPT_MODE]=:SIMPLE')}
119
121
  if RUBY_PLATFORM =~ /cygwin/i
120
122
  open('tmp/irbin','w') {|fh| fh.write(script.gsub('\n',"\n")+"\n")}
@@ -190,7 +192,6 @@ module Gorp
190
192
  if args =~ /echo\s+((["')])(.*?)\2)\s+\|\s+(.*)$/
191
193
  args = "bash -c #{$4.inspect}"
192
194
  echo = eval($1).gsub("\\n","\n")
193
- $x.pre! args
194
195
  end
195
196
  Open3.popen3(args) do |pin, pout, perr|
196
197
  terr = Thread.new do
data/lib/gorp/net.rb CHANGED
@@ -104,6 +104,7 @@ def post path, form, options={}
104
104
  if form
105
105
  body = xhtmlparse(response.body).at('//body')
106
106
  body = xhtmlparse(response.body).root unless body
107
+ return unless body
107
108
  xforms = body.search('//form')
108
109
 
109
110
  # find matching button by action
data/lib/gorp/rails.rb CHANGED
@@ -101,6 +101,7 @@ module Gorp
101
101
 
102
102
  # determine how to invoke rails
103
103
  rails = Gorp.which_rails($rails)
104
+ rails += ' new' if `#{rails} -v` !~ /Rails 2/
104
105
  rails.sub! 'ruby ', 'ruby -rubygems '
105
106
 
106
107
  opt = (ARGV.include?('--dev') ? ' --dev' : '')
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Gorp
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 25
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 25
8
- - 0
9
- version: 0.25.0
8
+ - 1
9
+ version: 0.25.1
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-05-09 00:00:00 -04:00
17
+ date: 2010-06-07 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency