-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for possible version mismatches of base64 (stdlib) gem
base64 is part of the ruby stdlib https://stdgems.org/base64/. Rubocop adds it now as a gem dependency since it gets removed from the stdlib with ruby 3.4 rubocop/rubocop#12094. The introduced version of base64 matches the one of our currently used ruby version (3.1.4). We have to make sure that the version that now is included to our bundle does not mismatch in the future due to possible introduced updates.
- Loading branch information
1 parent
92826a0
commit fb22db3
Showing
4 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
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
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 @@ | ||
#!/usr/bin/ruby | ||
# frozen_string_literal: true | ||
|
||
class CreateDiffendIoLinks | ||
def initialize | ||
|
||
end | ||
|
||
def receive_file_diff_names | ||
# EXAMPLE: "mini_mime-1.1.5\n" | ||
@added_files = `git diff --name-only --diff-filter=A origin/${GITHUB_BASE_REF} $GITHUB_SHA`.split("\n") | ||
@added_files = filter_gem_files_from_diff_names(filepaths: @added_files) | ||
# EXAMPLE: "mini_mime-1.1.2\n" | ||
@removed_files = `git diff --name-only --diff-filter=D origin/${GITHUB_BASE_REF} $GITHUB_SHA`.split("\n") | ||
@removed_files = filter_gem_files_from_diff_names(filepaths: @removed_files) | ||
# EXAMPLE: "src/api/vendor/cache/nokogiri-1.15.3.gem" | ||
@changed_files = `git diff --name-only --diff-filter=C origin/${GITHUB_BASE_REF} $GITHUB_SHA`.split("\n") | ||
@changed_files = filter_gem_files_from_diff_names(filepaths: @changed_files) | ||
end | ||
|
||
def filter_gem_files_from_diff_names(filepaths:) | ||
filepaths.filter_map do |filepath| | ||
File.basename(filepath) if File.extname(filepath) == '.gem' | ||
end | ||
end | ||
|
||
def create_diffend_io_links | ||
|
||
end | ||
end | ||
|
||
CreateDiffendIoLinks.new |
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