rugular 0.9.0 → 0.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5f48107191ea322aa2d1538b45ee453c638a71f
4
- data.tar.gz: 6e57b10629f6e1cc8bd348fcd9fb9bc5c74d4768
3
+ metadata.gz: d43d1862e8b53e8914e53eb844cd452a1f205bb7
4
+ data.tar.gz: 6e8b2033c7b078eee9e65e5374eca16658d0e549
5
5
  SHA512:
6
- metadata.gz: 81cf22fd329eb700ed88f376fdc073c80057015986e23ef4739d6d2b91a59b2b8c3217f3407421402d051407a206e65589d91d20634fd27e3cce5d1fd168998f
7
- data.tar.gz: 07a5605f5f31fa252767dfacfbe32e7c702f08102f085b2e47a30d31edc3b8ac4074ceaf6db76e5c374a288bc3d000667b444d0a089506ee98663089dee3e033
6
+ metadata.gz: 6593f7dc21173535117196316cd9b83437a09a2337043354477673d7854941c3118afc1b56c35047838a97a7315d348bca46a533d525469ab8d22f30541a07ab
7
+ data.tar.gz: 5e2e500793fc46f6ae108ca46a78c1dd886f5daf51093314df601d62c1a9dee9471e21abc612c5e111e37b51ff1bc0d5be0c0d1079f00b97dc9f293596243be8
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- ![Build
2
- Status](https://circleci.com/gh/currica/rugular.svg?style=shield&circle-token=:circle-token)
1
+ [![Circle
2
+ CI](https://circleci.com/gh/q-centrix/rugular/tree/master.svg?style=svg)](https://circleci.com/gh/q-centrix/rugular/tree/master)
3
3
 
4
4
  # Rugular
5
5
 
@@ -4,24 +4,26 @@ Feature: Rugular CLI
4
4
  As a user of the rugular framework
5
5
  I want to create a bower_component from my rugular application
6
6
 
7
- # Scenario: Abstracting components folder
8
- # When I set up Rugular and run "rugular g directive test && rugular abstract -c"
9
- # Then the file "my-app/bower.json" should contain:
10
- # """
11
- # "version": "0.0.0",
12
- # """
13
- # And a file named "my-app/release/my-app.js" should exist
14
- # And a file named "my-app/release/my-app.css" should exist
7
+ Scenario: Abstracting components folder
8
+ When I set up Rugular and run "rugular g directive test && rugular abstract -c"
9
+ Then the file "my-app/bower.json" should contain:
10
+ """
11
+ "version": "0.0.0",
12
+ """
13
+ And a file named "my-app/release/my-app.js" should exist
14
+ And a file named "my-app/release/my-app.min.js" should exist
15
+ And a file named "my-app/release/my-app.css" should exist
16
+
17
+ Scenario: Abstracting both the app and components folder
18
+ When I set up Rugular and run "rugular g directive test && rugular abstract"
19
+ Then the file "my-app/bower.json" should contain:
20
+ """
21
+ "version": "0.0.0",
22
+ """
23
+ And a file named "my-app/release/my-app.js" should exist
24
+ And a file named "my-app/release/my-app.min.js" should exist
25
+ And a file named "my-app/release/my-app.css" should exist
15
26
 
16
- # Scenario: Abstracting both the app and components folder
17
- # When I set up Rugular and run "rugular g directive test && rugular abstract"
18
- # Then the file "my-app/bower.json" should contain:
19
- # """
20
- # "version": "0.0.0",
21
- # """
22
- # And a file named "my-app/release/my-app.js" should exist
23
- # And a file named "my-app/release/my-app.css" should exist
24
- #
25
27
  Scenario: Abstracting both the app and components folder twice
26
28
  When I set up Rugular and run "rugular g directive test && rugular abstract && rugular abstract"
27
29
  Then the file "my-app/bower.json" should contain:
@@ -29,4 +31,5 @@ Feature: Rugular CLI
29
31
  "0.0.1"
30
32
  """
31
33
  And a file named "my-app/release/my-app.js" should exist
34
+ And a file named "my-app/release/my-app.min.js" should exist
32
35
  And a file named "my-app/release/my-app.css" should exist
data/features/new.feature CHANGED
@@ -21,7 +21,7 @@ Feature: Rugular CLI
21
21
  """
22
22
  And the file "my-app/karma.conf.js" should contain:
23
23
  """
24
- frameworks: ['jasmine', 'chai', 'sinon', 'chai-sinon'],
24
+ frameworks: ['jasmine', 'sinon'],
25
25
  """
26
26
  And the file "my-app/src/index.haml" should contain:
27
27
  """
@@ -42,19 +42,13 @@ module Rugular
42
42
  end
43
43
  end
44
44
 
45
- def write_release_js_file
45
+ def write_release_js_files
46
46
  File.open(release_js, 'w') do |file|
47
- file.write(
48
- Uglifier.compile(
49
-
50
- javascript_files.map do |javascript_file|
51
- CoffeeScript.compile(
52
- File.read(javascript_file).gsub('templateUrl', 'template')
53
- )
54
- end.join
47
+ file.write(one_coffeescript_file)
48
+ end
55
49
 
56
- )
57
- )
50
+ File.open(release_min_js, 'w') do |file|
51
+ file.write(Uglifier.compile(one_coffeescript_file))
58
52
  end
59
53
  end
60
54
 
@@ -69,6 +63,10 @@ module Rugular
69
63
  IO.write(release_js, File.open(release_js) do |f|
70
64
  f.read.gsub(html_filename, html)
71
65
  end)
66
+
67
+ IO.write(release_min_js, File.open(release_js) do |f|
68
+ f.read.gsub(html_filename, html)
69
+ end)
72
70
  end
73
71
  end
74
72
 
@@ -103,5 +101,17 @@ module Rugular
103
101
  def release_js
104
102
  "release/#{app_name}.js"
105
103
  end
104
+
105
+ def release_min_js
106
+ "release/#{app_name}.min.js"
107
+ end
108
+
109
+ def one_coffeescript_file
110
+ @_one_coffeescript_file ||= javascript_files.map do |javascript_file|
111
+ CoffeeScript.compile(
112
+ File.read(javascript_file).gsub('templateUrl', 'template')
113
+ )
114
+ end.join
115
+ end
106
116
  end
107
117
  end
@@ -7,8 +7,6 @@ AppRouting = ($stateProvider, $urlRouterProvider) ->
7
7
  controller: 'AppController'
8
8
  controllerAs: 'app'
9
9
 
10
- return
11
-
12
10
  AppRouting.$inject = ['$stateProvider', '$urlRouterProvider']
13
11
 
14
12
  angular.module('app').config(AppRouting)
@@ -5,8 +5,6 @@
5
5
  controller: '<%= camelcase_name %>Controller'
6
6
  controllerAs: '<%= name %>'
7
7
 
8
- return
9
-
10
8
  <%= name %>Routing.$inject = ['$stateProvider']
11
9
 
12
10
  angular.module('<%= camelcase_name %>').config(<%= camelcase_name %>Routing)
@@ -1,3 +1,3 @@
1
1
  module Rugular
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Shook