chemlab 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +6 -0
- data/bin/chemlab +10 -0
- data/bin/chemlab-suite +1 -0
- data/bin/chemlab-test +1 -0
- data/lib/chemlab.rb +11 -13
- data/lib/chemlab/attributable.rb +16 -10
- data/lib/chemlab/cli/fixtures/new_library/.gitignore +63 -0
- data/lib/chemlab/cli/fixtures/new_library/Gemfile +5 -0
- data/lib/chemlab/cli/fixtures/new_library/README.md.erb +1 -0
- data/lib/chemlab/cli/fixtures/new_library/lib/new_library.rb.erb +7 -0
- data/lib/chemlab/cli/fixtures/new_library/lib/page/sample.rb.erb +9 -0
- data/lib/chemlab/cli/fixtures/new_library/new_library.gemspec.erb +23 -0
- data/lib/chemlab/cli/fixtures/new_library/spec/integration/page/sample_spec.rb.erb +17 -0
- data/lib/chemlab/cli/fixtures/new_library/spec/unit/page/sample_spec.rb.erb +19 -0
- data/lib/chemlab/cli/generator.rb +46 -0
- data/lib/chemlab/cli/generator/templates/page.erb +3 -0
- data/lib/chemlab/cli/new_library.rb +62 -0
- data/lib/chemlab/cli/stub.erb +65 -0
- data/lib/chemlab/cli/stubber.rb +74 -0
- data/lib/chemlab/component.rb +78 -8
- data/lib/chemlab/configuration.rb +60 -12
- data/lib/chemlab/element.rb +4 -0
- data/lib/chemlab/page.rb +19 -1
- data/lib/chemlab/runtime/browser.rb +13 -17
- data/lib/chemlab/runtime/env.rb +13 -9
- data/lib/chemlab/runtime/logger.rb +16 -13
- data/lib/chemlab/version.rb +1 -1
- data/lib/tasks/generate.rake +22 -0
- data/lib/tasks/generate_stubs.rake +20 -0
- data/lib/tasks/help.rake +24 -0
- data/lib/tasks/new.rake +19 -0
- data/lib/tasks/version.rake +8 -0
- metadata +87 -49
- data/lib/chemlab/api_fabricator.rb +0 -134
- data/lib/chemlab/resource.rb +0 -169
- data/lib/chemlab/runtime/api_client.rb +0 -18
- data/lib/chemlab/support/api.rb +0 -71
- data/lib/chemlab/support/logging.rb +0 -176
- data/lib/chemlab/support/repeater.rb +0 -65
- data/lib/chemlab/support/waiter.rb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Chemlab
|
4
|
-
module Support
|
5
|
-
module Waiter
|
6
|
-
extend Repeater
|
7
|
-
|
8
|
-
module_function
|
9
|
-
|
10
|
-
def wait_until(max_duration: singleton_class::DEFAULT_MAX_WAIT_TIME, reload_page: nil, sleep_interval: 0.1, raise_on_failure: true, retry_on_exception: false, log: true)
|
11
|
-
if log
|
12
|
-
QA::Runtime::Logger.debug(
|
13
|
-
<<~MSG.tr("\n", ' ')
|
14
|
-
with wait_until: max_duration: #{max_duration};
|
15
|
-
reload_page: #{reload_page};
|
16
|
-
sleep_interval: #{sleep_interval};
|
17
|
-
raise_on_failure: #{raise_on_failure}
|
18
|
-
MSG
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
result = nil
|
23
|
-
self.repeat_until(
|
24
|
-
max_duration: max_duration,
|
25
|
-
reload_page: reload_page,
|
26
|
-
sleep_interval: sleep_interval,
|
27
|
-
raise_on_failure: raise_on_failure,
|
28
|
-
retry_on_exception: retry_on_exception,
|
29
|
-
log: log
|
30
|
-
) do
|
31
|
-
result = yield
|
32
|
-
end
|
33
|
-
QA::Runtime::Logger.debug("ended wait_until") if log
|
34
|
-
|
35
|
-
result
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|