demotape 0.0.4 → 0.0.5
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 +5 -0
- data/lib/demo_tape/command.rb +1 -1
- data/lib/demo_tape/parser/helpers.rb +12 -2
- data/lib/demo_tape/runner.rb +3 -2
- 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: 4d2d9c7696e6ae9e4a0013f5e431e2ce1140ea7a536ce3027b7d1fe055835be7
|
|
4
|
+
data.tar.gz: 96318b40137c65f80b9a25d1d7aef2a9d2b5abda54137b3155fad72d22c65df4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ae5db1753a91ef17835e0a77ec046ef05a8b67245a8fc86634eb51216fee0216a5d2596402ccddbb12074982dae06b1d7ef3e315b266ac61f8c318cb5db0e5f
|
|
7
|
+
data.tar.gz: f53681e7e489a9390905ce79fc47c8417f9fb2df65cc13496a7c58737e8f6cd9cbc4d209a925043f78a526bde42504fd4b025557d370fa0cb94c61c0157e97de
|
data/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,11 @@ Prefix your message with one of the following:
|
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
|
+
## v0.0.5
|
|
15
|
+
|
|
16
|
+
- [Changed] Add newline to multiline strings if they don't end with one.
|
|
17
|
+
- [Fixed] Ensure multiline strings are passed as the argument.
|
|
18
|
+
|
|
14
19
|
## v0.0.4
|
|
15
20
|
|
|
16
21
|
- [Fixed] Fix how Thor handle defaults for arrays.
|
data/lib/demo_tape/command.rb
CHANGED
|
@@ -268,7 +268,7 @@ module DemoTape
|
|
|
268
268
|
duration = token.value[:raw].to_s.strip
|
|
269
269
|
duration = "#{duration}s" if token.value[:unit].to_s.strip == ""
|
|
270
270
|
values << thor.set_color(duration, :cyan)
|
|
271
|
-
when Token::String
|
|
271
|
+
when Token::String, Token::MultilineString
|
|
272
272
|
values << thor.set_color(token.raw, :yellow)
|
|
273
273
|
when Token::Operator
|
|
274
274
|
values << thor.set_color(token.value, :white)
|
|
@@ -266,8 +266,18 @@ module DemoTape
|
|
|
266
266
|
compute_at_duration!(tokens, options)
|
|
267
267
|
|
|
268
268
|
# Find the string/value argument
|
|
269
|
-
string_token = tokens.find(&:string?)
|
|
270
|
-
|
|
269
|
+
string_token = tokens.find(&:string?) ||
|
|
270
|
+
tokens.find(&:multiline_string?)
|
|
271
|
+
|
|
272
|
+
args = case string_token
|
|
273
|
+
when Token::String
|
|
274
|
+
string_token.value
|
|
275
|
+
when Token::MultilineString
|
|
276
|
+
text = string_token.value
|
|
277
|
+
text.end_with?("\n") ? text : "#{text}\n"
|
|
278
|
+
else
|
|
279
|
+
""
|
|
280
|
+
end
|
|
271
281
|
|
|
272
282
|
# For Sleep, Wait - check for duration/number
|
|
273
283
|
if %w[
|
data/lib/demo_tape/runner.rb
CHANGED
|
@@ -31,9 +31,10 @@ module DemoTape
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def fail_with(error)
|
|
34
|
-
|
|
34
|
+
error_message = error
|
|
35
|
+
error_message = error.message if error.respond_to?(:message)
|
|
35
36
|
|
|
36
|
-
thor.say_error "\nERROR: #{
|
|
37
|
+
thor.say_error "\nERROR: #{error_message}", :red
|
|
37
38
|
puts error.backtrace if error.respond_to?(:backtrace)
|
|
38
39
|
exit 1
|
|
39
40
|
end
|
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.5
|
|
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.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
|
|
698
698
|
rdoc_options: []
|
|
699
699
|
require_paths:
|
|
700
700
|
- lib
|