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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2df1fe8ddac13f58aebe2e0f99b2654e58ecc73e
4
- data.tar.gz: 10243091f0a47c4af76cbd76ccf46a4d114c5d7c
3
+ metadata.gz: e99bdbdcdc84bfc65410c5230050dbb27bef9b10
4
+ data.tar.gz: 3be489d2f27a2fa1dd701fc8e56bfef6df2aa093
5
5
  SHA512:
6
- metadata.gz: 134313f90f076d08a2360cd0fca4f1920109bf871b49caa9843c222c860d42eeb6f8e463d4c8f0632370cf23f95546bbb65e9968fc19477ae225a15fe7eb98dd
7
- data.tar.gz: 08db898418eb68af12a18658f21448fc92499ab1675b8092877d650ca039a81a2369a57330d760b8460d503029851660b25dc9ac18199489f7852c0141884e3d
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'],
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "crabfarm", '<%= version %>'
4
- gem "pincers", '~> 0.6'
4
+ gem "pincers", '~> 0.7'
5
5
 
6
6
  # Comment this if not using a nokogiri based parser or browser
7
7
  gem 'nokogiri', "~> 1.6.6"
@@ -1,3 +1,3 @@
1
1
  module Crabfarm
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
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.3
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-09-29 00:00:00.000000000 Z
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.6'
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.6'
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