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 +4 -4
- data/README.md +6 -0
- data/VERSION +1 -1
- data/lib/capybara/flow.rb +1 -1
- data/lib/capybara/flow/gif_animator.rb +1 -1
- data/lib/capybara/flow/gif_recorder.rb +5 -6
- data/spec/capybara/flow_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9896c41c1ada12e48b9dca3253e14fa1d3eeadea03588eac22e17bf1a428ca42
|
4
|
+
data.tar.gz: 5b39c82d0791eb15170d65ca369e2273802c741af48cee3f04cb5ec8b70571c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
0.2.2
|
data/lib/capybara/flow.rb
CHANGED
@@ -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
|
-
|
17
|
-
page.save_screenshot(
|
18
|
-
gif_animator.add(
|
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 :
|
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))
|
32
|
+
FileUtils.mkdir_p(File.dirname(file))
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
data/spec/capybara/flow_spec.rb
CHANGED
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.
|
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
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|