-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: add support for ruby 3.x (#9)
* added support for ruby 3.x * added github workflows * added workflow to publish to rubygems --------- Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
- Loading branch information
Showing
18 changed files
with
180 additions
and
95 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@test-kitchen/maintainers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
name: 'Lint, Unit & Integration Tests' | ||
|
||
'on': | ||
pull_request: | ||
|
||
jobs: | ||
lint-unit: | ||
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: release-please | ||
|
||
"on": | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
with: | ||
token: ${{ secrets.PORTER_GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Build and publish to GitHub Package | ||
uses: actionshub/publish-gem-to-github@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: ${{ secrets.OWNER }} | ||
|
||
- name: Build and publish to RubyGems | ||
uses: actionshub/publish-gem-to-rubygems@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.RUBYGEMS_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
default: true | ||
MD004: false | ||
MD007: false | ||
MD012: false | ||
MD013: false | ||
MD024: false | ||
MD039: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "1.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
Metrics/AbcSize: | ||
Max: 50 | ||
Metrics/ClassLength: | ||
Max: 300 | ||
Metrics/LineLength: | ||
Max: 130 | ||
Metrics/MethodLength: | ||
Max: 25 | ||
Style/Documentation: | ||
Enabled: false | ||
Style/SignalException: | ||
Enabled: false | ||
Style/SpaceInsideBrackets: | ||
Enabled: false | ||
--- | ||
require: | ||
- chefstyle | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.1 | ||
Include: | ||
- "**/*.rb" | ||
Exclude: | ||
- "vendor/**/*" | ||
- "spec/**/*" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
# Encoding: UTF-8 | ||
|
||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in kitchen-rackspace.gemspec | ||
gemspec | ||
|
||
group :test do | ||
gem "rake" | ||
gem "kitchen-inspec" | ||
gem "rspec", "~> 3.2" | ||
end | ||
|
||
group :debug do | ||
gem "pry" | ||
end | ||
|
||
group :chefstyle do | ||
gem "chefstyle", "2.2.3" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
require "bundler/gem_tasks" | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
require "rspec/core/rake_task" | ||
desc "Run all specs in spec directory" | ||
RSpec::Core::RakeTask.new(:test) do |t| | ||
t.pattern = "spec/**/*_spec.rb" | ||
end | ||
|
||
task default: [ :spec ] | ||
begin | ||
require "chefstyle" | ||
require "rubocop/rake_task" | ||
RuboCop::RakeTask.new(:style) do |task| | ||
task.options += ["--display-cop-names", "--no-color"] | ||
end | ||
rescue LoadError | ||
puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking." | ||
end | ||
|
||
task default: %i{test style} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.