diff --git a/.cane b/.cane
deleted file mode 100644
index e69de29..0000000
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 452ebb3..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-version: 2
-updates:
-- package-ecosystem: bundler
- directory: "/"
- schedule:
- interval: daily
- open-pull-requests-limit: 10
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..773e62f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,32 @@
+---
+name: "Test"
+
+"on":
+ push:
+ branches: [main]
+ pull_request:
+ workflow_dispatch:
+
+# The default token is granted write access to most of the repository.
+# Nothing here needs more than the checkout.
+permissions:
+ contents: read
+
+# Supersede in-flight runs for a branch. Pull requests cancel freely, but
+# pushes to main do not: every commit on main should keep a build of its own.
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ lint-unit:
+ # Pinned to a commit rather than @main so an upstream edit cannot reach
+ # this repository's CI without a reviewed pull request. The trailing
+ # comment names the release the commit belongs to, which is what lets
+ # Renovate track the pin by version and keep both in step.
+ uses: test-kitchen/.github/.github/workflows/lint-unit.yml@95ef7803cf23aae5ee68593de5b7e0a731c1a929 # v0.4.0
+ with:
+ # This gem requires Ruby 3.2, and so do busser 0.9 and cucumber 11.
+ # Without this the shared workflow would still start a Ruby 3.1 job and
+ # bundler would refuse to resolve there.
+ ruby_versions: '["3.2", "3.3", "3.4", "4.0"]'
diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml
new file mode 100644
index 0000000..ed85ecd
--- /dev/null
+++ b/.github/workflows/pr-title.yml
@@ -0,0 +1,28 @@
+---
+name: "PR Title"
+
+"on":
+ pull_request_target:
+ types: [opened, edited, reopened, synchronize]
+
+permissions:
+ contents: read
+
+jobs:
+ conventional-title:
+ name: "Conventional commit title"
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: read
+ steps:
+ # Pull requests here are squash merged, so the pull request title becomes
+ # the commit subject on main. That makes the title the one place worth
+ # checking: release-please reads those subjects to decide the next
+ # version and to build the changelog.
+ #
+ # pull_request_target is used so the check also runs for pull requests
+ # from forks. No repository code is checked out in this job, so none of
+ # the usual pull_request_target risk applies.
+ - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..88ba666
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,45 @@
+---
+name: "Release"
+
+"on":
+ push:
+ branches: [main]
+
+permissions:
+ contents: read
+
+jobs:
+ release-please:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # tag the release and commit the version bump
+ pull-requests: write # open and update the release pull request
+ packages: write # push the gem to GitHub Packages
+ steps:
+ # Opens and maintains a release pull request. Merging that pull request
+ # is what actually cuts a release, so every step below is skipped until
+ # release_created is set.
+ - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
+ id: release
+ with:
+ token: ${{ secrets.PORTER_GITHUB_TOKEN }}
+
+ - name: Checkout code
+ if: ${{ steps.release.outputs.release_created }}
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+
+ # These two steps are handed publishing credentials, so they are pinned
+ # to a commit rather than a branch. A floating ref would let whoever
+ # controls that branch run code with a token that can push this gem.
+ - name: Publish to GitHub Packages
+ if: ${{ steps.release.outputs.release_created }}
+ uses: actionshub/publish-gem-to-github@86eb0ce1ced1072298bf68776a32a5c9703ad9aa # v1.0.13
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ owner: ${{ github.repository_owner }}
+
+ - name: Publish to RubyGems
+ if: ${{ steps.release.outputs.release_created }}
+ uses: actionshub/publish-gem-to-rubygems@f9126f7a2d36a4fd31a13e78fde5fbdcc4b7b251 # v2.0.6
+ with:
+ token: ${{ secrets.RUBYGEMS_API_KEY }}
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
new file mode 100644
index 0000000..9fd2375
--- /dev/null
+++ b/.markdownlint.yaml
@@ -0,0 +1,6 @@
+---
+default: true
+MD004: false
+MD012: false
+MD013: false
+MD024: false
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
new file mode 100644
index 0000000..88f7c73
--- /dev/null
+++ b/.release-please-manifest.json
@@ -0,0 +1,3 @@
+{
+ ".": "0.1.4"
+}
diff --git a/.rubocop.yml b/.rubocop.yml
index ba6d558..8ed7747 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,13 @@
+---
+require:
+ - cookstyle/chefstyle
+
+AllCops:
+ TargetRubyVersion: 3.1
+ Exclude:
+ - "vendor/**/*"
+ - "spec/**/*"
+
Style/ClassAndModuleChildren:
Exclude:
- lib/busser/runner_plugin/bash.rb
diff --git a/.simplecov b/.simplecov
index 66ed770..022e106 100644
--- a/.simplecov
+++ b/.simplecov
@@ -1,10 +1,10 @@
-SimpleCov.profiles.define 'gem' do
- command_name 'Specs'
+SimpleCov.profiles.define "gem" do
+ command_name "Specs"
- add_filter '.gem/'
- add_filter '/spec/'
- add_filter '/lib/vendor/'
+ add_filter ".gem/"
+ add_filter "/spec/"
+ add_filter "/lib/vendor/"
- add_group 'Libraries', '/lib/'
+ add_group "Libraries", "/lib/"
end
-SimpleCov.start 'gem'
+SimpleCov.start "gem"
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a83dd08..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-language: ruby
-
-rvm:
- - 2.1
- - 2.0.0
- - 1.9.3
- - ruby-head
-
-env:
- - RUBYGEMS_VERSION=
- - RUBYGEMS_VERSION=2.2.2
- - RUBYGEMS_VERSION=2.1.11
- - RUBYGEMS_VERSION=2.0.14
- - RUBYGEMS_VERSION=1.8.29
-
-bundler_args: --without guard
-
-before_install:
- - if [ -n "$RUBYGEMS_VERSION" ]; then gem update --system $RUBYGEMS_VERSION; fi
- - gem --version
-
-matrix:
- exclude:
- - rvm: 2.1
- env: RUBYGEMS_VERSION=1.8.29
- - rvm: 2.0.0
- env: RUBYGEMS_VERSION=1.8.29
- - rvm: ruby-head
- env: RUBYGEMS_VERSION=1.8.29
- allow_failures:
- - rvm: ruby-head
-
-notifications:
- irc: "chat.freenode.net#kitchenci"
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 0000000..ecfdffb
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,6 @@
+---
+extends: default
+rules:
+ line-length:
+ max: 256
+ level: warning
diff --git a/Gemfile b/Gemfile
index 8e427e4..67ed829 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,10 +1,18 @@
-# -*- encoding: utf-8 -*-
source "https://rubygems.org"
gemspec
-group :guard do
- gem "guard-cucumber"
- gem "guard-cane"
- gem "guard-rubocop"
+group :cookstyle do
+ gem "cookstyle", ">= 9.0.0"
+end
+
+group :test do
+ gem "aruba", ">= 2.0"
+ gem "base64" # cucumber needs it; not a default gem on Ruby 4.0
+ gem "cucumber", ">= 11.1"
+ gem "rake"
+end
+
+group :development do
+ gem "simplecov"
end
diff --git a/Guardfile b/Guardfile
deleted file mode 100644
index 8e9eb35..0000000
--- a/Guardfile
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- encoding: utf-8 -*-
-ignore %r{^\.gem/}
-
-def rubocop_opts
- { :all_on_start => false, :keep_failed => false, :cli => "-r finstyle -D" }
-end
-
-group :red_green_refactor, :halt_on_fail => true do
- guard :cucumber do
- watch(%r{^features/.+\.feature$})
- watch(%r{^features/support/.+$}) { "features" }
- watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
- Dir[File.join("**/#{m[1]}.feature")][0] || "features"
- end
- end
-
- guard :rubocop, rubocop_opts do
- watch(%r{.+\.rb$})
- watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
- end
-
- guard :cane do
- watch(%r{.*\.rb})
- watch(".cane")
- end
-end
diff --git a/README.md b/README.md
index 1f4cf2b..1971130 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
-# Busser::RunnerPlugin::Bash
+# Busser::RunnerPlugin::Bash
-[](http://badge.fury.io/rb/busser-bash)
-[](https://travis-ci.org/test-kitchen/busser-bash)
-[](https://codeclimate.com/github/test-kitchen/busser-bash)
+[](http://badge.fury.io/rb/busser-bash)
A Busser runner plugin for testing bash scripts
@@ -10,11 +8,11 @@ A Busser runner plugin for testing bash scripts
This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.
-## Installation and Setup
+## Installation and Setup
Please read the Busser [plugin usage][plugin_usage] page for more details.
-## Usage
+## Usage
Please put test files into [COOKBOOK]/test/integration/[SUITES]/bash/
@@ -28,11 +26,11 @@ Please put test files into [COOKBOOK]/test/integration/[SUITES]/bash/
The exit code of the script is used as indicator for failure or success.
-### Note
+### Note
Globbing pattern to match files is `"bash/*_{test,spec}.{sh,bash}"`.
-## Development
+## Development
* Source hosted at [GitHub][repo]
* Report issues/questions/feature requests on [GitHub Issues][issues]
@@ -47,11 +45,11 @@ example:
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
-## Authors
+## Authors
Created and maintained by [Fletcher Nichol][author] ()
-## License
+## License
Apache 2.0 (see [LICENSE][license])
@@ -60,4 +58,4 @@ Apache 2.0 (see [LICENSE][license])
[issues]: https://github.com/fnichol/busser-bash/issues
[license]: https://github.com/fnichol/busser-bash/blob/master/LICENSE
[repo]: https://github.com/fnichol/busser-bash
-[plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage
+[plugin_usage]: https://kitchen.ci/docs/verifiers/
diff --git a/Rakefile b/Rakefile
index a56aa15..5174a4f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,3 @@
-# -*- encoding: utf-8 -*-
-
require "bundler/gem_tasks"
require "cucumber/rake/task"
@@ -8,29 +6,6 @@ Cucumber::Rake::Task.new(:features) do |t|
end
desc "Run all test suites"
-task :test => [:features]
-
-require "finstyle"
-require "rubocop/rake_task"
-RuboCop::RakeTask.new(:style) do |task|
- task.options << "--display-cop-names"
-end
-
-require "cane/rake_task"
-desc "Run cane to check quality metrics"
-Cane::RakeTask.new do |cane|
- cane.canefile = "./.cane"
-end
-
-desc "Display LOC stats"
-task :stats do
- puts "\n## Production Code Stats"
- sh "countloc -r lib"
- puts "\n## Test Code Stats"
- sh "countloc -r features"
-end
-
-desc "Run all quality tasks"
-task :quality => [:cane, :style, :stats]
+task test: [:features]
-task :default => [:test, :quality]
+task default: [:test]
diff --git a/busser-bash.gemspec b/busser-bash.gemspec
index db372cf..aaacd60 100644
--- a/busser-bash.gemspec
+++ b/busser-bash.gemspec
@@ -1,34 +1,30 @@
-# coding: utf-8
-lib = File.expand_path("../lib", __FILE__)
+lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "busser/bash/version"
-require "English"
-Gem::Specification.new do |gem|
- gem.name = "busser-bash"
- gem.version = Busser::Bash::VERSION
- gem.authors = ["Fletcher Nichol"]
- gem.email = ["fnichol@nichol.ca"]
- gem.description = "A Busser runner plugin for testing bash scripts"
- gem.summary = gem.description
- gem.homepage = "https://github.com/test-kitchen/busser-bash"
- gem.license = "Apache 2.0"
+Gem::Specification.new do |spec|
+ spec.name = "busser-bash"
+ spec.version = Busser::Bash::VERSION
+ spec.authors = ["Fletcher Nichol"]
+ spec.email = ["fnichol@nichol.ca"]
+ spec.description = "A Busser runner plugin for testing bash scripts"
+ spec.summary = spec.description
+ spec.homepage = "https://github.com/test-kitchen/busser-bash"
+ spec.license = "Apache-2.0"
- gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
- gem.executables = []
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.require_paths = ["lib"]
+ spec.required_ruby_version = ">= 3.2"
- gem.add_dependency "busser", ">= 0.2.0"
+ spec.files = `git ls-files -z`.split("\x0")
+ spec.executables = []
+ spec.require_paths = ["lib"]
- gem.add_development_dependency "aruba"
- gem.add_development_dependency "countloc"
- gem.add_development_dependency "rake"
- gem.add_development_dependency "simplecov"
+ spec.metadata = {
+ "bug_tracker_uri" => "#{spec.homepage}/issues",
+ "changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
+ "documentation_uri" => "#{spec.homepage}/blob/main/README.md",
+ "homepage_uri" => spec.homepage,
+ "source_code_uri" => spec.homepage,
+ }
- # style and complexity libraries are tightly version pinned as newer releases
- # may introduce new and undesirable style choices which would be immediately
- # enforced in CI
- gem.add_development_dependency "cane", "3.0.0"
- gem.add_development_dependency "finstyle", "1.5.0"
+ spec.add_dependency "busser", ">= 0.9.0"
end
diff --git a/features/support/env.rb b/features/support/env.rb
index c98de01..7acbcf0 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -1,5 +1,3 @@
-# -*- encoding: utf-8 -*-
-
require "aruba/cucumber"
require "busser/cucumber"
diff --git a/lib/busser/bash/version.rb b/lib/busser/bash/version.rb
index 00bad16..b85e7ba 100644
--- a/lib/busser/bash/version.rb
+++ b/lib/busser/bash/version.rb
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
#
# Author:: Fletcher Nichol ()
#
@@ -21,6 +20,6 @@ module Busser
module Bash
# Version string for the Bash Busser runner plugin
- VERSION = "0.1.5.dev"
+ VERSION = "0.1.4".freeze
end
end
diff --git a/lib/busser/runner_plugin/bash.rb b/lib/busser/runner_plugin/bash.rb
index f137891..f1889eb 100644
--- a/lib/busser/runner_plugin/bash.rb
+++ b/lib/busser/runner_plugin/bash.rb
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
#
# Author:: Fletcher Nichol ()
#
diff --git a/release-please-config.json b/release-please-config.json
new file mode 100644
index 0000000..eb1c855
--- /dev/null
+++ b/release-please-config.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "bootstrap-sha": "24c265088451eb1f8e4093dba405fe23951e091e",
+ "packages": {
+ ".": {
+ "package-name": "busser-bash",
+ "changelog-path": "CHANGELOG.md",
+ "release-type": "ruby",
+ "include-component-in-tag": false,
+ "version-file": "lib/busser/bash/version.rb"
+ }
+ }
+}
diff --git a/renovate.json b/renovate.json
index 5db72dd..92b9a7b 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,6 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
- "config:recommended"
+ "config:recommended",
+ "helpers:pinGitHubActionDigests",
+ ":semanticCommits"
]
}