-
Notifications
You must be signed in to change notification settings - Fork 260
Add Ruby gems support to JFrog CLI #2992
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
Conversation
cba682d
to
f53b6ce
Compare
f53b6ce
to
36d0eb8
Compare
36d0eb8
to
8c796d9
Compare
RUBY_GEMS_IMPLEMENTATION_SUMMARY.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it has to be part of jfrog-cli repository?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was created just to show the doc of implemented, shouldn't be part of this PR, will remove this from here.
ruby-test/.jfrog/projects/ruby.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this used for tests? If so it should be part of testdata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, not part of test, will remove this.
utils/cliutils/commandsflags.go
Outdated
@@ -1938,6 +1938,9 @@ var commandFlags = map[string][]string{ | |||
Poetry: { | |||
BuildName, BuildNumber, module, Project, | |||
}, | |||
RubyConfig: { | |||
global, serverIdResolve, repoResolve, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why is global flag needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The global flag is needed and is standard across all package manager configurations. It allows users to set configuration:
Global: applies to all projects on the system
Local: applies only to the current project director
This was something maintained across other package managers as well, so i have added it here also
8c796d9
to
c5d4de1
Compare
c5d4de1
to
c37d30f
Compare
go.mod
Outdated
|
||
// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20250527091824-60a3b4b741aa | ||
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/agrasth/jfrog-cli-core/v2 v2.0.0-20250613074107-730ccf25f2ed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see any dependent PR from jfrog-cli-core
. Is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it's not needed anymore, I will change this
@@ -1938,6 +1938,9 @@ var commandFlags = map[string][]string{ | |||
Poetry: { | |||
BuildName, BuildNumber, module, Project, | |||
}, | |||
RubyConfig: { | |||
global, serverIdResolve, serverIdDeploy, repoResolve, repoDeploy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the flag global flag required?
6dd22a0
to
f522da8
Compare
269c740
to
cbf1476
Compare
6e034de
to
4d47f88
Compare
e456155
to
f526883
Compare
e39d170
to
9810293
Compare
This reverts commit 9810293.
Resolved conflicts in: - go.mod: Updated dependency versions to latest from upstream - go.sum: Updated corresponding checksums Changes include: - Updated jfrog-cli-core/v2 to v2.31.1-0.20250629143350-c43614bbffcd - Updated jfrog-client-go to v1.28.1-0.20250629142537-bb24db402fe1
dev
branch.go vet ./...
.go fmt ./...
.Add Ruby Gems Configuration Support to JFrog CLI
Summary
This PR adds Ruby gems configuration support to the JFrog CLI, enabling developers to configure Ruby projects to use JFrog Artifactory repositories through the
jf ruby-config
command. The implementation follows established patterns used by other package managers in the JFrog CLI ecosystem and adopts a config-only approach for clean separation of concerns.Features
Core Functionality
Ruby
to core project type systemruby-config
(alias:rubyc
) command for project setupCommands Added
📁 Files Changed
jfrog-cli-core
Repositorycommon/project/projectconfig.go
: AddedRuby
to ProjectType enum and ProjectTypes slicejfrog-cli-artifactory
Repositoryartifactory/commands/ruby/ruby.go
: New Ruby command package with:go.mod
: Updated dependencies for Ruby supportjfrog-cli
Repositorybuildtools/cli.go
: Addedruby-config
command definition withrubyc
aliasutils/cliutils/commandsflags.go
: AddedRubyConfig
constant and flag mappingdocs/buildtools/rubyconfig/help.go
: Command documentationruby-test/.jfrog/projects/ruby.yaml
: Sample configuration filego.mod
: Updated with local replace directives for developmentTechnical Implementation
Architecture
Follows the established three-tier architecture:
Configuration Output
Creates
.jfrog/projects/ruby.yaml
:📋 Usage Examples
Basic Configuration Workflow
Advanced Configuration
Help and Documentation
🎯 Integration Points
Command Integration
--server-id-resolve
,--repo-resolve
,--global
)rubyc
for shorter command syntaxConfiguration System
.jfrog/projects/ruby.yaml
(project-specific) or globalThe implementation provides Ruby developers with native JFrog CLI configuration support while maintaining clean separation from interactive setup workflows, completing the package manager configuration matrix for the JFrog CLI.