screen-recorder 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 223571eec67845c142f2bddbe0bb59960b8ba800ba41374158aeadab58611291
4
- data.tar.gz: 7292831582ec9afb87736c0e807c061162abf75cdf1a8c5b08a0ffc40a458aa0
3
+ metadata.gz: 354630449024886a2588bf44a6dfad01d7837341ecb94ced49b936d6cce6fb57
4
+ data.tar.gz: 21140832dd0bc9f9fb51d01a9ef885b6387847c4ec1484380993613e96453ae0
5
5
  SHA512:
6
- metadata.gz: f1bbe228c99deea2feb837097c7b6bc30cd00fc8051f43a2b56ad90f0dc6768ff04b87ecb45b564c56267383e1e5113c74ffdcea5c8708563a7782bca4b689fe
7
- data.tar.gz: 173054cecd3169310b5a8982e9c3d5334edb5ade410436a11480c234d385bbe8b91c52a3ff25062a15e6dfc56ec7f37e52d325243cdd1a36fc423fcee870e9b6
6
+ metadata.gz: 58da8b78830b44b56b76408561198953b5dba59a3d5c57f0eae82052f60312ad8e6a426fc4b1bcbef9bd142fc9640ab07785aa0cba03676c5b9ce04bb99b51ea
7
+ data.tar.gz: 8c549968577da56770fa558a91d461240765dc32276612de7ad17bf31fe74bc29386b92f77438cbc444fe7c2d0622f33074120341810b4f9d363b1919bcf99a0
data/.gitignore CHANGED
@@ -1,100 +1,100 @@
1
- Gemfile.lock # Part of best practice
2
-
3
- # Created by https://www.gitignore.io/api/rubymine+all
4
-
5
- ### RubyMine+all ###
6
- # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7
- # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8
-
9
- /.bundle/
10
- /.yardoc
11
- /_yardoc/
12
- /coverage/
13
- /doc/
14
- /pkg/
15
- /spec/reports/
16
- /tmp/
17
- /webdrivers_bin
18
- *.log
19
- *.mkv
20
- *.mp4
21
- *.avi
22
- *.gif
23
-
24
- Gemfile.lock
25
-
26
- # rspec failure tracking
27
- .rspec_status
28
-
29
- # Generated files
30
- .idea/**/contentModel.xml
31
-
32
- # Sensitive or high-churn files
33
- .idea/**/dataSources/
34
- .idea/**/dataSources.ids
35
- .idea/**/dataSources.local.xml
36
- .idea/**/sqlDataSources.xml
37
- .idea/**/dynamic.xml
38
- .idea/**/uiDesigner.xml
39
- .idea/**/dbnavigator.xml
40
-
41
- # Gradle
42
- .idea/**/gradle.xml
43
- .idea/**/libraries
44
-
45
- # Gradle and Maven with auto-import
46
- # When using Gradle or Maven with auto-import, you should exclude module files,
47
- # since they will be recreated, and may cause churn. Uncomment if using
48
- # auto-import.
49
- # .idea/modules.xml
50
- # .idea/*.iml
51
- # .idea/modules
52
-
53
- # CMake
54
- cmake-build-*/
55
-
56
- # Mongo Explorer plugin
57
- .idea/**/mongoSettings.xml
58
-
59
- # File-based project format
60
- *.iws
61
-
62
- # IntelliJ
63
- out/
64
-
65
- # mpeltonen/sbt-idea plugin
66
- .idea_modules/
67
-
68
- # JIRA plugin
69
- atlassian-ide-plugin.xml
70
-
71
- # Cursive Clojure plugin
72
- .idea/replstate.xml
73
-
74
- # Crashlytics plugin (for Android Studio and IntelliJ)
75
- com_crashlytics_export_strings.xml
76
- crashlytics.properties
77
- crashlytics-build.properties
78
- fabric.properties
79
-
80
- # Editor-based Rest Client
81
- .idea/httpRequests
82
-
83
- # Android studio 3.1+ serialized cache file
84
- .idea/caches/build_file_checksums.ser
85
-
86
- ### RubyMine+all Patch ###
87
- # Ignores the whole .idea folder and all .iml files
88
- # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
89
-
90
- .idea/
91
-
92
- # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
93
-
94
- *.iml
95
- modules.xml
96
- *.ipr
97
-
98
- .DS_Store # On mac
99
-
1
+ Gemfile.lock # Part of best practice
2
+
3
+ # Created by https://www.gitignore.io/api/rubymine+all
4
+
5
+ ### RubyMine+all ###
6
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8
+
9
+ /.bundle/
10
+ /.yardoc
11
+ /_yardoc/
12
+ /coverage/
13
+ /doc/
14
+ /pkg/
15
+ /spec/reports/
16
+ /tmp/
17
+ /webdrivers_bin
18
+ *.log
19
+ *.mkv
20
+ *.mp4
21
+ *.avi
22
+ *.gif
23
+
24
+ Gemfile.lock
25
+
26
+ # rspec failure tracking
27
+ .rspec_status
28
+
29
+ # Generated files
30
+ .idea/**/contentModel.xml
31
+
32
+ # Sensitive or high-churn files
33
+ .idea/**/dataSources/
34
+ .idea/**/dataSources.ids
35
+ .idea/**/dataSources.local.xml
36
+ .idea/**/sqlDataSources.xml
37
+ .idea/**/dynamic.xml
38
+ .idea/**/uiDesigner.xml
39
+ .idea/**/dbnavigator.xml
40
+
41
+ # Gradle
42
+ .idea/**/gradle.xml
43
+ .idea/**/libraries
44
+
45
+ # Gradle and Maven with auto-import
46
+ # When using Gradle or Maven with auto-import, you should exclude module files,
47
+ # since they will be recreated, and may cause churn. Uncomment if using
48
+ # auto-import.
49
+ # .idea/modules.xml
50
+ # .idea/*.iml
51
+ # .idea/modules
52
+
53
+ # CMake
54
+ cmake-build-*/
55
+
56
+ # Mongo Explorer plugin
57
+ .idea/**/mongoSettings.xml
58
+
59
+ # File-based project format
60
+ *.iws
61
+
62
+ # IntelliJ
63
+ out/
64
+
65
+ # mpeltonen/sbt-idea plugin
66
+ .idea_modules/
67
+
68
+ # JIRA plugin
69
+ atlassian-ide-plugin.xml
70
+
71
+ # Cursive Clojure plugin
72
+ .idea/replstate.xml
73
+
74
+ # Crashlytics plugin (for Android Studio and IntelliJ)
75
+ com_crashlytics_export_strings.xml
76
+ crashlytics.properties
77
+ crashlytics-build.properties
78
+ fabric.properties
79
+
80
+ # Editor-based Rest Client
81
+ .idea/httpRequests
82
+
83
+ # Android studio 3.1+ serialized cache file
84
+ .idea/caches/build_file_checksums.ser
85
+
86
+ ### RubyMine+all Patch ###
87
+ # Ignores the whole .idea folder and all .iml files
88
+ # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
89
+
90
+ .idea/
91
+
92
+ # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
93
+
94
+ *.iml
95
+ modules.xml
96
+ *.ipr
97
+
98
+ .DS_Store # On mac
99
+
100
100
  # End of https://www.gitignore.io/api/rubymine+all
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -32,6 +32,9 @@ Layout/AlignParameters:
32
32
  Layout/IndentFirstHashElement:
