grell 1.6.9 → 1.6.10

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: 2a7136c81652b0260ee867e65380e69e5d3a2264
4
- data.tar.gz: f95af6c4e4a99aa1216f8842c8829af521f7b1d9
3
+ metadata.gz: 866f1b7117624455b79791bacba549710eb7dc2b
4
+ data.tar.gz: 4a3646c053bb7b4884fa8b82ebb24809d2d37f97
5
5
  SHA512:
6
- metadata.gz: 5b6c238c9894254531f5448dd5435603009b01c0c1fef015b748f3a91a662fa81fd0c7bbe882b95d88e8cbe91beee342222877f889931d5ed186cf0e2d03ef4e
7
- data.tar.gz: 76a390dc30e53275ded279b27a8bd6ebabe4d9cefb0cc7367563467cd86fd37e6bb20440810d237137f400d72af6dd289602603ff6f70dce8f3bd6906f6d24e2
6
+ metadata.gz: dfb07e7c0a6a7fb2fe53a40a3da248a24ba683972c696ab7064481448cb4067403dc7350d34cbba21ff4f240fb09b3571adbb36b38bfecd28aeee1ea1551638e
7
+ data.tar.gz: 7f91a206fd4cb264d73b05468dce66d858637c6d675b92088b800a85b67599201f957f879d618a0f4fc7a538de79c3211f82ffc3d73b063fec760da09209578a
@@ -6,3 +6,9 @@ rvm:
6
6
  - 2.2.4
7
7
  - 2.3.0
8
8
  script: bundle exec rspec
9
+
10
+ before_install:
11
+ - mkdir travis-phantomjs
12
+ - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
13
+ - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
14
+ - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
@@ -1,5 +1,9 @@
1
+ # 1.6.10
2
+ * Avoid following JS href links, add missing dependencies to fix Travis build
3
+
1
4
  # 1.6.9
2
5
  * Avoid following links when disabled by CSS (1.6.8 worked only for Javascript)
6
+
3
7
  # 1.6.8
4
8
  * Avoid following disabled links
5
9
 
data/README.md CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
 
24
24
  Grell uses PhantomJS, you will need to download and install it in your
25
25
  system. Check for instructions in http://phantomjs.org/
26
- Grell has been tested with PhantomJS v1.9.x
26
+ Grell has been tested with PhantomJS v2.1.x
27
27
 
28
28
  ## Usage
29
29
 
@@ -24,12 +24,14 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'capybara', '~> 2.7'
25
25
  spec.add_dependency 'poltergeist', '~> 1.10'
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.6"
28
- spec.add_development_dependency "byebug", "~> 4.0"
29
- spec.add_development_dependency "kender", '~> 0.2'
30
- spec.add_development_dependency "rake", '~> 10.0'
31
- spec.add_development_dependency "webmock", '~> 1.18'
27
+ spec.add_development_dependency 'bundler', '~> 1.6'
28
+ spec.add_development_dependency 'byebug', '~> 4.0'
29
+ spec.add_development_dependency 'kender', '~> 0.2'
30
+ spec.add_development_dependency 'rake', '~> 10.0'
31
+ spec.add_development_dependency 'webmock', '~> 1.18'
32
32
  spec.add_development_dependency 'rspec', '~> 3.0'
33
33
  spec.add_development_dependency 'puffing-billy', '~> 0.5'
34
34
  spec.add_development_dependency 'timecop', '~> 0.8'
35
+ spec.add_development_dependency 'capybara-webkit', '~> 1.11.1'
36
+ spec.add_development_dependency 'selenium-webdriver', '~> 2.53.4'
35
37
  end
@@ -206,7 +206,7 @@ module Grell
206
206
  private
207
207
  def all_links
208
208
  links = @rawpage.all_anchors.map { |anchor| Link.new(anchor) }
209
- body_enabled_links = links.reject { |link| link.inside_header? || link.disabled? }
209
+ body_enabled_links = links.reject { |link| link.inside_header? || link.disabled? || link.js_href? }
210
210
  body_enabled_links.map { |link| link.to_url(host) }.uniq.compact
211
211
 
212
212
  rescue Capybara::Poltergeist::ObsoleteNode
@@ -232,6 +232,11 @@ module Grell
232
232
  @anchor.disabled? || !!@anchor.native.attributes['disabled']
233
233
  end
234
234
 
235
+ # Does the href use javascript?
236
+ def js_href?
237
+ href.start_with?('javascript:')
238
+ end
239
+
235
240
  # Some links may use data-href + javascript to do interesting things
236
241
  def href
237
242
  @anchor['href'] || @anchor['data-href']
@@ -1,3 +1,3 @@
1
1
  module Grell
2
- VERSION = "1.6.9".freeze
2
+ VERSION = "1.6.10".freeze
3
3
  end
@@ -2,7 +2,7 @@ require 'grell'
2
2
  require 'byebug'
3
3
  require 'timecop'
4
4
  require 'webmock/rspec'
5
- require 'billy/rspec'
5
+ require 'billy/capybara/rspec'
6
6
  require 'rack'
7
7
  require 'rack/server'
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.9
4
+ version: 1.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo Carres
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-13 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -150,6 +150,34 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.8'
153
+ - !ruby/object:Gem::Dependency
154
+ name: capybara-webkit
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.11.1
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 1.11.1
167
+ - !ruby/object:Gem::Dependency
168
+ name: selenium-webdriver
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 2.53.4
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 2.53.4
153
181
  description: Ruby web crawler using PhantomJS
154
182
  email:
155
183
  - jcarres@mdsol.com