lib/spyke/path.rb in spyke-1.7.0 vs lib/spyke/path.rb in spyke-1.7.1

- old
+ new

@@ -41,10 +41,16 @@ raise Spyke::InvalidPathError, "Missing required params: #{missing_required_params.join(', ')} in #{@pattern}. Mark optional params with parens eg: (:param)" end end def missing_required_params - required_params - @params.keys + required_params - params_with_values + end + + def params_with_values + @params.map do |key, value| + key if value.present? + end.compact end def required_params @pattern.scan(/\/:(\w+)/).flatten.map(&:to_sym) end