"itamae list" command to list itamae plugin recipes#321
Open
fuminori-ido wants to merge 4 commits intoitamae-kitchen:masterfrom
Open
"itamae list" command to list itamae plugin recipes#321fuminori-ido wants to merge 4 commits intoitamae-kitchen:masterfrom
fuminori-ido wants to merge 4 commits intoitamae-kitchen:masterfrom
Conversation
unasuke
reviewed
Aug 17, 2020
Member
unasuke
left a comment
There was a problem hiding this comment.
I think adding spec is better, but Itamae has no official plugin, so if add spec, it depends on 3rd-party's gem. That looks not good way to me... 🤔
| end | ||
|
|
||
| # from rubygems Gem::Commands::QueryCommand#output_versions | ||
| versions.each do |gem_name, matching_tuples| |
Member
There was a problem hiding this comment.
Is gem_name unused? I think you should add a prefix _ if that.
Contributor
Author
There was a problem hiding this comment.
Thank you for your pointing out! I did so at 80fadc1
inspired by 'rubygems' test to test around gem so that before/after, and instance variables are used.
Contributor
Author
|
I tried to add spec at f234f5b . It's a little bit too long because of testing in temporary created gem space as 'rubygems' tests itself. I'm not sure if it is acceptable?? |
unasuke
reviewed
Oct 19, 2020
Comment on lines
+19
to
+23
| req = Gem::Requirement.default | ||
| dep = Gem::Deprecate.skip_during { Gem::Dependency.new pattern, req } | ||
| specs.select! do |s| | ||
| dep.match?(s.name, s.version, false) | ||
| end |
Member
There was a problem hiding this comment.
@fuminori-ido I can't understand these lines. What purpose of this?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
NAME
"itamae list" command lists recipes in installed itamae-plugin-recipe-X gems
SYNOPSIS
itamae list
DESCRIPTION
"itamae list" command lists recipes in installed itamae-plugin-recipe-X gems; for example:
Implementation Note
The basic idea is "gem list ^itamae-plugin-recipe", scan '*.rb' , then print the path with conversion of directory separator from '/' to '::'. "X/default.rb" will be converted to "X" as well.