crabfarm 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crabfarm.rb +1 -0
- data/lib/crabfarm/adapters/browser/chenso.rb +32 -0
- data/lib/crabfarm/configuration.rb +1 -1
- data/lib/crabfarm/templates/Gemfile.erb +1 -1
- data/lib/crabfarm/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99bdbdcdc84bfc65410c5230050dbb27bef9b10
|
4
|
+
data.tar.gz: 3be489d2f27a2fa1dd701fc8e56bfef6df2aa093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f02b42dc55ede5aabfa3ced6047072ce3b75bd7e612bb75ca5cbe82bc6c7a981c26387ec648830eb4c061bf764e0dcf8dfbc289d584db25f08d6d771551d0449
|
7
|
+
data.tar.gz: 03ac85efb8ca6caab57fda20b0f29b47118266c2a6a712bfe6b08ccaf5912af68c9b7ad55a37f3b344322dc8debcfe22aa7bf488f0ae12db8c2ae81da3edfc02
|
data/lib/crabfarm.rb
CHANGED
@@ -100,6 +100,7 @@ module Crabfarm
|
|
100
100
|
register :browser, :firefox, 'Crabfarm::Adapters::Browser::Firefox', dependencies: ['selenium-webdriver']
|
101
101
|
register :browser, :chrome, 'Crabfarm::Adapters::Browser::Chrome', dependencies: ['selenium-webdriver']
|
102
102
|
register :browser, :remote, 'Crabfarm::Adapters::Browser::RemoteWebdriver', dependencies: ['selenium-webdriver']
|
103
|
+
register :browser, :chenso, 'Crabfarm::Adapters::Browser::Chenso', dependencies: ['pincers']
|
103
104
|
register :browser, :noop, 'Crabfarm::Adapters::Browser::Noop'
|
104
105
|
|
105
106
|
# bundled webdriver dsl adapters
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'crabfarm/adapters/browser/base'
|
2
|
+
|
3
|
+
module Crabfarm
|
4
|
+
module Adapters
|
5
|
+
module Browser
|
6
|
+
class Chenso < Base
|
7
|
+
|
8
|
+
def initialize(_proxy=nil)
|
9
|
+
@config = load_chenso_config
|
10
|
+
@config[:proxy] = _proxy
|
11
|
+
end
|
12
|
+
|
13
|
+
def build_driver(_session_id)
|
14
|
+
Pincers.for_chenso @config
|
15
|
+
end
|
16
|
+
|
17
|
+
def reset_driver(_pincers)
|
18
|
+
_pincers
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def load_chenso_config
|
24
|
+
{
|
25
|
+
# nothing for now
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -6,7 +6,7 @@ module Crabfarm
|
|
6
6
|
|
7
7
|
OPTIONS = [
|
8
8
|
# Global options
|
9
|
-
[:browser, ['chrome', 'firefox', 'phantomjs', 'remote'], 'Browser engine to be used by navigators, common options: phantomjs, chrome, firefox, remote.'],
|
9
|
+
[:browser, ['chrome', 'firefox', 'phantomjs', 'remote', 'chenso'], 'Browser engine to be used by navigators, common options: phantomjs, chrome, firefox, remote.'],
|
10
10
|
[:parser, :string, 'Default parser engine used by reducers'],
|
11
11
|
[:log_path, :string, 'Path where logs should be stored'],
|
12
12
|
[:proxy, :string, 'If given, a proxy is used to connect to the internet if driver supports it'],
|
data/lib/crabfarm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crabfarm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignacio Baixas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -222,14 +222,14 @@ dependencies:
|
|
222
222
|
requirements:
|
223
223
|
- - ~>
|
224
224
|
- !ruby/object:Gem::Version
|
225
|
-
version: '0.
|
225
|
+
version: '0.7'
|
226
226
|
type: :development
|
227
227
|
prerelease: false
|
228
228
|
version_requirements: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
230
|
- - ~>
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version: '0.
|
232
|
+
version: '0.7'
|
233
233
|
- !ruby/object:Gem::Dependency
|
234
234
|
name: bundler
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|
@@ -465,6 +465,7 @@ files:
|
|
465
465
|
- lib/crabfarm.rb
|
466
466
|
- lib/crabfarm/adapters/browser/abstract_webdriver.rb
|
467
467
|
- lib/crabfarm/adapters/browser/base.rb
|
468
|
+
- lib/crabfarm/adapters/browser/chenso.rb
|
468
469
|
- lib/crabfarm/adapters/browser/chrome.rb
|
469
470
|
- lib/crabfarm/adapters/browser/firefox.rb
|
470
471
|
- lib/crabfarm/adapters/browser/noop.rb
|