lopata 0.1.26 → 0.1.27

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c48d8c35ec3fbda8e6e707ec75a4d48c98a7e0733a4156869e932a00cadb6a10
4
- data.tar.gz: 70ef965bafbf052815cd06f9807f1ac209dd06668e7fe17dabee4684e7066885
3
+ metadata.gz: b0587bd058d882d2a656a1ab4f4e60ae05f756f2190e5f2b977ea9c97ca9a749
4
+ data.tar.gz: 97fc9b78d90d71c2ecfdd43d892380b25aed11b3ad03b5370683a601b5aa3a17
5
5
  SHA512:
6
- metadata.gz: 9547b0ce6a37588e0fac9a3f0c899502e755e17caf753eac1bdcaba8dbf2119b2d5ddcda3897b8450cecc03b9796a1b2234bd3f09ebe4e442501cc7f79f62410
7
- data.tar.gz: f1c6e073a0dce8cfdd22182214fddb5ff88acef2771df288bf8109333533506a941db6e9d3111553e7ea5dea2dba05b21d096924dc424dee6dfea1f5d7cd147d
6
+ metadata.gz: d20009dbd9d904fc2af94df682c2964b74d269871c7d331eacf26536c365b39d830a03308c1aa6eb7399022e21d63a98cb1ec60dbf6d8bac876be1484db725ae
7
+ data.tar.gz: adf29771c6c191fca1e1dcf7954d5a21a2ae0acf28fabeb94886a8d82e83e4120f74d4610febaace4049ac5be20d28927c0076b9cc1590b8b3fae473e0177fd7
@@ -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
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.27'
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.27
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-10 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.27
142
142
  test_files: []