capybara-flow 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: d2d4089bc504959b5d01fee1607480e0fa4e1977667b29381abba52516885589
4
- data.tar.gz: e889449c864412652e57836cc8355e80e01700713949d4043661bc3d29af037a
3
+ metadata.gz: 9896c41c1ada12e48b9dca3253e14fa1d3eeadea03588eac22e17bf1a428ca42
4
+ data.tar.gz: 5b39c82d0791eb15170d65ca369e2273802c741af48cee3f04cb5ec8b70571c1
5
5
  SHA512:
6
- metadata.gz: 3db3c1d8c1cc46b6edf34f1090a335a4b8e0c27e84e93ae1454a36c01f492dcd978cf3888b0a6d3e7f704749f28c460cfc7d1db67a744d8d22838ece194dd6a2
7
- data.tar.gz: 962e010b739781f9a0f1e1c2dba4d8e462e53a963b138e72309476501a8ba2ea64f6844faf8ff3ece4bc49595b38a5cb8b2312ff878dae938668291ff678f99e
6
+ metadata.gz: 1711e1b902ccb5654aea9fc1e987901649b5ce87fa0c5f867d9bf4a893c76ea5e78396fcbaa125fef360a0cb09b35eabc1e68bb9f171def24e913079796b48de
7
+ data.tar.gz: ffb23413f2b788e7a964791a07f78afba65e261458b76a4d8d8ad687991661c4a9b125579854225db0a9376eb2d32d194e402730a4fb9f5d2154bce8f8bea696
data/README.md CHANGED
@@ -43,6 +43,12 @@ end
43
43
 
44
44
  ```
45
45
 
46
+ ## Releasing new version
47
+
48
+ 1. Update VERSION
49
+ 1. Run `rake build` to build the package
50
+ 1. Run `rake release` to publish the package to rubygems.org
51
+
46
52
  ## Credit
47
53
 
48
54
  This is forked from https://github.com/surzycki/capybara-animate
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -41,7 +41,7 @@ module Capybara
41
41
  :click_link,
42
42
  :click_link_or_button,
43
43
  :click_on,
44
- :evaluate_script,
44
+ # :evaluate_script, #BAD FOR PERCY
45
45
  :execute_script,
46
46
  :fill_in,
47
47
  :go_back,
@@ -1,4 +1,4 @@
1
- require "RMagick"
1
+ require "rmagick"
2
2
 
3
3
  module Capybara
4
4
  module Flow
@@ -9,13 +9,12 @@ module Capybara
9
9
  make_path_unless_exists(output_file)
10
10
  make_path_unless_exists(@frame_dir)
11
11
  @gif_animator = GifAnimator.new(output_file, delay_in_ms: Capybara::Flow.configuration.delay_in_ms, iterations: Capybara::Flow.configuration.iterations)
12
- @tmpdir = Dir.mktmpdir
13
12
  end
14
13
 
15
14
  def add(page)
16
- file = File.join(@frame_dir, "#{current_frame}.png")
17
- page.save_screenshot(file, width: 320, height: 480)
18
- gif_animator.add(file)
15
+ file_name = File.join(@frame_dir, "#{current_frame}.png")
16
+ page.save_screenshot(file_name, width: 320, height: 480)
17
+ gif_animator.add(file_name)
19
18
  end
20
19
 
21
20
  def generate!
@@ -23,14 +22,14 @@ module Capybara
23
22
  end
24
23
 
25
24
  private
26
- attr_reader :tmpdir, :gif_animator
25
+ attr_reader :gif_animator
27
26
 
28
27
  def current_frame
29
28
  gif_animator.frames.length
30
29
  end
31
30
 
32
31
  def make_path_unless_exists(file)
33
- FileUtils.mkdir_p(File.dirname(file)) unless File.exists?(File.dirname(file))
32
+ FileUtils.mkdir_p(File.dirname(file))
34
33
  end
35
34
  end
36
35
  end
@@ -9,7 +9,7 @@ describe Capybara::Flow do
9
9
  :click_link,
10
10
  :click_link_or_button,
11
11
  :click_on,
12
- :evaluate_script,
12
+ # :evaluate_script, #BAD FOR PERCY
13
13
  :execute_script,
14
14
  :fill_in,
15
15
  :go_back,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Read
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara