demotape 0.0.7 → 0.0.8

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.
@@ -86,13 +86,10 @@ module DemoTape
86
86
  TypeFile
87
87
  Wait
88
88
  WaitUntil
89
+ WaitUntilDone
89
90
  ].freeze
90
91
 
91
92
  META_COMMANDS = %w[Group Include Output Require Set].freeze
92
- COMMANDS_WITH_DURATION = KEY_MAPPING.keys +
93
- %w[Run Type TypeFile WaitUntil Wait Sleep].freeze
94
- COMMANDS_WITH_COUNT = KEY_MAPPING.keys + %w[Wait Sleep Set]
95
- VALID_TIME_UNITS = %w[ms s m h].freeze
96
93
 
97
94
  # Valid keys that can be used in key combos
98
95
  VALID_KEYS = KEY_MAPPING.keys + %w[
@@ -330,6 +330,11 @@ module DemoTape
330
330
  duration +
331
331
  string
332
332
 
333
+ # WaitUntilDone
334
+ rules.push identifier("WaitUntilDone")
335
+ rules.push identifier("WaitUntilDone") + operator("@") + duration
336
+ rules.push identifier("WaitUntilDone") + operator("@") + number
337
+
333
338
  # WaitUntil
334
339
  rules.push identifier("WaitUntil") + regex
335
340
  rules.push identifier("WaitUntil") + operator("@") + duration + regex
@@ -530,6 +530,14 @@ module DemoTape
530
530
  session.execute_script(script)
531
531
  end
532
532
 
533
+ def run_wait_until_done(command)
534
+ run_wait_until Command.new(
535
+ "WaitUntil",
536
+ {pattern: /::done::/},
537
+ duration: command.options[:duration]
538
+ )
539
+ end
540
+
533
541
  def run_wait_until(command)
534
542
  spinner = Spinner.new(phrases: [
535
543
  "Searching high and low…",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DemoTape
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.8"
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.7
4
+ version: 0.0.8
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.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
694
+ source_code_uri: https://github.com/fnando/demotape/tree/v0.0.8
695
+ changelog_uri: https://github.com/fnando/demotape/tree/v0.0.8/CHANGELOG.md
696
+ documentation_uri: https://github.com/fnando/demotape/tree/v0.0.8/README.md
697
+ license_uri: https://github.com/fnando/demotape/tree/v0.0.8/LICENSE.md
698
698
  rdoc_options: []
699
699
  require_paths:
700
700
  - lib