lopata 0.1.26 → 0.1.28

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: c48d8c35ec3fbda8e6e707ec75a4d48c98a7e0733a4156869e932a00cadb6a10
4
- data.tar.gz: 70ef965bafbf052815cd06f9807f1ac209dd06668e7fe17dabee4684e7066885
3
+ metadata.gz: 72851180980a23d7192519fecc8dd302ec9a792bf634b6b3a6b1903673c81730
4
+ data.tar.gz: '0484aa838510d86c1cbb5a002113091aed5634ca866484909e60ed0a926abbb7'
5
5
  SHA512:
6
- metadata.gz: 9547b0ce6a37588e0fac9a3f0c899502e755e17caf753eac1bdcaba8dbf2119b2d5ddcda3897b8450cecc03b9796a1b2234bd3f09ebe4e442501cc7f79f62410
7
- data.tar.gz: f1c6e073a0dce8cfdd22182214fddb5ff88acef2771df288bf8109333533506a941db6e9d3111553e7ea5dea2dba05b21d096924dc424dee6dfea1f5d7cd147d
6
+ metadata.gz: 6e47235c9aa1b6221e408fb7f951a3cb9f609165a4304a9048bc3c3ad289720c8e26de38331ed8ef086819263bffc8825ee71236875f0e340bc510c515f3ee32
7
+ data.tar.gz: a9e5c49e3c2675cac5b4b5d9b82d8cedd2bb44215362fbe32399a95bc6beef546bba2e5c6308c43421edd09a3a9a302ffd73230249a09ed3dd413bdb780c99a9
@@ -46,6 +46,12 @@ module Lopata
46
46
  @launch_id = JSON.parse(post("/projects/#{project_code}/builds/#{build_number}/launches.json", body: {total: count}).body)['id']
47
47
  end
48
48
 
49
+ # Create test stubs for all the scenarios within then build
50
+ def init_scenarios(world)
51
+ post("/projects/#{project_code}/builds/#{build_number}/tests.json",
52
+ body: { scenarios: world.scenarios.map { { title: _1.title } } })
53
+ end
54
+
49
55
  def add_attempt(scenario, finished)
50
56
  status = scenario.failed? ? Lopata::FAILED : Lopata::PASSED
51
57
  steps = build_hashes(scenario.steps)
data/lib/lopata/runner.rb CHANGED
@@ -15,6 +15,7 @@ module Lopata
15
15
  option :keep, type: :boolean, aliases: 'k'
16
16
  option :text, aliases: 't'
17
17
  option :list, type: :boolean, aliases: 'l'
18
+ option :init, type: :boolean, aliases: 'i'
18
19
  def test(*args)
19
20
  trap_interrupt
20
21
  configure_from_options
@@ -22,6 +23,8 @@ module Lopata
22
23
  Lopata::Loader.load_scenarios(*args)
23
24
  if options[:list]
24
25
  list_scenarios
26
+ elsif options[:init]
27
+ init_scenarios
25
28
  else
26
29
  run_scenarios
27
30
  end
@@ -64,6 +67,11 @@ module Lopata
64
67
  Lopata.world.scenarios.each { |s| puts s.title }
65
68
  end
66
69
 
70
+ def init_scenarios
71
+ client = Lopata::Client.new
72
+ client.init_scenarios(Lopata.world)
73
+ end
74
+
67
75
  def run_scenarios
68
76
  world = Lopata.world
69
77
  world.notify_observers(:started, world)
@@ -1,6 +1,6 @@
1
1
  module Lopata
2
2
  # @private
3
3
  module Version
4
- STRING = '0.1.26'
4
+ STRING = '0.1.28'
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.26
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-12-11 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.26
141
+ summary: lopata-0.1.28
142
142
  test_files: []