Skip to content

Commit b41b0ec

Browse files
author
Rafael Grigorian
committed
Version 1.0.9 Complete
1 parent 7f29382 commit b41b0ec

File tree

66 files changed

+372
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+372
-170
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion

COMPATIBILITY.md

Lines changed: 28 additions & 0 deletions

Gruntfile.js

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -131,64 +131,6 @@ module.exports = function ( grunt ) {
131131
}
132132
});
133133

134-
grunt.task.registerTask ( "metadata", "initializes and replaces comment metadata", function () {
135-
// Loop through all the php files in source directory
136-
grunt.file.expand ("src/**/*.php").forEach ( function ( dir ) {
137-
// Extract the file name and the folder above it
138-
var filename = dir.split ("/") [ dir.split ("/").length - 1 ];
139-
var category = dir.split ("/") [ dir.split ("/").length - 2 ].toLowerCase ();
140-
filename = filename.replace ( ".php", "" );
141-
category = category.charAt ( 0 ).toUpperCase () + category.slice ( 1 );
142-
// Initialize the metadata header
143-
var header = "" +
144-
"\t * @version " + package.version + "\n" +
145-
"\t * @package " + package.company + " " + package.name + "\n" +
146-
"\t * @category " + category + "\n" +
147-
"\t * @author " + package.author + " - " + package.company + "\n";
148-
// If the package does not contain a copyright
149-
if ( package.copyright == null ) {
150-
// Append the license to it
151-
header += "\t * @license " + package.license + "\n";
152-
}
153-
// Otherwise, apply the copyright
154-
else {
155-
// Append the copyright to the header
156-
header += "\t * @copyright " + package.copyright + "\n";
157-
}
158-
// Initialize the replacement patterns
159-
var _patterns = [
160-
{
161-
match: /(\n[ \t]*\n[ \t]*)([ \t]+class [0-9a-zA-Z_]+(?: extends [0-9a-zA-Z_]+)?[ \t]*\{)/gm,
162-
replacement: "$1" + "\t/**\n" + "\t * " + filename + ".php - \n" + header + "\t */\n" + "$2"
163-
},
164-
{
165-
match: /\t\/\*\*\n\t \* [a-zA-Z]*\.php - ([a-zA-Z\W0-9\.\*]*?)\n\t \* @[a-zA-Z\W0-9\.\*]*\*\/\n\t(class [0-9a-zA-Z_]+(?: extends [0-9a-zA-Z_]+)?[ \t]*\{)/gm,
166-
replacement: "\t/**\n\t \* " + filename + ".php - $1\n" + header + "\t */\n" + "\t$2"
167-
},
168-
{
169-
match: /(\n[ \t]*\n)([ \t]*)([public|protected|private]+ function [a-zA-Z0-9_]+(?: )?\()([a-zA-Z0-9$_\:\/="', ]*)(\)(?: )?\{)/gm,
170-
replacement: "$1 $2\/**\n$2 * \n$2 * @return\n$2 *\/\n" + "$2$3$4$5"
171-
}
172-
];
173-
// Initialize which files are effected
174-
var _files = [
175-
{
176-
expand: true,
177-
flatten: false,
178-
src: [ dir ],
179-
dest: "."
180-
}
181-
];
182-
// Define a temp variable for the grunt name (for async execution)
183-
var temp = category.replace ( /_|\.|-/gm, "" ) + filename.replace ( /_|-|\./g, "" );
184-
// Update the options in grunt config
185-
grunt.config.set ( "replace." + temp + ".options.patterns", _patterns );
186-
grunt.config.set ( "replace." + temp + ".files", _files );
187-
// Run the replace task
188-
grunt.task.run ( "replace:" + temp + "" );
189-
});
190-
});
191-
192134
grunt.task.registerTask ( "resolve", "downloads jetrails dependency extensions", function () {
193135
// Run the dependency command
194136
grunt.task.run ( "init" );
@@ -213,8 +155,6 @@ module.exports = function ( grunt ) {
213155
// Run the dependency tasks
214156
grunt.task.run ( "init" );
215157
grunt.task.run ( "resolve" );
216-
// Update the metadata in comments
217-
grunt.task.run ( "metadata" );
218158
// Change version numbers
219159
grunt.task.run ( "version" );
220160
// Clear dist folder
@@ -237,10 +177,12 @@ module.exports = function ( grunt ) {
237177
});
238178
});
239179
// Define the output file
240-
var _output = package.name.replace ( "-", "_" ) + ".zip";
180+
var company = package.company.replace ( "®", "" );
181+
var name = package.name.replace ( "-", "_" );
182+
var _output = company + "_" + name + ".tgz";
241183
// Define other options
242184
grunt.config.set ( "compress.module.options.archive", "dist/" + _output );
243-
grunt.config.set ( "compress.module.options.mode", "zip" );
185+
grunt.config.set ( "compress.module.options.mode", "tgz" );
244186
grunt.config.set ( "compress.module.files", files );
245187
// Compress the module
246188
grunt.task.run ( "compress:module" );

LICENSE

Lines changed: 0 additions & 7 deletions
This file was deleted.

LICENSE.md

Lines changed: 21 additions & 0 deletions

README.md

Lines changed: 14 additions & 5 deletions

design/User_Guide.sketch

6.09 MB
Binary file not shown.

dist/JetRails_TwoFactor.tgz

50.5 KB
Binary file not shown.

dist/TwoFactor.zip

-57.9 KB
Binary file not shown.

doc/.DS_Store

8 KB
Binary file not shown.

0 commit comments

Comments
 (0)