diff --git a/Gemfile b/Gemfile index e90a476..45af2fe 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ -source "https://rubygems.org" +source 'https://rubygems.org' -gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' +gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' diff --git a/skeleton/.rubocop.yml b/skeleton/.rubocop.yml index e4d810a..f3fccde 100644 --- a/skeleton/.rubocop.yml +++ b/skeleton/.rubocop.yml @@ -72,7 +72,7 @@ Lint/AmbiguousRegexpLiteral: Enabled: false # DISABLED -Lint/Eval: +Security/Eval: Enabled: false # DISABLED @@ -168,6 +168,9 @@ Style/ClassAndModuleChildren: Style/ClassCheck: Enabled: false +Metrics/BlockLength: + Enabled: false + Metrics/ClassLength: Enabled: false @@ -211,7 +214,7 @@ Style/SpaceInsideParens: Style/LeadingCommentSpace: Enabled: false -Style/SingleSpaceBeforeFirstArg: +Style/SpaceBeforeFirstArg: Enabled: false Style/SpaceAfterColon: @@ -220,7 +223,7 @@ Style/SpaceAfterColon: Style/SpaceAfterComma: Enabled: false -Style/SpaceAfterControlKeyword: +Style/SpaceAroundKeyword: Enabled: false Style/SpaceAfterMethodName: @@ -268,9 +271,6 @@ Style/Documentation: Style/DefWithParentheses: Enabled: false -Style/DeprecatedHashMethods: - Enabled: false - Style/DotPosition: Enabled: false @@ -308,9 +308,6 @@ Style/EmptyLiteral: Metrics/LineLength: Enabled: false -Style/MethodCallParentheses: - Enabled: false - Style/MethodDefParentheses: Enabled: false @@ -323,7 +320,10 @@ Style/TrailingWhitespace: Style/StringLiterals: Enabled: false -Style/TrailingComma: +Style/TrailingCommaInLiteral: + Enabled: false + +Style/TrailingCommaInArguments: Enabled: false Style/GlobalVars: @@ -464,9 +464,6 @@ Metrics/ParameterLists: Lint/RequireParentheses: Enabled: false -Lint/SpaceBeforeFirstArg: - Enabled: false - Style/ModuleFunction: Enabled: false diff --git a/skeleton/CONTRIBUTING.md b/skeleton/CONTRIBUTING.md index 36d07a8..4ed29a4 100644 --- a/skeleton/CONTRIBUTING.md +++ b/skeleton/CONTRIBUTING.md @@ -30,7 +30,7 @@ By default the tests use a baseline version of Puppet. If you have Ruby 2.x or want a specific version of Puppet, you must set an environment variable such as: - export PUPPET_VERSION="~> 3.2.0" + export PUPPET_GEM_VERSION="~> 3.2.0" Install the dependencies like so... diff --git a/skeleton/Gemfile b/skeleton/Gemfile index 0b5912b..256c27c 100644 --- a/skeleton/Gemfile +++ b/skeleton/Gemfile @@ -1,37 +1,37 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" +source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem "rake" - gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' - gem "rspec", '< 3.2.0' - gem "rspec-puppet" - gem "puppetlabs_spec_helper" - gem "metadata-json-lint" - gem "rspec-puppet-facts" - gem 'rubocop', '0.33.0' + gem 'metadata-json-lint' + gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0' + gem 'puppetlabs_spec_helper' + gem 'rake' + gem 'rspec-core', '< 3.2.0' if RUBY_VERSION < '1.9' + gem 'rspec-puppet' + gem 'rspec-puppet-facts' + gem 'rubocop', if RUBY_VERSION < '2.0.0' or Gem::Version.new((ENV['PUPPET_GEM_VERSION'] || '3.8.0').split(' ').last) < Gem::Version.new('4.0.0') then '< 0.42.0' end gem 'simplecov', '>= 0.11.0' - gem 'simplecov-console' + gem 'simplecov-console', if RUBY_VERSION < '2.0.0' then '< 0.4.0' end - gem "puppet-lint-absolute_classname-check" - gem "puppet-lint-leading_zero-check" - gem "puppet-lint-trailing_comma-check" - gem "puppet-lint-version_comparison-check" - gem "puppet-lint-classes_and_types_beginning_with_digits-check" - gem "puppet-lint-unquoted_string-check" + gem 'puppet-lint-absolute_classname-check' + gem 'puppet-lint-classes_and_types_beginning_with_digits-check' + gem 'puppet-lint-leading_zero-check' gem 'puppet-lint-resource_reference_syntax' + gem 'puppet-lint-trailing_comma-check' + gem 'puppet-lint-unquoted_string-check' + gem 'puppet-lint-version_comparison-check' gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0' end group :development do - gem "travis" if RUBY_VERSION >= '2.1.0' - gem "travis-lint" if RUBY_VERSION >= '2.1.0' - gem "puppet-blacksmith" - gem "guard-rake" if RUBY_VERSION >= '2.2.5' # per dependency https://rubygems.org/gems/ruby_dep + gem 'guard-rake' if RUBY_VERSION >= '2.2.5' # per dependency https://rubygems.org/gems/ruby_dep + gem 'puppet-blacksmith' + gem 'travis' if RUBY_VERSION >= '2.1.0' + gem 'travis-lint' if RUBY_VERSION >= '2.1.0' end group :system_tests do - gem "beaker" - gem "beaker-rspec" - gem "beaker-puppet_install_helper" + gem 'beaker' + gem 'beaker-puppet_install_helper' + gem 'beaker-rspec' end diff --git a/skeleton/Rakefile b/skeleton/Rakefile index f96b21f..0873369 100644 --- a/skeleton/Rakefile +++ b/skeleton/Rakefile @@ -27,7 +27,7 @@ exclude_paths = [ # Coverage from puppetlabs-spec-helper requires rcov which # doesn't work in anything since 1.8.7 -Rake::Task[:coverage].clear +Rake::Task[:coverage].clear if Rake::Task.task_defined?(:coverage) Rake::Task[:lint].clear