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 +1 -1
- data/lib/klepto/browser.rb +8 -8
- data/lib/klepto/config.rb +4 -4
- data/lib/klepto/version.rb +1 -1
- metadata +2 -2
data/lib/klepto/bot.rb
CHANGED
data/lib/klepto/browser.rb
CHANGED
@@ -8,13 +8,13 @@ module Klepto
|
|
8
8
|
super
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
def set_driver(use_driver)
|
12
|
+
@use_driver = use_driver
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
60
|
+
Capybara.using_driver use_driver do
|
61
61
|
visit @url_to_structure
|
62
62
|
page
|
63
|
-
|
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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
data/lib/klepto/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: poltergeist
|