Skip to content

Commit

Permalink
Merge pull request #3432 from brodock/user-agent-gitlab-ci
Browse files Browse the repository at this point in the history
Report GitLab CI within bundler user-agent string
  • Loading branch information
colby-swandale committed Mar 27, 2020
2 parents 29c5a91 + 6a92a9a commit 7f84c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bundler/lib/bundler/fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def cis
"BUILDBOX" => "buildbox",
"GO_SERVER_URL" => "go",
"SNAP_CI" => "snap",
"GITLAB_CI" => "gitlab",
"CI_NAME" => ENV["CI_NAME"],
"CI" => "ci",
}
Expand Down
3 changes: 2 additions & 1 deletion bundler/spec/bundler/fetcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@
end

it "from many CI" do
with_env_vars("TRAVIS" => "foo", "CI_NAME" => "my_ci") do
with_env_vars("TRAVIS" => "foo", "GITLAB_CI" => "gitlab", "CI_NAME" => "my_ci") do
ci_part = fetcher.user_agent.split(" ").find {|x| x.start_with?("ci/") }
expect(ci_part).to match("travis")
expect(ci_part).to match("gitlab")
expect(ci_part).to match("my_ci")
end
end
Expand Down

0 comments on commit 7f84c7b

Please sign in to comment.