allure_turnip 0.2.1 → 0.3.0

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: 62ad1e5048e18e54eda488dc29bc1e411f2896cb1c9b2ebe7b03a0e56c0b88a9
4
- data.tar.gz: 449e4fb87d84b38cd5ca6be05f5e38fe518f895434b3ceaf0f88385acd97af41
3
+ metadata.gz: 70c173c5fc571cb24e540a51be9eeb34d9b10b260e8ec916e220f9d1b951c711
4
+ data.tar.gz: 2f98e548c17505637b59cb1ef6b7035a8c7dd03ab474f597c3e3491ee11e476f
5
5
  SHA512:
6
- metadata.gz: e182a3501609fd91081baa475f006524b03bb58d8d86e9dc661932574aec37527f5b2d0839d7e396259e83fce151680ccbe43e3ec0a42f68759345248ff21a88
7
- data.tar.gz: 8b6e43680e155cf5f500284d6fe9c31cc058bfda21ea361b25fabaccccd1683a9153a5c4354b96273d1592fd87dc90dce3fa568dcf994cfba286ee5546acf6c3
6
+ metadata.gz: b7108bb3221c4ff3c84e94841dc1620134b4afb452e192a06c7a72f7439863ebeee6b581220cb2b52346f6feef57feaa58da9350af3588c75afc677045ac1db4
7
+ data.tar.gz: f4aa7450a37fc9a39dc79bab737e0223e7cb80b25b5833c0fa7cf8cb81581828b2eb4d5272886c0b866c2b71315d9831531f6e8106ee07a5b6d11e13cf1d3215
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- allure_turnip (0.2.1)
4
+ allure_turnip (0.3.0)
5
5
  allure-ruby-adaptor-api (= 0.7.0)
6
- rspec (~> 3.5)
7
- turnip (~> 3.0)
6
+ rspec (~> 3.7)
7
+ turnip (~> 4.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -13,13 +13,19 @@ GEM
13
13
  mimemagic
14
14
  nokogiri (~> 1.7)
15
15
  uuid
16
+ c21e (1.1.9)
17
+ cucumber-messages (2.1.2)
18
+ google-protobuf (>= 3.2, <= 3.7)
16
19
  diff-lcs (1.3)
17
- gherkin (5.1.0)
20
+ gherkin (6.0.17)
21
+ c21e (~> 1.1.9)
22
+ cucumber-messages (~> 2.1.2)
23
+ google-protobuf (3.7.0)
18
24
  macaddr (1.7.1)
19
25
  systemu (~> 2.6.2)
20
26
  mimemagic (0.3.3)
21
27
  mini_portile2 (2.4.0)
22
- nokogiri (1.10.1)
28
+ nokogiri (1.10.2)
23
29
  mini_portile2 (~> 2.4.0)
24
30
  rake (10.4.2)
25
31
  rspec (3.8.0)
@@ -36,8 +42,8 @@ GEM
36
42
  rspec-support (~> 3.8.0)
37
43
  rspec-support (3.8.0)
38
44
  systemu (2.6.5)
39
- turnip (3.1.0)
40
- gherkin (~> 5.0)
45
+ turnip (4.0.0)
46
+ gherkin (~> 6.0)
41
47
  rspec (>= 3.0, < 4.0)
42
48
  uuid (2.3.9)
43
49
  macaddr (~> 1.0)
data/README.md CHANGED
@@ -16,6 +16,7 @@ Add the dependency to your Gemfile. Choose the version carefully:
16
16
  | Allure Turnip | Turnip |
17
17
  | ------------- | ------ |
18
18
  | >= 0.1.x | >= 3.0 |
19
+ | >= 0.3.x | >= 4.0 |
19
20
 
20
21
  ```ruby
21
22
  gem 'allure_turnip'
@@ -1,14 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
3
- require "allure_turnip/version"
2
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
3
+ require 'allure_turnip/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
+ s.required_ruby_version = '>= 2.3'
6
7
  s.name = 'allure_turnip'
7
8
  s.version = AllureTurnip::Version::STRING
8
9
  s.platform = Gem::Platform::RUBY
9
10
  s.authors = ['aha-oretama']
10
11
  s.email = ['sekine_y_529@msn.com']
11
- s.description = %q{Adaptor to use Allure framework along with the Turnip}
12
+ s.description = 'Adaptor to use Allure framework along with the Turnip'
12
13
  s.summary = "allure_turnip-#{AllureTurnip::Version::STRING}"
13
14
  s.homepage = 'https://github.com/aha-oretama/allure_turnip'
14
15
  s.license = 'Apache-2.0'
@@ -18,9 +19,9 @@ Gem::Specification.new do |s|
18
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
20
  s.require_paths = ['lib']
20
21
 
21
- s.add_dependency 'rspec', '~> 3.5'
22
22
  s.add_dependency 'allure-ruby-adaptor-api', '0.7.0'
23
- s.add_dependency 'turnip', '~> 3.0'
23
+ s.add_dependency 'rspec', '~> 3.7'
24
+ s.add_dependency 'turnip', '~> 4.0'
24
25
 
25
26
  s.add_development_dependency 'bundler'
26
27
  s.add_development_dependency 'rake'
@@ -38,10 +38,12 @@ module AllureTurnip
38
38
  private
39
39
 
40
40
  def __suite
41
+ parent_group = metadata[:example_group][:parent_example_group]
42
+ parent_group = parent_group.has_key?(:parent_example_group) ? parent_group[:parent_example_group] : parent_group
41
43
  if AllureTurnip::Config.feature_with_filename?
42
- "#{File.split(metadata[:example_group][:parent_example_group][:file_path])[1]} -> #{metadata[:example_group][:parent_example_group][:description]}"
44
+ "#{File.split(parent_group[:file_path])[1]} -> #{parent_group[:description]}"
43
45
  else
44
- metadata[:example_group][:parent_example_group][:description]
46
+ parent_group[:description]
45
47
  end
46
48
  end
47
49
 
@@ -26,7 +26,7 @@ module AllureTurnip
26
26
  def example_group_finished(notification)
27
27
  return unless turnip?(notification)
28
28
 
29
- if notification.group.examples.empty? # Feature has no examples
29
+ if suite?(notification.group)
30
30
  AllureRubyAdaptorApi::Builder.stop_suite(suite(notification.group))
31
31
  end
32
32
  end
@@ -34,9 +34,9 @@ module AllureTurnip
34
34
  def example_group_started(notification)
35
35
  return unless turnip?(notification)
36
36
 
37
- if notification.group.examples.empty? # Feature has no examples
37
+ if suite?(notification.group)
38
38
  AllureRubyAdaptorApi::Builder.start_suite(suite(notification.group), labels(notification))
39
- else # Scenario has examples
39
+ elsif test?(notification.group)
40
40
  suite = suite(notification.group)
41
41
  test = test(notification.group)
42
42
  AllureRubyAdaptorApi::Builder.start_test(suite, test, labels(notification))
@@ -87,6 +87,10 @@ module AllureTurnip
87
87
  )
88
88
  end
89
89
 
90
+ def suite?(group)
91
+ group.metadata[:scoped_id] == '1'
92
+ end
93
+
90
94
  def suite(group)
91
95
  if AllureTurnip::Config.feature_with_filename?
92
96
  "#{File.split(group.parent_groups.last.metadata[:file_path])[1]} -> #{group.parent_groups.last.description}"
@@ -95,6 +99,10 @@ module AllureTurnip
95
99
  end
96
100
  end
97
101
 
102
+ def test?(group)
103
+ !suite?(group) && !group.examples.empty?
104
+ end
105
+
98
106
  def test(group)
99
107
  group.metadata[:full_description]
100
108
  end
@@ -1,5 +1,5 @@
1
1
  module AllureTurnip # :nodoc:
2
2
  module Version # :nodoc:
3
- STRING = '0.2.1'
3
+ STRING = '0.3.0'
4
4
  end
5
5
  end
@@ -0,0 +1,25 @@
1
+ Feature: Gherkin 6 syntax
2
+
3
+ Background:
4
+ Given there is a monster with 2 hitpoints
5
+
6
+ Scenario: Defeat 2 hit points monster
7
+ When I attack it
8
+ Then the monster should be alive
9
+ When I attack it
10
+ Then it should die
11
+
12
+ Rule: Battle with preemptive attack
13
+ Background:
14
+ Given I attack the monster and do 1 points damage
15
+
16
+ Example: Defeat 1 hit points
17
+ When I attack it
18
+ Then it should die
19
+
20
+ Rule: Battle with preemptive critical attack
21
+ Background:
22
+ Given I attack the monster and do 2 points damage
23
+
24
+ Example: Already no hit points
25
+ Then it should die
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure_turnip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - aha-oretama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-21 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
14
+ name: allure-ruby-adaptor-api
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '3.5'
19
+ version: 0.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '3.5'
26
+ version: 0.7.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: allure-ruby-adaptor-api
28
+ name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.7.0
33
+ version: '3.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.7.0
40
+ version: '3.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: turnip
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '4.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '4.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -112,6 +112,7 @@ files:
112
112
  - spec/backgrounds.feature
113
113
  - spec/blank.feature
114
114
  - spec/errors.feature
115
+ - spec/gherkin6_syntax.feature
115
116
  - spec/interpolation.feature
116
117
  - spec/multiline_string.feature
117
118
  - spec/pending.feature
@@ -148,15 +149,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
149
  requirements:
149
150
  - - ">="
150
151
  - !ruby/object:Gem::Version
151
- version: '0'
152
+ version: '2.3'
152
153
  required_rubygems_version: !ruby/object:Gem::Requirement
153
154
  requirements:
154
155
  - - ">="
155
156
  - !ruby/object:Gem::Version
156
157
  version: '0'
157
158
  requirements: []
158
- rubygems_version: 3.0.2
159
+ rubygems_version: 3.0.3
159
160
  signing_key:
160
161
  specification_version: 4
161
- summary: allure_turnip-0.2.1
162
+ summary: allure_turnip-0.3.0
162
163
  test_files: []