33
33
  Enabled: true
34
34
 
35
+ Layout/TrailingBlankLines:
36
+ Enabled: false
37
+
35
38
  Metrics/LineLength:
36
39
  Max: 120
37
40
 
@@ -69,7 +72,4 @@ Style/CommentedKeyword:
69
72
  Enabled: false
70
73
 
71
74
  Style/FrozenStringLiteralComment:
72
- Enabled: false
73
-
74
- TrailingBlankLines:
75
75
  Enabled: false
@@ -16,7 +16,7 @@ matrix:
16
16
  env: RAKE_TASK=rubocop
17
17
  - rvm: 2.6.3
18
18
  dist: xenial
19
- env: RAKE_TASK=spec
19
+ env: RAKE_TASK=spec REPORT_COVERAGE=true
20
20
  - rvm: jruby-9.2.7.0
21
21
  dist: xenial
22
22
  jdk: openjdk8
@@ -2,6 +2,10 @@
2
2
 
3
3
  This project adheres to [Semantic Versioning](https://semver.org/).
4
4
 
5
+ ### 1.3.1 (2019-10-20)
6
+ * Reattempt `ffprobe` execution up to times if the first try raises `Errno::EAGAIN`.
7
+ Hopefully fixes [#79](https://github.com/kapoorlakshya/screen-recorder/issues/79).
8
+
5
9
  ### 1.3.0 (2019-07-26)
6
10
  * Support JRuby 9.2+ ([#58](https://github.com/kapoorlakshya/screen-recorder/issues/58))
7
11
  * Add `ScreenRecorder::Window.fetch_title` as an alias for `ScreenRecorder::Titles.fetch`.
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 Lakshya Kapoor
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Lakshya Kapoor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -23,7 +23,7 @@ Works on Windows, Linux, and macOS. Requires Ruby 2.0+ or JRuby 9.2+.
23
23
 
24
24
  ##### 1. Setup FFmpeg
25
25
 
26
- Linux and macOS instructions are [here](https://www.ffmpeg.org/download.html).
26
+ Linux and macOS instructions are [here](https://trac.ffmpeg.org/wiki/CompilationGuide).
27
27
 
28
28
  For Microsoft Windows, download the *libx264* enabled binary from [here](https://ffmpeg.zeranoe.com/builds/).
29
29
  Once downloaded, add location of the `ffmpeg/bin` folder to the `PATH`
@@ -38,13 +38,13 @@ Next, add these lines to your application's Gemfile:
38
38
 
39
39
  ```ruby
40
40
  gem 'ffi' # Windows only
41
- gem 'screen-recorder'
41
+ gem 'screen-recorder', '~> 1.0'
42
42
  ```
43
43
 
44
44
  The [`ffi`](https://github.com/ffi/ffi) gem is used by the
45
45
  [`childprocess`](https://github.com/enkessler/childprocess) gem on
46
46
  Windows, but it does not explicitly require it. More information
47
- on this [here](https://github.com/enkessler/childprocess/issues/150).
47
+ on this [here](https://github.com/enkessler/childprocess/issues/160).
48
48
 
49
49
 
50
50
  And then execute:
File without changes
data/bin/setup CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -19,8 +19,8 @@ module ScreenRecorder
19
19
  #
20
20
  def start
21
21
  ScreenRecorder.logger.debug 'Starting recorder...'
22
- @video = nil # New file
23
- @process = start_ffmpeg
22
+ @video = nil # New file
23
+ @process = start_ffmpeg
24
24
  ScreenRecorder.logger.info 'Recording...'
25
25
  @process
26
26
  end
@@ -33,7 +33,7 @@ module ScreenRecorder
33
33
  stop_ffmpeg
34
34
  ScreenRecorder.logger.debug 'Stopped ffmpeg.'
35
35
  ScreenRecorder.logger.info 'Recording complete.'
36
- @video = FFMPEG::Movie.new(options.output)
36
+ @video = prepare_video
37
37
  end
38
38
 
39
39
  #
@@ -86,6 +86,27 @@ module ScreenRecorder
86
86
  ScreenRecorder.logger.error "Check '#{@options.log}' for more information."
87
87
  end
88
88
 
89
+ #
90
+ # Runs ffprobe on the output video file and returns
91
+ # a FFMPEG::Movie object.
92
+ #
93
+ def prepare_video
94
+ max_attempts = 3
95
+ attempts_made = 0
96
+ delay = 1.0
97
+
98
+ begin # Fixes #79
99
+ ScreenRecorder.logger.info 'Running ffprobe to prepare video (output) file.'
100
+ FFMPEG::Movie.new(options.output)
101
+ rescue Errno::EAGAIN, Errno::EACCES
102
+ attempts_made += 1
103
+ ScreenRecorder.logger.error "Failed to run ffprobe. Retrying... (#{attempts_made}/#{max_attempts})"
104
+ sleep(delay)
105
+ retry if attempts_made < max_attempts
106
+ raise
107
+ end
108
+ end
109
+
89
110
  #
90
111
  # Generates the command line arguments based on the given
91
112
  # options.
@@ -1,10 +1,10 @@
1
- module ScreenRecorder
2
- # @since 1.0.0-beta5
3
- module Errors
4
- # @since 1.0.0-beta3
5
- class ApplicationNotFound < StandardError; end
6
-
7
- # @since 1.0.0-beta5
8
- class DependencyNotFound < StandardError; end
9
- end
1
+ module ScreenRecorder
2
+ # @since 1.0.0-beta5
3
+ module Errors
4
+ # @since 1.0.0-beta3
5
+ class ApplicationNotFound < StandardError; end
6
+
7
+ # @since 1.0.0-beta5
8
+ class DependencyNotFound < StandardError; end
9
+ end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module ScreenRecorder
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  'on Windows, Linux, and macOS. Primarily geared towards recording automated UI ' \
15
15
  '(Selenium) test executions for debugging and documentation.'
16
16
  spec.license = 'MIT'
17
- # noinspection RubyStringKeysInHashInspection,RubyStringKeysInHashInspection,RubyStringKeysInHashInspection
17
+ # noinspection RubyStringKeysInHashInspection
18
18
  spec.metadata = {
19
19
  'changelog_uri' => 'https://github.com/kapoorlakshya/screen-recorder/blob/master/CHANGELOG.md',
20
20
  'source_code_uri' => 'https://github.com/kapoorlakshya/screen-recorder/',
@@ -28,17 +28,17 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_development_dependency 'ffi' # For selenium_webdriver on Windows
32
- spec.add_development_dependency 'rake', '~> 12.0'
31
+ spec.add_development_dependency 'ffi' # For selenium-webdriver on Windows
32
+ spec.add_development_dependency 'rake', '>= 12.0'
33
33
  spec.add_development_dependency 'rspec', '~> 3.0'
34
- spec.add_development_dependency 'rubocop', '~> 0.73'
35
- spec.add_development_dependency 'rubocop-performance', '~> 1.1.0'
36
- spec.add_development_dependency 'rubocop-rspec', '~> 1.32'
34
+ spec.add_development_dependency 'rubocop', '~> 0.75'
35
+ spec.add_development_dependency 'rubocop-performance', '~> 1.0'
36
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.0'
37
37
  spec.add_development_dependency 'simplecov', '~> 0.16'
38
38
  spec.add_development_dependency 'watir', '~> 6.0'
39
39
  spec.add_development_dependency 'webdrivers', '~> 4.0'
40
40
 
41
- spec.add_runtime_dependency 'childprocess', '~> 1.0'
41
+ spec.add_runtime_dependency 'childprocess', '~> 3.0'
42
42
  spec.add_runtime_dependency 'os', '~> 1.0.0'
43
43
  spec.add_runtime_dependency 'streamio-ffmpeg', '~> 3.0'
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: screen-recorder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lakshya Kapoor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-26 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -28,14 +28,14 @@ dependencies:
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: '12.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: '12.0'
41
41
  - !ruby/object:Gem::Dependency
@@ -58,42 +58,42 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.73'
61
+ version: '0.75'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.73'
68
+ version: '0.75'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-performance
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.1.0
75
+ version: '1.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.1.0
82
+ version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.32'
89
+ version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.32'
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.0'
145
+ version: '3.0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.0'
152
+ version: '3.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: os
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubygems_version: 3.0.3
240
+ rubygems_version: 3.0.6
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Video record your computer screen using FFmpeg.