yahoo-se 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ module Yahoo
18
18
  attr_reader :request
19
19
  attr_accessor :options
20
20
 
21
- def initialize(domain, options)
21
+ def initialize(domain, options={})
22
22
  @domain = domain
23
23
  @options = options
24
24
  @options[:query] = domain
@@ -18,7 +18,7 @@ module Yahoo
18
18
  attr_reader :request
19
19
  attr_accessor :options
20
20
 
21
- def initialize(domain, options)
21
+ def initialize(domain, options={})
22
22
  @domain = domain
23
23
  @options = options
24
24
  @options[:query] = domain
@@ -25,12 +25,12 @@ module Yahoo
25
25
 
26
26
  # The response object of the request
27
27
  def response
28
- @response = @response ||= Yahoo::SE::Response.new(response_body)
28
+ @response ||= Yahoo::SE::Response.new(response_body)
29
29
  end
30
30
 
31
31
  # The response body of the request
32
32
  def response_body
33
- open(path).readlines.join
33
+ open(path,"User-Agent" => "Ruby/Yahoo Site Explorer Gem v#{Yahoo::SE::VERSION}").readlines.join
34
34
  end
35
35
 
36
36
  # The results from the response object
@@ -1,5 +1,5 @@
1
1
  module Yahoo
2
2
  module SE
3
- VERSION = "1.0.4" unless defined?(Yahoo::SE::VERSION)
3
+ VERSION = "1.0.5" unless defined?(Yahoo::SE::VERSION)
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo-se
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Carlson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-09 00:00:00 -05:00
12
+ date: 2008-11-20 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency