cucumber-html-formatter 21.6.0 → 21.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,32 +3,34 @@
3
3
  module Cucumber
4
4
  module HTMLFormatter
5
5
  class AssetsLoader
6
- def template
7
- read_asset('index.mustache.html')
8
- end
6
+ class << self
7
+ def template
8
+ read_asset('index.mustache.html')
9
+ end
9
10
 
10
- def css
11
- read_asset('main.css')
12
- end
11
+ def css
12
+ read_asset('main.css')
13
+ end
13
14
 
14
- def script
15
- read_asset('main.js')
16
- end
15
+ def script
16
+ read_asset('main.js')
17
+ end
17
18
 
18
- private
19
+ private
19
20
 
20
- def read_asset(name)
21
- File.read(File.join(assets_path, name))
22
- end
21
+ def read_asset(name)
22
+ File.read(File.join(assets_path, name))
23
+ end
23
24
 
24
- def assets_path
25
- "#{html_formatter_path}/assets"
26
- end
25
+ def assets_path
26
+ "#{html_formatter_path}/assets"
27
+ end
27
28
 
28
- def html_formatter_path
29
- Gem.loaded_specs['cucumber-html-formatter'].full_gem_path
30
- rescue StandardError
31
- '.'
29
+ def html_formatter_path
30
+ Gem.loaded_specs['cucumber-html-formatter'].full_gem_path
31
+ rescue StandardError
32
+ '.'
33
+ end
32
34
  end
33
35
  end
34
36
  end
@@ -41,14 +41,10 @@ module Cucumber
41
41
 
42
42
  private
43
43
 
44
- def assets_loader
45
- @assets_loader ||= AssetsLoader.new
46
- end
47
-
48
44
  def pre_message
49
45
  [
50
46
  template_writer.write_between(nil, '{{css}}'),
51
- assets_loader.css,
47
+ AssetsLoader.css,
52
48
  template_writer.write_between('{{css}}', '{{messages}}')
53
49
  ].join("\n")
54
50
  end
@@ -56,13 +52,13 @@ module Cucumber
56
52
  def post_message
57
53
  [
58
54
  template_writer.write_between('{{messages}}', '{{script}}'),
59
- assets_loader.script,
55
+ AssetsLoader.script,
60
56
  template_writer.write_between('{{script}}', nil)
61
57
  ].join("\n")
62
58
  end
63
59
 
64
60
  def template_writer
65
- @template_writer ||= TemplateWriter.new(assets_loader.template)
61
+ @template_writer ||= TemplateWriter.new(AssetsLoader.template)
66
62
  end
67
63
  end
68
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-html-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.6.0
4
+ version: 21.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Prêtre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-05 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-messages
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '19'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '25'
22
+ version: '27'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,63 +29,63 @@ dependencies:
29
29
  version: '19'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '25'
32
+ version: '27'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: cucumber-compatibility-kit
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '14.1'
39
+ version: '15.2'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '14.1'
46
+ version: '15.2'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '13.1'
53
+ version: '13.2'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '13.1'
60
+ version: '13.2'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '3.12'
67
+ version: '3.13'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.12'
74
+ version: '3.13'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 1.41.0
81
+ version: 1.61.0
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 1.41.0
88
+ version: 1.61.0
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rubocop-rake
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 2.15.0
109
+ version: 2.25.0
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 2.15.0
116
+ version: 2.25.0
117
117
  description: HTML formatter for Cucumber
118
118
  email: cukes@googlegroups.com
119
119
  executables:
@@ -157,8 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: 3.0.3
159
159
  requirements: []
160
- rubygems_version: 3.4.19
160
+ rubygems_version: 3.5.11
161
161
  signing_key:
162
162
  specification_version: 4
163
- summary: cucumber-html-formatter-21.6.0
163
+ summary: cucumber-html-formatter-21.7.0
164
164
  test_files: []