Ejemplo n.º 1
0
        private string GetControllerFilePath(string controllerName)
        {
            var fileName = Constants.ControllerPascalPathFormat.FormattedWith(controllerName.Pascalize());

            if (_pathProvider.FileExists(fileName))
            {
                return(fileName);
            }

            fileName = Constants.ControllerUnderscorePathFormat.FormattedWith(controllerName.Underscore());

            return(_pathProvider.FileExists(fileName) ? fileName : string.Empty);
        }
Ejemplo n.º 2
0
        private static void ProcessRubyRoutes(IRubyEngine engine, IPathProvider vpp, string routesPath)
        {
            if (!vpp.FileExists(routesPath))
            {
                return;
            }
            var routeCollection = new RubyRoutes(RouteTable.Routes);

            engine.DefineReadOnlyGlobalVariable("routes", routeCollection);
            engine.RequireRubyFile(routesPath, ReaderType.File);
        }
Ejemplo n.º 3
0
 public override bool FileExists(string path)
 {
     return(_pathProvider.FileExists(path));
 }