simplecov-erb 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simplecov-erb.rb +8 -2
  3. metadata +8 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '090c8c8daca9f3e71a41e665ea6c8e20a440cfb640865dfbbdf5ed22a8bed04c'
4
- data.tar.gz: 421aec6678fb1f1be42828e74b339c616a06c94bea7e85bab0befa06acdda1f9
3
+ metadata.gz: 52f73426c6c21da27afbf735a3dfd2cc5286ad0a1e931d182c18bdffce7d6ecd
4
+ data.tar.gz: d0311f379abedc275e7e212162f3b71dcbd13eb35006b179b2a2a38032edef35
5
5
  SHA512:
6
- metadata.gz: 74cb54a45bdf77d3054f2c799cc982026800f91864bdc1824af68e3151dedf7557b6d50fd13ae8bacf15c16b2cc9cf99f601185053d95b704f20e5cd260e1b7d
7
- data.tar.gz: bee35c6871c84223508accbfd41308791784dc7bde349a92971b3b22522dc802bb63b56211fe822b8475c478600621a87a037e779ea349c56cea81377598be0c
6
+ metadata.gz: dd9617ab76db8ed174b9dc5677d91d32eca3623a6ea096e3541c2db42e128b20a56f9924d8f3a724c054ca678b837b7748123acd07f2682cdab2883880e72357
7
+ data.tar.gz: dfd44fd2d55cc3f6de3a97ee22ec8a04a893359629ee5a72b9331d503762c5ddbcc085dc539fbca7ec4574dc14017c963453d6a87b3cf7d286a58c46ac6fab4d
data/lib/simplecov-erb.rb CHANGED
@@ -49,8 +49,14 @@ class SimpleCov::Formatter::ERBFormatter
49
49
  private
50
50
 
51
51
  def template
52
- # Path, safe_mode, trim_mode
53
- ERB.new(File.read(erb_file), nil, "-")
52
+ # This syntax changed between Ruby versions 2.5 and 2.6. Although 2.5 is EOL, this will keep backward
53
+ # compatibility for those who are not yet on 2.6+. We use Gem::Version to compare instead of strings,
54
+ # which are rife with errors.
55
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
56
+ ERB.new(File.read(erb_file), trim_mode: "-")
57
+ else
58
+ ERB.new(File.read(erb_file), nil, "-")
59
+ end
54
60
  end
55
61
 
56
62
  def output_message(result)
metadata CHANGED
@@ -1,31 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov-erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Paulisse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.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: '0'
27
- description: Customizable text formatter for SimpleCov code coverage tool for ruby
28
- 1.9+
26
+ version: '1.0'
27
+ description:
29
28
  email:
30
29
  - kpaulisse@gmail.com
31
30
  executables: []
@@ -53,8 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0'
55
54
  requirements: []
56
- rubyforge_project:
57
- rubygems_version: 2.7.6
55
+ rubygems_version: 3.3.5
58
56
  signing_key:
59
57
  specification_version: 4
60
58
  summary: Customizable text formatter for SimpleCov code coverage tool for ruby 1.9+