aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.sync.yml31
-rw-r--r--CHANGELOG.md4
-rw-r--r--Gemfile15
-rw-r--r--Rakefile2
-rw-r--r--spec/spec_helper.rb14
-rw-r--r--spec/spec_helper_local.rb13
6 files changed, 54 insertions, 25 deletions
diff --git a/.sync.yml b/.sync.yml
new file mode 100644
index 0000000..00a3fb4
--- /dev/null
+++ b/.sync.yml
@@ -0,0 +1,31 @@
+---
+Gemfile:
+ required:
+ ':system_tests':
+ - gem: 'puppet-module-posix-system-r#{minor_version}'
+ platforms: ruby
+ - gem: 'puppet-module-win-system-r#{minor_version}'
+ platforms:
+ - mswin
+ - mingw
+ - x64_mingw
+ - gem: beaker
+ version: '~> 3.13'
+ from_env: BEAKER_VERSION
+ - gem: beaker-abs
+ from_env: BEAKER_ABS_VERSION
+ version: '~> 0.1'
+ - gem: beaker-pe
+ - gem: beaker-hostgenerator
+ from_env: BEAKER_HOSTGENERATOR_VERSION
+ - gem: beaker-rspec
+ from_env: BEAKER_RSPEC_VERSION
+ ':development':
+ - gem: puppet-blacksmith
+ version: '~> 3.4'
+ - gem: puppet-strings
+
+Rakefile:
+ requires:
+ - puppet_blacksmith/rake_tasks
+ - puppet-lint/tasks/puppet-lint
diff --git a/CHANGELOG.md b/CHANGELOG.md
index caf255a..33e085f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
### Added
- Gem dependency on puppet-blacksmith, which is required to ship to the module
to forge.puppet.com
+### Changed
+- The Gemfile and spec/spec_helper.rb are managed by pdk. Any additional content
+ for these files should be defined in .syn.yml and spec/spec_helper_local.rb
+ respectively
## [1.0.1] - 2018-04-30
### Summary
diff --git a/Gemfile b/Gemfile
index 25d4426..bb4eff8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -32,26 +32,19 @@ 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]
-
- # Needed to push to the forge
gem "puppet-blacksmith", '~> 3.4', require: false
-
- # Puppet Strings for documentation purposes
- gem 'puppet-strings'
- gem 'rake'
+ gem "puppet-strings", require: false
end
-
group :system_tests do
- gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
- gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
+ gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
+ gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 3.13')
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
- gem "beaker-pe", require: false
+ gem "beaker-pe", require: false
gem "beaker-hostgenerator"
gem "beaker-rspec"
end
-
puppet_version = ENV['PUPPET_GEM_VERSION']
puppet_type = gem_type(puppet_version)
facter_version = ENV['FACTER_GEM_VERSION']
diff --git a/Rakefile b/Rakefile
index 81381e0..a39cae2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,2 +1,4 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
+require 'puppet_blacksmith/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 9885e2d..efd225b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -28,17 +28,3 @@ end
RSpec.configure do |c|
c.default_facts = default_facts
end
-
-dir = File.expand_path(File.dirname(__FILE__))
-$LOAD_PATH.unshift File.join(dir, 'lib')
-
-# So everyone else doesn't have to include this base constant.
-module PuppetSpec
- FIXTURE_DIR = File.join(File.expand_path(File.dirname(__FILE__)), 'fixtures') unless defined?(FIXTURE_DIR)
-end
-
-require 'puppet_spec/files'
-
-Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
- require behaviour.relative_path_from(Pathname.new(dir))
-end
diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb
new file mode 100644
index 0000000..0fcc231
--- /dev/null
+++ b/spec/spec_helper_local.rb
@@ -0,0 +1,13 @@
+dir = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift File.join(dir, 'lib')
+
+# So everyone else doesn't have to include this base constant.
+module PuppetSpec
+ FIXTURE_DIR = File.join(File.expand_path(File.dirname(__FILE__)), 'fixtures') unless defined?(FIXTURE_DIR)
+end
+
+require 'puppet_spec/files'
+
+Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
+ require behaviour.relative_path_from(Pathname.new(dir))
+end