aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Helwig <jacob@technosorcery.net>2018-06-25 10:49:51 -0700
committerJacob Helwig <jacob@technosorcery.net>2018-06-25 11:26:53 -0700
commitf00732c424c7535e22a31f64d1cd22d83dc76b14 (patch)
treee4f9f74eb0ecad483742b87c032940ce82dc1a4a
parent9a3a8bf16198197ab89430dda8bc674cbd60fcca (diff)
downloadpuppet-sshkeys_core-f00732c424c7535e22a31f64d1cd22d83dc76b14.tar.gz
puppet-sshkeys_core-f00732c424c7535e22a31f64d1cd22d83dc76b14.tar.bz2
Update PDK template
-rw-r--r--.rubocop.yml6
-rw-r--r--Rakefile5
-rw-r--r--metadata.json2
3 files changed, 9 insertions, 4 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 7dc5efb..e4664cb 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -68,14 +68,14 @@ Style/SymbolArray:
EnforcedStyle: brackets
RSpec/NamedSubject:
Enabled: false
-RSpec/MessageSpies:
- EnforcedStyle: receive
Style/Documentation:
Exclude:
- lib/puppet/parser/functions/**/*
- spec/**/*
- lib/puppet/type/**
- lib/puppet/provider/**
+RSpec/MessageSpies:
+ EnforcedStyle: receive
Style/WordArray:
EnforcedStyle: brackets
Style/CollectionMethods:
@@ -86,6 +86,8 @@ Style/StringMethods:
Enabled: true
Layout/EndOfLine:
Enabled: false
+Layout/IndentHeredoc:
+ Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
diff --git a/Rakefile b/Rakefile
index 99cbf32..a7c4d68 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,6 +5,7 @@ require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_
require 'puppet-lint/tasks/puppet-lint'
def changelog_user
+ return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['author']
raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator user:#{returnVal}"
@@ -12,6 +13,7 @@ def changelog_user
end
def changelog_project
+ return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
@@ -19,6 +21,7 @@ def changelog_project
end
def changelog_future_release
+ return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = JSON.load(File.read('metadata.json'))['version']
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator future_release:#{returnVal}"
@@ -29,7 +32,7 @@ PuppetLint.configuration.send('disable_relative')
if Bundler.rubygems.find_name('github_changelog_generator').any?
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
- raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if ENV['CHANGELOG_GITHUB_TOKEN'].nil?
+ raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
config.user = "#{changelog_user}"
config.project = "#{changelog_project}"
config.future_release = "#{changelog_future_release}"
diff --git a/metadata.json b/metadata.json
index 0901e7d..099bf96 100644
--- a/metadata.json
+++ b/metadata.json
@@ -86,5 +86,5 @@
],
"pdk-version": "1.5.0",
"template-url": "https://github.com/puppetlabs/pdk-templates.git",
- "template-ref": "heads/master-0-g473cd94"
+ "template-ref": "heads/master-0-gc87eee3"
}