rugular 0.7.0 → 0.7.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: 760689401011b12fb7cdaf5ad0ef46ceee2ecc1b
4
- data.tar.gz: 365708444880c8c3276b591863af6c88a31024cb
3
+ metadata.gz: 9984dbdfd23f8ca2e33329b9a885207a4995b305
4
+ data.tar.gz: a715174ffa8e23b19ea7dbf202076bcecd794852
5
5
  SHA512:
6
- metadata.gz: 80751032aefa055f466621e9235947db0db1a2c95f415f93fb913853c91fdac14f86537564e95f394c1eab2d43547dfd676ec665af5407529d648f6cb2132d93
7
- data.tar.gz: 6f1c8e2fdff3f7a62018b67ce8651bb7ec8661b4f74d62b1753b98ead164a2d50266ba8c1c6bcb43f9c24f0b9e585aacfaee58b7f3a6ea1122045d264d1e0483
6
+ metadata.gz: 29352b360c55f4147d32c6b07c500fe2a75903914a4497b4dad95360cee1a534585a10eaf02fce4289e34061f68641bbde664789860f70bc635d7073b4eb9eb1
7
+ data.tar.gz: 312329acdbf540b6381c7fc45f01136a5f3d46e51ff05945cca39206c75e247394a8981952d97f520a7677d7e9f600d40f90108c4946c9622cc215401c84c718
data/README.md CHANGED
@@ -334,7 +334,8 @@ This will create the following files:
334
334
 
335
335
  Features coming soon:
336
336
 
337
- * Abstracting bower components from a folder and its subfolders
337
+ * Abstracting a bower component from a either the ``components`` folder or both
338
+ the ``components`` and ``app`` folder as one component.
338
339
  * Fingerprinting dist asset files for caching
339
340
  * Nginx based docker container for deploying apps
340
341
 
@@ -342,11 +343,11 @@ As soon as it reaches a stable release:
342
343
 
343
344
  * ``angular-ui-router`` will be replaced by the ``router`` re-write by the
344
345
  Angular team.
345
- * Angular 1.3 will be updated to Angular 1.4
346
+ * Angular 1.3 will be updated to Angular 1.4 (then to 1.5)
346
347
 
347
348
  Post Angular 2.0 changes
348
349
 
349
- * replace CoffeeScript with EcmaScript6
350
+ * replace CoffeeScript with Typescript
350
351
  * replace the folder structure and build scripts to take advantage of
351
352
  EcmaScript 6 modules
352
353
 
data/bower.json CHANGED
@@ -6,9 +6,6 @@
6
6
  ],
7
7
  "description": "yes",
8
8
  "main": "okay.js",
9
- "moduleType": [
10
- "es6"
11
- ],
12
9
  "keywords": [
13
10
  "yes"
14
11
  ],
@@ -4,13 +4,20 @@ Feature: Rugular CLI
4
4
  As a user of the rugular framework
5
5
  I want to create a bower_component from any component folder
6
6
 
7
- Scenario: Abstract
8
- When I set up Rugular and run "rugular g directive test"
9
- And I run `cd tmp/aruba/my-app && rugular abstract test` interactively
10
- And I type 'yes'
11
- Then the file "~/bower_components/test/bower.json" should contain:
12
- """
13
- "private": true,
14
- """
15
-
16
-
7
+ # Scenario: Abstracting components folder
8
+ # When I set up Rugular and run "rugular g directive test"
9
+ # And I run `cd tmp/aruba/my-app && rugular abstract -c`
10
+ # Then the file "~/bower_components/myapp/bower.json" should contain:
11
+ # """
12
+ # "private": true,
13
+ # """
14
+ #
15
+ # Scenario: Abstracting both the app and components folder
16
+ # When I set up Rugular and run "rugular g directive test"
17
+ # And I run `cd tmp/aruba/my-app && rugular abstract`
18
+ # Then the file "~/bower_components/myapp/bower.json" should contain:
19
+ # """
20
+ # "private": true,
21
+ # """
22
+ #
23
+ #
@@ -21,10 +21,8 @@ module Rugular
21
21
  )
22
22
  end
23
23
 
