smartshot 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +17 -0
- data/lib/smartshot/screenshot.rb +2 -1
- data/lib/smartshot/version.rb +1 -1
- data/test/smartshot_test.rb +0 -8
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cb89e4ec886c4da2d6325972f63fba636e6b640
|
4
|
+
data.tar.gz: babb1fa7092b297d1671065c412939fae0401644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e01a92243cacd15394bad3af4a05089c6d2f57da8ff5f5f3e5a9e21e0cb063fdd6b5c4b062958bc86e58b89d0d14f79827e42fdd24972dad5e6172d913792697
|
7
|
+
data.tar.gz: 3821a30078d9bd6f8ad4a130fec652b504ef3ade20addab4ce9dbb90e0d35fcc7abc3a8723677d6f5758ba9173698c2abd5b9ebfd8c285cb37a9ce9dcacee0cb
|
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
language: ruby
|
2
|
+
cache: bundler
|
3
|
+
before_install:
|
4
|
+
- gem install bundler
|
5
|
+
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O /tmp/phantomjs.tar.bz2
|
6
|
+
- tar -vxjf /tmp/phantomjs.tar.bz2
|
7
|
+
- export PATH=$PWD:$PATH
|
8
|
+
rvm:
|
9
|
+
- 2.1
|
10
|
+
- 2.0
|
11
|
+
- 1.9.3
|
12
|
+
- jruby-19mode # JRuby in 1.9 mode
|
13
|
+
- rbx-2
|
14
|
+
matrix:
|
15
|
+
allow_failures:
|
16
|
+
- rvm: rbx-2
|
17
|
+
fast_finish: true
|
data/lib/smartshot/screenshot.rb
CHANGED
@@ -22,7 +22,8 @@ module Smartshot
|
|
22
22
|
visit options.delete(:url)
|
23
23
|
inside_frames options.delete(:frames_path) do
|
24
24
|
[options.delete(:wait_for_element)].flatten.each do |element|
|
25
|
-
|
25
|
+
visible = (element =~ /^(link|meta)/).nil?
|
26
|
+
page.find element, visible: visible
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
data/lib/smartshot/version.rb
CHANGED
data/test/smartshot_test.rb
CHANGED
@@ -27,14 +27,6 @@ class SmartshotTest < MiniTest::Unit::TestCase
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def test_invalid_url
|
31
|
-
%w(nxdomain).each do |name|
|
32
|
-
assert_raises Smartshot::SmartshotError do
|
33
|
-
@smartshot.take_screenshot! url: "http://#{name}/", output: thumb(name)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
30
|
def test_iframe
|
39
31
|
waited = notwaited = nil
|
40
32
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caio Almeida
|
@@ -104,6 +104,7 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
106
|
- .gitignore
|
107
|
+
- .travis.yml
|
107
108
|
- CONTRIBUTORS
|
108
109
|
- Gemfile
|
109
110
|
- LICENSE.txt
|