capybara_screenshot_idobata 0.0.2 → 0.0.3

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: 99ecd5a6e9948bb66ed37c0b3dbb988aa676cb4d
4
- data.tar.gz: ed790f8215719a1ab6548fe59202c1d6ee9a9769
3
+ metadata.gz: e67251c87361de8e9bd2046bdeded66acabd8bf5
4
+ data.tar.gz: e35d559b99a51144efca38120188f7a224401a90
5
5
  SHA512:
6
- metadata.gz: 5ac83e603f446e93c7ece2bc48a682d6e588ed1f8e07f79b02ba2e472fee4ac57344dcb62ba156fe68123c543b6728773e13fe83b19a983aab2e6ef140ad3627
7
- data.tar.gz: b23c4e745243dff344c3702ac3a172ab83ee7685e18ef8cc53c0d8d8a45fca0d5df98dc6eefb1c6a175c6d5f4318f212a4954a8ee78c9aee4193c7e38a0630fd
6
+ metadata.gz: 67b9c96dd4c6732e923538be11fce8ff31aa616383daed86ea3f25eb018539262555f0ddaf94dc132a321ab204a233ebbd4f28f41a0d30cd609e048edf2db133
7
+ data.tar.gz: f48076f40094b066ab735cab98594375fc8aac3457e7bfff39e34312328a19f3823a8aab75127d27dcfbf17828a3644ed15b371238c4b044b5de683c1e73682b
@@ -1,9 +1,12 @@
1
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
2
4
  rvm:
3
- - 1.9.3
4
- - 2.1.0
5
- - 2.1
6
- - 2.2
5
+ - 2.0.0
6
+ - 2.1.10
7
+ - 2.2.5
8
+ - 2.3.1
9
+ before_install: gem update bundler # To use 1.10.0 or later. See: https://github.com/bundler/bundler/issues/3558
7
10
  script: bundle exec rake
8
11
  notifications:
9
12
  webhooks:
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in capybara_screenshot_idobata.gemspec
4
4
  gemspec
5
+
6
+ gem 'rack', '~> 1.0' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.2')
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'rest-client'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.5'
25
- spec.add_development_dependency 'cucumber', '~> 1.3.0'
25
+ spec.add_development_dependency 'cucumber', '>= 1.3.0', '< 3.0'
26
26
  spec.add_development_dependency 'multipart-parser'
27
27
  spec.add_development_dependency 'rake'
28
- spec.add_development_dependency 'rspec', '~> 2.0'
28
+ spec.add_development_dependency 'rspec', '~> 3.0'
29
29
  spec.add_development_dependency 'webmock'
30
30
  end
@@ -13,7 +13,7 @@ end
13
13
  Capybara.app = lambda {|env| [200, {}, ['hi']] }
14
14
 
15
15
  Before do
16
- allow(page.driver).to receive(:save_screenshot).and_return {|filepath|
16
+ allow(page.driver).to receive(:save_screenshot) {|filepath|
17
17
  File.write(filepath, "\x89PNG")
18
18
  }
19
19
  end
@@ -8,7 +8,7 @@ module CapybaraScreenshotIdobata
8
8
 
9
9
  options = detect_default_option(Capybara.current_driver).merge(options)
10
10
 
11
- save_screenshot filename, options
11
+ screenshot_path = save_screenshot(filename, options)
12
12
 
13
13
  absolute_filepath, line = caller[0].split(':')
14
14
 
@@ -16,7 +16,7 @@ module CapybaraScreenshotIdobata
16
16
 
17
17
  source = CapybaraScreenshotIdobata.message_formatter.call(filepath, line, self)
18
18
 
19
- File.open(filename, 'rb') do |file|
19
+ File.open(screenshot_path, 'rb') do |file|
20
20
  RestClient.post(CapybaraScreenshotIdobata.hook_url,
21
21
  {
22
22
  source: source,
@@ -1,3 +1,3 @@
1
1
  module CapybaraScreenshotIdobata
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe 'The request to Idobata', type: :feature do
4
4
  before do
5
- allow(page.driver).to receive(:save_screenshot).and_return {|filepath|
5
+ allow(page.driver).to receive(:save_screenshot) {|filepath|
6
6
  File.write(filepath, "\x89PNG")
7
7
  }
8
8
  end
@@ -6,7 +6,6 @@ require 'webmock/rspec'
6
6
  Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }
7
7
 
8
8
  RSpec.configure do |config|
9
- config.treat_symbols_as_metadata_keys_with_true_values = true
10
9
  config.run_all_when_everything_filtered = true
11
10
  config.filter_run :focus
12
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_screenshot_idobata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryunosuke SATO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2016-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -56,16 +56,22 @@ dependencies:
56
56
  name: cucumber
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.3.0
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '3.0'
62
65
  type: :development
63
66
  prerelease: false
64
67
  version_requirements: !ruby/object:Gem::Requirement
65
68
  requirements:
66
- - - "~>"
69
+ - - ">="
67
70
  - !ruby/object:Gem::Version
68
71
  version: 1.3.0
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.0'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: multipart-parser
71
77
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +106,14 @@ dependencies:
100
106
  requirements:
101
107
  - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '2.0'
109
+ version: '3.0'
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
114
  - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: '2.0'
116
+ version: '3.0'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: webmock
113
119
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
174
  version: '0'
169
175
  requirements: []
170
176
  rubyforge_project:
171
- rubygems_version: 2.4.5
177
+ rubygems_version: 2.5.1
172
178
  signing_key:
173
179
  specification_version: 4
174
180
  summary: Post screenshot to Idobata