mechanize 0.9.2 → 0.9.3

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.

@@ -15,7 +15,13 @@ module WWW
15
15
  def handle(ctx, params)
16
16
  uri = params[:uri]
17
17
  http_obj = params[:connection]
18
- if uri.scheme == 'https' && ! http_obj.started? && ! http_obj.frozen?
18
+
19
+ ssl = nil
20
+ if http_obj.instance_variable_defined?(:@ssl_context)
21
+ http_obj.instance_variable_get(:@ssl_context)
22
+ end
23
+
24
+ if uri.scheme == 'https' && ! http_obj.started? && ! ssl.frozen?
19
25
  http_obj.use_ssl = true
20
26
  http_obj.verify_mode = OpenSSL::SSL::VERIFY_NONE
21
27
  if @ca_file
@@ -15,7 +15,11 @@ module WWW
15
15
  referer = params[:referer]
16
16
  unless uri.is_a?(URI)
17
17
  uri = uri.to_s.strip.gsub(/[^#{0.chr}-#{126.chr}]/) { |match|
18
- sprintf('%%%X', match.unpack($KCODE == 'UTF8' ? 'U' : 'c')[0])
18
+ if RUBY_VERSION >= "1.9.0"
19
+ CGI.escape(match)
20
+ else
21
+ sprintf('%%%X', match.unpack($KCODE == 'UTF8' ? 'U' : 'c')[0])
22
+ end
19
23
  }
20
24
 
21
25
  escaped_uri = Util.html_unescape(
@@ -10,54 +10,56 @@ module WWW
10
10
  def initialize
11
11
  @jar = {}
12
12
  end
13
-
13
+
14
14
  # Add a cookie to the Jar.
15
15
  def add(uri, cookie)
16
16
  return unless uri.host =~ /#{CookieJar.strip_port(cookie.domain)}$/i
17
+
17
18
  normal_domain = cookie.domain.downcase
19
+
18
20
  unless @jar.has_key?(normal_domain)
19
- @jar[normal_domain] = Hash.new
21
+ @jar[normal_domain] = Hash.new { |h,k| h[k] = {} }
20
22
  end
21
-
22
- @jar[normal_domain][cookie.name] = cookie
23
- cleanup()
23
+
24
+ @jar[normal_domain][cookie.path][cookie.name] = cookie
25
+ cleanup
24
26
  cookie
25
27
  end
26
-
28
+
27
29
  # Fetch the cookies that should be used for the URI object passed in.
28
30
  def cookies(url)
29
31
  cleanup
30
- cookies = []
31
32
  url.path = '/' if url.path.empty?
32
- @jar.each_key do |domain|
33
- if url.host =~ /#{CookieJar.strip_port(domain)}$/i
34
- @jar[domain].each_key do |name|
35
- if url.path =~ /^#{@jar[domain][name].path}/
36
- if @jar[domain][name].expires.nil?
37
- cookies << @jar[domain][name]
38
- elsif Time.now < @jar[domain][name].expires
39
- cookies << @jar[domain][name]
40
- end
41
- end
42
- end
43
- end
44
- end
45
-
46
- cookies
33
+
34
+ domains = @jar.find_all { |domain, _|
35
+ url.host =~ /#{CookieJar.strip_port(domain)}$/i
36
+ }
37
+
38
+ return [] unless domains.length > 0
39
+
40
+ cookies = domains.map { |_,paths|
41
+ paths.find_all { |path, _|
42
+ url.path =~ /^#{Regexp.escape(path)}/
43
+ }.map { |_,cookie| cookie.values }
44
+ }.flatten
45
+
46
+ cookies.find_all { |cookie|
47
+ !cookie.expires || Time.now < cookie.expires
48
+ }
47
49
  end
48
-
50
+
49
51
  def empty?(url)
50
52
  cookies(url).length > 0 ? false : true
51
53
  end
52
54
 
53
55
  def to_a
54
56
  cookies = []
55
- @jar.each_key do |domain|
56
- @jar[domain].each_key do |name|
57
- cookies << @jar[domain][name]
57
+ @jar.each do |domain, paths|
58
+ paths.each do |path, names|
59
+ cookies << names.values
58
60
  end
59
61
  end
60
- cookies
62
+ cookies.flatten
61
63
  end
62
64
 
63
65
  # Save the cookie jar to a file in the format specified.
@@ -106,14 +108,14 @@ module WWW
106
108
  def load_cookiestxt(io)
107
109
  now = Time.now
108
110
  fakeuri = Struct.new(:host) # add_cookie wants something resembling a URI.
109
-
111
+
110
112
  io.each_line do |line|
111
113
  line.chomp!
112
114
  line.gsub!(/#.+/, '')
113
115
  fields = line.split("\t")
114
-
116
+
115
117
  next if fields.length != 7
116
-
118
+
117
119
  expires_seconds = fields[4].to_i
118
120
  begin
119
121
  expires = Time.at(expires_seconds)
@@ -123,7 +125,7 @@ module WWW
123
125
  # expires = DateTime.new(1970,1,1) + ((expires_seconds + 1) / (60*60*24.0))
124
126
  end
125
127
  next if expires < now
126
-
128
+
127
129
  c = WWW::Mechanize::Cookie.new(fields[5], fields[6])
128
130
  c.domain = fields[0]
129
131
  # Field 1 indicates whether the cookie can be read by other machines at the same domain.
@@ -132,50 +134,48 @@ module WWW
132
134
  c.secure = (fields[3] == "TRUE") # Requires a secure connection
133
135
  c.expires = expires # Time the cookie expires.
134
136
  c.version = 0 # Conforms to Netscape cookie spec.
135
-
137
+
136
138
  add(fakeuri.new(c.domain), c)
137
139
  end
138
140
  @jar
139
141
  end
140
-
142
+
141
143
  # Write cookies to Mozilla cookies.txt-style IO stream
142
144
  def dump_cookiestxt(io)
143
- @jar.each_pair do |domain, cookies|
144
- cookies.each_pair do |name, cookie|
145
- fields = []
146
- fields[0] = cookie.domain
147
-
148
- if cookie.domain =~ /^\./
149
- fields[1] = "TRUE"
150
- else
151
- fields[1] = "FALSE"
152
- end
153
-
154
- fields[2] = cookie.path
155
-
156
- if cookie.secure == true
157
- fields[3] = "TRUE"
158
- else
159
- fields[3] = "FALSE"
160
- end
161
-
162
- fields[4] = cookie.expires.to_i.to_s
163
-
164
- fields[5] = cookie.name
165
- fields[6] = cookie.value
166
- io.puts(fields.join("\t"))
167
- end
145
+ to_a.each do |cookie|
146
+ fields = []
147
+ fields[0] = cookie.domain
148
+
149
+ if cookie.domain =~ /^\./
150
+ fields[1] = "TRUE"
151
+ else
152
+ fields[1] = "FALSE"
153
+ end
154
+
155
+ fields[2] = cookie.path
156
+
157
+ if cookie.secure == true
158
+ fields[3] = "TRUE"
159
+ else
160
+ fields[3] = "FALSE"
161
+ end
162
+
163
+ fields[4] = cookie.expires.to_i.to_s
164
+
165
+ fields[5] = cookie.name
166
+ fields[6] = cookie.value
167
+ io.puts(fields.join("\t"))
168
168
  end
169
169
  end
170
170
 
171
171
  private
172
172
  # Remove expired cookies
173
173
  def cleanup
174
- @jar.each_key do |domain|
175
- @jar[domain].each_key do |name|
176
- unless @jar[domain][name].expires.nil?
177
- if Time.now > @jar[domain][name].expires
178
- @jar[domain].delete(name)
174
+ @jar.each do |domain, paths|
175
+ paths.each do |path, names|
176
+ names.each do |cookie_name, cookie|
177
+ if cookie.expires && Time.now > cookie.expires
178
+ paths[path].delete(cookie_name)
179
179
  end
180
180
  end
181
181
  end
@@ -39,7 +39,7 @@ module WWW
39
39
  if disposition = @response['content-disposition']
40
40
  disposition.split(/;\s*/).each do |pair|
41
41
  k,v = pair.split(/=/, 2)
42
- @filename = v if k.downcase == 'filename'
42
+ @filename = v if k && k.downcase == 'filename'
43
43
  end
44
44
  else
45
45
  if @uri
@@ -139,6 +139,7 @@ module WWW
139
139
  # This method is sub-method of build_query.
140
140
  # It converts charset of query value of fields into excepted one.
141
141
  def proc_query(field)
142
+ return unless field.query_value
142
143
  field.query_value.map{|(name, val)|
143
144
  [from_native_charset(name), from_native_charset(val.to_s)]
144
145
  }
@@ -37,7 +37,7 @@ module WWW
37
37
  end
38
38
 
39
39
  def query_value
40
- value ? [[name, value]] : ''
40
+ value ? [[name, value]] : nil
41
41
  end
42
42
  end
43
43
  end
@@ -21,20 +21,28 @@ module WWW
21
21
  extend Forwardable
22
22
 
23
23
  attr_accessor :mech
24
- attr_accessor :encoding
25
24
 
26
25
  def initialize(uri=nil, response=nil, body=nil, code=nil, mech=nil)
27
26
  @encoding = nil
28
- response.each do |header,v|
27
+
28
+ method = response.respond_to?(:each_header) ? :each_header : :each
29
+ response.send(method) do |header,v|
29
30
  next unless v =~ /charset/i
30
- @encoding = v.split('=').last.strip
31
+ encoding = v.split('=').last.strip
32
+ @encoding = encoding unless encoding == 'none'
31
33
  end
34
+
35
+ # Force the encoding to be 8BIT so we can perform regular expressions.
36
+ # We'll set it to the detected encoding later
37
+ body.force_encoding('ASCII-8BIT') if defined?(Encoding) && body
38
+
32
39
  @encoding ||= Util.detect_charset(body)
33
- body = Util.to_native_charset(body, @encoding) rescue body
34
40
 
35
41
  super(uri, response, body, code)
36
42
  @mech ||= mech
37
43
 
44
+ @encoding = nil if html_body =~ /<meta[^>]*charset[^>]*>/i
45
+
38
46
  raise Mechanize::ContentTypeError.new(response['content-type']) unless
39
47
  response['content-type'] =~ /^(text\/html)|(application\/xhtml\+xml)/i
40
48
  @parser = @links = @forms = @meta = @bases = @frames = @iframes = nil
@@ -46,15 +54,27 @@ module WWW
46
54
  end
47
55
  end
48
56
 
57
+ def encoding=(encoding)
58
+ @encoding = encoding
59
+
60
+ if @parser && @parser.encoding.downcase != encoding.downcase
61
+ # lazy reinitialize the parser with the new encoding
62
+ @parser = nil
63
+ end
64
+ end
65
+
66
+ def encoding
67
+ parser.respond_to?(:encoding) ? parser.encoding : nil
68
+ end
69
+
49
70
  def parser
50
71
  return @parser if @parser
51
72
 
52
73
  if body && response
53
- html_body = body.length > 0 ? body : '<html></html>'
54
- if WWW::Mechanize.html_parser == Nokogiri::HTML
55
- @parser = Mechanize.html_parser.parse(html_body, nil, @encoding)
74
+ if mech.html_parser == Nokogiri::HTML
75
+ @parser = mech.html_parser.parse(html_body, nil, @encoding)
56
76
  else
57
- @parser = Mechanize.html_parser.parse(html_body)
77
+ @parser = mech.html_parser.parse(html_body)
58
78
  end
59
79
  end
60
80
 
@@ -118,8 +138,9 @@ module WWW
118
138
  next unless node['http-equiv'] && node['content']
119
139
  (equiv, content) = node['http-equiv'], node['content']
120
140
  if equiv && equiv.downcase == 'refresh'
121
- if content && content =~ /^\d+\s*;\s*url\s*=\s*'?([^\s']+)/i
122
- node['href'] = $1
141
+ Meta.parse(content, uri) do |delay, href|
142
+ node['delay'] = delay
143
+ node['href'] = href
123
144
  Meta.new(node, @mech, self)
124
145
  end
125
146
  end
@@ -140,6 +161,16 @@ module WWW
140
161
  @iframes ||=
141
162
  search('iframe').map { |node| Frame.new(node, @mech, self) }
142
163
  end
164
+
165
+ private
166
+
167
+ def html_body
168
+ if body
169
+ body.length > 0 ? body : '<html></html>'
170
+ else
171
+ ''
172
+ end
173
+ end
143
174
  end
144
175
  end
145
176
  end
@@ -4,7 +4,48 @@ module WWW
4
4
  # This class encapsulates a Meta tag. Mechanize treats meta tags just
5
5
  # like 'a' tags. Meta objects will contain links, but most likely will
6
6
  # have no text.
7
- class Meta < Link; end
7
+ class Meta < Link
8
+
9
+ # Matches the content attribute of a meta tag. After the match:
10
+ #
11
+ # $1:: delay
12
+ # $3:: url
13
+ #
14
+ CONTENT_REGEXP = /^\s*(\d+\.?\d*)(;|;\s*url=\s*['"]?(\S*?)['"]?)?\s*$/i
15
+
16
+ class << self
17
+ # Parses the delay and url from the content attribute of a meta tag.
18
+ # Parse requires the uri of the current page to infer a url when no
19
+ # url is specified. If a block is given, the parsed delay and url
20
+ # will be passed to it for further processing.
21
+ #
22
+ # Returns nil if the delay and url cannot be parsed.
23
+ #
24
+ # # <meta http-equiv="refresh" content="5;url=http://example.com/" />
25
+ # uri = URI.parse('http://current.com/')
26
+ #
27
+ # Meta.parse("5;url=http://example.com/", uri) # => ['5', 'http://example.com/']
28
+ # Meta.parse("5;url=", uri) # => ['5', 'http://current.com/']
29
+ # Meta.parse("5", uri) # => ['5', 'http://current.com/']
30
+ # Meta.parse("invalid content", uri) # => nil
31
+ #
32
+ def parse(content, uri)
33
+ if content && content =~ CONTENT_REGEXP
34
+ delay, url = $1, $3
35
+
36
+ url = case url
37
+ when nil, "" then uri.to_s
38
+ when /^http/i then url
39
+ else "http://#{uri.host}#{url}"
40
+ end
41
+
42
+ block_given? ? yield(delay, url) : [delay, url]
43
+ else
44
+ nil
45
+ end
46
+ end
47
+ end
48
+ end
8
49
  end
9
50
  end
10
51
  end
@@ -19,7 +19,7 @@ module WWW
19
19
  [WEBrick::HTTPUtils.escape_form(k.to_s),
20
20
  WEBrick::HTTPUtils.escape_form(v.to_s)].join("=")
21
21
  =end
22
-
22
+
23
23
  end
24
24
  }.compact.join('&')
25
25
  end
@@ -2,37 +2,41 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mechanize}
5
- s.version = "0.9.1.20090304135355"
5
+ s.version = "0.9.2.20090428104652"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Aaron Patterson", "Mike Dalessio"]
9
- s.date = %q{2009-03-04}
10
- s.description = %q{The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.}
9
+ s.date = %q{2009-04-28}
10
+ s.description = %q{The Mechanize library is used for automating interaction with websites.
11
+ Mechanize automatically stores and sends cookies, follows redirects,
12
+ can follow links, and submit forms. Form fields can be populated and
13
+ submitted. Mechanize also keeps track of the sites that you have visited as
14
+ a history.}
11
15
  s.email = ["aaronp@rubyforge.org", "mike.dalessio@gmail.com"]
12
16
  s.extra_rdoc_files = ["Manifest.txt", "CHANGELOG.rdoc", "EXAMPLES.rdoc", "FAQ.rdoc", "GUIDE.rdoc", "LICENSE.rdoc", "README.rdoc"]
13
- s.files = ["CHANGELOG.rdoc", "EXAMPLES.rdoc", "FAQ.rdoc", "GUIDE.rdoc", "LICENSE.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "examples/flickr_upload.rb", "examples/mech-dump.rb", "examples/proxy_req.rb", "examples/rubyforge.rb", "examples/spider.rb", "lib/mechanize.rb", "lib/www/mechanize.rb", "lib/www/mechanize/chain.rb", "lib/www/mechanize/chain/auth_headers.rb", "lib/www/mechanize/chain/body_decoding_handler.rb", "lib/www/mechanize/chain/connection_resolver.rb", "lib/www/mechanize/chain/custom_headers.rb", "lib/www/mechanize/chain/handler.rb", "lib/www/mechanize/chain/header_resolver.rb", "lib/www/mechanize/chain/parameter_resolver.rb", "lib/www/mechanize/chain/post_connect_hook.rb", "lib/www/mechanize/chain/pre_connect_hook.rb", "lib/www/mechanize/chain/request_resolver.rb", "lib/www/mechanize/chain/response_body_parser.rb", "lib/www/mechanize/chain/response_header_handler.rb", "lib/www/mechanize/chain/response_reader.rb", "lib/www/mechanize/chain/ssl_resolver.rb", "lib/www/mechanize/chain/uri_resolver.rb", "lib/www/mechanize/content_type_error.rb", "lib/www/mechanize/cookie.rb", "lib/www/mechanize/cookie_jar.rb", "lib/www/mechanize/file.rb", "lib/www/mechanize/file_response.rb", "lib/www/mechanize/file_saver.rb", "lib/www/mechanize/form.rb", "lib/www/mechanize/form/button.rb", "lib/www/mechanize/form/check_box.rb", "lib/www/mechanize/form/field.rb", "lib/www/mechanize/form/file_upload.rb", "lib/www/mechanize/form/image_button.rb", "lib/www/mechanize/form/multi_select_list.rb", "lib/www/mechanize/form/option.rb", "lib/www/mechanize/form/radio_button.rb", "lib/www/mechanize/form/select_list.rb", "lib/www/mechanize/headers.rb", "lib/www/mechanize/history.rb", "lib/www/mechanize/inspect.rb", "lib/www/mechanize/monkey_patch.rb", "lib/www/mechanize/page.rb", "lib/www/mechanize/page/base.rb", "lib/www/mechanize/page/frame.rb", "lib/www/mechanize/page/link.rb", "lib/www/mechanize/page/meta.rb", "lib/www/mechanize/pluggable_parsers.rb", "lib/www/mechanize/redirect_limit_reached_error.rb", "lib/www/mechanize/redirect_not_get_or_head_error.rb", "lib/www/mechanize/response_code_error.rb", "lib/www/mechanize/unsupported_scheme_error.rb", "lib/www/mechanize/util.rb", "mechanize.gemspec", "test/chain/test_argument_validator.rb", "test/chain/test_custom_headers.rb", "test/chain/test_parameter_resolver.rb", "test/chain/test_request_resolver.rb", "test/chain/test_response_reader.rb", "test/data/htpasswd", "test/data/server.crt", "test/data/server.csr", "test/data/server.key", "test/data/server.pem", "test/helper.rb", "test/htdocs/alt_text.html", "test/htdocs/bad_form_test.html", "test/htdocs/button.jpg", "test/htdocs/empty_form.html", "test/htdocs/file_upload.html", "test/htdocs/find_link.html", "test/htdocs/form_multi_select.html", "test/htdocs/form_multival.html", "test/htdocs/form_no_action.html", "test/htdocs/form_no_input_name.html", "test/htdocs/form_select.html", "test/htdocs/form_select_all.html", "test/htdocs/form_select_none.html", "test/htdocs/form_select_noopts.html", "test/htdocs/form_set_fields.html", "test/htdocs/form_test.html", "test/htdocs/frame_test.html", "test/htdocs/google.html", "test/htdocs/iframe_test.html", "test/htdocs/index.html", "test/htdocs/link with space.html", "test/htdocs/meta_cookie.html", "test/htdocs/no_title_test.html", "test/htdocs/relative/tc_relative_links.html", "test/htdocs/tc_bad_links.html", "test/htdocs/tc_base_link.html", "test/htdocs/tc_blank_form.html", "test/htdocs/tc_checkboxes.html", "test/htdocs/tc_encoded_links.html", "test/htdocs/tc_follow_meta.html", "test/htdocs/tc_form_action.html", "test/htdocs/tc_links.html", "test/htdocs/tc_no_attributes.html", "test/htdocs/tc_pretty_print.html", "test/htdocs/tc_radiobuttons.html", "test/htdocs/tc_referer.html", "test/htdocs/tc_relative_links.html", "test/htdocs/tc_textarea.html", "test/htdocs/unusual______.html", "test/servlets.rb", "test/ssl_server.rb", "test/test_authenticate.rb", "test/test_bad_links.rb", "test/test_blank_form.rb", "test/test_checkboxes.rb", "test/test_content_type.rb", "test/test_cookie_class.rb", "test/test_cookie_jar.rb", "test/test_cookies.rb", "test/test_encoded_links.rb", "test/test_errors.rb", "test/test_follow_meta.rb", "test/test_form_action.rb", "test/test_form_as_hash.rb", "test/test_form_button.rb", "test/test_form_no_inputname.rb", "test/test_forms.rb", "test/test_frames.rb", "test/test_get_headers.rb", "test/test_gzipping.rb", "test/test_hash_api.rb", "test/test_history.rb", "test/test_history_added.rb", "test/test_html_unscape_forms.rb", "test/test_if_modified_since.rb", "test/test_keep_alive.rb", "test/test_links.rb", "test/test_mech.rb", "test/test_mechanize_file.rb", "test/test_multi_select.rb", "test/test_no_attributes.rb", "test/test_option.rb", "test/test_page.rb", "test/test_pluggable_parser.rb", "test/test_post_form.rb", "test/test_pretty_print.rb", "test/test_radiobutton.rb", "test/test_redirect_limit_reached.rb", "test/test_redirect_verb_handling.rb", "test/test_referer.rb", "test/test_relative_links.rb", "test/test_request.rb", "test/test_response_code.rb", "test/test_save_file.rb", "test/test_scheme.rb", "test/test_select.rb", "test/test_select_all.rb", "test/test_select_none.rb", "test/test_select_noopts.rb", "test/test_set_fields.rb", "test/test_ssl_server.rb", "test/test_subclass.rb", "test/test_textarea.rb", "test/test_upload.rb", "test/test_verbs.rb"]
17
+ s.files = ["CHANGELOG.rdoc", "EXAMPLES.rdoc", "FAQ.rdoc", "GUIDE.rdoc", "LICENSE.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "examples/flickr_upload.rb", "examples/mech-dump.rb", "examples/proxy_req.rb", "examples/rubyforge.rb", "examples/spider.rb", "lib/mechanize.rb", "lib/www/mechanize.rb", "lib/www/mechanize/chain.rb", "lib/www/mechanize/chain/auth_headers.rb", "lib/www/mechanize/chain/body_decoding_handler.rb", "lib/www/mechanize/chain/connection_resolver.rb", "lib/www/mechanize/chain/custom_headers.rb", "lib/www/mechanize/chain/handler.rb", "lib/www/mechanize/chain/header_resolver.rb", "lib/www/mechanize/chain/parameter_resolver.rb", "lib/www/mechanize/chain/post_connect_hook.rb", "lib/www/mechanize/chain/pre_connect_hook.rb", "lib/www/mechanize/chain/request_resolver.rb", "lib/www/mechanize/chain/response_body_parser.rb", "lib/www/mechanize/chain/response_header_handler.rb", "lib/www/mechanize/chain/response_reader.rb", "lib/www/mechanize/chain/ssl_resolver.rb", "lib/www/mechanize/chain/uri_resolver.rb", "lib/www/mechanize/content_type_error.rb", "lib/www/mechanize/cookie.rb", "lib/www/mechanize/cookie_jar.rb", "lib/www/mechanize/file.rb", "lib/www/mechanize/file_response.rb", "lib/www/mechanize/file_saver.rb", "lib/www/mechanize/form.rb", "lib/www/mechanize/form/button.rb", "lib/www/mechanize/form/check_box.rb", "lib/www/mechanize/form/field.rb", "lib/www/mechanize/form/file_upload.rb", "lib/www/mechanize/form/image_button.rb", "lib/www/mechanize/form/multi_select_list.rb", "lib/www/mechanize/form/option.rb", "lib/www/mechanize/form/radio_button.rb", "lib/www/mechanize/form/select_list.rb", "lib/www/mechanize/headers.rb", "lib/www/mechanize/history.rb", "lib/www/mechanize/inspect.rb", "lib/www/mechanize/monkey_patch.rb", "lib/www/mechanize/page.rb", "lib/www/mechanize/page/base.rb", "lib/www/mechanize/page/frame.rb", "lib/www/mechanize/page/link.rb", "lib/www/mechanize/page/meta.rb", "lib/www/mechanize/pluggable_parsers.rb", "lib/www/mechanize/redirect_limit_reached_error.rb", "lib/www/mechanize/redirect_not_get_or_head_error.rb", "lib/www/mechanize/response_code_error.rb", "lib/www/mechanize/unsupported_scheme_error.rb", "lib/www/mechanize/util.rb", "mechanize.gemspec", "test/chain/test_argument_validator.rb", "test/chain/test_custom_headers.rb", "test/chain/test_parameter_resolver.rb", "test/chain/test_request_resolver.rb", "test/chain/test_response_reader.rb", "test/data/htpasswd", "test/data/server.crt", "test/data/server.csr", "test/data/server.key", "test/data/server.pem", "test/helper.rb", "test/htdocs/alt_text.html", "test/htdocs/bad_form_test.html", "test/htdocs/button.jpg", "test/htdocs/empty_form.html", "test/htdocs/file_upload.html", "test/htdocs/find_link.html", "test/htdocs/form_multi_select.html", "test/htdocs/form_multival.html", "test/htdocs/form_no_action.html", "test/htdocs/form_no_input_name.html", "test/htdocs/form_select.html", "test/htdocs/form_select_all.html", "test/htdocs/form_select_none.html", "test/htdocs/form_select_noopts.html", "test/htdocs/form_set_fields.html", "test/htdocs/form_test.html", "test/htdocs/frame_test.html", "test/htdocs/google.html", "test/htdocs/iframe_test.html", "test/htdocs/index.html", "test/htdocs/link with space.html", "test/htdocs/meta_cookie.html", "test/htdocs/no_title_test.html", "test/htdocs/relative/tc_relative_links.html", "test/htdocs/tc_bad_links.html", "test/htdocs/tc_base_link.html", "test/htdocs/tc_blank_form.html", "test/htdocs/tc_checkboxes.html", "test/htdocs/tc_encoded_links.html", "test/htdocs/tc_follow_meta.html", "test/htdocs/tc_form_action.html", "test/htdocs/tc_links.html", "test/htdocs/tc_no_attributes.html", "test/htdocs/tc_pretty_print.html", "test/htdocs/tc_radiobuttons.html", "test/htdocs/tc_referer.html", "test/htdocs/tc_relative_links.html", "test/htdocs/tc_textarea.html", "test/htdocs/unusual______.html", "test/servlets.rb", "test/ssl_server.rb", "test/test_authenticate.rb", "test/test_bad_links.rb", "test/test_blank_form.rb", "test/test_checkboxes.rb", "test/test_content_type.rb", "test/test_cookie_class.rb", "test/test_cookie_jar.rb", "test/test_cookies.rb", "test/test_encoded_links.rb", "test/test_errors.rb", "test/test_follow_meta.rb", "test/test_form_action.rb", "test/test_form_as_hash.rb", "test/test_form_button.rb", "test/test_form_no_inputname.rb", "test/test_forms.rb", "test/test_frames.rb", "test/test_get_headers.rb", "test/test_gzipping.rb", "test/test_hash_api.rb", "test/test_history.rb", "test/test_history_added.rb", "test/test_html_unscape_forms.rb", "test/test_if_modified_since.rb", "test/test_keep_alive.rb", "test/test_links.rb", "test/test_mech.rb", "test/test_mechanize_file.rb", "test/test_multi_select.rb", "test/test_no_attributes.rb", "test/test_option.rb", "test/test_page.rb", "test/test_pluggable_parser.rb", "test/test_post_form.rb", "test/test_pretty_print.rb", "test/test_radiobutton.rb", "test/test_redirect_limit_reached.rb", "test/test_redirect_verb_handling.rb", "test/test_referer.rb", "test/test_relative_links.rb", "test/test_request.rb", "test/test_response_code.rb", "test/test_save_file.rb", "test/test_scheme.rb", "test/test_select.rb", "test/test_select_all.rb", "test/test_select_none.rb", "test/test_select_noopts.rb", "test/test_set_fields.rb", "test/test_ssl_server.rb", "test/test_subclass.rb", "test/test_textarea.rb", "test/test_upload.rb", "test/test_verbs.rb", "test/chain/test_header_resolver.rb", "test/test_meta.rb"]
14
18
  s.has_rdoc = true
15
19
  s.homepage = %q{ http://mechanize.rubyforge.org/}
16
20
  s.rdoc_options = ["--main", "README.rdoc"]
17
21
  s.require_paths = ["lib"]
18
22
  s.rubyforge_project = %q{mechanize}
19
- s.rubygems_version = %q{1.3.1}
23
+ s.rubygems_version = %q{1.3.2}
20
24
  s.summary = %q{Mechanize provides automated web-browsing}
21
- s.test_files = ["test/chain/test_argument_validator.rb", "test/chain/test_custom_headers.rb", "test/chain/test_parameter_resolver.rb", "test/chain/test_request_resolver.rb", "test/chain/test_response_reader.rb", "test/test_authenticate.rb", "test/test_bad_links.rb", "test/test_blank_form.rb", "test/test_checkboxes.rb", "test/test_content_type.rb", "test/test_cookie_class.rb", "test/test_cookie_jar.rb", "test/test_cookies.rb", "test/test_encoded_links.rb", "test/test_errors.rb", "test/test_follow_meta.rb", "test/test_form_action.rb", "test/test_form_as_hash.rb", "test/test_form_button.rb", "test/test_form_no_inputname.rb", "test/test_forms.rb", "test/test_frames.rb", "test/test_get_headers.rb", "test/test_gzipping.rb", "test/test_hash_api.rb", "test/test_history.rb", "test/test_history_added.rb", "test/test_html_unscape_forms.rb", "test/test_if_modified_since.rb", "test/test_keep_alive.rb", "test/test_links.rb", "test/test_mech.rb", "test/test_mechanize_file.rb", "test/test_multi_select.rb", "test/test_no_attributes.rb", "test/test_option.rb", "test/test_page.rb", "test/test_pluggable_parser.rb", "test/test_post_form.rb", "test/test_pretty_print.rb", "test/test_radiobutton.rb", "test/test_redirect_limit_reached.rb", "test/test_redirect_verb_handling.rb", "test/test_referer.rb", "test/test_relative_links.rb", "test/test_request.rb", "test/test_response_code.rb", "test/test_save_file.rb", "test/test_scheme.rb", "test/test_select.rb", "test/test_select_all.rb", "test/test_select_none.rb", "test/test_select_noopts.rb", "test/test_set_fields.rb", "test/test_ssl_server.rb", "test/test_subclass.rb", "test/test_textarea.rb", "test/test_upload.rb", "test/test_verbs.rb"]
25
+ s.test_files = ["test/chain/test_argument_validator.rb", "test/chain/test_custom_headers.rb", "test/chain/test_header_resolver.rb", "test/chain/test_parameter_resolver.rb", "test/chain/test_request_resolver.rb", "test/chain/test_response_reader.rb", "test/test_authenticate.rb", "test/test_bad_links.rb", "test/test_blank_form.rb", "test/test_checkboxes.rb", "test/test_content_type.rb", "test/test_cookie_class.rb", "test/test_cookie_jar.rb", "test/test_cookies.rb", "test/test_encoded_links.rb", "test/test_errors.rb", "test/test_follow_meta.rb", "test/test_form_action.rb", "test/test_form_as_hash.rb", "test/test_form_button.rb", "test/test_form_no_inputname.rb", "test/test_forms.rb", "test/test_frames.rb", "test/test_get_headers.rb", "test/test_gzipping.rb", "test/test_hash_api.rb", "test/test_history.rb", "test/test_history_added.rb", "test/test_html_unscape_forms.rb", "test/test_if_modified_since.rb", "test/test_keep_alive.rb", "test/test_links.rb", "test/test_mech.rb", "test/test_mechanize_file.rb", "test/test_meta.rb", "test/test_multi_select.rb", "test/test_no_attributes.rb", "test/test_option.rb", "test/test_page.rb", "test/test_pluggable_parser.rb", "test/test_post_form.rb", "test/test_pretty_print.rb", "test/test_radiobutton.rb", "test/test_redirect_limit_reached.rb", "test/test_redirect_verb_handling.rb", "test/test_referer.rb", "test/test_relative_links.rb", "test/test_request.rb", "test/test_response_code.rb", "test/test_save_file.rb", "test/test_scheme.rb", "test/test_select.rb", "test/test_select_all.rb", "test/test_select_none.rb", "test/test_select_noopts.rb", "test/test_set_fields.rb", "test/test_ssl_server.rb", "test/test_subclass.rb", "test/test_textarea.rb", "test/test_upload.rb", "test/test_verbs.rb"]
22
26
 
23
27
  if s.respond_to? :specification_version then
24
28
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 2
29
+ s.specification_version = 3
26
30
 
27
31
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
32
  s.add_runtime_dependency(%q<nokogiri>, [">= 1.2.1"])
29
- s.add_development_dependency(%q<hoe>, [">= 1.9.0"])
33
+ s.add_development_dependency(%q<hoe>, [">= 1.12.1"])
30
34
  else
31
35
  s.add_dependency(%q<nokogiri>, [">= 1.2.1"])
32
- s.add_dependency(%q<hoe>, [">= 1.9.0"])
36
+ s.add_dependency(%q<hoe>, [">= 1.12.1"])
33
37
  end
34
38
  else
35
39
  s.add_dependency(%q<nokogiri>, [">= 1.2.1"])
36
- s.add_dependency(%q<hoe>, [">= 1.9.0"])
40
+ s.add_dependency(%q<hoe>, [">= 1.12.1"])
37
41
  end
38
42
  end