gorp 0.10.2 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- data/gorp.gemspec +2 -2
- data/lib/gorp.rb +10 -0
- data/lib/version.rb +2 -2
- metadata +2 -2
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.
|
5
|
+
s.version = "0.11.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{2009-12-
|
9
|
+
s.date = %q{2009-12-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.rb
CHANGED
@@ -440,6 +440,16 @@ def post path, form
|
|
440
440
|
body = xhtmlparse(response.body).at('//body')
|
441
441
|
body = xhtmlparse(response.body).root unless body
|
442
442
|
xform = body.at('//form[.//input[@name="commit"]]')
|
443
|
+
|
444
|
+
if !xform
|
445
|
+
# if page isn't one big form, find matching button on page instead
|
446
|
+
require 'cgi'
|
447
|
+
query = form.map{|key,val| /[&?]#{key}=#{CGI.escape(val.to_s)}(&|$)/}
|
448
|
+
xform = body.search('form').find do |element|
|
449
|
+
query.all? {|kv| element['action'] =~ kv}
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
443
453
|
return unless xform
|
444
454
|
path = xform.attribute('action').to_s unless
|
445
455
|
xform.attribute('action').to_s.empty?
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gorp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-07 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|