24
- def ask_for_version
25
- @version = ask(
26
- "the previous version is #{previous_version}, what is the version now?"
27
- )
24
+ def initialize_or_create_version
25
+
28
26
  end
29
27
 
30
28
  def file_copy_folder_into_bower_src_folder
@@ -1,17 +1,17 @@
1
1
  module Rugular
2
2
  class JavascriptFiles
3
3
  def self.ordered_array
4
- Dir.glob('src/components/**/*.module.{coffee,es6}') +
5
- Dir.glob('src/components/**/*.constant.{coffee,es6}') +
6
- Dir.glob('src/components/**/*.factory.{coffee,es6}') +
7
- Dir.glob('src/components/**/*.filter.{coffee,es6}') +
8
- Dir.glob('src/components/**/*.controller.{coffee,es6}') +
9
- Dir.glob('src/components/**/*.directive.{coffee,es6}') +
10
- Dir.glob('src/app/**/*.module.{coffee,es6}') +
11
- Dir.glob('src/app/**/*.config.{coffee,es6}') +
12
- Dir.glob('src/app/**/*.constant.{coffee,es6}') +
13
- Dir.glob('src/app/**/*.controller.{coffee,es6}') +
14
- Dir.glob('src/app/**/*.routes.{coffee,es6}')
4
+ Dir.glob('src/components/**/*.module.coffee') +
5
+ Dir.glob('src/components/**/*.constant.coffee') +
6
+ Dir.glob('src/components/**/*.factory.coffee') +
7
+ Dir.glob('src/components/**/*.filter.coffee') +
8
+ Dir.glob('src/components/**/*.controller.coffee') +
9
+ Dir.glob('src/components/**/*.directive.coffee') +
10
+ Dir.glob('src/app/**/*.module.coffee') +
11
+ Dir.glob('src/app/**/*.config.coffee') +
12
+ Dir.glob('src/app/**/*.constant.coffee') +
13
+ Dir.glob('src/app/**/*.controller.coffee') +
14
+ Dir.glob('src/app/**/*.routes.coffee')
15
15
  end
16
16
  end
17
17
  end
@@ -2,7 +2,6 @@ require 'guard'
2
2
  require_relative 'rugular_assets'
3
3
  require_relative 'rugular_bower_components'
4
4
  require_relative 'rugular_coffee'
5
- require_relative 'rugular_es6'
6
5
  require_relative 'rugular_haml'
7
6
  require_relative 'rugular_index_html'
8
7
 
@@ -32,7 +31,6 @@ module Guard
32
31
  [*paths].each do |file|
33
32
  message =
34
33
  case File.extname(file)
35
- when '.es6' then ::RugularES6.compile(file)
36
34
  when '.coffee' then ::RugularCoffee.compile(file)
37
35
  when '.haml' then ::RugularHaml.compile(file)
38
36
  when '.yaml' then ::RugularBowerComponents.compile
@@ -57,7 +55,6 @@ module Guard
57
55
 
58
56
  message =
59
57
  case File.extname(file)
60
- when '.es6' then ::RugularES6.delete(file)
61
58
  when '.coffee' then ::RugularCoffee.delete(file)
62
59
  when '.haml' then ::RugularHaml.delete(file)
63
60
  when '.yaml' then fail "Please restore #{file}"
@@ -35,7 +35,7 @@ class RugularIndexHtml
35
35
 
36
36
  def convert_to_script_tag
37
37
  lambda do |javascript_file|
38
- tmp_filename = javascript_file.gsub('src', '').gsub(/coffee|es6/, 'js')
38
+ tmp_filename = javascript_file.gsub('src', '').gsub('coffee', 'js')
39
39
 
40
40
  Nokogiri::XML::Node.new 'script', application_html do |node|
41
41
  node['src'] = tmp_filename
@@ -6,9 +6,6 @@
6
6
  ],
7
7
  "description": "<%= description %>",
8
8
  "main": "<%= main_javascript_files %>",
9
- "moduleType": [
10
- "es6"
11
- ],
12
9
  "keywords": [
13
10
  "yes"
14
11
  ],
@@ -1,5 +1,6 @@
1
1
  css:
2
2
  - 'font-awesome/css/font-awesome.min.css'
