linkscape 0.3.0 → 0.3.1

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.0
1
+ 0.3.1
@@ -10,6 +10,7 @@ module Linkscape
10
10
  attr_accessor :requestURL
11
11
 
12
12
  URL_TEMPLATE = %Q[http://:apiHost:/:apiRoot:/:api:/:url:?AccessID=:accessID:&Expires=:expiration:&Signature=:signature:]
13
+ MAX_URL_LENGTH = 500
13
14
 
14
15
  def self.run(options)
15
16
  self.new(options).run
@@ -29,6 +30,10 @@ module Linkscape
29
30
  raise "URL most be a String or an Array"
30
31
  end
31
32
  end
33
+
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
32
37
 
33
38
  @requestURL = URL_TEMPLATE.template(signRequest(options.merge(new_vals)))
34
39
  @requestURL += "&" + options[:query].collect{|k,v| "#{CGI::escape(k.to_s)}=#{CGI::escape(v.to_s)}"}.join('&') if options[:query] && Hash === 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.0"
8
+ s.version = "0.3.1"
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{2010-12-17}
12
+ s.date = %q{2011-06-08}
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,11 +39,10 @@ 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.3.7}
42
+ s.rubygems_version = %q{1.6.1}
43
43
  s.summary = %q{Provides an interface to the SEOmoz API}
44
44
 
45
45
  if s.respond_to? :specification_version then
46
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
47
46
  s.specification_version = 3
48
47
 
49
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') 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: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
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: 2010-12-17 00:00:00 -08:00
20
+ date: 2011-06-08 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.3.7
96
+ rubygems_version: 1.6.1
97
97
  signing_key:
98
98
  specification_version: 3
99
99
  summary: Provides an interface to the SEOmoz API