summaryrefslogtreecommitdiff
path: root/chef-server-api/config/router.rb
diff options
context:
space:
mode:
authorNuo Yan <nuo@opscode.com>2010-10-08 10:58:37 -0700
committerDaniel DeLeo <dan@opscode.com>2010-10-12 20:06:07 -0700
commitf3fb233d4ea85e459922a351a4fbc45579e64b23 (patch)
tree74a61cee5aaa6e50e521662a46a9272c7eca7e4c /chef-server-api/config/router.rb
parent3586c85f94825d1f0c197d729c9e706080da29bd (diff)
downloadchef-f3fb233d4ea85e459922a351a4fbc45579e64b23.tar.gz
fixing CHEF-1747 cookbook version regex
Diffstat (limited to 'chef-server-api/config/router.rb')
-rw-r--r--chef-server-api/config/router.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/chef-server-api/config/router.rb b/chef-server-api/config/router.rb
index 4fb5aea975..b1d3c874a1 100644
--- a/chef-server-api/config/router.rb
+++ b/chef-server-api/config/router.rb
@@ -63,13 +63,13 @@ Merb::Router.prepare do
match("/cookbooks/:cookbook_name/:cookbook_version",
:method => 'get',
:cookbook_name => /[\w\.]+/,
- :cookbook_version => /(\d+\.\d+\.\d+|_latest)/
+ :cookbook_version => /\d+\.\d+\.\d+|_latest/
).to(:controller => "cookbooks", :action => "show").name(:cookbook_version)
match("/cookbooks/:cookbook_name/:cookbook_version",
:method => 'delete',
:cookbook_name => /[\w\.]+/,
- :cookbook_version => /(\d+\.\d+\.\d+|_latest)/
+ :cookbook_version => /\d+\.\d+\.\d+|_latest/
).to(:controller => "cookbooks", :action => "destroy")
match("/cookbooks/:cookbook_name",