Skip to content
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

Allow path prefix for non forge module repositories #36

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/puppet_forge/v3/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def request(resource, item = nil, params = {}, reset_connection = false, conn_op
end

if item.nil?
uri_path = "/v3/#{resource}"
uri_path = "v3/#{resource}"
else
uri_path = "/v3/#{resource}/#{item}"
uri_path = "v3/#{resource}/#{item}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like just dropping the leading slash here will allow things to work without any other changes. path_prefix seems to get automatically set to / if the url_prefix doesn't include a path component.

end

PuppetForge::V3::Base.conn.get uri_path, params
Expand Down