-
Notifications
You must be signed in to change notification settings - Fork 28
Updating for Ruby 3.4 and Cookstyle #62
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1a30cca
Updating for Ruby 3.4 and Cookstyle
johnmccrae 0fb91a5
Updating for Ruby 3.4 and Cookstyle
johnmccrae 743ef4f
Explicitly adding gems that are moving out of the Ruby System
johnmccrae ada0038
Explicitly adding gems that are moving out of the Ruby System
johnmccrae f8f4c83
Explicitly adding gems that are moving out of the Ruby System
johnmccrae 757fe29
making the Ruby versions match gemspec
johnmccrae d95d722
making the Ruby versions match gemspec
johnmccrae 11d52a2
Where are GCC and Make?
johnmccrae 97e79dd
where the heck is gcc?
johnmccrae d1a3288
tweaking the fiddle gem dependency
johnmccrae bdb65d1
Pinning fiddle to 1.1.6
johnmccrae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,27 @@ | ||
--- | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: lint-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
bundler-cache: false | ||
- uses: r7kamura/rubocop-problem-matchers-action@v1 # this shows the failures in the PR | ||
- run: | | ||
gem install cookstyle | ||
cookstyle --chefstyle -c .rubocop.yml | ||
|
This file contains hidden or 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,31 @@ | ||
--- | ||
name: unit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-2019, windows-2022] | ||
ruby: ['3.1', '3.4'] | ||
name: Unit test on ${{ matrix.os }} with Ruby ${{ matrix.ruby }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
RUBYOPT: '--disable-error_highlight' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: ruby-setup | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: bundle exec rake spec |
This file contains hidden or 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,48 @@ | ||
AllCops: | ||
TargetRubyVersion: 3.1 | ||
Exclude: | ||
- "spec/data/**/*" | ||
- "habitat/**/*" | ||
- "vendor/**/*" | ||
Security/Eval: | ||
Enabled: false | ||
Lint/UselessAssignment: | ||
Enabled: false | ||
Lint/DeprecatedClassMethods: | ||
Enabled: false | ||
Lint/AmbiguousRegexpLiteral: | ||
Enabled: false | ||
Lint/AssignmentInCondition: | ||
Enabled: false | ||
Lint/AmbiguousBlockAssociation: | ||
Enabled: false | ||
Layout/EndOfLine: | ||
Enabled: false | ||
Lint/ShadowingOuterLocalVariable: | ||
Enabled: false | ||
Lint/IneffectiveAccessModifier: | ||
Enabled: false | ||
Lint/InterpolationCheck: | ||
Enabled: true | ||
Exclude: | ||
- 'spec/unit/property_spec.rb' | ||
- 'spec/functional/shell_spec.rb' | ||
Lint/DeprecatedConstants: | ||
Enabled: true | ||
Exclude: | ||
- lib/chef/node/attribute.rb # false alarms | ||
|
||
|
||
# This cop shouldn't alert on the helper / specs itself | ||
Chef/Ruby/LegacyPowershellOutMethods: | ||
Exclude: | ||
- 'lib/chef/mixin/powershell_out.rb' | ||
- 'spec/functional/mixin/powershell_out_spec.rb' | ||
- 'spec/unit/mixin/powershell_out_spec.rb' | ||
- 'lib/chef/resource/windows_feature_powershell.rb' # https://github.com/chef/chef/issues/10927 | ||
- 'lib/chef/provider/package/powershell.rb' # https://github.com/chef/chef/issues/10926 | ||
|
||
# set additional paths | ||
Chef/Ruby/UnlessDefinedRequire: | ||
Include: | ||
- 'lib/**/*' |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -10,8 +10,15 @@ Gem::Specification.new do |s| | |
s.author = "Chef Software, Inc." | ||
s.email = "[email protected]" | ||
s.homepage = "https://github.com/chef/mixlib-authentication" | ||
s.required_ruby_version = ">= 2.5" | ||
s.required_ruby_version = ">= 3.1" | ||
|
||
s.files = %w{LICENSE} + Dir.glob("lib/**/*") | ||
s.require_paths = ["lib"] | ||
# logger, ostruct, fiddle, and base64 are part of the stdlib | ||
# and are being removed in ruby 3.5 so they must be included in the gemspec | ||
s.add_dependency "logger" | ||
s.add_dependency "ostruct" | ||
s.add_dependency "fiddle", "~> 1.1.6" | ||
s.add_dependency "base64" | ||
s.add_development_dependency "cookstyle", "~> 8.1" | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.