demotape 0.0.6 → 0.0.7
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/CHANGELOG.md +4 -0
- data/editors/sublime-text/DemoTape.sublime-syntax +1 -1
- data/editors/vim/syntax/demotape.vim +1 -1
- data/editors/vscode/demotape.tmLanguage.json +1 -1
- data/editors/zed/tree-sitter/grammar.js +1 -1
- data/lib/demo_tape/parser/rules.rb +33 -31
- data/lib/demo_tape/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9703d45771aaa186b951e020ed1f30f6eb0ef4c12aa9de87a55cc6b229dacb07
|
|
4
|
+
data.tar.gz: 3f16d0099cffbc04e345c062e04c176dcec891063177bcdb2850056b2f24d29f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e71e511638f3bb46d93bc332f79df365c9a80e5a6daef615500685a1f9e5a7760e37bbb7e0f2faf333a5a439685439defe0140baab13fdbcf2119d8ac718871f
|
|
7
|
+
data.tar.gz: d563b7107de203799897fcf840f045f8d73b009a7e9a60c54f16f55f61b0570accfbe656756603abb32a845aaed304fc7151a911103bdd273197ad42efa82099
|
data/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,10 @@ Prefix your message with one of the following:
|
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## v0.0.7
|
|
15
|
+
|
|
16
|
+
- [Fixed] Fix key combos that had numbers in them not being recognized.
|
|
17
|
+
|
|
14
18
|
## v0.0.6
|
|
15
19
|
|
|
16
20
|
- [Added] Add `demotape run --working-dir` to specify the working directory for
|
|
@@ -32,7 +32,7 @@ syn match demotapeKey "\<Numpad[0-9]\>"
|
|
|
32
32
|
syn match demotapeKey "\<F\([1-9]\|1[0-2]\)\>"
|
|
33
33
|
|
|
34
34
|
" Modifiers
|
|
35
|
-
syn keyword demotapeModifier Ctrl Control Alt Option Shift Meta Command
|
|
35
|
+
syn keyword demotapeModifier Ctrl Control Alt Option Shift Meta Command Cmd
|
|
36
36
|
|
|
37
37
|
" Key combination operator
|
|
38
38
|
syn match demotapeOperator "+"
|
|
@@ -187,7 +187,7 @@ module.exports = grammar({
|
|
|
187
187
|
),
|
|
188
188
|
|
|
189
189
|
modifier_key: $ => choice(
|
|
190
|
-
'Ctrl', 'Control', 'Alt', 'Option', 'Shift', 'Meta', 'Command'
|
|
190
|
+
'Ctrl', 'Control', 'Alt', 'Option', 'Shift', 'Meta', 'Command', 'Cmd'
|
|
191
191
|
),
|
|
192
192
|
|
|
193
193
|
letter_key: $ => /[A-Za-z0-9]/,
|
|
@@ -42,12 +42,26 @@ module DemoTape
|
|
|
42
42
|
results.any?
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
def |(other)
|
|
46
|
+
Any.new(self, other)
|
|
47
|
+
end
|
|
48
|
+
|
|
45
49
|
def +(other)
|
|
46
50
|
expectations << other
|
|
47
51
|
self
|
|
48
52
|
end
|
|
49
53
|
end
|
|
50
54
|
|
|
55
|
+
class Any
|
|
56
|
+
def initialize(*types)
|
|
57
|
+
@types = types
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def valid?(*)
|
|
61
|
+
@types.any? { it.valid?(*) }
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
51
65
|
class Duration
|
|
52
66
|
include Helpers
|
|
53
67
|
|
|
@@ -232,50 +246,38 @@ module DemoTape
|
|
|
232
246
|
# Group invocations
|
|
233
247
|
rules.push identifier(/^[a-z0-9_]+$/)
|
|
234
248
|
|
|
249
|
+
key = identifier(*Command::VALID_KEYS) | number
|
|
250
|
+
|
|
235
251
|
# KEY+KEY
|
|
252
|
+
rules.push identifier(*Command::KEY_MAPPING.keys) + operator("+") + key
|
|
236
253
|
rules.push identifier(*Command::KEY_MAPPING.keys) +
|
|
237
254
|
operator("+") +
|
|
238
|
-
|
|
255
|
+
key +
|
|
256
|
+
number
|
|
239
257
|
|
|
240
258
|
# KEY+KEY+KEY
|
|
241
259
|
rules.push identifier(*Command::KEY_MAPPING.keys) +
|
|
242
260
|
operator("+") +
|
|
243
|
-
|
|
244
|
-
operator("+") +
|
|
245
|
-
identifier(*Command::VALID_KEYS)
|
|
246
|
-
|
|
247
|
-
# KEY+KEY+KEY+KEY
|
|
248
|
-
rules.push identifier(*Command::KEY_MAPPING.keys) +
|
|
249
|
-
operator("+") +
|
|
250
|
-
identifier(*Command::VALID_KEYS) +
|
|
251
|
-
operator("+") +
|
|
252
|
-
identifier(*Command::VALID_KEYS) +
|
|
261
|
+
key +
|
|
253
262
|
operator("+") +
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
# KEY+KEY COUNT
|
|
257
|
-
rules.push identifier(*Command::KEY_MAPPING.keys) +
|
|
258
|
-
operator("+") +
|
|
259
|
-
identifier(*Command::VALID_KEYS) +
|
|
260
|
-
number
|
|
261
|
-
|
|
262
|
-
# KEY+KEY+KEY COUNT
|
|
263
|
+
key
|
|
263
264
|
rules.push identifier(*Command::KEY_MAPPING.keys) +
|
|
264
265
|
operator("+") +
|
|
265
|
-
|
|
266
|
+
key +
|
|
266
267
|
operator("+") +
|
|
267
|
-
|
|
268
|
+
key +
|
|
268
269
|
number
|
|
269
270
|
|
|
270
|
-
# KEY+KEY+KEY+KEY
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
# KEY+KEY+KEY+KEY
|
|
272
|
+
key_combo = identifier(*Command::KEY_MAPPING.keys) +
|
|
273
|
+
operator("+") +
|
|
274
|
+
key +
|
|
275
|
+
operator("+") +
|
|
276
|
+
key +
|
|
277
|
+
operator("+") +
|
|
278
|
+
key
|
|
279
|
+
rules.push key_combo
|
|
280
|
+
rules.push key_combo.dup + number
|
|
279
281
|
|
|
280
282
|
# COMMAND
|
|
281
283
|
rules.push identifier(
|
data/lib/demo_tape/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: demotape
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nando Vieira
|
|
@@ -691,10 +691,10 @@ metadata:
|
|
|
691
691
|
rubygems_mfa_required: 'true'
|
|
692
692
|
homepage_uri: https://github.com/fnando/demotape
|
|
693
693
|
bug_tracker_uri: https://github.com/fnando/demotape/issues
|
|
694
|
-
source_code_uri: https://github.com/fnando/demotape/tree/v0.0.
|
|
695
|
-
changelog_uri: https://github.com/fnando/demotape/tree/v0.0.
|
|
696
|
-
documentation_uri: https://github.com/fnando/demotape/tree/v0.0.
|
|
697
|
-
license_uri: https://github.com/fnando/demotape/tree/v0.0.
|
|
694
|
+
source_code_uri: https://github.com/fnando/demotape/tree/v0.0.7
|
|
695
|
+
changelog_uri: https://github.com/fnando/demotape/tree/v0.0.7/CHANGELOG.md
|
|
696
|
+
documentation_uri: https://github.com/fnando/demotape/tree/v0.0.7/README.md
|
|
697
|
+
license_uri: https://github.com/fnando/demotape/tree/v0.0.7/LICENSE.md
|
|
698
698
|
rdoc_options: []
|
|
699
699
|
require_paths:
|
|
700
700
|
- lib
|