Skip to content

(MODULES-6332) - PDK convert #881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 18 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# This file is generated by ModuleSync, do not edit.
*.iml
.*.sw[op]
.DS_Store
.bundle/
.idea/
.metadata
.vagrant/
.yardoc
.yardwarns
Gemfile.local
Gemfile.lock
bin/
coverage/
doc/
junit/
log/
pkg/
spec/fixtures/manifests/
spec/fixtures/modules/
tmp/
vendor/

!spec/fixtures/
spec/fixtures/manifests/site.pp
spec/fixtures/modules/*
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/tmp/
/vendor/
/convert_report.txt
.DS_Store
20 changes: 13 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
require:
- rubocop-rspec
require: rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
Include:
- "./**/*.rb"
Expand All @@ -13,7 +13,6 @@ AllCops:
- pkg/**/*
- spec/fixtures/**/*
- vendor/**/*
inherit_from: .rubocop_todo.yml
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
Expand All @@ -25,8 +24,6 @@ RSpec/BeforeAfterAll:
RSpec/HookArgument:
Description: Prefer explicit :each argument, matching existing module's style
EnforcedStyle: each
Style/HashSyntax:
EnforcedStyle: hash_rockets
Style/BlockDelimiters:
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
be consistent then.
Expand Down Expand Up @@ -66,12 +63,17 @@ Style/TrailingCommaInLiteral:
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
inherit_from: ".rubocop_todo.yml"
RSpec/MessageSpies:
EnforcedStyle: receive
Style/CollectionMethods:
Enabled: true
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/StringMethods:
Enabled: true
Layout/EndOfLine:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Expand All @@ -90,13 +92,17 @@ Metrics/PerceivedComplexity:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/MessageExpectation:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/NestedGroups:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/SymbolProc:
Enabled: false
RSpec/NamedSubject:
Enabled: false
6 changes: 6 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Style/HashSyntax:
EnforcedStyle: hash_rockets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to avoid making the module backwards compatible.

RSpec/NamedSubject:
Enabled: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure how ok this is?
It used to be disabled and there are a serious amount of violations of this cop. It would result in some files being completely rewritten.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this is fine for now. Plus it won't get lost if it's in the todo, so seems perfect solution for the meantime.

Lint/ScriptPermission:
Enabled: false
75 changes: 57 additions & 18 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,61 @@
---
NOTICE:
unmanaged: true
.gitignore:
paths:
- '!spec/fixtures/'
- 'spec/fixtures/manifests/site.pp'
- 'spec/fixtures/modules/*'
spec/spec_helper.rb:
allow_deprecations: true
appveyor.yml:
environment:
PUPPET_GEM_VERSION: "~> 4.0"
matrix:
- RUBY_VERSION: 24-x64
CHECK: "syntax lint"
- RUBY_VERSION: 24-x64
CHECK: metadata_lint
- RUBY_VERSION: 24-x64
CHECK: rubocop

.travis.yml:
bundle_args: --without system_tests
docker_sets:
- set: docker/centos-7
options:
- set: docker/ubuntu-14.04
options:
docker_defaults:
bundler_args: ""
secure: ""
branches:
- release
extras:
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.6.0"
bundler_args: --without system_tests
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.7.0"
bundler_args: --without system_tests
- rvm: 2.1.9
script: bundle exec rake rubocop
- env: CHECK=release_checks
rvm: 2.1.9

Gemfile:
required:
':system_tests':
- gem: 'puppet-module-posix-system-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-win-system-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
- gem: beaker
version: '~> 3.13'
from_env: BEAKER_VERSION
- gem: beaker-abs
from_env: BEAKER_ABS_VERSION
version: '~> 0.1'
- gem: beaker-pe
- gem: beaker-hostgenerator
from_env: BEAKER_HOSTGENERATOR_VERSION
- gem: beaker-rspec
from_env: BEAKER_RSPEC_VERSION
':development':
- gem: puppet-blacksmith
version: '~> 3.4'

Rakefile:
requires:
- puppet_blacksmith/rake_tasks
- puppet-lint/tasks/puppet-lint

.rubocop.yml:
unmanaged: true
default_configs:
inherit_from: .rubocop_todo.yml
87 changes: 59 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,68 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
dist: trusty
language: ruby
cache: bundler
script: "bundle exec rake release_checks"
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.4.1
env:
- PUPPET_GEM_VERSION="~> 5.0" CHECK=spec
matrix:
fast_finish: true
include:
- rvm: 2.3.1
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.3.1
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.4.1
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0"
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.6.0"
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.7.0"
- rvm: 2.1.9
script: bundle exec rake rubocop
-
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
rvm: 2.4.1
script: bundle exec rake beaker
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
rvm: 2.4.1
script: bundle exec rake beaker
services: docker
sudo: required
-
env: CHECK=rubocop
-
env: CHECK="syntax lint"
-
env: CHECK=metadata_lint
-
env: CHECK=spec
-
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=spec
rvm: 2.1.9
-
env: CHECK=release_checks
rvm: 2.1.9
branches:
only:
- master
- /^v\d/
- release
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
password:
secure: ""
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
Loading