Skip to content

Commit 8329c6c

Browse files
authored
Merge pull request #279 from Zak-Kent/modules-7359-make-a-release
Setup for 7.0.0 release
2 parents 78b9df2 + da9cc18 commit 8329c6c

41 files changed

Lines changed: 1598 additions & 1242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
# Final publish location for module build
2-
pkg/
3-
4-
# VIM files
5-
*.swp
6-
7-
# Mac files
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
7+
/.bundle/
8+
/.idea/
9+
/.vagrant/
10+
/coverage/
11+
/bin/
12+
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/
20+
/tmp/
21+
/vendor/
22+
/convert_report.txt
23+
/update_report.txt
824
.DS_Store
9-
10-
# Generated directory for coverage results
11-
coverage/
12-
13-
# Gem & bundler related files we do not want persisted to the repository
14-
Gemfile.lock
15-
.bundle
16-
vendor/
17-
18-
# Used by rake spec, for temp modules and other test requirements
19-
spec/fixtures/
20-
21-
# RVM files that are specific to developers implementation
22-
.ruby-version
23-
.ruby-gemset
24-
25-
# Add Jetbrains RubyMine .idea folder
26-
.idea/
27-
28-
# Beaker files
29-
log/
30-
.vagrant/
31-
junit/

.pdkignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.git/
2+
.*.sw[op]
3+
.metadata
4+
.yardoc
5+
.yardwarns
6+
*.iml
7+
/.bundle/
8+
/.idea/
9+
/.vagrant/
10+
/coverage/
11+
/bin/
12+
/doc/
13+
/Gemfile.local
14+
/Gemfile.lock
15+
/junit/
16+
/log/
17+
/pkg/
18+
/spec/fixtures/manifests/
19+
/spec/fixtures/modules/
20+
/tmp/
21+
/vendor/
22+
/convert_report.txt
23+
/update_report.txt
24+
.DS_Store

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

.rubocop.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
require: rubocop-rspec
3+
AllCops:
4+
DisplayCopNames: true
5+
TargetRubyVersion: '2.1'
6+
Include:
7+
- "./**/*.rb"
8+
Exclude:
9+
- bin/*
10+
- ".vendor/**/*"
11+
- "**/Gemfile"
12+
- "**/Rakefile"
13+
- pkg/**/*
14+
- spec/fixtures/**/*
15+
- vendor/**/*
16+
- "**/Puppetfile"
17+
- "**/Vagrantfile"
18+
- "**/Guardfile"
19+
Metrics/LineLength:
20+
Description: People have wide screens, use them.
21+
Max: 200
22+
RSpec/BeforeAfterAll:
23+
Description: Beware of using after(:all) as it may cause state to leak between tests.
24+
A necessary evil in acceptance testing.
25+
Exclude:
26+
- spec/acceptance/**/*.rb
27+
RSpec/HookArgument:
28+
Description: Prefer explicit :each argument, matching existing module's style
29+
EnforcedStyle: each
30+
Style/BlockDelimiters:
31+
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
32+
be consistent then.
33+
EnforcedStyle: braces_for_chaining
34+
Style/ClassAndModuleChildren:
35+
Description: Compact style reduces the required amount of indentation.
36+
EnforcedStyle: compact
37+
Style/EmptyElse:
38+
Description: Enforce against empty else clauses, but allow `nil` for clarity.
39+
EnforcedStyle: empty
40+
Style/FormatString:
41+
Description: Following the main puppet project's style, prefer the % format format.
42+
EnforcedStyle: percent
43+
Style/FormatStringToken:
44+
Description: Following the main puppet project's style, prefer the simpler template
45+
tokens over annotated ones.
46+
EnforcedStyle: template
47+
Style/Lambda:
48+
Description: Prefer the keyword for easier discoverability.
49+
EnforcedStyle: literal
50+
Style/RegexpLiteral:
51+
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
52+
EnforcedStyle: percent_r
53+
Style/TernaryParentheses:
54+
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
55+
on complex expressions for better readability, but seriously consider breaking
56+
it up.
57+
EnforcedStyle: require_parentheses_when_complex
58+
Style/TrailingCommaInArguments:
59+
Description: Prefer always trailing comma on multiline argument lists. This makes
60+
diffs, and re-ordering nicer.
61+
EnforcedStyleForMultiline: comma
62+
Style/TrailingCommaInLiteral:
63+
Description: Prefer always trailing comma on multiline literals. This makes diffs,
64+
and re-ordering nicer.
65+
EnforcedStyleForMultiline: comma
66+
Style/SymbolArray:
67+
Description: Using percent style obscures symbolic intent of array's contents.
68+
EnforcedStyle: brackets
69+
RSpec/MessageSpies:
70+
EnforcedStyle: receive
71+
Style/Documentation:
72+
Exclude:
73+
- lib/puppet/parser/functions/**/*
74+
- spec/**/*
75+
Style/WordArray:
76+
EnforcedStyle: brackets
77+
Style/CollectionMethods:
78+
Enabled: true
79+
Style/MethodCalledOnDoEndBlock:
80+
Enabled: true
81+
Style/StringMethods:
82+
Enabled: true
83+
Layout/EndOfLine:
84+
Enabled: false
85+
Metrics/AbcSize:
86+
Enabled: false
87+
Metrics/BlockLength:
88+
Enabled: false
89+
Metrics/ClassLength:
90+
Enabled: false
91+
Metrics/CyclomaticComplexity:
92+
Enabled: false
93+
Metrics/MethodLength:
94+
Enabled: false
95+
Metrics/ModuleLength:
96+
Enabled: false
97+
Metrics/ParameterLists:
98+
Enabled: false
99+
Metrics/PerceivedComplexity:
100+
Enabled: false
101+
RSpec/DescribeClass:
102+
Enabled: false
103+
RSpec/ExampleLength:
104+
Enabled: false
105+
RSpec/MessageExpectation:
106+
Enabled: false
107+
RSpec/MultipleExpectations:
108+
Enabled: false
109+
RSpec/NestedGroups:
110+
Enabled: false
111+
Style/AsciiComments:
112+
Enabled: false
113+
Style/IfUnlessModifier:
114+
Enabled: false
115+
Style/SymbolProc:
116+
Enabled: false

