demotape 0.0.5 → 0.0.6

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: 4d2d9c7696e6ae9e4a0013f5e431e2ce1140ea7a536ce3027b7d1fe055835be7
4
- data.tar.gz: 96318b40137c65f80b9a25d1d7aef2a9d2b5abda54137b3155fad72d22c65df4
3
+ metadata.gz: e3798bd4179968cb52b8665fee05eb4195be7ec98898bb1bbfd881f44f79c59d
4
+ data.tar.gz: 714db5cf0c410162b7aff172f6b4b1175ff3cfff4e3e001943429a53dd7ac372
5
5
  SHA512:
6
- metadata.gz: 3ae5db1753a91ef17835e0a77ec046ef05a8b67245a8fc86634eb51216fee0216a5d2596402ccddbb12074982dae06b1d7ef3e315b266ac61f8c318cb5db0e5f
7
- data.tar.gz: f53681e7e489a9390905ce79fc47c8417f9fb2df65cc13496a7c58737e8f6cd9cbc4d209a925043f78a526bde42504fd4b025557d370fa0cb94c61c0157e97de
6
+ metadata.gz: 2fc9f8b39e9c07ece1effff7b412242d64c31af62e0a9e33011556f390c0e2a15ec0f51005250dbf7eaa8799b47ac07cf533695447271fa197b6501ea4102a53
7
+ data.tar.gz: 96125fe7e9ddf9a702b4857ec4780776fb98c4d971110d7a4ac9e9cf30f04f67745ad0c07ca733108655c244e0efbad48a0c13a99eace8e52802547c6d050adc
data/CHANGELOG.md CHANGED
@@ -11,6 +11,14 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## v0.0.6
15
+
16
+ - [Added] Add `demotape run --working-dir` to specify the working directory for
17
+ commands. Notice that this changes all path references to be relative to the
18
+ working directory, including `--output-path` (if it's a relative path).
19
+ - [Fixed] Fix issue where `Set typing_speed` wasn't recognized.
20
+ - [Fixed] Fix issue where `Set shell` wasn't recognized.
21
+
14
22
  ## v0.0.5
15
23
 
16
24
  - [Changed] Add newline to multiline strings if they don't end with one.
data/README.md CHANGED
@@ -109,6 +109,11 @@ $ echo "Type 'echo \"it works with stdin too\"'\nEnter\nSleep 5" | \
109
109
  info Finished in 11.92s
110
110
  ```
111
111
 
112
+ > [!TIP]
113
+ >
114
+ > Notice that when using `--working-dir`, all path references will be relative
115
+ > to the working directory, including `--output-path`.
116
+
112
117
  ### Output formats
113
118
 
114
119
  - When exporting videos, you can choose between `.mp4`, `.webm` or `.avi`.
data/lib/demo_tape/cli.rb CHANGED
@@ -13,6 +13,10 @@ module DemoTape
13
13
  end
14
14
 
15
15
  desc "run PATH", "Runs a demo tape"
16
+ option :working_dir,
17
+ type: :string,
18
+ desc: "Working directory to run the commands in",
19
+ default: Dir.pwd
16
20
  option :typing_speed,
17
21
  type: :string,
18
22
  default: "50ms",
@@ -158,7 +162,9 @@ module DemoTape
158
162
  content = File.read(file_path)
159
163
  end
160
164
 
161
- Runner.new(file_path:, content:, thor: shell, options:).run
165
+ Dir.chdir(options.working_dir) do
166
+ Runner.new(file_path:, content:, thor: shell, options:).run
167
+ end
162
168
  end
163
169
 
164
170
  desc "themes", "Lists available built-in themes"
@@ -335,7 +335,8 @@ module DemoTape
335
335
 
336
336
  # Set attribute DURATION
337
337
  rules.push identifier("Set") +
338
- identifier("loop_delay", "run_sleep", "run_enter_delay") +
338
+ identifier("loop_delay", "run_sleep", "run_enter_delay",
339
+ "typing_speed") +
339
340
  duration
340
341
 
341
342
  # Set attribute BOOLEAN
@@ -347,12 +348,12 @@ module DemoTape
347
348
  rules.push identifier("Set") +
348
349
  identifier("width", "height", "cursor_width", "font_size",
349
350
  "padding", "margin", "loop_delay", "line_height",
350
- "border_radius") +
351
+ "border_radius", "typing_speed") +
351
352
  number
352
353
 
353
354
  # Set attribute STRING
354
355
  rules.push identifier("Set") +
355
- identifier("theme", "font_family", "margin_fill") +
356
+ identifier("theme", "font_family", "margin_fill", "shell") +
356
357
  string
357
358
 
358
359
  # Set cursor_style STRING
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DemoTape
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
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.5
4
+ version: 0.0.6
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.5
695
- changelog_uri: https://github.com/fnando/demotape/tree/v0.0.5/CHANGELOG.md
696
- documentation_uri: https://github.com/fnando/demotape/tree/v0.0.5/README.md
697
- license_uri: https://github.com/fnando/demotape/tree/v0.0.5/LICENSE.md
694
+ source_code_uri: https://github.com/fnando/demotape/tree/v0.0.6
695
+ changelog_uri: https://github.com/fnando/demotape/tree/v0.0.6/CHANGELOG.md
696
+ documentation_uri: https://github.com/fnando/demotape/tree/v0.0.6/README.md
697
+ license_uri: https://github.com/fnando/demotape/tree/v0.0.6/LICENSE.md
698
698
  rdoc_options: []
699
699
  require_paths:
700
700
  - lib