Skip to content
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "ci"

on:
pull_request:
branches:
- "main"
workflow_dispatch:

jobs:

spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
puppet_gem_version:
- '~> 6.0'
- '~> 7.0'
name: "spec (ruby ${{ matrix.ruby_version }} | ${{ matrix.puppet_gem_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}

acceptance:
needs: "spec"
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
ruby_version:
- "2.5"
- "2.7"
puppet_gem_version:
- '~> 6.0'
- '~> 7.0'
name: "acceptance (${{ matrix.os }} ruby ${{ matrix.ruby_version }} |${{ matrix.puppet_gem_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}
rake_task: 'acceptance'
puppet_version: ${{ matrix.puppet_gem_version }}
runs_on: ${{ matrix.os }}
22 changes: 22 additions & 0 deletions .github/workflows/labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: community-labeller

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

jobs:
label:
runs-on: ubuntu-latest
steps:

- uses: puppetlabs/community-labeller@v0
name: Label issues or pull requests
with:
label_name: community
label_color: '5319e7'
org_membership: puppetlabs
token: ${{ secrets.IAC_COMMUNITY_LABELER }}
15 changes: 15 additions & 0 deletions .github/workflows/mend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "mend"

on:
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:

mend:
uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
secrets: "inherit"
47 changes: 47 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "nightly"

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:

spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
puppet_gem_version:
- '~> 6.0'
- '~> 7.0'
name: "spec (ruby ${{ matrix.ruby_version }} | ${{ matrix.puppet_gem_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}

acceptance:
needs: "spec"
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "windows-latest"
ruby_version:
- "2.5"
- "2.7"
puppet_gem_version:
- '~> 6.0'
- '~> 7.0'
name: "acceptance (${{ matrix.os }} ruby ${{ matrix.ruby_version }} |${{ matrix.puppet_gem_version }})"
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main"
secrets: "inherit"
with:
ruby_version: ${{ matrix.ruby_version }}
rake_task: 'acceptance'
puppet_version: ${{ matrix.puppet_gem_version }}
runs_on: ${{ matrix.os }}
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Release"

on:
workflow_dispatch:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"

jobs:
release:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main"
with:
target: "${{ github.event.inputs.target }}"
secrets: "inherit"
20 changes: 20 additions & 0 deletions .github/workflows/release_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Release Prep"

on:
workflow_dispatch:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"
version:
description: "Version of gem to be released."
required: true

jobs:
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
with:
target: "${{ github.event.inputs.target }}"
version: "${{ github.event.inputs.version }}"
secrets: "inherit"
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require: rubocop-rspec

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.5
Exclude:
# binstubs, and other utilities
- bin/**/*
Expand Down Expand Up @@ -178,3 +178,6 @@ Lint/RaiseException:

Lint/StructNewOverride:
Enabled: true

RSpec/MultipleMemoizedHelpers:
Max: 14
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ group :development do
gem 'rake', '~> 12.0'
gem 'rspec', '~> 3.0'

gem 'rubocop', ['~> 0.68', '< 0.82.0']
gem 'rubocop-rspec', '~> 1.38'
gem 'rubocop', '= 1.6.1', require: false
gem 'rubocop-performance', '= 1.9.1', require: false
gem 'rubocop-rspec', '= 2.0.1', require: false

gem 'codecov', '~> 0.1'
gem 'github_changelog_generator', '~> 1.15', require: false
Expand Down
30 changes: 0 additions & 30 deletions appveyor.yml

This file was deleted.

6 changes: 2 additions & 4 deletions lib/puppet/modulebuilder/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class Builder
'/vendor/',
].freeze

attr_reader :destination

attr_reader :logger
attr_reader :destination, :logger

def initialize(source, destination = nil, logger = nil)
raise ArgumentError, 'logger is expected to be nil or a Logger. Got %{klass}' % { klass: logger.class } unless logger.nil? || logger.is_a?(Logger)
Expand Down Expand Up @@ -143,7 +141,7 @@ def copy_mtime(path)
#
# @return [Boolean] true if the path matches and should be ignored.
def ignored_path?(path)
path = path.to_s + '/' if File.directory?(path)
path = "#{path}/" if File.directory?(path)

ignored_files.match_path(path, source)
end
Expand Down
2 changes: 1 addition & 1 deletion puppet-modulebuilder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.email = ['sheena@puppet.com', 'https://puppetlabs.github.io/iac/']
spec.summary = 'A gem to set up puppet-modulebuilder'
spec.homepage = 'https://github.com/puppetlabs/puppet-modulebuilder'
spec.required_ruby_version = Gem::Requirement.new('>= 2.1.0')
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
spec.license = 'Apache-2.0'

spec.metadata['homepage_uri'] = spec.homepage
Expand Down