lopata 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 774b79e80dea037bec71641e42289e46c8b756e7928fb2d928e448ccf9de7429
4
- data.tar.gz: 262c23ee9ab55b1d3258bd41124ccce45bdb968b5afeeb67b778a30c293adc80
3
+ metadata.gz: b016b2963faca94942b2f9800c37be27e85221241a00c3f888775380983ebd13
4
+ data.tar.gz: 100227eb53c7642def09cf3c9edc64b0036ba2ddb766feeb441d159ca02e73d0
5
5
  SHA512:
6
- metadata.gz: 6415bf6ab545f56a68cd8b6cf84c7f1e4a8322fc8615afd782b86590cb458bc64c493ac783ab952fc76ab085e0c4080cf85750bc6e4da120685775f4a6b7970a
7
- data.tar.gz: d75b4a44b1ca80254b6ffca2822a166b263131facc4cef869fb0df4c437987ad421a716933eb356dce37bf742066613e384ce63478b9ab1c11be1660834519d9
6
+ metadata.gz: 646a6432a265c98966b2938564a57fb06e321a3b6cc67722b3021815586002e26e27fa4282eb5647404e5ca8582453747ee669b015e3e3ae666f3e706cbf3bfd
7
+ data.tar.gz: 9e4d413066ed6714024fa3df2252eb8c6256892036e1a9a89ab36f391a21db211b9c82d8b5afb3b89b293b4926e9af028527fa7360aa9ca17fe61d0b6796e2cd
data/lib/lopata/runner.rb CHANGED
@@ -14,15 +14,17 @@ module Lopata
14
14
  option :rerun, type: :boolean, aliases: 'r'
15
15
  option :keep, type: :boolean, aliases: 'k'
16
16
  option :text, aliases: 't'
17
+ option :list, type: :boolean, aliases: 'l'
17
18
  def test(*args)
18
19
  trap_interrupt
19
20
  configure_from_options
20
21
  Lopata::Loader.load_shared_steps
21
22
  Lopata::Loader.load_scenarios(*args)
22
- world = Lopata.world
23
- world.notify_observers(:started, world)
24
- world.scenarios.each { |s| s.run }
25
- world.notify_observers(:finished, world)
23
+ if options[:list]
24
+ list_scenarios
25
+ else
26
+ run_scenarios
27
+ end
26
28
  end
27
29
 
28
30
  default_task :test
@@ -57,6 +59,17 @@ module Lopata
57
59
  def trap_interrupt
58
60
  trap('INT') { exit!(1) }
59
61
  end
62
+
63
+ def list_scenarios
64
+ Lopata.world.scenarios.each { |s| puts s.title }
65
+ end
66
+
67
+ def run_scenarios
68
+ world = Lopata.world
69
+ world.notify_observers(:started, world)
70
+ world.scenarios.each { |s| s.run }
71
+ world.notify_observers(:finished, world)
72
+ end
60
73
  end
61
74
  end
62
75
  end
@@ -1,6 +1,6 @@
1
1
  module Lopata
2
2
  # @private
3
3
  module Version
4
- STRING = '0.1.16'
4
+ STRING = '0.1.17'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lopata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -138,5 +138,5 @@ requirements: []
138
138
  rubygems_version: 3.2.15
139
139
  signing_key:
140
140
  specification_version: 4
141
- summary: lopata-0.1.16
141
+ summary: lopata-0.1.17
142
142
  test_files: []