lib/vitals/utils.rb in vitals-0.8.0 vs lib/vitals/utils.rb in vitals-0.8.1
- old
+ new
@@ -15,11 +15,18 @@
def self.grape_path(route)
version = route.route_version
path = route.route_path.dup[1..-1] # /foo/bar/baz -> foo/bar/baz
path.sub!(/\(\..*\)$/, '') # (.json) -> ''
path.sub!(":version", version) if version # :version -> v1
- path.gsub!(/\//, ".") # foo/bar -> foo.bar
- path.gsub!(/\//, ".")
+ path.gsub!(/\//, self.path_sep) # foo/bar -> foo.bar
path
+ end
+
+ def self.path_sep
+ @path_sep
+ end
+
+ def self.path_sep=(val)
+ @path_sep = val
end
end
end