diff --git a/.rubocop.yml b/.rubocop.yml index 18a5eec..27c17f3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,12 +4,11 @@ AllCops: - vendor/**/* - "*/puppet/Puppetfile" - "*/puppet/.tmp/**/*" + TargetRubyVersion: 1.9 Documentation: Enabled: false AlignParameters: Enabled: true -Encoding: - Enabled: true HashSyntax: Enabled: true LineLength: @@ -20,9 +19,11 @@ MethodLength: Max: 40 NumericLiterals: MinDigits: 10 +Metrics/BlockLength: + Max: 35 Metrics/CyclomaticComplexity: Max: 10 Metrics/PerceivedComplexity: Max: 10 Metrics/AbcSize: - Max: 29 + Max: 30 diff --git a/.travis.yml b/.travis.yml index 1da179c..08dc2bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: ruby cache: bundler rvm: - - 1.9.3 - 2.0 - 2.2 + - 2.3.1 bundler_args: --without integration script: bundle exec rake diff --git a/Gemfile b/Gemfile index 587005b..fc82503 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,9 @@ -# encoding: utf-8 - source 'https://rubygems.org' -# pin dependency for Ruby 1.9.3 since bundler is not -# detecting that net-ssh 3 does not work with 1.9.3 -if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new('1.9.3') - gem 'net-ssh', '~> 2.9' -end - gem 'rake' -gem 'inspec', '~> 0' -gem 'rubocop', '~> 0.36.0' +gem 'rack', '1.6.4' +gem 'inspec', '~> 1' +gem 'rubocop', '~> 0.44.0' gem 'highline', '~> 1.6.0' group :tools do diff --git a/Rakefile b/Rakefile index 1a77717..6196cd9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,4 @@ #!/usr/bin/env rake -# encoding: utf-8 require 'rake/testtask' require 'rubocop/rake_task' @@ -26,10 +25,13 @@ namespace :test do end # Automatically generate a changelog for this project. Only loaded if -# the necessary gem is installed. -# use `rake changelog to=1.2.0` +# the necessary gem is installed. By default its picking up the version from +# inspec.yml. You can override that behavior with s`rake changelog to=1.2.0` begin - v = ENV['to'] + require 'yaml' + metadata = YAML.load_file('inspec.yml') + v = ENV['to'] || metadata['version'] + puts "Generate changelog for version #{v}" require 'github_changelog_generator/task' GitHubChangelogGenerator::RakeTask.new :changelog do |config| config.future_release = v