File tree 5 files changed +11
-24
lines changed
5 files changed +11
-24
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ require: rubocop-performance
2
2
inherit_from : .rubocop_todo.yml
3
3
4
4
AllCops :
5
- TargetRubyVersion : 2.3
5
+ TargetRubyVersion : 2.5
6
6
Exclude :
7
7
# Ignore HTML related things
8
8
- ' **/*.erb'
Original file line number Diff line number Diff line change @@ -22,24 +22,21 @@ group :test do
22
22
gem 'simplecov-console'
23
23
gem 'rspec' , '~> 3.1'
24
24
gem 'json_spec' , '~> 1.1' , '>= 1.1.5'
25
- gem 'mdl' , '~> 0.8.0' if Gem :: Version . new ( RUBY_VERSION . dup ) >= Gem :: Version . new ( '2.4.0' )
25
+ gem 'mdl'
26
26
end
27
27
28
28
group :acceptance do
29
- # Litmus has dependencies which require Ruby 2.5 (Puppet 6) or above.
30
- if Gem ::Version . new ( RUBY_VERSION . dup ) >= Gem ::Version . new ( '2.5.0' )
31
- gem 'puppet_litmus' , '~> 0.18'
32
- gem 'net-ssh' , '~> 5.2'
33
- end
29
+ gem 'puppet_litmus'
30
+ gem 'net-ssh'
34
31
end
35
32
36
33
group :development do
37
- gem 'github_changelog_generator' , '~> 1.15' if Gem :: Version . new ( RUBY_VERSION . dup ) >= Gem :: Version . new ( '2.3.0' )
34
+ gem 'github_changelog_generator'
38
35
gem 'pry'
39
36
gem 'pry-byebug'
40
37
end
41
38
42
- gem 'rubocop' , '~> 0.81.0' # last release that supports Ruby 2.3.0
39
+ gem 'rubocop' , '~> 0.81.0' # Requires work to upgrade
43
40
gem 'rubocop-rspec'
44
41
gem 'rubocop-performance'
45
42
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
14
14
s . homepage = 'https://github.com/puppetlabs/puppet-strings'
15
15
s . description = s . summary
16
- s . required_ruby_version = '>= 2.3 .0'
16
+ s . required_ruby_version = '>= 2.5 .0'
17
17
18
18
s . extra_rdoc_files = [
19
19
'CHANGELOG.md' ,
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
if ENV [ 'COVERAGE' ] == 'yes'
4
+ require 'codecov'
4
5
require 'simplecov'
5
6
require 'simplecov-console'
6
7
7
8
SimpleCov . formatters = [
8
9
SimpleCov ::Formatter ::HTMLFormatter ,
9
10
SimpleCov ::Formatter ::Console ,
11
+ SimpleCov ::Formatter ::Codecov ,
10
12
]
11
13
12
- unless Gem ::Version . new ( RUBY_VERSION . dup ) < Gem ::Version . new ( '2.3.0' )
13
- require 'codecov'
14
- SimpleCov . formatters << SimpleCov ::Formatter ::Codecov
15
- end
16
-
17
14
SimpleCov . start do
18
15
track_files 'lib/**/*.rb'
19
16
22
19
end
23
20
24
21
require 'mocha'
22
+ require 'mdl'
25
23
require 'rspec'
26
24
require 'json_spec'
27
25
require 'puppet/version'
54
52
end
55
53
end
56
54
57
- def mdl_available
58
- @mdl_available ||= !Gem ::Specification . select { |item | item . name . casecmp ( 'mdl' ) . zero? } . empty?
59
- end
60
-
61
55
def lint_markdown ( content )
62
- return [ ] unless mdl_available
63
-
64
- require 'mdl'
65
-
66
56
# Load default mdl ruleset
67
57
ruleset = MarkdownLint ::RuleSet . new . tap { |r | r . load_default }
68
58
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def parse_data_type_content
46
46
let ( :output ) { PuppetStrings ::Markdown . generate }
47
47
48
48
RSpec . shared_examples 'markdown lint checker' do |parameter |
49
- it 'should not generate markdown lint errors from the rendered markdown' , if : mdl_available do
49
+ it 'should not generate markdown lint errors from the rendered markdown' do
50
50
expect ( output ) . to have_no_markdown_lint_errors
51
51
end
52
52
end
You can’t perform that action at this time.
0 commit comments