screen-recorder 1.1.0 → 1.2.0
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 +4 -4
- data/.gitignore +99 -99
- data/.rspec +3 -3
- data/.rubocop.yml +1 -1
- data/.travis.yml +49 -35
- data/CHANGES.md +89 -78
- data/LICENSE.txt +21 -21
- data/README.md +212 -218
- data/appveyor.yml +23 -0
- data/bin/console +0 -0
- data/bin/setup +8 -8
- data/lib/screen-recorder.rb +54 -53
- data/lib/screen-recorder/common.rb +152 -146
- data/lib/screen-recorder/desktop.rb +40 -40
- data/lib/screen-recorder/errors.rb +9 -9
- data/lib/screen-recorder/options.rb +168 -151
- data/lib/screen-recorder/titles.rb +52 -49
- data/lib/screen-recorder/type_checker.rb +13 -11
- data/lib/screen-recorder/version.rb +2 -2
- data/lib/screen-recorder/window.rb +22 -22
- data/screen-recorder.gemspec +41 -39
- metadata +34 -6
@@ -1,12 +1,14 @@
|
|
1
|
-
module ScreenRecorder
|
2
|
-
# @since 1.0.0.beta10
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
module ScreenRecorder
|
2
|
+
# @since 1.0.0.beta10
|
3
|
+
#
|
4
|
+
# @api private
|
5
|
+
module TypeChecker
|
6
|
+
#
|
7
|
+
# Compares the given object's type (class) to the desired object type.
|
8
|
+
# Raises an ArgumentError if the object is not of desired type.
|
9
|
+
#
|
10
|
+
def self.check(obj, klass)
|
11
|
+
raise ArgumentError, "Expected #{klass}, given: #{obj.class}" unless obj.is_a? klass
|
12
|
+
end
|
13
|
+
end
|
12
14
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module ScreenRecorder
|
2
|
-
VERSION = '1.
|
1
|
+
module ScreenRecorder
|
2
|
+
VERSION = '1.2.0'.freeze
|
3
3
|
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
# @since 1.0.0-beta11
|
2
|
-
module ScreenRecorder
|
3
|
-
# @since 1.0.0-beta11
|
4
|
-
class Window < Common
|
5
|
-
#
|
6
|
-
# Window recording specific initializer.
|
7
|
-
#
|
8
|
-
def initialize(title:, output:, advanced: {})
|
9
|
-
raise NotImplementedError, 'Window recording is only supported on Microsoft Windows.' unless OS.windows?
|
10
|
-
|
11
|
-
super(input: format_input(title), output: output, advanced: advanced)
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
#
|
17
|
-
# Sets input syntax specific to the FFmpeg window recorder.
|
18
|
-
#
|
19
|
-
def format_input(title)
|
20
|
-
%("title=#{title}")
|
21
|
-
end
|
22
|
-
end
|
1
|
+
# @since 1.0.0-beta11
|
2
|
+
module ScreenRecorder
|
3
|
+
# @since 1.0.0-beta11
|
4
|
+
class Window < Common
|
5
|
+
#
|
6
|
+
# Window recording specific initializer.
|
7
|
+
#
|
8
|
+
def initialize(title:, output:, advanced: {})
|
9
|
+
raise NotImplementedError, 'Window recording is only supported on Microsoft Windows.' unless OS.windows?
|
10
|
+
|
11
|
+
super(input: format_input(title), output: output, advanced: advanced)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
#
|
17
|
+
# Sets input syntax specific to the FFmpeg window recorder.
|
18
|
+
#
|
19
|
+
def format_input(title)
|
20
|
+
%("title=#{title}")
|
21
|
+
end
|
22
|
+
end
|
23
23
|
end
|
data/screen-recorder.gemspec
CHANGED
@@ -1,40 +1,42 @@
|
|
1
|
-
lib = File.expand_path('lib', __dir__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require 'screen-recorder/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = 'screen-recorder'
|
7
|
-
spec.version = ScreenRecorder::VERSION
|
8
|
-
spec.required_ruby_version = '>= 2.0.0'
|
9
|
-
spec.authors = ['Lakshya Kapoor']
|
10
|
-
spec.email = ['kapoorlakshya@gmail.com']
|
11
|
-
spec.homepage = 'http://github.com/kapoorlakshya/screen-recorder'
|
12
|
-
spec.summary = 'Video record your computer screen using FFmpeg via Ruby.'
|
13
|
-
spec.description = 'Video record your computer screen - desktop or specific window - using FFmpeg via Ruby on Windows, Linux, and macOS.'
|
14
|
-
spec.license = 'MIT'
|
15
|
-
# noinspection RubyStringKeysInHashInspection,RubyStringKeysInHashInspection,RubyStringKeysInHashInspection
|
16
|
-
spec.metadata = {
|
17
|
-
'changelog_uri' => 'https://github.com/kapoorlakshya/screen-recorder/blob/master/CHANGES.md',
|
18
|
-
'source_code_uri' => 'https://github.com/kapoorlakshya/screen-recorder/',
|
19
|
-
'bug_tracker_uri' => 'https://github.com/kapoorlakshya/screen-recorder/issues',
|
20
|
-
'wiki_uri' => 'https://github.com/kapoorlakshya/screen-recorder/wiki'
|
21
|
-
}
|
22
|
-
|
23
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
-
end
|
26
|
-
|
27
|
-
spec.require_paths = ['lib']
|
28
|
-
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
31
|
-
spec.add_development_dependency '
|
32
|
-
spec.add_development_dependency 'rubocop
|
33
|
-
spec.add_development_dependency 'rubocop-
|
34
|
-
spec.add_development_dependency '
|
35
|
-
spec.add_development_dependency '
|
36
|
-
spec.add_development_dependency '
|
37
|
-
|
38
|
-
|
39
|
-
spec.add_runtime_dependency '
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'screen-recorder/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'screen-recorder'
|
7
|
+
spec.version = ScreenRecorder::VERSION
|
8
|
+
spec.required_ruby_version = '>= 2.0.0'
|
9
|
+
spec.authors = ['Lakshya Kapoor']
|
10
|
+
spec.email = ['kapoorlakshya@gmail.com']
|
11
|
+
spec.homepage = 'http://github.com/kapoorlakshya/screen-recorder'
|
12
|
+
spec.summary = 'Video record your computer screen using FFmpeg via Ruby.'
|
13
|
+
spec.description = 'Video record your computer screen - desktop or specific window - using FFmpeg via Ruby on Windows, Linux, and macOS.'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
# noinspection RubyStringKeysInHashInspection,RubyStringKeysInHashInspection,RubyStringKeysInHashInspection
|
16
|
+
spec.metadata = {
|
17
|
+
'changelog_uri' => 'https://github.com/kapoorlakshya/screen-recorder/blob/master/CHANGES.md',
|
18
|
+
'source_code_uri' => 'https://github.com/kapoorlakshya/screen-recorder/',
|
19
|
+
'bug_tracker_uri' => 'https://github.com/kapoorlakshya/screen-recorder/issues',
|
20
|
+
'wiki_uri' => 'https://github.com/kapoorlakshya/screen-recorder/wiki'
|
21
|
+
}
|
22
|
+
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
|
27
|
+
spec.require_paths = ['lib']
|
28
|
+
|
29
|
+
spec.add_development_dependency 'ffi' # For selenium_webdriver on Windows
|
30
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
32
|
+
spec.add_development_dependency 'rubocop', '~> 0.59'
|
33
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.1.0'
|
34
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.32'
|
35
|
+
spec.add_development_dependency 'simplecov', '~> 0.16'
|
36
|
+
spec.add_development_dependency 'watir', '~> 6.0'
|
37
|
+
spec.add_development_dependency 'webdrivers', '~> 3.8.0'
|
38
|
+
|
39
|
+
spec.add_runtime_dependency 'childprocess', '~> 1.0'
|
40
|
+
spec.add_runtime_dependency 'os', '~> 1.0.0'
|
41
|
+
spec.add_runtime_dependency 'streamio-ffmpeg', '~> 3.0'
|
40
42
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: screen-recorder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
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-
|
11
|
+
date: 2019-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ffi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +128,28 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
131
|
+
version: 3.8.0
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
138
|
+
version: 3.8.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: childprocess
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: os
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,6 +196,7 @@ files:
|
|
168
196
|
- LICENSE.txt
|
169
197
|
- README.md
|
170
198
|
- Rakefile
|
199
|
+
- appveyor.yml
|
171
200
|
- bin/console
|
172
201
|
- bin/setup
|
173
202
|
- lib/screen-recorder.rb
|
@@ -203,8 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
232
|
- !ruby/object:Gem::Version
|
204
233
|
version: '0'
|
205
234
|
requirements: []
|
206
|
-
|
207
|
-
rubygems_version: 2.7.6
|
235
|
+
rubygems_version: 3.0.2
|
208
236
|
signing_key:
|
209
237
|
specification_version: 4
|
210
238
|
summary: Video record your computer screen using FFmpeg via Ruby.
|