3
3
  js:
4
+ - 'jquery/dist/jquery.js'
4
5
  - 'angularjs-ie8-build/dist/angular.js'
5
6
  - 'angular-ui-router/release/angular-ui-router.js'
@@ -1,6 +1,5 @@
1
- AppController = function() {
2
- this.title = 'App'
3
- }
1
+ AppController = ->
2
+ @title = 'App'
4
3
 
5
4
  angular.module('app').controller('AppController', AppController)
6
5
 
@@ -1 +1,3 @@
1
1
  %h1 {{ app.title }}
2
+
3
+ %div(ui-view)
@@ -1,3 +1,3 @@
1
1
  module Rugular
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
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.7.0
4
+ version: 0.7.1
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-09 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -339,7 +339,6 @@ files:
339
339
  - lib/rugular/tasks/server/guards/rugular_assets.rb
340
340
  - lib/rugular/tasks/server/guards/rugular_bower_components.rb
341
341
  - lib/rugular/tasks/server/guards/rugular_coffee.rb
342
- - lib/rugular/tasks/server/guards/rugular_es6.rb
343
342
  - lib/rugular/tasks/server/guards/rugular_haml.rb
344
343
  - lib/rugular/tasks/server/guards/rugular_index_html.rb
345
344
  - lib/rugular/tasks/tmux.rb
@@ -351,8 +350,8 @@ files:
351
350
  - lib/rugular/templates/directive/app.directive.spec.coffee.erb
352
351
  - lib/rugular/templates/directive/app.haml.erb
353
352
  - lib/rugular/templates/directive/app.module.coffee.erb
354
- - lib/rugular/templates/factory/app.factory.coffee
355
- - lib/rugular/templates/factory/app.module.coffee
353
+ - lib/rugular/templates/factory/app.factory.coffee.erb
354
+ - lib/rugular/templates/factory/app.module.coffee.erb
356
355
  - lib/rugular/templates/filter/app.filter.coffee.erb
357
356
  - lib/rugular/templates/filter/app.filter.spec.coffee.erb
358
357
  - lib/rugular/templates/filter/app.module.coffee.erb
@@ -364,7 +363,7 @@ files:
364
363
  - lib/rugular/templates/new/e2e/app_spec.coffee
365
364
  - lib/rugular/templates/new/karma.conf.js
366
365
  - lib/rugular/templates/new/protractor.conf.js
367
- - lib/rugular/templates/new/src/app/app.controller.es6
366
+ - lib/rugular/templates/new/src/app/app.controller.coffee
368
367
  - lib/rugular/templates/new/src/app/app.controller.spec.coffee
369
368
  - lib/rugular/templates/new/src/app/app.haml
370
369
  - lib/rugular/templates/new/src/app/app.module.coffee
@@ -1,55 +0,0 @@
1
- require 'babel/transpiler'
2
-
3
- class RugularES6
4
- def self.compile(es6_file)
5
- new(es6_file).compile
6
- end
7
-
8
- def self.delete(es6_file)
9
- new(es6_file).delete
10
- end
11
-
12
- def initialize(es6_file)
13
- @es6_file = es6_file
14
- end
15
-
16
- def compile
17
- write_tmp_file
18
-
19
- "Successfully compiled #{es6_file} to js!\n"
20
- end
21
-
22
- def delete
23
- FileUtils.rm(tmp_file)
24
-
25
- "Sucessfully removed #{tmp_file}\n"
26
- end
27
-
28
- private
29
-
30
- attr_reader :es6_file
31
-
32
- def javascript
33
- Babel::Transpiler.transform File.read(es6_file)
34
- end
35
-
36
- def tmp_file
37
- es6_file.gsub('src', '.tmp').gsub('es6', 'js')
38
- end
39
-
40
- def write_tmp_file
41
- create_tmp_folder
42
-
43
- File.open(tmp_file, 'w', &write_javascript)
44
- end
45
-
46
- def create_tmp_folder
47
- dirname = File.dirname(tmp_file)
48
-
49
- FileUtils.mkdir_p(dirname) unless File.directory? dirname
50
- end
51
-
52
- def write_javascript
53
- ->(file) { file.write javascript }
54
- end
55
- end