Skip to content

Commit 86b26d7

Browse files
committed
(maint) Enable changelog-generator
1 parent f78b81b commit 86b26d7

File tree

12 files changed

+91
-53
lines changed

12 files changed

+91
-53
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml

.pdkignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.project
26+
.envrc
27+
/inventory.yaml
2528
/appveyor.yml
2629
/.fixtures.yml
2730
/Gemfile
@@ -30,8 +33,10 @@
3033
/.gitlab-ci.yml
3134
/.pdkignore
3235
/Rakefile
36+
/rakelib/
3337
/.rspec
3438
/.rubocop.yml
3539
/.travis.yml
3640
/.yardopts
3741
/spec/
42+
/.vscode/

.puppet-lint.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--relative

.rubocop.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
require: rubocop-rspec
2+
require:
3+
- rubocop-rspec
4+
- rubocop-i18n
35
AllCops:
46
DisplayCopNames: true
57
TargetRubyVersion: '2.1'
@@ -19,10 +21,13 @@ AllCops:
1921
Metrics/LineLength:
2022
Description: People have wide screens, use them.
2123
Max: 200
24+
GetText:
25+
Enabled: false
2226
GetText/DecorateString:
2327
Description: We don't want to decorate test output.
2428
Exclude:
25-
- spec/*
29+
- spec/**/*
30+
Enabled: false
2631
RSpec/BeforeAfterAll:
2732
Description: Beware of using after(:all) as it may cause state to leak between tests.
2833
A necessary evil in acceptance testing.
@@ -88,6 +93,12 @@ Style/MethodCalledOnDoEndBlock:
8893
Enabled: true
8994
Style/StringMethods:
9095
Enabled: true
96+
GetText/DecorateFunctionMessage:
97+
Enabled: false
98+
GetText/DecorateStringFormattingUsingInterpolation:
99+
Enabled: false
100+
GetText/DecorateStringFormattingUsingPercent:
101+
Enabled: false
91102
Layout/EndOfLine:
92103
Enabled: false
93104
Layout/IndentHeredoc:

.sync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
---
22
Gemfile:
3+
optional:
4+
':development':
5+
- gem: 'github_changelog_generator'
6+
git: 'https://github.com/skywinder/github-changelog-generator'
7+
ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
8+
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
39
required:
410
':system_tests':
511
- gem: 'puppet-module-posix-system-r#{minor_version}'

.travis.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
dist: trusty
2+
dist: xenial
33
language: ruby
44
cache: bundler
55
before_install:
6-
- if [ $BUNDLER_VERSION ]; then
7-
gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri;
8-
fi
96
- bundle -v
107
- rm -f Gemfile.lock
118
- gem update --system $RUBYGEMS_VERSION
@@ -15,35 +12,34 @@ script:
1512
- 'bundle exec rake $CHECK'
1613
bundler_args: --without system_tests
1714
rvm:
18-
- 2.5.1
19-
env:
20-
global:
21-
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
15+
- 2.5.3
16+
stages:
17+
- static
18+
- spec
19+
- acceptance
20+
-
21+
if: tag =~ ^v\d
22+
name: deploy
2223
matrix:
2324
fast_finish: true
2425
include:
2526
-
26-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
27-
-
28-
env: CHECK=parallel_spec
27+
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
28+
stage: static
2929
-
3030
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
31-
rvm: 2.4.4
31+
rvm: 2.4.5
32+
stage: spec
33+
-
34+
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
35+
rvm: 2.5.3
36+
stage: spec
3237
-
33-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec RUBYGEMS_VERSION=2.7.8 BUNDLER_VERSION=1.17.3
34-
rvm: 2.1.9
38+
env: DEPLOY_TO_FORGE=yes
39+
stage: deploy
3540
branches:
3641
only:
3742
- master
3843
- /^v\d/
3944
notifications:
4045
email: false
41-
deploy:
42-
provider: puppetforge
43-
user: puppet
44-
password:
45-
secure: ""
46-
on:
47-
tags: true
48-
all_branches: true
49-
condition: "$DEPLOY_TO_FORGE = yes"

Gemfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
1717
minor_version = ruby_version_segments[0..1].join('.')
1818

1919
group :development do
20-
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
21-
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
22-
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
23-
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
24-
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
25-
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
26-
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
27-
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
28-
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
29-
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
30-
gem "puppet-strings", require: false
20+
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
21+
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
22+
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
23+
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
24+
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
25+
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
26+
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27+
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
28+
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
29+
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
30+
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
31+
gem "puppet-strings", require: false
32+
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
3133
end
3234
group :system_tests do
3335
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]

Rakefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
12
require 'puppetlabs_spec_helper/rake_tasks'
23
require 'puppet-syntax/tasks/puppet-syntax'
34
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
@@ -15,15 +16,24 @@ end
1516

1617
def changelog_project
1718
return unless Rake.application.top_level_tasks.include? "changelog"
18-
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
19-
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
19+
20+
returnVal = nil
21+
returnVal ||= begin
22+
metadata_source = JSON.load(File.read('metadata.json'))['source']
23+
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
24+
25+
metadata_source_match && metadata_source_match[1]
26+
end
27+
28+
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
29+
2030
puts "GitHubChangelogGenerator project:#{returnVal}"
2131
returnVal
2232
end
2333

2434
def changelog_future_release
2535
return unless Rake.application.top_level_tasks.include? "changelog"
26-
returnVal = JSON.load(File.read('metadata.json'))['version']
36+
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
2737
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
2838
puts "GitHubChangelogGenerator future_release:#{returnVal}"
2939
returnVal

appveyor.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: 1.1.x.{build}
33
branches:
44
only:
55
- master
6+
- release
67
skip_commits:
78
message: /^\(?doc\)?.*/
89
clone_depth: 10
@@ -17,14 +18,6 @@ environment:
1718
-
1819
RUBY_VERSION: 24-x64
1920
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
20-
-
21-
PUPPET_GEM_VERSION: ~> 4.0
22-
RUBY_VERSION: 21
23-
CHECK: parallel_spec
24-
-
25-
PUPPET_GEM_VERSION: ~> 4.0
26-
RUBY_VERSION: 21-x64
27-
CHECK: parallel_spec
2821
-
2922
PUPPET_GEM_VERSION: ~> 5.0
3023
RUBY_VERSION: 24

metadata.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "puppetlabs-sshkeys_core",
33
"version": "1.0.2",
4-
"author": "Puppet Labs",
4+
"author": "puppetlabs",
55
"summary": "Manage SSH authorized keys, and known hosts.",
66
"license": "Apache-2.0",
77
"source": "https://github.com/puppetlabs/puppetlabs-sshkeys_core",
@@ -86,7 +86,7 @@
8686
"version_requirement": ">= 6.0.0 < 7.0.0"
8787
}
8888
],
89-
"pdk-version": "1.8.0",
90-
"template-url": "https://github.com/puppetlabs/pdk-templates.git",
91-
"template-ref": "heads/master-0-gd61c0a4"
92-
}
89+
"pdk-version": "1.14.0",
90+
"template-url": "https://github.com/puppetlabs/pdk-templates.git#master",
91+
"template-ref": "heads/master-0-g6b5ed92"
92+
}

0 commit comments

Comments
 (0)