From 3d6cac94b47b3c1b1915f5c37f9e811041210ddc Mon Sep 17 00:00:00 2001 From: James Couball Date: Mon, 7 Jul 2025 23:16:07 -0700 Subject: [PATCH 1/4] docs: announce that the project has adopted RuboCop --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index ac319337..3a9a65ed 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ [![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=main)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) +- [📢 We Now Use RuboCop 📢](#-we-now-use-rubocop-) - [📢 Default Branch Rename 📢](#-default-branch-rename-) - [📢 We've Switched to Conventional Commits 📢](#-weve-switched-to-conventional-commits-) - [Summary](#summary) @@ -23,6 +24,30 @@ - [Ruby version support policy](#ruby-version-support-policy) - [License](#license) +## 📢 We Now Use RuboCop 📢 + +To improve code consistency and maintainability, the `ruby-git` project has now +adopted [RuboCop](https://rubocop.org/) as our static code analyzer and formatter. + +This integration is a key part of our ongoing commitment to making `ruby-git` a +high-quality, stable, and easy-to-contribute-to project. All new contributions will +be expected to adhere to the style guidelines enforced by our RuboCop configuration. + + RuboCop can be run from the project's Rakefile: + +```shell +rake rubocop +``` + +RuboCop is also run as part of the default rake task (by running `rake`) that is run +in our Continuous Integration workflow. + +Going forward, any PRs that have any Robocop offenses will not be merged. In +certain rare cases, it might be acceptable to disable a RuboCop check for the most +limited scope possible. + +If you have a problem fixing a RuboCop offense, don't be afraid to ask a contributor. + ## 📢 Default Branch Rename 📢 On June 6th, 2025, the default branch was renamed from 'master' to 'main'. From 3a87722760176db54dfef9631de6191b183ab223 Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Mon, 7 Jul 2025 22:12:18 -0400 Subject: [PATCH 2/4] chore: update comment to be accurate (bin/test prepends the unit_test directory; the quoted calls previously would fail because it ended up trying to run `tests/units/test/units/test_archive.rb`) --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 3c40c500..7af234d5 100644 --- a/Rakefile +++ b/Rakefile @@ -14,9 +14,9 @@ task :test do # You can run individual test files (or multiple files) from the command # line with: # - # $ bin/test tests/units/test_archive.rb + # $ bin/test test_archive.rb # - # $ bin/test tests/units/test_archive.rb tests/units/test_object.rb + # $ bin/test test_archive.rb test_object.rb end default_tasks << :test From 07dfab5804874cbc52469bd40203b6d0b08be7a1 Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Mon, 7 Jul 2025 22:20:39 -0400 Subject: [PATCH 3/4] fix: call Git::Index#new correctly from initialize_components Use the keyword parameter, not the positional one. --- lib/git/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/base.rb b/lib/git/base.rb index 7ffb1d2e..b291c83f 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -851,7 +851,7 @@ def setup_logger(log_option) def initialize_components(options) @working_directory = Git::WorkingDirectory.new(options[:working_directory]) if options[:working_directory] @repository = Git::Repository.new(options[:repository]) if options[:repository] - @index = Git::Index.new(options[:index], false) if options[:index] + @index = Git::Index.new(options[:index], must_exist: false) if options[:index] end # Normalize options before they are sent to Git::Base.new From 5f291246f34108805ec144772239413277d74319 Mon Sep 17 00:00:00 2001 From: James Couball Date: Mon, 7 Jul 2025 23:28:17 -0700 Subject: [PATCH 4/4] chore: release v4.0.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lib/git/version.rb | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cf533f28..1778b2a6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.0.1" + ".": "4.0.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5075282f..68430064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ # Change Log +## [4.0.2](https://github.com/ruby-git/ruby-git/compare/v4.0.1...v4.0.2) (2025-07-08) + + +### Bug Fixes + +* Call Git::Index#new correctly from initialize_components ([07dfab5](https://github.com/ruby-git/ruby-git/commit/07dfab5804874cbc52469bd40203b6d0b08be7a1)) + + +### Other Changes + +* Announce that the project has adopted RuboCop ([3d6cac9](https://github.com/ruby-git/ruby-git/commit/3d6cac94b47b3c1b1915f5c37f9e811041210ddc)) +* Update comment to be accurate ([3a87722](https://github.com/ruby-git/ruby-git/commit/3a87722760176db54dfef9631de6191b183ab223)) + ## [4.0.1](https://github.com/ruby-git/ruby-git/compare/v4.0.0...v4.0.1) (2025-07-06) diff --git a/lib/git/version.rb b/lib/git/version.rb index 09d34e80..bd22d777 100644 --- a/lib/git/version.rb +++ b/lib/git/version.rb @@ -3,5 +3,5 @@ module Git # The current gem version # @return [String] the current gem version. - VERSION = '4.0.1' + VERSION = '4.0.2' end pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy