Skip to content

Commit

Permalink
(maint) Updated .sync.yml
Browse files Browse the repository at this point in the history
Update .sync.yml to remove duplicate dependency declarations
and switched to using the puppet-module-gems.
Also includes subsequent PDK template changes.
  • Loading branch information
bmjen committed Aug 16, 2018
1 parent 48e75b1 commit 8b97aee
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 66 deletions.
13 changes: 5 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.2'
Include:
- "./**/*.rb"
- "./**/*.rb"
Exclude:
- bin/*
- ".vendor/**/*"
Expand All @@ -16,13 +16,6 @@ AllCops:
- "**/Puppetfile"
- "**/Vagrantfile"
- "**/Guardfile"
- tooling/kube_tool/*
- tooling/*
- spec/defines/*
- spec/classes/*
- spec/*
- spec/acceptance/*
- rakelib/*
inherit_from: ".rubocop_todo.yml"
Metrics/LineLength:
Description: People have wide screens, use them.
Expand Down Expand Up @@ -67,6 +60,10 @@ Style/TrailingCommaInArguments:
Description: Prefer always trailing comma on multiline argument lists. This makes
diffs, and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
Description: Prefer always trailing comma on multiline literals. This makes diffs,
and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
Expand Down
37 changes: 22 additions & 15 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,36 @@
bundler_args: ' '
branches:
- release
remove_includes:
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.1.9
includes:
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
rvm: 2.3.3

Gemfile:
required:
':development':
- gem: 'nokogiri'
version: '1.8.4'
- gem: 'net-telnet'
- gem: 'facter'
version: '>= 1.7.0'
- gem: 'rspec-puppet'
- gem: "rspec-retry"
- gem: 'thor'
- gem: 'semantic_puppet'
- gem: 'simplecov'
- gem: 'simplecov-json'
- gem: 'simplecov-rcov'
- gem: 'beaker-puppet_install_helper'
- gem: 'beaker-rspec'
from_env: BEAKER_RSPEC_VERSION
- gem: 'parallel_tests'
- gem: "beaker"
version: '~> 2.0'
from_env: BEAKER_VERSION
- gem: 'rspec_junit_formatter'
- gem: "puppet-lint-i18n"
- gem: "puppet_pot_generator"
- gem: 'rubocop-i18n'
- gem: 'gettext-setup'
- gem: 'rubocop-rspec'
- gem: 'puppet-module-posix-system-r#{minor_version}'
platforms: ruby
- gem: 'rspec'
version: '~> 2.0'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')"
- gem: 'rake'
version: '~> 10.0'
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')"

Rakefile:
requires:
Expand All @@ -44,3 +45,9 @@ Rakefile:
.rubocop.yml:
include_todos:
inherit_from: '.rubocop_todo.yml'

.gitlab-ci.yml:
delete: true

appveyor.yml:
delete: true
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ matrix:
rvm: 2.3.3
branches:
only:
- master
- /^v\d/
- release
- master
- /^v\d/
- release
notifications:
email: false
deploy:
Expand Down
42 changes: 7 additions & 35 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@ end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')
puppet_version = ENV['PUPPET_GEM_VERSION']
puppet_type = gem_type(puppet_version)
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['HIERA_GEM_VERSION']
puppet_git_url = ENV['PUPPET_GIT_URL']

if puppet_version = ENV['PUPPET_GEM_VERSION']
gem "puppet", puppet_version
elsif puppet_git_url = ENV['PUPPET_GIT_URL']
gem "puppet", :git => puppet_git_url
else
gem "puppet"
end

group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
Expand All @@ -46,36 +33,21 @@ group :development do
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "nokogiri", '1.8.4', require: false
gem "net-telnet", require: false
gem "facter", '>= 1.7.0', require: false
gem "rspec-puppet", require: false
gem "rspec-retry", require: false
gem "thor", require: false
gem "semantic_puppet", require: false
gem "simplecov", require: false
gem "simplecov-json", require: false
gem "simplecov-rcov", require: false
gem "beaker-puppet_install_helper", require: false
gem "beaker-rspec"
gem "parallel_tests", require: false
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 2.0')
gem "rspec_junit_formatter", require: false
gem "puppet-lint-i18n", require: false
gem "puppet_pot_generator", require: false
gem "rubocop-i18n", require: false
gem "gettext-setup", require: false
gem "rubocop-rspec", require: false
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "rspec", '~> 2.0', require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')
gem "rake", '~> 10.0', require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('1.8.7') && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('1.9')
end

# rspec must be v2 for ruby 1.8.7
if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'rspec', '~> 2.0'
gem 'rake', '~> 10.0'
else
# rubocop requires ruby >= 1.9
gem 'rubocop'
end
puppet_version = ENV['PUPPET_GEM_VERSION']
puppet_type = gem_type(puppet_version)
facter_version = ENV['FACTER_GEM_VERSION']
hiera_version = ENV['HIERA_GEM_VERSION']

gems = {}

Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"version_requirement": ">= 4.2.1 < 5.0.0"
}
],
"pdk-version": "1.6.1",
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
"template-ref": "1.6.1-0-g6b0d497"
"pdk-version": "1.7.0",
"template-url": "https://github.com/puppetlabs/pdk-templates",
"template-ref": "1.7.0-0-g57412ed"
}
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

require 'puppetlabs_spec_helper/module_spec_helper'
require 'simplecov'
require 'rspec-puppet-facts'

begin
Expand Down

0 comments on commit 8b97aee

Please sign in to comment.