File tree Expand file tree Collapse file tree 5 files changed +11
-24
lines changed Expand file tree Collapse file tree 5 files changed +11
-24
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ require: rubocop-performance
22inherit_from : .rubocop_todo.yml
33
44AllCops :
5- TargetRubyVersion : 2.3
5+ TargetRubyVersion : 2.5
66 Exclude :
77 # Ignore HTML related things
88 - ' **/*.erb'
Original file line number Diff line number Diff line change @@ -22,24 +22,21 @@ group :test do
2222 gem 'simplecov-console'
2323 gem 'rspec' , '~> 3.1'
2424 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'
2626end
2727
2828group :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'
3431end
3532
3633group :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'
3835 gem 'pry'
3936 gem 'pry-byebug'
4037end
4138
42- gem 'rubocop' , '~> 0.81.0' # last release that supports Ruby 2.3.0
39+ gem 'rubocop' , '~> 0.81.0' # Requires work to upgrade
4340gem 'rubocop-rspec'
4441gem 'rubocop-performance'
4542
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13131414 s . homepage = 'https://github.com/puppetlabs/puppet-strings'
1515 s . description = s . summary
16- s . required_ruby_version = '>= 2.3 .0'
16+ s . required_ruby_version = '>= 2.5 .0'
1717
1818 s . extra_rdoc_files = [
1919 'CHANGELOG.md' ,
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33if ENV [ 'COVERAGE' ] == 'yes'
4+ require 'codecov'
45 require 'simplecov'
56 require 'simplecov-console'
67
78 SimpleCov . formatters = [
89 SimpleCov ::Formatter ::HTMLFormatter ,
910 SimpleCov ::Formatter ::Console ,
11+ SimpleCov ::Formatter ::Codecov ,
1012 ]
1113
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-
1714 SimpleCov . start do
1815 track_files 'lib/**/*.rb'
1916
2219end
2320
2421require 'mocha'
22+ require 'mdl'
2523require 'rspec'
2624require 'json_spec'
2725require 'puppet/version'
5452 end
5553end
5654
57- def mdl_available
58- @mdl_available ||= !Gem ::Specification . select { |item | item . name . casecmp ( 'mdl' ) . zero? } . empty?
59- end
60-
6155def lint_markdown ( content )
62- return [ ] unless mdl_available
63-
64- require 'mdl'
65-
6656 # Load default mdl ruleset
6757 ruleset = MarkdownLint ::RuleSet . new . tap { |r | r . load_default }
6858
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def parse_data_type_content
4646 let ( :output ) { PuppetStrings ::Markdown . generate }
4747
4848 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
5050 expect ( output ) . to have_no_markdown_lint_errors
5151 end
5252 end
You can’t perform that action at this time.
0 commit comments