mechanize 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mechanize might be problematic. Click here for more details.

data/CHANGELOG.txt CHANGED
@@ -1,5 +1,9 @@
1
1
  = Mechanize CHANGELOG
2
2
 
3
+ == 0.7.5
4
+
5
+ * Fixed a bug when fetching files and not pages. Thanks Mat Schaffer!
6
+
3
7
  == 0.7.4
4
8
 
5
9
  * doh!
data/lib/www/mechanize.rb CHANGED
@@ -38,7 +38,7 @@ module WWW
38
38
  class Mechanize
39
39
  ##
40
40
  # The version of Mechanize you are using.
41
- VERSION = '0.7.4'
41
+ VERSION = '0.7.5'
42
42
 
43
43
  ##
44
44
  # User Agent aliases
@@ -168,7 +168,7 @@ module WWW
168
168
  # FIXME: Huge hack so that using a URI as a referer works. I need to
169
169
  # refactor everything to pass around URIs but still support
170
170
  # WWW::Mechanize::Page#base
171
- unless referer.is_a?(Page)
171
+ unless referer.is_a?(WWW::Mechanize::File)
172
172
  referer = referer.is_a?(String) ?
173
173
  Page.new(URI.parse(referer), {'content-type' => 'text/html'}) :
174
174
  Page.new(referer, {'content-type' => 'text/html'})
data/test/tc_mech.rb CHANGED
@@ -25,6 +25,12 @@ class TestMechMethods < Test::Unit::TestCase
25
25
  @agent.get('http://localhost/', [], 'http://tenderlovemaking.com/')
26
26
  assert_equal 'http://tenderlovemaking.com/', @agent.request['Referer']
27
27
  end
28
+
29
+ def test_get_with_file_referer
30
+ assert_nothing_raised do
31
+ @agent.get('http://localhost', [], WWW::Mechanize::File.new(URI.parse('http://tenderlovemaking.com/crossdomain.xml')))
32
+ end
33
+ end
28
34
 
29
35
  def test_weird_url
30
36
  assert_nothing_raised {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mechanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-13 00:00:00 -07:00
12
+ date: 2008-03-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency