rugular 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rugular/tasks/generate/generator_base.rb +6 -1
- data/lib/rugular/templates/route/app.controller.coffee.erb +3 -3
- data/lib/rugular/templates/route/app.controller.spec.coffee.erb +4 -4
- data/lib/rugular/templates/route/app.module.coffee.erb +1 -1
- data/lib/rugular/templates/route/app.routes.coffee.erb +4 -4
- data/lib/rugular/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d74a9e398b04071e03b89dc8f4c0d4ecde77e0
|
4
|
+
data.tar.gz: 1b821582e6409faf2213060afce1c4ca6dc7d8c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5826c34900a237e135b882adc6cf37eaf19e470b2f9396ab9a75dede8ed4af5a705efb4d973b8bdc7e9757cc29074ee0841580d42cea1faace0e3277ddbe6fc1
|
7
|
+
data.tar.gz: 92c55f2fa5a0d27786bec5e73a64156e18b2710b17d5bdc6368024df7ffc208a58ce7373ae59bca42abb8d85ca6393618ebee0f57d2ed4c24b2fe6f6bdeb2a08
|
@@ -74,7 +74,12 @@ module Rugular
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def open_struct
|
77
|
-
@_open_struct ||= OpenStruct.new(
|
77
|
+
@_open_struct ||= OpenStruct.new(
|
78
|
+
name: name.split(':').last,
|
79
|
+
full_name: name.gsub(':', '/'),
|
80
|
+
camelcase_name: camelcase_name,
|
81
|
+
app_or_component: app_or_component
|
82
|
+
)
|
78
83
|
end
|
79
84
|
|
80
85
|
def app_module_file
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= camelcase_name %>Controller = ->
|
2
2
|
@title = '<%= name %>'
|
3
3
|
|
4
|
-
<%=
|
4
|
+
<%= camelcase_name %>Controller.$inject = []
|
5
5
|
|
6
|
-
angular.module('<%=
|
6
|
+
angular.module('<%= camelcase_name %>').controller('<%= camelcase_name %>Controller', <%= camelcase_name %>Controller)
|
7
7
|
|
8
8
|
|
@@ -1,15 +1,15 @@
|
|
1
|
-
describe '<%=
|
1
|
+
describe '<%= camelcase_name %>Controller', ->
|
2
2
|
controller = undefined
|
3
3
|
beforeEach ->
|
4
|
-
module '<%=
|
4
|
+
module '<%= camelcase_name %>', ($provide) ->
|
5
5
|
specHelper.fakeStateProvider $provide
|
6
6
|
specHelper.fakeLogger $provide
|
7
7
|
|
8
8
|
specHelper.injector ($controller, $q, $rootScope) ->
|
9
9
|
|
10
|
-
controller = $controller('<%=
|
10
|
+
controller = $controller('<%= camelcase_name %>Controller')
|
11
11
|
|
12
|
-
describe '<%=
|
12
|
+
describe '<%= camelcase_name %> controller', ->
|
13
13
|
it 'should be created successfully', ->
|
14
14
|
expect(controller).to.be.defined
|
15
15
|
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<%=
|
1
|
+
<%= camelcase_name %>Routing = ($stateProvider) ->
|
2
2
|
$stateProvider.state 'root.<%= name %>',
|
3
3
|
url: '<%= name %>'
|
4
|
-
templateUrl: '
|
5
|
-
controller: '<%=
|
4
|
+
templateUrl: '<%= app_or_component %>/<%= full_name %>/<%= name %>.html'
|
5
|
+
controller: '<%= camelcase_name %>Controller'
|
6
6
|
controllerAs: '<%= name %>'
|
7
7
|
|
8
8
|
return
|
9
9
|
|
10
10
|
<%= name %>Routing.$inject = ['$stateProvider']
|
11
11
|
|
12
|
-
angular.module('<%=
|
12
|
+
angular.module('<%= camelcase_name %>').config(<%= camelcase_name %>Routing)
|
13
13
|
|
data/lib/rugular/version.rb
CHANGED