Skip to content

Commit 45f46ec

Browse files
committed
Pdk convert
1 parent 000aa10 commit 45f46ec

14 files changed

+499
-132
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.rb eol=lf
2+
*.erb eol=lf
3+
*.pp eol=lf
4+
*.sh eol=lf
5+
*.epp eol=lf

.gitignore

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
/.idea
2-
/.gradle
3-
/.rvmrc
4-
/_site
5-
build
6-
pkg/
7-
coverage/
8-
Session.vim
9-
spec/fixtures
10-
.*.sw[a-z]
11-
Gemfile.lock
12-
*.un~
13-
/.vagrant
14-
/vagrant/modules/public
15-
.coveralls.yml
16-
.bundle/
17-
.yardoc/
18-
doc/
19-
vendor/
20-
_site/
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

.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
14+
- gem --version
15+
- bundle -v
16+
- bundle install --without system_tests --path vendor/bundle --jobs $(nproc)
17+
18+
parallel_spec-Ruby 2.1.9-Puppet ~> 4.0:
19+
stage: unit
20+
image: ruby:2.1.9
21+
script:
22+
- bundle exec rake parallel_spec
23+
variables:
24+
PUPPET_GEM_VERSION: '~> 4.0'
25+
26+
syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.4.4-Puppet ~> 5.5:
27+
stage: syntax
28+
image: ruby:2.4.4
29+
script:
30+
- bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
31+
variables:
32+
PUPPET_GEM_VERSION: '~> 5.5'
33+
34+
parallel_spec-Ruby 2.4.4-Puppet ~> 5.5:
35+
stage: unit
36+
image: ruby:2.4.4
37+
script:
38+
- bundle exec rake parallel_spec
39+
variables:
40+
PUPPET_GEM_VERSION: '~> 5.5'
41+

.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: 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: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,47 @@
11
---
2+
sudo: false
3+
dist: trusty
24
language: ruby
5+
cache: bundler
6+
before_install:
7+
- bundle -v
8+
- rm -f Gemfile.lock
9+
- gem update --system
10+
- gem --version
11+
- bundle -v
312
script:
4-
- "bundle exec rake lint spec SPEC_OPTS='--format documentation'"
13+
- 'bundle exec rake $CHECK'
14+
bundler_args: --without system_tests
15+
rvm:
16+
- 2.5.1
17+
env:
18+
global:
19+
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
520
matrix:
21+
fast_finish: true
622
include:
7-
# Debian 8
8-
- rvm: 2.1.2
9-
env: PUPPET_GEM_VERSION="~> 3.7.2" FACTER_GEM_VERSION="~> 2.2.0"
10-
# Puppet 3.1 with Ruby 1.9.3
11-
- rvm: 1.9.3
12-
env: PUPPET_GEM_VERSION="~> 3.1.0"
13-
# puppet 4 AIO
14-
- rvm: 2.1.4
15-
# env: STRICT_VARIABLES="yes"
16-
23+
-
24+
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
25+
-
26+
env: CHECK=parallel_spec
27+
-
28+
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
29+
rvm: 2.4.4
30+
-
31+
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
32+
rvm: 2.1.9
33+
branches:
34+
only:
35+
- master
36+
- /^v\d/
1737
notifications:
18-
email:
19-
38+
email: false
39+
deploy:
40+
provider: puppetforge
41+
user: puppet
42+
password:
43+
secure: ""
44+
on:
45+
tags: true
46+
all_branches: true
47+
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

0 commit comments

Comments
 (0)