.travis.yml

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
11
---
22
sudo: false
3+
dist: trusty
34
language: ruby
45
cache: bundler
5-
script: "bundle exec rake release_checks"
6-
#Inserting below due to the following issue: https://github.com/travis-ci/travis-ci/issues/3531#issuecomment-88311203
7-
before_install:
8-
- gem update bundler
6+
before_install: >
7+
set -ex
8+
&& bundle -v
9+
&& rm -f Gemfile.lock
10+
&& gem update --system
11+
&& gem --version
12+
&& bundle -v
13+
script:
14+
- 'bundle exec rake $CHECK'
15+
bundler_args: --without system_tests
16+
rvm:
17+
- 2.4.1
18+
env:
19+
global:
20+
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
921
matrix:
1022
fast_finish: true
1123
include:
12-
- rvm: 2.3.1
13-
dist: trusty
14-
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
15-
script: bundle exec rake beaker
16-
services: docker
17-
sudo: required
18-
- rvm: 2.3.1
19-
dist: trusty
20-
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
21-
script: bundle exec rake beaker
22-
services: docker
23-
sudo: required
24-
- rvm: 2.3.1
25-
bundler_args: --without system_tests
26-
env: PUPPET_GEM_VERSION="~> 4.0"
27-
- rvm: 2.1.7
28-
bundler_args: --without system_tests
29-
env: PUPPET_GEM_VERSION="~> 4.0"
24+
-
25+
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
26+
-
27+
env: CHECK=parallel_spec
28+
-
29+
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
30+
rvm: 2.1.9
31+
branches:
32+
only:
33+
- master
34+
- /^v\d/
3035
notifications:
31-
email: false
36+
email: false
37+
deploy:
38+
provider: puppetforge
39+
user: puppet
40+
password:
41+
secure: ""
42+
on:
43+
tags: true
44+
all_branches: true
45+
condition: "$DEPLOY_TO_FORGE = yes"

.yardopts

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

CHANGELOG

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
Release notes for the puppetlabs-puppetdb module.
44

