klepto 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/klepto/bot.rb CHANGED
@@ -32,7 +32,7 @@ EOS
32
32
  def __process!
33
33
  @structure = nil
34
34
  @browser.set_headers @config.headers
35
- #browser.set_driver config.driver
35
+ @browser.set_driver @config.driver
36
36
 
37
37
  @config.before_handlers[:get].each { |bh|
38
38
  bh.call(@browser,@config.url)
@@ -8,13 +8,13 @@ module Klepto
8
8
  super
9
9
  end
10
10
 
11
- # def set_driver(use_driver)
12
- # @use_driver = use_driver
13
- # end
11
+ def set_driver(use_driver)
12
+ @use_driver = use_driver
13
+ end
14
14
 
15
- # def use_driver
16
- # @use_driver || :poltergeist
17
- # end
15
+ def use_driver
16
+ @use_driver || :poltergeist
17
+ end
18
18
 
19
19
  def set_headers(headers)
20
20
  page.driver.headers = headers
@@ -57,10 +57,10 @@ module Klepto
57
57
  @url_to_structure = _url
58
58
  Klepto.logger.debug("Fetching #{@url_to_structure}")
59
59
 
60
- #Capybara.using_driver use_driver do
60
+ Capybara.using_driver use_driver do
61
61
  visit @url_to_structure
62
62
  page
63
- #end
63
+ end
64
64
  end
65
65
  end
66
66
  end
data/lib/klepto/config.rb CHANGED
@@ -24,10 +24,10 @@ module Klepto
24
24
  # @handlers[group][handler].each{|handler| handler.call(*args)}
25
25
  # end
26
26
 
27
- # def driver(_driver=nil)
28
- # @default_driver = _driver if _driver
29
- # @default_driver
30
- # end
27
+ def driver(_driver=nil)
28
+ @default_driver = _driver if _driver
29
+ @default_driver
30
+ end
31
31
 
32
32
  def headers(_headers=nil)
33
33
  @headers = _headers if _headers
@@ -1,3 +1,3 @@
1
1
  module Klepto
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klepto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-24 00:00:00.000000000 Z
12
+ date: 2013-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: poltergeist