Skip to content

Commit 3394278

Browse files
committed
Pdk convert
1 parent 6a8b204 commit 3394278

File tree

9 files changed

+286
-3
lines changed

9 files changed

+286
-3
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@
2525
.project
2626
.envrc
2727
/inventory.yaml
28-
/results.txt

.gitlab-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
stages:
3+
- syntax
4+
- unit
5+
6+
cache:
7+
paths:
8+
- vendor/bundle
9+
10+
before_script:
11+
- bundle -v
12+
- rm Gemfile.lock || true
13+
- gem update --system $RUBYGEMS_VERSION
14+
- gem --version
15+
- bundle -v
16+
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
17+
18+
syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6:
19+
stage: syntax
20+
image: ruby:2.5.3
21+
script:
22+
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
23+
variables:
24+
PUPPET_GEM_VERSION: '~> 6'
25+
26+
parallel_spec-Ruby 2.5.3-Puppet ~> 6:
27+
stage: unit
28+
image: ruby:2.5.3
29+
script:
30+
- bundle exec rake parallel_spec
31+
variables:
32+
PUPPET_GEM_VERSION: '~> 6'
33+
34+
parallel_spec-Ruby 2.4.5-Puppet ~> 5:
35+
stage: unit
36+
image: ruby:2.4.5
37+
script:
38+
- bundle exec rake parallel_spec
39+
variables:
40+
PUPPET_GEM_VERSION: '~> 5'
41+

.rspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
--color
2-
--format progress
2+
--format documentation

.rubocop.yml

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

.travis.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
dist: trusty
3+
language: ruby
4+
cache: bundler
5+
before_install:
6+
- bundle -v
7+
- rm -f Gemfile.lock
8+
- gem update --system $RUBYGEMS_VERSION
9+
- gem --version
10+
- bundle -v
11+
script:
12+
- 'bundle exec rake $CHECK'
13+
bundler_args: --without system_tests
14+
rvm:
15+
- 2.5.3
16+
stages:
17+
- static
18+
- spec
19+
- acceptance
20+
-
21+
if: tag =~ ^v\d
22+
name: deploy
23+
matrix:
24+
fast_finish: true
25+
include:
26+
-
27+
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
28+
stage: static
29+
-
30+
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
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
37+
-
38+
env: DEPLOY_TO_FORGE=yes
39+
stage: deploy
40+
branches:
41+
only:
42+
- master
43+
- /^v\d/
44+
notifications:
45+
email: false
46+
deploy:
47+
provider: puppetforge
48+
user: puppet
49+
password:
50+
secure: ""
51+
on:
52+
tags: true
53+
all_branches: true
54+
condition: "$DEPLOY_TO_FORGE = yes"

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## Release 0.7.3
6+
7+
**Features**
8+
9+
**Bugfixes**
10+
11+
**Known Issues**

appveyor.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
version: 1.1.x.{build}
3+
branches:
4+
only:
5+
- master
6+
skip_commits:
7+
message: /^\(?doc\)?.*/
8+
clone_depth: 10
9+
init:
10+
- SET
11+
- 'mkdir C:\ProgramData\PuppetLabs\code && exit 0'
12+
- 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0'
13+
- 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0'
14+
- 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0'
15+
environment:
16+
matrix:
17+
-
18+
RUBY_VERSION: 24-x64
19+
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
20+
-
21+
PUPPET_GEM_VERSION: ~> 5.0
22+
RUBY_VERSION: 24
23+
CHECK: parallel_spec
24+
-
25+
PUPPET_GEM_VERSION: ~> 5.0
26+
RUBY_VERSION: 24-x64
27+
CHECK: parallel_spec
28+
-
29+
PUPPET_GEM_VERSION: ~> 6.0
30+
RUBY_VERSION: 25
31+
CHECK: parallel_spec
32+
-
33+
PUPPET_GEM_VERSION: ~> 6.0
34+
RUBY_VERSION: 25-x64
35+
CHECK: parallel_spec
36+
matrix:
37+
fast_finish: true
38+
install:
39+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
40+
- bundle install --jobs 4 --retry 2 --without system_tests
41+
- type Gemfile.lock
42+
build: off
43+
test_script:
44+
- bundle exec puppet -V
45+
- ruby -v
46+
- gem -v
47+
- bundle -v
48+
- bundle exec rake %CHECK%
49+
notifications:
50+
- provider: Email
51+
to:
52+
53+
on_build_success: false
54+
on_build_failure: false
55+
on_build_status_changed: false

data/common.yaml

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

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
],
9292
"checksums": {
9393
},
94-
"pdk-version": "1.14.0",
94+
"pdk-version": "3.4.0",
9595
"template-url": "https://github.com/puppetlabs/pdk-templates#1.10.0",
9696
"template-ref": "tags/1.10.0-0-gbba9ac3"
9797
}

0 commit comments

Comments
 (0)