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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e948746ff29e4ee9cea56b10190128563feebc90
4
- data.tar.gz: ca1a2b3bd5da8b9febba321863124b8ecbc30902
3
+ metadata.gz: e8d74a9e398b04071e03b89dc8f4c0d4ecde77e0
4
+ data.tar.gz: 1b821582e6409faf2213060afce1c4ca6dc7d8c2
5
5
  SHA512:
6
- metadata.gz: ca02a3f98fcbea5e0c9ef9ce8fac36a322b3a7526c9a391ebb812ffc0a61995d6d2d84dcbe9639fcc7e6521683232e5ff45ae7d9f6545e98495492bcd9b34e58
7
- data.tar.gz: 1285305eb0aca38fc1589f060505529a2d3cb887b0bdea4833fb50fa91957f9001b92355a056a98c3e6c9a1ba5af0a23142d07780fad234fff408803c73673db
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(name: camelcase_name)
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
- <%= name %>Controller = ->
1
+ <%= camelcase_name %>Controller = ->
2
2
  @title = '<%= name %>'
3
3
 
4
- <%= name %>Controller.$inject = []
4
+ <%= camelcase_name %>Controller.$inject = []
5
5
 
6
- angular.module('<%= name %>').controller('<%= name %>Controller', <%= name %>Controller)
6
+ angular.module('<%= camelcase_name %>').controller('<%= camelcase_name %>Controller', <%= camelcase_name %>Controller)
7
7
 
8
8
 
@@ -1,15 +1,15 @@
1
- describe '<%= name %>Controller', ->
1
+ describe '<%= camelcase_name %>Controller', ->
2
2
  controller = undefined
3
3
  beforeEach ->
4
- module '<%= name %>', ($provide) ->
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('<%= name %>Controller')
10
+ controller = $controller('<%= camelcase_name %>Controller')
11
11
 
12
- describe '<%= name %> controller', ->
12
+ describe '<%= camelcase_name %> controller', ->
13
13
  it 'should be created successfully', ->
14
14
  expect(controller).to.be.defined
15
15
 
@@ -1,4 +1,4 @@
1
- angular.module '<%= name %>', [
1
+ angular.module '<%= camelcase_name %>', [
2
2
  'ui.router'
3
3
  ]
4
4
 
@@ -1,13 +1,13 @@
1
- <%= name %>Routing = ($stateProvider) ->
1
+ <%= camelcase_name %>Routing = ($stateProvider) ->
2
2
  $stateProvider.state 'root.<%= name %>',
3
3
  url: '<%= name %>'
4
- templateUrl: 'app/<%= name %>/<%= name %>.html'
5
- controller: '<%= name %>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('<%= name %>').config(<%= name %>Routing)
12
+ angular.module('<%= camelcase_name %>').config(<%= camelcase_name %>Routing)
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Rugular
2
- VERSION = '0.8.6'
2
+ VERSION = '0.8.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rugular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Shook