webshot 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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YWNlMDY1YmFhZGVjY2ZkNzZlMDkxNWIzYjc2YmUzOGY3MzY1NzMzZQ==
5
- data.tar.gz: !binary |-
6
- NmMzMDNiYjQ1OWZmMGRiNzBjMDkyZWVmNDFjMDQ1YjlhMTA1ZTMwZQ==
2
+ SHA1:
3
+ metadata.gz: cb836bb211faef4bf42b90964943d999c1b39ee3
4
+ data.tar.gz: 4dc2857113dfa94ad2eb483ed9fe23ff98bc576f
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MTVhNjhiODgwNzU1ZGU3OTEyYzc2NmU0N2RhNzY1NDg5NmQ1ODMyOWQyNWRl
10
- MDM0YTViNDZjODQxYTIzMDdlZTQyY2ZjMmY0YzczM2M4Mzc4ZWI4OTliNzRh
11
- YTZjNjI3Y2U0OTFmYzQzN2NkMWI0YTQ1NDkzZjdiNDFiMzRkYTY=
12
- data.tar.gz: !binary |-
13
- MzU4MThhZDEzNWNhZmEzZWRiY2ZhNjNkMDljYTk0NzhhYzg3NDFjN2U4YjI3
14
- Y2FjNjNhZmZjYWNjZTkzY2Q5NjZkNzY4M2MwY2ExNmQ2OGVhY2E2M2U2Mjc2
15
- Y2I1MDMxOWM5Yjg2YzEwMzQ0YjA4ZWU1MTcxMDczMmQ5ZDk4OTg=
6
+ metadata.gz: b8a12ad3169c3fe7c82c5905353b243df4352eb1d058d6905a7c161b9a6b540c4fb317e512492d747219d3fcb4c3360d2f3685a36a9e889ae420ec58912a1eae
7
+ data.tar.gz: e6ad894ae25cb5e253d849f2c8941e5c9d399d8731ea5b492489a2668614174d5ee74224e1d57c1e3f84c712a35eb569e7b15d96bd99dcdc5ff404af9c9183b5
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ cache: bundler
3
+ before_install:
4
+ - gem install bundler
5
+ rvm:
6
+ - 2.1.1
7
+ - 2.0.0
8
+ - 1.9.3
9
+ - jruby-19mode # JRuby in 1.9 mode
10
+ - rbx-2
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: rbx-2
14
+ fast_finish: true
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Captures a web page as a screenshot using Poltergeist, Capybara and PhantomJS.
4
4
 
5
+ - [![Build Status](https://travis-ci.org/vitalie/webshot.svg?branch=master)](https://travis-ci.org/vitalie/webshot)
6
+
5
7
  ## Installation
6
8
 
7
9
  Download and install [PhantomJS](http://phantomjs.org/) and then add PhantomJS to
@@ -3,7 +3,6 @@ require "capybara/dsl"
3
3
  require "capybara/poltergeist"
4
4
  require "active_support"
5
5
  require "active_support/core_ext"
6
- require "active_support/deprecation"
7
6
  require "webshot/version"
8
7
  require "webshot/errors"
9
8
  require "webshot/screenshot"
@@ -1,3 +1,3 @@
1
1
  module Webshot
2
- VERSION = "0.0.6"
2
+ VERSION = '0.0.7'
3
3
  end
@@ -1,2 +1,4 @@
1
- require "webshot"
2
- require "test/unit"
1
+ require 'rubygems'
2
+ require 'webshot'
3
+ require 'minitest/autorun'
4
+ require 'minitest/unit'
@@ -1,6 +1,6 @@
1
1
  require "test_helper"
2
2
 
3
- class WebshotTest < Test::Unit::TestCase
3
+ class WebshotTest < MiniTest::Unit::TestCase
4
4
 
5
5
  DATA_DIR = File.expand_path(File.dirname(__FILE__) + "/data")
6
6
 
@@ -10,50 +10,44 @@ class WebshotTest < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_http
13
- assert_nothing_raised do
14
- %w(www.yahoo.com).each do |name|
15
- output = thumb(name)
16
- File.delete output if File.exists? output
17
- @webshot.capture "http://#{name}/", output
18
- assert File.exists? output
19
- end
13
+ %w(www.yahoo.com).each do |name|
14
+ output = thumb(name)
15
+ File.delete output if File.exists? output
16
+ @webshot.capture "http://#{name}/", output
17
+ assert File.exists? output
20
18
  end
21
19
  end
22
20
 
23
21
  def test_https
24
- assert_nothing_raised do
25
- %w(github.com).each do |name|
26
- output = thumb(name)
27
- File.delete output if File.exists? output
28
- @webshot.capture "https://#{name}/", output
29
- assert File.exists? output
30
- end
22
+ %w(github.com).each do |name|
23
+ output = thumb(name)
24
+ File.delete output if File.exists? output
25
+ @webshot.capture "https://#{name}/", output
26
+ assert File.exists? output
31
27
  end
32
28
  end
33
29
 
34
30
  def test_invalid_url
35
31
  %w(nxdomain).each do |name|
36
- assert_raise Webshot::WebshotError do
32
+ assert_raises Webshot::WebshotError do
37
33
  @webshot.capture "http://#{name}/", thumb(name)
38
34
  end
39
35
  end
40
36
  end
41
37
 
42
38
  def test_mini_magick
43
- assert_nothing_raised do
44
- %w(www.yahoo.com).each do |name|
45
- output = thumb(name)
46
- File.delete output if File.exists? output
47
-
48
- # Customize MiniMagick options
49
- result = @webshot.capture("http://#{name}/", output) do |thumb|
50
- thumb.combine_options do |c|
51
- c.thumbnail "100x90"
52
- end
39
+ %w(www.yahoo.com).each do |name|
40
+ output = thumb(name)
41
+ File.delete output if File.exists? output
42
+
43
+ # Customize MiniMagick options
44
+ result = @webshot.capture("http://#{name}/", output) do |thumb|
45
+ thumb.combine_options do |c|
46
+ c.thumbnail "100x90"
53
47
  end
54
- assert File.exists? output
55
- assert result.respond_to? :to_blob
56
48
  end
49
+ assert File.exists? output
50
+ assert result.respond_to? :to_blob
57
51
  end
58
52
  end
59
53
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "minitest", "~> 4.0"
23
+ spec.add_development_dependency "minitest"
24
24
 
25
25
  spec.add_dependency "activesupport"
26
26
  spec.add_dependency "poltergeist", "~> 1.5.0"
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalie Cherpec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '4.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: poltergeist
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.5.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.5.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faye-websocket
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.7.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.7.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: mini_magick
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 3.7.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 3.7.0
111
111
  description: Captures a web page as a screenshot using Poltergeist, Capybara and PhantomJS
@@ -115,7 +115,8 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .gitignore
118
+ - ".gitignore"
119
+ - ".travis.yml"
119
120
  - CONTRIBUTORS
120
121
  - Gemfile
121
122
  - LICENSE.txt
@@ -138,17 +139,17 @@ require_paths:
138
139
  - lib
139
140
  required_ruby_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
- - - ! '>='
142
+ - - ">="
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  required_rubygems_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
- - - ! '>='
147
+ - - ">="
147
148
  - !ruby/object:Gem::Version
148
149
  version: '0'
149
150
  requirements: []
150
151
  rubyforge_project:
151
- rubygems_version: 2.2.2
152
+ rubygems_version: 2.3.0
152
153
  signing_key:
153
154
  specification_version: 4
154
155
  summary: Captures a web page as a screenshot