linkscape 0.3.1 → 0.3.2

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -22,6 +22,9 @@ module Linkscape
22
22
  if options[:url]
23
23
  case options[:url]
24
24
  when String
25
+ if options[:url].length > MAX_URL_LENGTH
26
+ raise ArgumentError.new("Request URLs must be < #{MAX_URL_LENGTH} long")
27
+ end
25
28
  new_vals = {:url => CGI::escape(options[:url].sub(/^https?:\/\//, '')) }
26
29
  when Array
27
30
  @body = options[:url].collect{ |u| u.sub(/^https?:\/\//, '') }
@@ -31,10 +34,6 @@ module Linkscape
31
34
  end
32
35
  end
33
36
 
34
- if Array(new_vals[:url]).any? { |u| u.length > MAX_URL_LENGTH }
35
- raise ArgumentError.new("Request URLs must be < #{MAX_URL_LENGTH} long")
36
- end
37
-
38
37
  @requestURL = URL_TEMPLATE.template(signRequest(options.merge(new_vals)))
39
38
  @requestURL += "&" + options[:query].collect{|k,v| "#{CGI::escape(k.to_s)}=#{CGI::escape(v.to_s)}"}.join('&') if options[:query] && Hash === options[:query]
40
39
  @requestURL += "&" + options[:query] if options[:query] && String === options[:query]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{linkscape}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Martin Tithonium", "Jeff Pollard", "Bryce Howard"]
12
- s.date = %q{2011-06-08}
12
+ s.date = %q{2011-07-20}
13
13
  s.description = %q{Provides an interface to SEOmoz's suite of APIs, including the free and site intelligence APIs.}
14
14
  s.email = %q{api@seomoz.org}
15
15
  s.extra_rdoc_files = [
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  ]
40
40
  s.homepage = %q{http://github.com/seomoz/linkscape-gem}
41
41
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.6.1}
42
+ s.rubygems_version = %q{1.6.2}
43
43
  s.summary = %q{Provides an interface to the SEOmoz API}
44
44
 
45
45
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkscape
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Martin Tithonium
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-06-08 00:00:00 -07:00
20
+ date: 2011-07-20 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements: []
94
94
 
95
95
  rubyforge_project:
96
- rubygems_version: 1.6.1
96
+ rubygems_version: 1.6.2
97
97
  signing_key:
98
98
  specification_version: 3
99
99
  summary: Provides an interface to the SEOmoz API