Skip to content

Commit 6d65765

Browse files
Robert HeinzmannRobert Heinzmann
authored andcommitted
Fix incompatibility with versions containing '-' dash (e.g. pupetlabs-apache-0.5.0-rc1)
1 parent 9a4cb83 commit 6d65765

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet_forge_server/app/version3.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def initialize(backends)
4040

4141
get '/v3/releases/:module' do
4242
halt 404, json({:errors => ['404 Not found']}) unless params[:module]
43-
author, name, version = params[:module].split '-'
43+
author, name, version = params[:module].split('-',3)
4444
halt 400, json({:errors => ["'#{params[:module]}' is not a valid release slug"]}) unless author && name && version
4545
releases = releases(author, name, version)
4646
halt 404, json({:errors => ['404 Not found']}) unless releases

0 commit comments

Comments
 (0)