Permalink
Browse files

Rename Middleware to lower case

  • Loading branch information...
1 parent 6c96de1 commit 5de509ce226fe9a750a70512a981f49d22bea152 @peterblazejewicz peterblazejewicz committed Jul 24, 2016
View
@@ -1,8 +0,0 @@
-Description:
- Creates a new C# Middleware class file
-
-Example:
- yo aspnet:Middleware filename
-
- This will create:
- filename.cs
View
@@ -113,7 +113,7 @@ The alphabetic list of available sub generators (_to create files after the proj
* [aspnet:json](#json)
* [aspnet:jsonschema](#jsonschema)
* [aspnet:jsx](#jsx)
-* [aspnet:Middleware](#middleware)
+* [aspnet:middleware](#middleware)
* [aspnet:MvcController](#mvccontroller)
* [aspnet:MvcView](#mvcview)
* [aspnet:nuget](#nuget)
@@ -404,14 +404,14 @@ Produces `filename.jsx`
[Return to top](#top)
-### Middleware
+### middleware
-Creates a new C# Middleware class file
+Creates a new C# middleware class file
Example:
```
-yo aspnet:Middleware filename
+yo aspnet:middleware filename
```
Produces `filename.cs`
View
@@ -22,7 +22,7 @@ Subgenerators:
yo aspnet:javascript [options] <name>
yo aspnet:json [options] <name>
yo aspnet:jsonschema [options] <name>
- yo aspnet:Middleware [options] <name>
+ yo aspnet:middleware [options] <name>
yo aspnet:MvcController [options] <name>
yo aspnet:MvcView [options] <name>
yo aspnet:nuget [options]
View
@@ -0,0 +1,8 @@
+Description:
+ Creates a new C# middleware class file
+
+Example:
+ yo aspnet:middleware filename
+
+ This will create:
+ filename.cs
@@ -11,7 +11,7 @@ util.inherits(NamedGenerator, ScriptBase);
NamedGenerator.prototype.createNamedItem = function() {
var extension = '.cs';
this.generateTemplateFile(
- 'Middleware.cs',
+ 'middleware.cs',
extension, {
namespace: this.namespace(),
classname: this.classNameWithoutExtension(extension)
File renamed without changes.
View
@@ -423,26 +423,26 @@ describe('Subgenerators with named arguments tests', function() {
util.fileContentCheck(filename, 'Check file content', /my MySchema JSON format/);
});
- describe('aspnet:Middleware without extension', function() {
+ describe('aspnet:middleware without extension', function() {
var arg = 'MyMiddleware';
var filename = 'MyMiddleware.cs';
- util.goCreateWithArgs('Middleware', [arg]);
+ util.goCreateWithArgs('middleware', [arg]);
util.fileCheck('should create ' + filename + ' file', filename);
util.fileContentCheck(filename, 'Check file content', /[ ]*public[ ]*class[ ]*MyMiddleware/);
util.fileContentCheck(filename, 'Check file content', /[ ]*public[ ]*static[ ]*class[ ]*MyMiddlewareExtensions/);
util.fileContentCheck(filename, 'Check file content', /[ ]*IApplicationBuilder[ ]*UseMyMiddleware/);
});
- describe('aspnet:Middleware with extension', function() {
+ describe('aspnet:middleware with extension', function() {
var filename = 'MyMiddleware.cs';
- util.goCreateWithArgs('Middleware', [filename]);
+ util.goCreateWithArgs('middleware', [filename]);
util.fileCheck('should create ' + filename + ' file', filename);
util.fileContentCheck(filename, 'Check file content', /[ ]*public[ ]*class[ ]*MyMiddleware/);
util.fileContentCheck(filename, 'Check file content', /[ ]*public[ ]*static[ ]*class[ ]*MyMiddlewareExtensions/);
util.fileContentCheck(filename, 'Check file content', /[ ]*IApplicationBuilder[ ]*UseMyMiddleware/);
});
- describe('aspnet:Middleware in cwd of project.json', function() {
+ describe('aspnet:middleware in cwd of project.json', function() {
var dir = util.makeTempDir();
util.goCreateApplication('classlibrary', 'emptyTest', dir);
@@ -451,7 +451,7 @@ describe('Subgenerators with named arguments tests', function() {
var filename = 'MyMiddleware.cs';
console.log(arg, dir);
- util.goCreateWithArgs('Middleware', [arg], path.join(dir, 'emptyTest'));
+ util.goCreateWithArgs('middleware', [arg], path.join(dir, 'emptyTest'));
util.fileCheck('should create ' + filename + ' file', filename);
util.fileContentCheck(filename, 'Check file content', /[ ]*public[ ]*class[ ]*MyMiddleware/);
util.fileContentCheck(filename, 'Check file content', 'namespace emptyTest');

0 comments on commit 5de509c

Please sign in to comment.