scrappy 0.1.20 → 0.1.21

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/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.1.21 2011-02-25
2
+
3
+ * Fixed missing callback in server redirection
4
+
1
5
  === 0.1.20 2011-02-25
2
6
 
3
7
  * Added missing dependency (haml)
@@ -11,12 +11,12 @@ module Scrappy
11
11
  haml :home
12
12
  end
13
13
 
14
- get '/:format/*' do
15
- process_request :get, params[:format], params[:splat] * "/", params[:callback]
14
+ get '/:format/*' do |format, url|
15
+ process_request :get, format, url, params[:callback]
16
16
  end
17
17
 
18
- post '/:format/*' do
19
- process_request :post, params[:format], params[:splat] * "/", params[:callback]
18
+ post '/:format/*' do |format, url|
19
+ process_request :post, format, url, params[:callback]
20
20
  end
21
21
 
22
22
  protected
@@ -48,8 +48,8 @@ module Scrappy
48
48
  end
49
49
 
50
50
  def textual_inputs
51
- return '' if inputs.empty?
52
- "?" + (inputs.map{|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}*'')
51
+ return '' if inputs.merge('callback'=>params[:callback]).empty?
52
+ "?" + (inputs.merge('callback'=>params[:callback]).map{|k,v| "#{CGI.escape(k)}=#{CGI.escape(v)}"}*'')
53
53
  end
54
54
  end
55
55
  end
data/lib/scrappy.rb CHANGED
@@ -21,7 +21,7 @@ require 'scrappy/agent/agent'
21
21
  Namespace :sc, 'http://lab.gsi.dit.upm.es/scraping.rdf#'
22
22
 
23
23
  module Scrappy
24
- VERSION = '0.1.20'
24
+ VERSION = '0.1.21'
25
25
  end
26
26
 
27
27
  # Require selectors
data/scrappy.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{scrappy}
5
- s.version = "0.1.20"
5
+ s.version = "0.1.21"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jose Ignacio"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 20
9
- version: 0.1.20
8
+ - 21
9
+ version: 0.1.21
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jose Ignacio