lib/usher/splitter.rb in joshbuddy-usher-0.4.0 vs lib/usher/splitter.rb in joshbuddy-usher-0.4.1

- old
+ new

@@ -51,11 +51,11 @@ type = part.slice!(0).chr.to_sym current_group << Usher::Route::Variable.new(type, part, requirements && requirements[part.to_sym], transformers && transformers[part.to_sym]) when ?{ pattern = '' count = 1 - variable = ss.scan(/:([^,]+),/) + variable = ss.scan(/[:\*]([^,]+),/) until count.zero? regex_part = ss.scan(/\{|\}|[^\{\}]+/) case regex_part[0] when ?{ count += 1 @@ -71,10 +71,9 @@ variable_name = variable[0, variable.size - 1].to_sym current_group << Usher::Route::Variable.new(variable_type, variable_name, requirements && requirements[variable_name], transformers && transformers[variable_name], regex) else current_group << regex end - when ?( new_group = Group.new(:any, current_group) current_group << new_group current_group = new_group when ?) \ No newline at end of file