rugular 0.9.5 → 0.9.6
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 +4 -4
- data/lib/rugular/tasks/generate/generator_base.rb +17 -1
- data/lib/rugular/templates/directive/app.haml.erb +1 -0
- data/lib/rugular/templates/new/karma.conf.js +41 -14
- data/lib/rugular/templates/route/app.haml.erb +1 -0
- data/lib/rugular/version.rb +1 -1
- metadata +4 -4
- data/lib/rugular/templates/directive/app.jade.erb +0 -1
- data/lib/rugular/templates/route/app.jade.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf27b87be40049829242854b1b8dbae32ae36ff
|
4
|
+
data.tar.gz: 56c8c8aadc99a04ee41a3d1b170ac2ea4a45a7f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cc70dabfbbe562fe2e2dd3f932de3863c7a22c1afd2131783ad0e5e6b90af4577b36da55f66948ca43d156fa171f7e889f07f27776429c662c2a800b9667cb
|
7
|
+
data.tar.gz: 451e992bc239666641308cc87143790d09fb3f1c660dc5943a447e9bd400633c876f2e217bacc1ab559c4dc4648eec3da7589494b2e282b19743380d6609d0ec
|
@@ -10,7 +10,7 @@ module Rugular
|
|
10
10
|
class_option(
|
11
11
|
:c,
|
12
12
|
type: :boolean,
|
13
|
-
desc: 'create the
|
13
|
+
desc: 'create the route in the component folder'
|
14
14
|
)
|
15
15
|
|
16
16
|
def self.source_root
|
@@ -31,6 +31,22 @@ module Rugular
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
def inject_module_into_module
|
35
|
+
if nested?
|
36
|
+
insert_into_file(
|
37
|
+
nested_module_file,
|
38
|
+
module_declaration,
|
39
|
+
after: "angular.module '#{nested_module_name}', [\n"
|
40
|
+
) unless module_declaration_present?(nested_module_file)
|
41
|
+
else
|
42
|
+
insert_into_file(
|
43
|
+
app_module_file,
|
44
|
+
module_declaration,
|
45
|
+
after: "angular.module 'app', [\n"
|
46
|
+
) unless module_declaration_present?(app_module_file)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
34
50
|
def template_files; []; end
|
35
51
|
|
36
52
|
protected
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 <%= name %>
|
@@ -1,4 +1,44 @@
|
|
1
|
+
var yaml = require('js-yaml')
|
2
|
+
var fs = require('fs')
|
3
|
+
var _ = require('lodash')
|
4
|
+
|
1
5
|
module.exports = function (config) {
|
6
|
+
loadBowerComponentYamlAndSrcFiles = function() {
|
7
|
+
this.bowerComponentFile = fs.readFileSync(
|
8
|
+
'bower_components.yaml',
|
9
|
+
'utf8',
|
10
|
+
function (err, data) {
|
11
|
+
console.log(data)
|
12
|
+
console.log(err)
|
13
|
+
return data
|
14
|
+
});
|
15
|
+
this.yaml = yaml.load(this.bowerComponentFile)
|
16
|
+
|
17
|
+
this.javascriptFiles = this.yaml.js.concat(this.yaml.test)
|
18
|
+
|
19
|
+
this.addBowerComponentDirectory = function (javascriptFile) {
|
20
|
+
return './bower_components/' + javascriptFile;
|
21
|
+
};
|
22
|
+
|
23
|
+
this.bowerComponentFiles = _.map(
|
24
|
+
javascriptFiles,
|
25
|
+
addBowerComponentDirectory
|
26
|
+
);
|
27
|
+
|
28
|
+
this.applicationFiles = [
|
29
|
+
'src/**/*.module.coffee',
|
30
|
+
'src/**/*.routes.coffee',
|
31
|
+
'src/**/*.factory.coffee',
|
32
|
+
'src/**/*.controller.coffee',
|
33
|
+
'src/**/*.directive.coffee',
|
34
|
+
'src/**/*.spec.coffee'
|
35
|
+
]
|
36
|
+
|
37
|
+
this.karmaFiles = this.bowerComponentFiles.concat(this.applicationFiles)
|
38
|
+
|
39
|
+
return this.karmaFiles
|
40
|
+
}
|
41
|
+
|
2
42
|
config.set({
|
3
43
|
|
4
44
|
// base path that will be used to resolve all patterns (eg. files, exclude)
|
@@ -23,20 +63,7 @@ module.exports = function (config) {
|
|
23
63
|
},
|
24
64
|
|
25
65
|
// list of files / patterns to load in the browser
|
26
|
-
files:
|
27
|
-
'./test/*.js',
|
28
|
-
|
29
|
-
'./bower_components/angular/angular.js',
|
30
|
-
'./bower_components/angular-ui-router/release/angular-ui-router.js',
|
31
|
-
'./bower_components/angular-mocks/angular-mocks.js',
|
32
|
-
|
33
|
-
'src/**/*.module.coffee',
|
34
|
-
'src/**/*.routes.coffee',
|
35
|
-
'src/**/*.factory.coffee',
|
36
|
-
'src/**/*.controller.coffee',
|
37
|
-
'src/**/*.directive.coffee',
|
38
|
-
'src/**/*.spec.coffee'
|
39
|
-
],
|
66
|
+
files: loadBowerComponentYamlAndSrcFiles(),
|
40
67
|
|
41
68
|
// web server port
|
42
69
|
port: 9876,
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 <%= name %>
|
data/lib/rugular/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rugular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Shook
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -349,7 +349,7 @@ files:
|
|
349
349
|
- lib/rugular/templates/directive/app.controller.coffee.erb
|
350
350
|
- lib/rugular/templates/directive/app.directive.coffee.erb
|
351
351
|
- lib/rugular/templates/directive/app.directive.spec.coffee.erb
|
352
|
-
- lib/rugular/templates/directive/app.
|
352
|
+
- lib/rugular/templates/directive/app.haml.erb
|
353
353
|
- lib/rugular/templates/directive/app.module.coffee.erb
|
354
354
|
- lib/rugular/templates/factory/app.factory.coffee.erb
|
355
355
|
- lib/rugular/templates/factory/app.module.coffee.erb
|
@@ -379,7 +379,7 @@ files:
|
|
379
379
|
- lib/rugular/templates/route/_app.sass.erb
|
380
380
|
- lib/rugular/templates/route/app.controller.coffee.erb
|
381
381
|
- lib/rugular/templates/route/app.controller.spec.coffee.erb
|
382
|
-
- lib/rugular/templates/route/app.
|
382
|
+
- lib/rugular/templates/route/app.haml.erb
|
383
383
|
- lib/rugular/templates/route/app.module.coffee.erb
|
384
384
|
- lib/rugular/templates/route/app.routes.coffee.erb
|
385
385
|
- lib/rugular/templates/server/application.sass
|
@@ -1 +0,0 @@
|
|
1
|
-
h1 <%= name %>
|
@@ -1 +0,0 @@
|
|
1
|
-
h1 <%= name %>
|