rugular 0.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.travis.yml +4 -0
- data/Gemfile +5 -0
- data/README.md +149 -0
- data/Rakefile +11 -0
- data/bin/rugular +8 -0
- data/features/generator_for_directive.feature +35 -0
- data/features/generator_for_route.feature +40 -0
- data/features/new.feature +29 -0
- data/features/step_definitions/rugular_steps.rb +3 -0
- data/features/support/setup.rb +2 -0
- data/lib/rugular/tasks/build.rb +27 -0
- data/lib/rugular/tasks/dependencies.rb +28 -0
- data/lib/rugular/tasks/generate/directive.rb +11 -0
- data/lib/rugular/tasks/generate/generator_base.rb +81 -0
- data/lib/rugular/tasks/generate/route.rb +11 -0
- data/lib/rugular/tasks/generate.rb +44 -0
- data/lib/rugular/tasks/helpers/app_checker.rb +41 -0
- data/lib/rugular/tasks/new.rb +52 -0
- data/lib/rugular/tasks/server/Guardfile +22 -0
- data/lib/rugular/tasks/server/Procfile +5 -0
- data/lib/rugular/tasks/server.rb +28 -0
- data/lib/rugular/templates/directive/app.directive.coffee.erb +23 -0
- data/lib/rugular/templates/directive/app.directive.spec.coffee.erb +16 -0
- data/lib/rugular/templates/directive/app.haml.erb +1 -0
- data/lib/rugular/templates/directive/app.module.coffee.erb +2 -0
- data/lib/rugular/templates/directive/app.sass.erb +2 -0
- data/lib/rugular/templates/new/.gitignore +7 -0
- data/lib/rugular/templates/new/Gemfile +5 -0
- data/lib/rugular/templates/new/karma.conf.js +48 -0
- data/lib/rugular/templates/new/protractor.conf.js +32 -0
- data/lib/rugular/templates/new/src/app/app.controller.coffee +6 -0
- data/lib/rugular/templates/new/src/app/app.controller.spec.coffee +19 -0
- data/lib/rugular/templates/new/src/app/app.haml +1 -0
- data/lib/rugular/templates/new/src/app/app.module.coffee +4 -0
- data/lib/rugular/templates/new/src/app/app.routes.coffee +15 -0
- data/lib/rugular/templates/new/src/app/app.sass +2 -0
- data/lib/rugular/templates/new/src/favicon.ico +0 -0
- data/lib/rugular/templates/new/src/index.haml +21 -0
- data/lib/rugular/templates/new/test/spec_helper.js +168 -0
- data/lib/rugular/templates/new_erb/bower.json.erb +29 -0
- data/lib/rugular/templates/new_erb/package.json.erb +30 -0
- data/lib/rugular/templates/route/app.controller.coffee.erb +8 -0
- data/lib/rugular/templates/route/app.controller.spec.coffee.erb +19 -0
- data/lib/rugular/templates/route/app.haml.erb +1 -0
- data/lib/rugular/templates/route/app.module.coffee.erb +4 -0
- data/lib/rugular/templates/route/app.routes.coffee.erb +15 -0
- data/lib/rugular/templates/route/app.sass.erb +2 -0
- data/lib/rugular/version.rb +3 -0
- data/lib/rugular.rb +36 -0
- data/rugular.gemspec +33 -0
- metadata +255 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
<%= name %>Controller = ->
|
2
|
+
@title = <%= name %>
|
3
|
+
return
|
4
|
+
|
5
|
+
<%= name %>Controller.$inject = []
|
6
|
+
|
7
|
+
angular.module('<%= name %>').controller('<%= name %>Controller', <%= name %>Controller)
|
8
|
+
|
9
|
+
<%= name %> = ->
|
10
|
+
directive =
|
11
|
+
bindToController: true
|
12
|
+
controller: <%= name %>Controller
|
13
|
+
controllerAs: 'vm'
|
14
|
+
restrict: 'E'
|
15
|
+
templateUrl: 'components/<%= name %>/<%= name %>.html'
|
16
|
+
scope:
|
17
|
+
number: '='
|
18
|
+
|
19
|
+
return directive
|
20
|
+
|
21
|
+
<%= name %>.$inject = []
|
22
|
+
|
23
|
+
angular.module('<%= name %>').directive('<%= name %>', <%= name %>)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
describe '<%= name %>', ->
|
2
|
+
|
3
|
+
describe '<%= name %>Controller', ->
|
4
|
+
controller = undefined
|
5
|
+
|
6
|
+
beforeEach angular.mock.module('<%= name %>')
|
7
|
+
|
8
|
+
beforeEach angular.mock.inject(($controller) ->
|
9
|
+
controller = $controller('<%= name %>Controller')
|
10
|
+
return
|
11
|
+
)
|
12
|
+
|
13
|
+
it 'should be created successfully', ->
|
14
|
+
expect(controller).to.be.defined
|
15
|
+
return
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 <%= name %>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module.exports = function (config) {
|
2
|
+
config.set({
|
3
|
+
|
4
|
+
// base path that will be used to resolve all patterns (eg. files, exclude)
|
5
|
+
basePath: './',
|
6
|
+
|
7
|
+
frameworks: ['mocha', 'chai', 'sinon', 'chai-sinon'],
|
8
|
+
|
9
|
+
// list of files / patterns to load in the browser
|
10
|
+
files: [
|
11
|
+
'./test/*.js',
|
12
|
+
|
13
|
+
'./bower_components/angular/angular.js',
|
14
|
+
'./bower_components/angular-ui-router/release/angular-ui-router.js',
|
15
|
+
'./bower_components/angular-mocks/angular-mocks.js',
|
16
|
+
'./bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
|
17
|
+
|
18
|
+
'.tmp/**/*.module.js',
|
19
|
+
'.tmp/**/*.routes.js',
|
20
|
+
'.tmp/**/*.controller.js',
|
21
|
+
'.tmp/**/*.directive.js',
|
22
|
+
'.tmp/**/*.spec.js'
|
23
|
+
],
|
24
|
+
|
25
|
+
// web server port
|
26
|
+
port: 9876,
|
27
|
+
|
28
|
+
// enable / disable colors in the output (reporters and logs)
|
29
|
+
colors: true,
|
30
|
+
|
31
|
+
// level of logging
|
32
|
+
// possible values: config.LOG_DISABLE || config.LOG_ERROR ||
|
33
|
+
// config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
34
|
+
logLevel: config.LOG_INFO,
|
35
|
+
|
36
|
+
// enable / disable watching file and executing tests whenever any file changes
|
37
|
+
autoWatch: true,
|
38
|
+
|
39
|
+
// start these browsers
|
40
|
+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
41
|
+
// browsers: ['Chrome', 'ChromeCanary', 'FirefoxAurora', 'Safari', 'PhantomJS'],
|
42
|
+
browsers: ['PhantomJS'],
|
43
|
+
|
44
|
+
// Continuous Integration mode
|
45
|
+
// if true, Karma captures browsers, runs the tests and exits
|
46
|
+
singleRun: false
|
47
|
+
});
|
48
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require('coffee-script').register();
|
2
|
+
require('mocha');
|
3
|
+
|
4
|
+
// An example configuration file
|
5
|
+
exports.config = {
|
6
|
+
// The address of a running selenium server.
|
7
|
+
seleniumAddress: 'http://localhost:4444/wd/hub',
|
8
|
+
|
9
|
+
// Use mocha
|
10
|
+
frameworks: ['mocha', 'chai'],
|
11
|
+
|
12
|
+
// Capabilities to be passed to the webdriver instance.
|
13
|
+
capabilities: {
|
14
|
+
'browserName': 'firefox'
|
15
|
+
},
|
16
|
+
|
17
|
+
// Spec patterns are relative to the configuration file location passed
|
18
|
+
// to proractor (in this example conf.js).
|
19
|
+
// They may include glob patterns.
|
20
|
+
specs: ['./e2e/**/*.coffee'],
|
21
|
+
|
22
|
+
baseUrl: 'http://localhost:8080/',
|
23
|
+
|
24
|
+
mochaOpts: {
|
25
|
+
reporter: "spec",
|
26
|
+
slow: 3000
|
27
|
+
},
|
28
|
+
|
29
|
+
onPrepare: function() {
|
30
|
+
global.By = global.by;
|
31
|
+
}
|
32
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe 'AppController', ->
|
2
|
+
controller = undefined
|
3
|
+
beforeEach ->
|
4
|
+
module 'app', ($provide) ->
|
5
|
+
specHelper.fakeStateProvider $provide
|
6
|
+
specHelper.fakeLogger $provide
|
7
|
+
|
8
|
+
specHelper.injector ($controller, $q, $rootScope) ->
|
9
|
+
|
10
|
+
controller = $controller('AppController')
|
11
|
+
|
12
|
+
describe 'App controller', ->
|
13
|
+
it 'should be created successfully', ->
|
14
|
+
expect(controller).to.be.defined
|
15
|
+
|
16
|
+
it 'should have title of App', ->
|
17
|
+
expect(controller.title).to.equal 'App'
|
18
|
+
|
19
|
+
specHelper.verifyNoOutstandingHttpRequests()
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 {{ app.title }}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
AppRouting = ($stateProvider, $urlRouterProvider) ->
|
2
|
+
$urlRouterProvider.otherwise('/')
|
3
|
+
|
4
|
+
$stateProvider.state 'root',
|
5
|
+
url: '/'
|
6
|
+
templateUrl: './app/app.html'
|
7
|
+
controller: 'AppController'
|
8
|
+
controllerAs: 'app'
|
9
|
+
|
10
|
+
return
|
11
|
+
|
12
|
+
AppRouting.$inject = ['$stateProvider', '$urlRouterProvider']
|
13
|
+
|
14
|
+
angular.module('app').config(AppRouting)
|
15
|
+
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
!!!
|
2
|
+
%html{"ng-app" => "app"}
|
3
|
+
%head
|
4
|
+
%title Hello
|
5
|
+
|
6
|
+
/it is recommended to cherry pick which bower components you want
|
7
|
+
= stylesheet_link_tag("./bower_components/bootstrap/dist/css/bootstrap.min.css")
|
8
|
+
= stylesheet_link_tag("./bower_components/font-awesome/css/font-awesome.min.css")
|
9
|
+
= stylesheet_link_tag(*Dir.glob("./dev/[^bower_components]**/*.css"))
|
10
|
+
|
11
|
+
%body
|
12
|
+
/[if lt IE 9] <a href='lthttp://browsehappy.com/'> You are using an out of date browser; this is very dangerous. I strongly urge you to update today.</a>
|
13
|
+
|
14
|
+
%ui-view
|
15
|
+
|
16
|
+
/it is recommended to cherry pick which bower components you want
|
17
|
+
= javascript_include_tag("./bower_components/angular/angular.js")
|
18
|
+
= javascript_include_tag("./bower_components/angular-ui-router/release/angular-ui-router.js")
|
19
|
+
= javascript_include_tag(*Dir.glob(".tmp/**/*.module.js"))
|
20
|
+
= javascript_include_tag(*Dir.glob(".tmp/**/*.routes.js"))
|
21
|
+
= javascript_include_tag(*Dir.glob(".tmp/**/*.controller.js"))
|
@@ -0,0 +1,168 @@
|
|
1
|
+
/* jshint -W079 */
|
2
|
+
var specHelper = (function() {
|
3
|
+
var service = {
|
4
|
+
fakeLogger: fakeLogger,
|
5
|
+
fakeRouteProvider: fakeRouteProvider,
|
6
|
+
fakeStateProvider: fakeStateProvider,
|
7
|
+
injector: injector,
|
8
|
+
verifyNoOutstandingHttpRequests: verifyNoOutstandingHttpRequests
|
9
|
+
};
|
10
|
+
return service;
|
11
|
+
|
12
|
+
function fakeLogger($provide) {
|
13
|
+
$provide.value('logger', sinon.stub({
|
14
|
+
info: function() {},
|
15
|
+
error: function() {},
|
16
|
+
warning: function() {},
|
17
|
+
success: function() {}
|
18
|
+
}));
|
19
|
+
}
|
20
|
+
|
21
|
+
function fakeStateProvider($provide) {
|
22
|
+
/**
|
23
|
+
* Stub out the $stateProvider so we avoid
|
24
|
+
* all routing calls, including the default state
|
25
|
+
* which runs on every test otherwise.
|
26
|
+
* Make sure this goes before the inject in the spec.
|
27
|
+
*/
|
28
|
+
$provide.provider('$state', function() {
|
29
|
+
/* jshint validthis:true */
|
30
|
+
this.state = sinon.stub();
|
31
|
+
|
32
|
+
this.$get = function() {
|
33
|
+
return {
|
34
|
+
// current: {}, // fake before each test as needed
|
35
|
+
// state: {} // fake before each test as needed
|
36
|
+
// more? You'll know when it fails :-)
|
37
|
+
};
|
38
|
+
};
|
39
|
+
});
|
40
|
+
$provide.provider('$urlRouter', function() {
|
41
|
+
/* jshint validthis:true */
|
42
|
+
this.otherwise = sinon.stub();
|
43
|
+
|
44
|
+
this.$get = function() {
|
45
|
+
return {
|
46
|
+
// current: {}, // fake before each test as needed
|
47
|
+
// states: {} // fake before each test as needed
|
48
|
+
// more? You'll know when it fails :-)
|
49
|
+
};
|
50
|
+
};
|
51
|
+
});
|
52
|
+
}
|
53
|
+
|
54
|
+
function fakeRouteProvider($provide) {
|
55
|
+
/**
|
56
|
+
* Stub out the $routeProvider so we avoid
|
57
|
+
* all routing calls, including the default route
|
58
|
+
* which runs on every test otherwise.
|
59
|
+
* Make sure this goes before the inject in the spec.
|
60
|
+
*/
|
61
|
+
$provide.provider('$route', function() {
|
62
|
+
/* jshint validthis:true */
|
63
|
+
this.when = sinon.stub();
|
64
|
+
this.otherwise = sinon.stub();
|
65
|
+
|
66
|
+
this.$get = function() {
|
67
|
+
return {
|
68
|
+
// current: {}, // fake before each test as needed
|
69
|
+
// routes: {} // fake before each test as needed
|
70
|
+
// more? You'll know when it fails :-)
|
71
|
+
};
|
72
|
+
};
|
73
|
+
});
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Inspired by Angular; that's how they get the parms for injection
|
78
|
+
*/
|
79
|
+
function getFnParams (fn) {
|
80
|
+
var fnText;
|
81
|
+
var argDecl;
|
82
|
+
|
83
|
+
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
|
84
|
+
var FN_ARG_SPLIT = /,/;
|
85
|
+
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
|
86
|
+
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
87
|
+
var params = [];
|
88
|
+
if (fn.length) {
|
89
|
+
fnText = fn.toString().replace(STRIP_COMMENTS, '');
|
90
|
+
argDecl = fnText.match(FN_ARGS);
|
91
|
+
angular.forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {
|
92
|
+
arg.replace(FN_ARG, function(all, underscore, name) {
|
93
|
+
params.push(name);
|
94
|
+
});
|
95
|
+
});
|
96
|
+
}
|
97
|
+
return params;
|
98
|
+
}
|
99
|
+
|
100
|
+
function injector () {
|
101
|
+
var annotation,
|
102
|
+
body = '',
|
103
|
+
cleanupBody = '',
|
104
|
+
mustAnnotate = false,
|
105
|
+
params;
|
106
|
+
|
107
|
+
if (typeof arguments[0] === 'function') {
|
108
|
+
params = getFnParams(arguments[0]);
|
109
|
+
}
|
110
|
+
// else from here on assume that arguments are all strings
|
111
|
+
else if (angular.isArray(arguments[0])) {
|
112
|
+
params = arguments[0];
|
113
|
+
}
|
114
|
+
else {
|
115
|
+
params = Array.prototype.slice.call(arguments);
|
116
|
+
}
|
117
|
+
|
118
|
+
annotation = params.join('\',\''); // might need to annotate
|
119
|
+
|
120
|
+
angular.forEach(params, function(name, ix) {
|
121
|
+
var _name,
|
122
|
+
pathName = name.split('.'),
|
123
|
+
pathLen = pathName.length;
|
124
|
+
|
125
|
+
if (pathLen > 1) {
|
126
|
+
// name is a path like 'block.foo'. Can't use as identifier
|
127
|
+
// assume last segment should be identifier name, e.g. 'foo'
|
128
|
+
name = pathName[pathLen - 1];
|
129
|
+
mustAnnotate = true;
|
130
|
+
}
|
131
|
+
|
132
|
+
_name = '_' + name + '_';
|
133
|
+
params[ix] = _name;
|
134
|
+
body += name + '=' + _name + ';';
|
135
|
+
cleanupBody += 'delete window.' + name + ';';
|
136
|
+
|
137
|
+
// todo: tolerate component names that are invalid JS identifiers, e.g. 'burning man'
|
138
|
+
});
|
139
|
+
|
140
|
+
var fn = 'function(' + params.join(',') + '){' + body + '}';
|
141
|
+
|
142
|
+
if (mustAnnotate) {
|
143
|
+
fn = '[\'' + annotation + '\',' + fn + ']';
|
144
|
+
}
|
145
|
+
|
146
|
+
var exp = 'inject(' + fn + ');' +
|
147
|
+
'afterEach(function(){' + cleanupBody + '});'; // remove from window.
|
148
|
+
|
149
|
+
//Function(exp)(); // the assigned vars will be global. `afterEach` will remove them
|
150
|
+
/* jshint evil:true */
|
151
|
+
new Function(exp)();
|
152
|
+
|
153
|
+
// Alternative that would not touch window but would require eval()!!
|
154
|
+
// Don't do `Function(exp)()` and don't do afterEach cleanup
|
155
|
+
// Instead do ..
|
156
|
+
// return exp;
|
157
|
+
//
|
158
|
+
// Then caller must say something like:
|
159
|
+
// eval(specHelper.injector('$log', 'foo'));
|
160
|
+
}
|
161
|
+
|
162
|
+
function verifyNoOutstandingHttpRequests () {
|
163
|
+
afterEach(inject(function($httpBackend) {
|
164
|
+
$httpBackend.verifyNoOutstandingExpectation();
|
165
|
+
$httpBackend.verifyNoOutstandingRequest();
|
166
|
+
}));
|
167
|
+
}
|
168
|
+
})();
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "<%= name %>",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "",
|
5
|
+
"authors": [
|
6
|
+
],
|
7
|
+
"license": "MIT",
|
8
|
+
"homepage": "",
|
9
|
+
"ignore": [
|
10
|
+
"**/.*",
|
11
|
+
"node_modules",
|
12
|
+
"bower_components",
|
13
|
+
"test",
|
14
|
+
"tests"
|
15
|
+
],
|
16
|
+
"devDependencies": {
|
17
|
+
"angular-mocks": "~1.2"
|
18
|
+
},
|
19
|
+
"dependencies": {
|
20
|
+
"angular": "~1.2",
|
21
|
+
"angular-sanitize": "~1.2",
|
22
|
+
"bootstrap": "~3.2.0",
|
23
|
+
"font-awesome": "~4.2.0",
|
24
|
+
"moment": "~2.6.0",
|
25
|
+
"angular-ui-router": "~0.2.12",
|
26
|
+
"toastr": "~2.1.0",
|
27
|
+
"angular-animate": "~1.2"
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"name": "<%= name %>",
|
3
|
+
"version": "0.0.0",
|
4
|
+
"devDependencies": {
|
5
|
+
"browser-sync": "*",
|
6
|
+
"chai": "*",
|
7
|
+
"chai-as-promised": "*",
|
8
|
+
"chalk": "*",
|
9
|
+
"coffee-script": "*",
|
10
|
+
"debug": "*",
|
11
|
+
"jshint-stylish": "*",
|
12
|
+
"karma": "*",
|
13
|
+
"karma-chai": "*",
|
14
|
+
"karma-chai-sinon": "*",
|
15
|
+
"karma-chrome-launcher": "*",
|
16
|
+
"karma-coverage": "*",
|
17
|
+
"karma-firefox-launcher": "*",
|
18
|
+
"karma-growl-reporter": "*",
|
19
|
+
"karma-mocha": "*",
|
20
|
+
"karma-phantomjs-launcher": "*",
|
21
|
+
"karma-safari-launcher": "*",
|
22
|
+
"karma-sinon": "*",
|
23
|
+
"mocha": "*",
|
24
|
+
"phantomjs": "*",
|
25
|
+
"plato": "*",
|
26
|
+
"protractor": "*",
|
27
|
+
"sinon": "*",
|
28
|
+
"sinon-chai": "*"
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
describe '<%= name %>Controller', ->
|
2
|
+
controller = undefined
|
3
|
+
beforeEach ->
|
4
|
+
module '<%= name %>', ($provide) ->
|
5
|
+
specHelper.fakeStateProvider $provide
|
6
|
+
specHelper.fakeLogger $provide
|
7
|
+
|
8
|
+
specHelper.injector ($controller, $q, $rootScope) ->
|
9
|
+
|
10
|
+
controller = $controller('<%= name %>Controller')
|
11
|
+
|
12
|
+
describe '<%= name %> controller', ->
|
13
|
+
it 'should be created successfully', ->
|
14
|
+
expect(controller).to.be.defined
|
15
|
+
|
16
|
+
it 'should have title of <%= name %>', ->
|
17
|
+
expect(controller.title).to.equal '<%= name %>'
|
18
|
+
|
19
|
+
specHelper.verifyNoOutstandingHttpRequests()
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 <%= name %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= name %>Routing = ($stateProvider, $urlRouterProvider) ->
|
2
|
+
$urlRouterProvider.otherwise('/')
|
3
|
+
|
4
|
+
$stateProvider.state '<%= name %>',
|
5
|
+
url: '<%= name %>'
|
6
|
+
templateUrl: './<%= name %>/index.html'
|
7
|
+
controller: '<%= name %>Controller'
|
8
|
+
controllerAs: '<%= name %>'
|
9
|
+
|
10
|
+
return
|
11
|
+
|
12
|
+
<%= name %>Routing.$inject = ['$stateProvider', '$urlRouterProvider']
|
13
|
+
|
14
|
+
angular.module('<%= name %>').config(<%= name %>Routing)
|
15
|
+
|
data/lib/rugular.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
Dir["#{__dir__}/**/*.rb"].each { |f| require f }
|
2
|
+
|
3
|
+
module Rugular
|
4
|
+
class Rugular < Thor
|
5
|
+
|
6
|
+
register(New, 'new', 'new', 'create a new Rugular project')
|
7
|
+
|
8
|
+
register(
|
9
|
+
Dependencies,
|
10
|
+
'dependencies',
|
11
|
+
'dependencies',
|
12
|
+
'install project dependencies'
|
13
|
+
)
|
14
|
+
|
15
|
+
register(
|
16
|
+
Server,
|
17
|
+
'server',
|
18
|
+
'server',
|
19
|
+
'start the Rugular server'
|
20
|
+
)
|
21
|
+
|
22
|
+
register(
|
23
|
+
Build,
|
24
|
+
'build',
|
25
|
+
'build',
|
26
|
+
'build the Rugular distribution'
|
27
|
+
)
|
28
|
+
|
29
|
+
register(
|
30
|
+
Generate,
|
31
|
+
'generate',
|
32
|
+
'generate',
|
33
|
+
'generate an angular service'
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
data/rugular.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rugular/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rugular'
|
8
|
+
spec.version = Rugular::VERSION
|
9
|
+
spec.authors = ['Nicholas Shook']
|
10
|
+
spec.email = ['nshook@q-centrix.com']
|
11
|
+
spec.summary = %q{Rugular - a ruby scaffolding framework for AngularJS}
|
12
|
+
spec.homepage = 'http://rugular.info'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_runtime_dependency 'actionview', '~> 4'
|
21
|
+
spec.add_runtime_dependency 'guard', '~> 2'
|
22
|
+
# spec.add_runtime_dependency 'guard-coffeescript', '~> 2'
|
23
|
+
spec.add_runtime_dependency 'guard-sass', '~> 1'
|
24
|
+
spec.add_runtime_dependency 'foreman', '~> 0'
|
25
|
+
spec.add_runtime_dependency 'therubyracer', '~> 0'
|
26
|
+
spec.add_runtime_dependency 'thor', '~> 0'
|
27
|
+
spec.add_runtime_dependency 'uglifier', '~> 2'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'aruba', '~> 0'
|
30
|
+
spec.add_development_dependency 'byebug', '~> 3'
|
31
|
+
spec.add_development_dependency 'pry', '~> 0'
|
32
|
+
spec.add_development_dependency 'rake', '~> 10'
|
33
|
+
end
|