5+
#### 7.0.0 - 2018/06/27
6+
7+
This is a major release that replaces validate_* methods with data types.
8+
The minimum required version of puppetlabs/stdlib has been bummped to 4.13.1
9+
in order to get the new data types. Thanks very much to @bastelfreak for your
10+
submissions!
11+
12+
Detailed changes:
13+
* Require puppetlabs/stdlib >= 4.13.1
14+
* Bump puppet-lint to version 2
15+
* Bump minimal recommended puppet4 version to 4.7.1
16+
* Replace uses of validate_* methods in favor of data types (Thanks @bastelfreak!)
17+
* Add data type for ttl (Thanks @bastelfreak!)
18+
* Update list of supported platforms
19+
* Retire the previously deprecated `database_ssl` and `read_database_ssl` params in favor of `jdbc_ssl_properties` and `read_database_jdbc_ssl_properties`
20+
21+
------------------------------------------
22+
523
#### 6.0.2 - 2017/11/06
624

725
This is a minor bugfix release.

Gemfile

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,63 @@
1-
source ENV['GEM_SOURCE'] || "https://rubygems.org"
2-
3-
group :development, :test do
4-
# Pinning `rake` because `v11` doesn't support Ruby 1.8.7
5-
gem 'rake', '10.5.0'
6-
gem 'puppetlabs_spec_helper', :require => false
7-
# Pinning due to bug in newer rspec with Ruby 1.8.7
8-
gem 'rspec-core', '3.1.7'
9-
gem 'rspec-puppet', '~> 2.0'
10-
gem 'rspec-puppet-facts'
11-
gem 'puppet-lint', '~> 2'
12-
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION < '1.9'
13-
gem 'metadata-json-lint' if RUBY_VERSION >= '1.9'
14-
gem 'json', '~> 1.8'
1+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2+
3+
def location_for(place_or_version, fake_version = nil)
4+
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
5+
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
6+
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
7+
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
8+
else
9+
[place_or_version, { require: false }]
10+
end
11+
end
12+
13+
def gem_type(place_or_version)
14+
if place_or_version =~ %r{\Agit[:@]}
15+
:git
16+
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
17+
:file
18+
else
19+
:gem
20+
end
21+
end
22+
23+
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
24+
minor_version = ruby_version_segments[0..1].join('.')
25+
26+
group :development do
27+
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
28+
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
29+
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
30+
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
31+
gem "json", '<= 2.0.4', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
32+
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
33+
gem "puppet-module-posix-dev-r#{minor_version}", '>= 0.3.5', require: false, platforms: [:ruby]
34+
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
35+
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
36+
end
37+
38+
puppet_version = ENV['PUPPET_GEM_VERSION']
39+
puppet_type = gem_type(puppet_version)
40+
facter_version = ENV['FACTER_GEM_VERSION']
41+
hiera_version = ENV['HIERA_GEM_VERSION']
42+
43+
gems = {}
44+
45+
gems['puppet'] = location_for(puppet_version)
46+
47+
# If facter or hiera versions have been specified via the environment
48+
# variables
49+
50+
gems['facter'] = location_for(facter_version) if facter_version
51+
gems['hiera'] = location_for(hiera_version) if hiera_version
52+
53+
if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
54+
# If we're using a Puppet gem on Windows which handles its own win32-xxx gem
55+
# dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
56+
gems['win32-dir'] = ['<= 0.4.9', require: false]
57+
gems['win32-eventlog'] = ['<= 0.6.5', require: false]
58+
gems['win32-process'] = ['<= 0.7.5', require: false]
59+
gems['win32-security'] = ['<= 0.2.5', require: false]
60+
gems['win32-service'] = ['0.8.8', require: false]
1561
end
1662

1763
group :system_tests do
@@ -22,8 +68,19 @@ group :system_tests do
2268
gem 'serverspec', :require => false
2369
end
2470

25-
if puppetversion = ENV['PUPPET_GEM_VERSION']
26-
gem 'puppet', puppetversion, :require => false
27-
else
28-
gem 'puppet', :require => false
71+
gems.each do |gem_name, gem_params|
72+
gem gem_name, *gem_params
73+
end
74+
75+
# Evaluate Gemfile.local and ~/.gemfile if they exist
76+
extra_gemfiles = [
77+
"#{__FILE__}.local",
78+
File.join(Dir.home, '.gemfile'),
79+
]
80+
81+
extra_gemfiles.each do |gemfile|
82+
if File.file?(gemfile) && File.readable?(gemfile)
83+
eval(File.read(gemfile), binding)
84+
end
2985
end
86+
# vim: syntax=ruby

0 commit comments

Comments
 (0)