rugular 0.6.0 → 0.6.6

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: 712ab8858ec0f97489e98b1159e8291f197f6a84
4
- data.tar.gz: fe995427e041ce3c3dfa6b8713ac1a4d7807a358
3
+ metadata.gz: 3d071512d3ab5d3a4c2dc9feb577a2bf915cdc7e
4
+ data.tar.gz: 6d7ade01d611534225776c420ab1135317ef1e2a
5
5
  SHA512:
6
- metadata.gz: 069d560a2f150b89528c2fb986cae99fd95ed74e6d5125b6ce8a884be233a99f12c5a5a7e22041cf224e82b2a23331071b6b438468ff9efccb7381629a4d87df
7
- data.tar.gz: 786a6cc2ca094a7c7d7a809bb5c698ddb9e5a995646303ae543dc58ce9cf0897f7c373a2f7f5e3082cc3971662525ffdac2704b7ec8ec52abe4544e118dc0b22
6
+ metadata.gz: 05717e162826c18155fe5866a61e6e40cfb2284bdd147f37047e71ff973f0f6daa28b56c2f9278186b62d2b9404f0ed1a85affc4ba27742f4191f65861bda03f
7
+ data.tar.gz: 2c1327afd4319480e045028c4b8749c3ed89add1def4d3a849ad7d4d2e1ee4f601724d03f4e7bc0a1e53f96a0084397fa9fd7a1cb8a11d948ccb8f5786a9bdf9
data/.rubocop.yml CHANGED
@@ -18,9 +18,10 @@ Metrics/ParameterLists:
18
18
 
19
19
  Style/CollectionMethods:
20
20
  PreferredMethods:
21
- map: 'collect'
22
- reduce: 'inject'
23
- find: 'detect'
21
+ collect: 'map'
22
+ collect!: 'map!'
23
+ inject: 'reduce'
24
+ detect: 'find'
24
25
  find_all: 'select'
25
26
 
26
27
  Style/Documentation:
@@ -39,10 +40,14 @@ Style/RaiseArgs:
39
40
  EnforcedStyle: compact
40
41
 
41
42
  Style/SpaceInsideHashLiteralBraces:
42
- EnforcedStyle: no_space
43
+ EnforcedStyle: space
43
44
 
44
45
  Style/StringLiterals:
45
- EnforcedStyle: single_space
46
+ EnforcedStyle: single_quotes
47
+
48
+ Style/TrailingBlankLines:
49
+ Enabled: false
46
50
 
47
51
  Style/TrailingComma:
48
- EnforcedStyleForMultiline: 'comma'
52
+ EnforcedStyleForMultiline: 'no_comma'
53
+
data/README.md CHANGED
@@ -25,6 +25,11 @@ CoffeeScript with generators to create template files.
25
25
  gem install rugular
26
26
  ```
27
27
 
28
+ ### Install dependencies
29
+
30
+ Download all necessary dependencies by running the ``rugular dependencies``
31
+ task. This will download packages from both ``npm`` and ``bower``.
32
+
28
33
  ## Start a new project
29
34
 
30
35
  ```bash
@@ -60,7 +65,7 @@ A new Rugular project contains the following folders and files:
60
65
 
61
66
  | Folder/File Name | Description |
62
67
  | --- | --- |
63
- | .application.sass | A manifest sass file for development purposes, you do not need to edit this file. |
68
+ | .application.sass | A manifest sass file for development purposes. [Declare vendor sass if needed, the rest is included for you](#writing-sass-and-haml). |
64
69
  | .gitignore | Many of the files and folders here are not needed for source control, when deploying an application, please use the ``rugular build`` command described below |
65
70
  | .tmp | A temporary folder used for storing compiled Haml, Sass, and Coffeescript file, you do not need to edit any files in this folder. |
66
71
  | bower_components | A folder used by bower to install packages. |
@@ -84,8 +89,7 @@ bower_components or other 3rd party vendor files are declared in the
84
89
  Code in the src folder are written in Coffeescript, Haml and Sass and designed
85
90
  to follow [Google's Best Practices for an Angular App
86
91
  Structure](https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub).
87
- The ``rugular new`` command creates an initial folder setup with an ``src/app``
88
- folder and an ``src/components`` folder.
92
+ Rugular initially creates a ``src/app`` folder for logic pertaining to urls and an ``src/components`` folder for abstracted web components, written as Angular directives.
89
93
 
90
94
  ### The src/app folder
91
95
 
@@ -97,13 +101,12 @@ Any modules that are created within one level of nesting in the ``src/app``
97
101
  folder (e.g. ``src/app/dashboard/dashboard.module.coffee``) are to be included
98
102
  in the ``app.module.coffee`` declaration.
99
103
 
100
- The ``src/app/app.routes.coffee`` file declares a base route for the
101
- application from which all other routes are derived from. As such, it is
102
- advised to prepend all other routes with ``'root.'``.
104
+ The ``src/app/app.routes.coffee`` file declares a base route, ``root`` for the
105
+ application from which all other routes are derived from; all other routes
106
+ should be prepended with ``'root.'``.
103
107
 
104
- Because the ``app.routes.coffee`` file declares a base route, the
105
- ``src/app/app.haml`` file serves as an application layout for the rest of your
106
- application. If you have directives such as a ``navbar`` or ``footer``
108
+ The``src/app/app.haml`` file serves as an application layout for the rest of
109
+ your application. If you have directives such as a ``navbar`` or ``footer``
107
110
  directive, it is advised to add these directives to this ``haml`` file.
108
111
 
109
112
  ### The src/components folder
@@ -117,7 +120,39 @@ contain one or more of the following:
117
120
 
118
121
  These files can also live in the ``app`` directory. It is recommended to put
119
122
  abstract modules that can be used in other projects in the ``src/components``
120
- directory. YMMV.
123
+ directory.
124
+
125
+ ### Server Side calls
126
+
127
+ Rugular apps are intended to interface with one main API. The base URL of that
128
+ API can be configured in the ``config.yaml`` file for both the ``rugular
129
+ server`` command for development, and the ``rugular build`` command for
130
+ production. The ``config.yaml`` file contains defaults for ``localhost:3000``
131
+ for a local server and a ``RUGULAR_SERVER`` environment variable that can be
132
+ injected during a deployment script, e.g. a Dockerfile.
133
+
134
+ ### Writing Sass and Haml
135
+
136
+ Rugular ships with Thoughtbot's [Bourbon, Neat, and
137
+ Bitters](http://bourbon.io/). These are included in the ``src/vendor``
138
+ directory and included in ``.application.sass``, the manifest sass file that
139
+ will be compiled in both the ``.tmp`` directory and ``dist`` directory for the
140
+ ``rugular server`` and ``rugular build`` commands separately.
141
+
142
+ All files in the ``src`` directory are included via [the sass-globbing
143
+ gem](https://github.com/chriseppstein/sass-globbing). It is recommended that
144
+ each sass file start with a top level class so that the sass files can be
145
+ included irrespective of their order. For example a sass file for a header
146
+ directive should look like:
147
+
148
+ ```sass
149
+ .header
150
+ > h1
151
+ color: red
152
+ ```
153
+
154
+ Haml files should also start with a top-level class that has the same name
155
+ of its folder.
121
156
 
122
157
  ## Rugular Generators
123
158
 
@@ -197,6 +232,9 @@ src/app/navbar.haml
197
232
  src/app/navbar.module.coffee
198
233
  ```
199
234
 
235
+ > This will be re-written as a component in Angular 2.0.
236
+ > (and it will be awesome!)
237
+
200
238
  #### Create a Factory
201
239
 
202
240
  A [factory](https://docs.angularjs.org/guide/services) is an angular service
@@ -278,7 +316,7 @@ rugular ci
278
316
 
279
317
  ## Building the app
280
318
 
281
- To build a minified version of your app in the ``/dist`` folder execute:
319
+ To build a minified version of your app in the ``dist`` folder execute:
282
320
 
283
321
  ```bash
284
322
  rugular build
@@ -292,9 +330,14 @@ This will create the following files:
292
330
  * application.js (a minified version of the coffee files in the src folder)
293
331
  * vendor.js (a minified version of bower_component and vendor files)
294
332
 
295
-
296
333
  ## Roadmap
297
334
 
335
+ Features coming soon:
336
+
337
+ * Abstracting bower components from a folder and its subfolders
338
+ * Fingerprinting dist asset files for caching
339
+ * Nginx based docker container for deploying apps
340
+
298
341
  As soon as it reaches a stable release:
299
342
 
300
343
  * ``angular-ui-router`` will be replaced by the ``router`` re-write by the
data/features/new.feature CHANGED
@@ -1,3 +1,4 @@
1
+ @increase_wait_time
1
2
  Feature: Rugular CLI
2
3
  In order to generate initial files
3
4
  As a user of the rugular framework
@@ -26,6 +27,13 @@ Feature: Rugular CLI
26
27
  """
27
28
  %title my-app
28
29
  """
30
+ And the file "my-app/.application.sass" should contain:
31
+ """
32
+ @import "vendor/bourbon/bourbon"
33
+ """
34
+ And a directory named "my-app/vendor/bourbon" should exist
35
+ And a directory named "my-app/vendor/neat" should exist
36
+ And a directory named "my-app/vendor/base" should exist
29
37
  And a directory named "my-app/src/components" should exist
30
38
  And the output should contain "Thank you for installing Rugular"
31
39
 
@@ -1,2 +1,6 @@
1
1
  Dir.glob("#{__dir__}/**/*.rb").each { |file| require file }
2
2
  require 'aruba/cucumber'
3
+
4
+ Before('@increase_wait_time') do
5
+ @aruba_timeout_seconds = 5
6
+ end
@@ -10,7 +10,9 @@ module Rugular
10
10
 
11
11
  desc('Creates a minified, compressed version in the dist folder')
12
12
 
13
- Rugular::AppChecker.check_rugular!(self.name, new.destination_root)
13
+ def check_for_rugular_directory
14
+ Rugular::AppChecker.check_rugular!(self.name, new.destination_root)
15
+ end
14
16
 
15
17
  def create_dist_folder
16
18
  FileUtils.mkdir_p('./dist') unless File.directory? './dist'
@@ -58,6 +60,14 @@ module Rugular
58
60
  end
59
61
  end
60
62
 
63
+ def inject_backend_urls
64
+ Rugular::BackendURLInjector.inject_urls(
65
+ config_file: 'config.yaml',
66
+ constant_file: 'dist/application.js',
67
+ environment: :production
68
+ )
69
+ end
70
+
61
71
  def add_template_application_sass_file
62
72
  FileUtils.cp(
63
73
  "#{lib_directory}/templates/server/application.sass",
@@ -6,7 +6,13 @@ module Rugular
6
6
 
7
7
  desc('Installs dependencies (bundle, bower and npm)')
8
8
 
9
- Rugular::AppChecker.check_rugular!(self.name, new.destination_root)
9
+ def self.exit_on_failue?; true end
10
+ def check_for_rugular_directory
11
+ ::Rugular::AppChecker.check_for_rugular_directory(
12
+ task_name: self.class.name,
13
+ root_directory: destination_root
14
+ )
15
+ end
10
16
 
11
17
  def bundle
12
18
  puts 'Installing Ruby gems'
@@ -19,6 +25,7 @@ module Rugular
19
25
  end
20
26
 
21
27
  def npm_install
28
+ puts 'Installing node packages'
22
29
  system('npm install')
23
30
  end
24
31
 
@@ -4,8 +4,6 @@ module Rugular
4
4
  class Generate < Thor
5
5
  include Thor::Actions
6
6
 
7
- Rugular::AppChecker.check_rugular!(self.name, new.destination_root)
8
-
9
7
  desc(
10
8
  'generate <angular_service> <name>',
11
9
  'generates an angular service'
@@ -24,6 +22,14 @@ module Rugular
24
22
  command will also create an angular module if one does not already exist.
25
23
  LONGDESC
26
24
 
25
+ def check_for_rugular_directory
26
+ ::Rugular::AppChecker.check_for_rugular_directory(
27
+ task_name: self.class.name,
28
+ root_directory: destination_root
29
+ )
30
+ end
31
+
32
+
27
33
  register(
28
34
  Rugular::Route,
29
35
  'route',
@@ -2,8 +2,11 @@ module Rugular
2
2
  class AppChecker
3
3
  include Thor::Shell
4
4
 
5
- def self.check_rugular!(task_name, root_directory)
6
- new(task_name: task_name, root_directory: root_directory).check_rugular!
5
+ def self.check_for_rugular_directory(task_name:, root_directory:)
6
+ new(
7
+ task_name: task_name,
8
+ root_directory: root_directory
9
+ ).check_for_rugular_directory
7
10
  end
8
11
 
9
12
  def initialize(task_name:, root_directory:)
@@ -11,8 +14,10 @@ module Rugular
11
14
  @root_directory = root_directory
12
15
  end
13
16
 
14
- def check_rugular!
15
- error(rugular_app_message) unless rugular_app?
17
+ def check_for_rugular_directory
18
+ fail(rugular_app_message) unless rugular_app?
19
+
20
+ return true
16
21
  end
17
22
 
18
23
  private
@@ -20,16 +25,15 @@ module Rugular
20
25
  attr_reader :task_name, :root_directory
21
26
 
22
27
  def rugular_app_message
23
- "#{task_name} requires a pre-existing Rugular application"
28
+ "#{task_name} can only be ran in the root folder of a Rugular app"
24
29
  end
25
30
 
26
31
  def rugular_app?
27
32
  [
28
33
  'bower.json',
29
34
  'package.json',
30
- 'src/index.haml',
31
35
  'Gemfile',
32
- '.tmp'
36
+ 'src/index.haml'
33
37
  ].each do |file_name|
34
38
  destination_file_name = root_directory + '/' + file_name
35
39
 
@@ -0,0 +1,66 @@
1
+ module Rugular
2
+ class BackendURLInjector
3
+ include Thor::Shell
4
+
5
+ def self.inject_urls(config_file:, environment:)
6
+ new(
7
+ config_file: config_file,
8
+ constant_file: constant_file,
9
+ environment: environment
10
+ ).inject_urls
11
+ end
12
+
13
+ def new(config_file:, constant_file:, environment:)
14
+ @config_file = config_file
15
+ @constant_file = constant_file
16
+ @environment = environment
17
+ end
18
+
19
+ def inject_urls
20
+ IO.write('', File.open do |file|
21
+ file.read.gsub(
22
+ authentication_url_text, authentication_url
23
+ ).gsub(
24
+ authorization_url_text, authorization_url
25
+ ).gsub(
26
+ api_url_test, api_url
27
+ )
28
+ end)
29
+ end
30
+
31
+ private
32
+
33
+ attr_reader :config_file, :constant_file, :environment
34
+
35
+ def authentication_url_text
36
+ 'Declare the authentication_url in the config.yaml, '\
37
+ 'Rugular will fill this in for you'
38
+ end
39
+
40
+ def authorization_url_text
41
+ 'Declare the authorization_url in the config.yaml, '\
42
+ 'Rugular will fill this in for you'
43
+ end
44
+
45
+ def api_url_text
46
+ 'Declare the api_url in the config.yaml, '\
47
+ 'Rugular will fill this in for you'
48
+ end
49
+
50
+ def backend_yaml
51
+ ERB.new(pathname.read).result
52
+ end
53
+
54
+ def authentication_url
55
+ backend_yaml.fetch(environment).fetch(:authentication_url)
56
+ end
57
+
58
+ def authorization_url
59
+ backend_yaml.fetch(environment).fetch(:authorization_url)
60
+ end
61
+
62
+ def api_url
63
+ backend_yaml.fetch(environment).fetch(:api_url)
64
+ end
65
+ end
66
+ end
@@ -17,12 +17,10 @@ module Rugular
17
17
  end
18
18
 
19
19
  def create_custom_files
20
- Dir.glob(
21
- "#{lib_directory}/templates/new_erb/**/*.erb"
22
- ).each do |file_name|
23
- pathname = Pathname.new(file_name)
20
+ template_file_names.each do |(file_name, template_file_name)|
21
+ create_file "#{app_name}/#{template_file_name.gsub('.erb', '')}" do
22
+ pathname = Pathname.new(file_name)
24
23
 
25
- create_file "#{app_name}/#{pathname.basename('.erb').to_s}" do
26
24
  ERB.new(pathname.read).result(
27
25
  app_open_struct.instance_eval { binding }
28
26
  )
@@ -34,12 +32,18 @@ module Rugular
34
32
  empty_directory "#{app_name}/src/components"
35
33
  end
36
34
 
35
+ def create_vendor_directory
36
+ empty_directory "#{app_name}/vendor"
37
+ end
38
+
39
+ def install_bourbon
40
+ run "cd #{app_name}/vendor && bourbon install "\
41
+ '&& neat install && bitters install'
42
+ end
43
+
37
44
  def installation_complete
38
- puts "Thank you for installing Rugular, please finish setting up your "\
39
- "project with: `cd #{app_open_struct.name} && bundle install && "\
40
- "rugular dependencies`\n"\
41
- "Please install bourbon and neat by bundle exec bourbon install "\
42
- "--path src/ and neat with bundle exec neat install --path src/"
45
+ puts 'Thank you for installing Rugular, please finish setting up your '\
46
+ "project with: `cd #{app_open_struct.name} && rugular dependencies`\n"
43
47
  end
44
48
 
45
49
  private
@@ -52,5 +56,15 @@ module Rugular
52
56
  __dir__.chomp('/tasks')
53
57
  end
54
58
 
59
+ def template_file_names
60
+ real_file_names = Dir.glob(
61
+ "#{lib_directory}/templates/new_erb/**/*.erb"
62
+ )
63
+ abbreviated_file_names = real_file_names.map do |file_name|
64
+ file_name.gsub("#{lib_directory}/templates/new_erb/", '')
65
+ end
66
+
67
+ real_file_names.zip(abbreviated_file_names)
68
+ end
55
69
  end
56
70
  end
@@ -2,5 +2,5 @@ require "#{__dir__}/guards/rugular.rb"
2
2
 
3
3
  guard :rugular do
4
4
  watch /^src\/.+\.[^sass]/
5
- watch /^vendor_and_bower_components.yaml/
5
+ watch 'vendor_and_bower_components.yaml'
6
6
  end
@@ -13,14 +13,16 @@ module Guard
13
13
  end
14
14
 
15
15
  def start
16
- run_on_changes('src/index.haml')
16
+ run_all
17
17
  end
18
18
 
19
19
  def stop; true end
20
20
  def reload; true end
21
21
 
22
22
  def run_all
23
- run_on_changes(Dir.glob("src/**/*"))
23
+ run_on_changes(
24
+ Dir.glob('src/**/*').unshift('vendor_and_bower_components.yaml')
25
+ )
24
26
  end
25
27
 
26
28
  def run_on_changes(paths)
@@ -9,6 +9,8 @@ class RugularVendorAndBowerComponents
9
9
  def initialize; end
10
10
 
11
11
  def compile
12
+ ::Guard::UI.info 'Beginning to create vendor asset files'
13
+
12
14
  File.open('.tmp/vendor.css', 'w') do |file|
13
15
  file.write bower_css
14
16
  end
@@ -16,7 +18,7 @@ class RugularVendorAndBowerComponents
16
18
  file.write(Uglifier.compile(bower_and_vendor_javascript))
17
19
  end
18
20
 
19
- message = 'Successfully created vendor asset files'
21
+ 'Successfully created vendor asset files'
20
22
  end
21
23
 
22
24
  private
@@ -27,18 +29,30 @@ class RugularVendorAndBowerComponents
27
29
 
28
30
  def bower_css
29
31
  bower_yaml.fetch('bower_components').fetch('css').map do |filename|
32
+ bower_component_file = 'bower_components/' + filename
33
+ next unless File.file? bower_component_file
30
34
  File.read('bower_components/' + filename)
31
35
  end.join
32
36
  end
33
37
 
34
38
  def bower_javascript
35
39
  bower_yaml.fetch('bower_components').fetch('js').map do |filename|
40
+ bower_component_file = 'bower_components/' + filename
41
+ next unless File.file? bower_component_file
36
42
  File.read('bower_components/' + filename)
37
43
  end.join
38
44
  end
39
45
 
40
46
  def vendor_javascript
47
+ bower_yaml.fetch('vendor').fetch('javascript').map do |filename|
48
+ vendor_file = 'vendor/' + filename
49
+ next unless File.file? vendor_file
50
+ File.read(vendor_file)
51
+ end.join +
52
+
41
53
  bower_yaml.fetch('vendor').fetch('coffee').map do |filename|
54
+ vendor_file = 'vendor/' + filename
55
+ next unless File.file? vendor_file
42
56
  CoffeeScript.compile(File.read('vendor/' + filename))
43
57
  end.join
44
58
  end
@@ -5,7 +5,13 @@ module Rugular
5
5
  class Server < Thor::Group
6
6
  include Thor::Actions
7
7
 
8
- Rugular::AppChecker.check_rugular!(self.name, new.destination_root)
8
+ def self.exit_on_failue?; true end
9
+ def check_for_rugular_directory
10
+ ::Rugular::AppChecker.check_for_rugular_directory(
11
+ task_name: self.class.name,
12
+ root_directory: destination_root
13
+ )
14
+ end
9
15
 
10
16
  desc(
11
17
  "runs the test suite and a dev server on localhost:8080 "\
@@ -1,8 +1,6 @@
1
1
  name: rugular
2
2
  root: .
3
3
 
4
- pre: git fetch origin --prune
5
-
6
4
  windows:
7
5
  - vim: vim .
8
6
  - console: git status
@@ -2,16 +2,22 @@ module Rugular
2
2
  class Tmux < Thor::Group
3
3
  include Thor::Actions
4
4
 
5
- Rugular::AppChecker.check_rugular!(name, new.destination_root)
5
+ def self.exit_on_failue?; true end
6
+ def check_for_rugular_directory
7
+ ::Rugular::AppChecker.check_for_rugular_directory(
8
+ task_name: self.class.name,
9
+ root_directory: destination_root
10
+ )
11
+ end
6
12
 
7
- desc "creates a new tmux session with the processes necessary for rugular"
13
+ desc 'creates a new tmux session with the processes necessary for rugular'
8
14
 
9
15
  def copy_tmux_file
10
16
  FileUtils.cp tmuxinator_file, "#{Dir.home}/.tmuxinator/rugular.yml"
11
17
  end
12
18
 
13
19
  def start_tmux
14
- system "tmuxinator start rugular"
20
+ system 'tmuxinator start rugular'
15
21
  end
16
22
 
17
23
  private
@@ -0,0 +1,4 @@
1
+ @import "vendor/bourbon/bourbon"
2
+ @import "vendor/neat/neat"
3
+ @import "vendor/base/base"
4
+ @import "src/**/*"
@@ -1,6 +1,7 @@
1
1
  .sass-cache
2
2
  .tmp
3
3
  dist
4
+ *.log
4
5
 
5
6
  bower_components
6
7
  node_modules
@@ -0,0 +1,13 @@
1
+ # Config for the rugular server command
2
+ development:
3
+ backend:
4
+ authentication_url: 'http://127.0.0.1:3000'
5
+ authorization_url: 'http://127.0.0.1:4000'
6
+ api_url: 'http://127.0.0.1:5000'
7
+
8
+ # Config for the rugular build command
9
+ production:
10
+ backend:
11
+ authentication_url: <%= ENV['RUGULAR_AUTHENTICATION_SERVER'] %>
12
+ authorization_url: <%= ENV['RUGULAR_AUTHORIZATION_SERVER'] %>
13
+ api_url: <%= ENV['RUGULAR_API_SERVER'] %>
@@ -0,0 +1,8 @@
1
+ # Do not change the contents of this file, it is used by Rugular
2
+ # to inject api endpoints as part of the build process
3
+ BACKEND =
4
+ authentication_url: 'Declare the authentication_url in the config.yaml, Rugular will fill this in for you'
5
+ authorization_url: 'Declare the authorization_url in the config.yaml, Rugular will fill this in for you'
6
+ api_url: 'Declare the api_url in the config.yaml, Rugular will fill this in for you'
7
+
8
+ angular.module('app').constant('BACKEND', BACKEND)
@@ -6,4 +6,6 @@ bower_components:
6
6
  - 'angular-ui-router/release/angular-ui-router.js'
7
7
  vendor:
8
8
  coffee:
9
- - 'jquery/jquery.minical.js.coffee'
9
+ - 'some coffee script file'
10
+ javascript:
11
+ - 'some javascript file'
@@ -21,11 +21,8 @@
21
21
  "angular-animate": "~1.3",
22
22
  "angular-sanitize": "~1.3",
23
23
  "angular-ui-router": "*",
24
- "bourbon": "*",
25
24
  "font-awesome": "*",
26
25
  "moment": "*",
27
- "neat": "*",
28
- "toastr": "*",
29
- "traceur": "*"
26
+ "toastr": "*"
30
27
  }
31
28
  }
@@ -2,6 +2,14 @@
2
2
  %html{'ng-app' => 'app'}
3
3
  %head
4
4
  %title <%= name %>
5
+
6
+ %link(href='vendor.css' media='screen' rel='stylesheet')
7
+ %link(href='application.css' media='screen' rel='stylesheet')
5
8
  -# You do not need to add link or script tags. Rugular will do that for you.
6
9
  %body
7
10
  %ui-view
11
+
12
+ %script(src='vendor.js')
13
+
14
+ .application_javascript
15
+ %script(src='application.js')
@@ -1,3 +1,3 @@
1
1
  module Rugular
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.6'
3
3
  end
data/rugular.gemspec CHANGED
@@ -18,17 +18,20 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_runtime_dependency 'actionview', '~> 4'
21
+ spec.add_runtime_dependency 'bitters', '~> 1'
22
+ spec.add_runtime_dependency 'bourbon', '~> 4'
23
+ spec.add_runtime_dependency 'coffee-script', '~> 2'
24
+ spec.add_runtime_dependency 'foreman', '~> 0'
21
25
  spec.add_runtime_dependency 'guard', '~> 2'
22
26
  spec.add_runtime_dependency 'guard-compat', '~> 1'
23
- spec.add_runtime_dependency 'coffee-script', '~> 2'
24
27
  spec.add_runtime_dependency 'haml', '~> 4'
28
+ spec.add_runtime_dependency 'neat', '~> 1'
29
+ spec.add_runtime_dependency 'nokogiri', '~> 1'
25
30
  spec.add_runtime_dependency 'sass', '~> 3'
26
- spec.add_runtime_dependency 'uglifier', '~> 2'
27
- spec.add_runtime_dependency 'foreman', '~> 0'
28
- spec.add_runtime_dependency 'thor', '~> 0'
29
31
  spec.add_runtime_dependency 'sass-globbing', '~> 1'
30
- spec.add_runtime_dependency 'nokogiri', '~> 1'
32
+ spec.add_runtime_dependency 'thor', '~> 0'
31
33
  spec.add_runtime_dependency 'tmuxinator', '~> 0'
34
+ spec.add_runtime_dependency 'uglifier', '~> 2'
32
35
 
33
36
  spec.add_development_dependency 'aruba', '~> 0'
34
37
  spec.add_development_dependency 'byebug', '~> 3'
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.6.0
4
+ version: 0.6.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-02-13 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -25,33 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
- name: guard
28
+ name: bitters
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2'
33
+ version: '1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2'
40
+ version: '1'
41
41
  - !ruby/object:Gem::Dependency
42
- name: guard-compat
42
+ name: bourbon
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1'
47
+ version: '4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1'
54
+ version: '4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: coffee-script
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -67,77 +67,77 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2'
69
69
  - !ruby/object:Gem::Dependency
70
- name: haml
70
+ name: foreman
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4'
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '4'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: sass
84
+ name: guard
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3'
89
+ version: '2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3'
96
+ version: '2'
97
97
  - !ruby/object:Gem::Dependency
98
- name: uglifier
98
+ name: guard-compat
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2'
103
+ version: '1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '2'
110
+ version: '1'
111
111
  - !ruby/object:Gem::Dependency
112
- name: foreman
112
+ name: haml
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '4'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '4'
125
125
  - !ruby/object:Gem::Dependency
126
- name: thor
126
+ name: neat
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '1'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '1'
139
139
  - !ruby/object:Gem::Dependency
140
- name: sass-globbing
140
+ name: nokogiri
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
@@ -151,7 +151,21 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1'
153
153
  - !ruby/object:Gem::Dependency
154
- name: nokogiri
154
+ name: sass
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '3'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '3'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sass-globbing
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - "~>"
@@ -164,6 +178,20 @@ dependencies:
164
178
  - - "~>"
165
179
  - !ruby/object:Gem::Version
166
180
  version: '1'
181
+ - !ruby/object:Gem::Dependency
182
+ name: thor
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
167
195
  - !ruby/object:Gem::Dependency
168
196
  name: tmuxinator
169
197
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +206,20 @@ dependencies:
178
206
  - - "~>"
179
207
  - !ruby/object:Gem::Version
180
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: uglifier
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '2'
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '2'
181
223
  - !ruby/object:Gem::Dependency
182
224
  name: aruba
183
225
  requirement: !ruby/object:Gem::Requirement
@@ -268,6 +310,7 @@ files:
268
310
  - lib/rugular/tasks/generate/generator_base.rb
269
311
  - lib/rugular/tasks/generate/route.rb
270
312
  - lib/rugular/tasks/helpers/app_checker.rb
313
+ - lib/rugular/tasks/helpers/backend_url_injector.rb
271
314
  - lib/rugular/tasks/helpers/haml_renderer.rb
272
315
  - lib/rugular/tasks/new.rb
273
316
  - lib/rugular/tasks/server.rb
@@ -292,8 +335,10 @@ files:
292
335
  - lib/rugular/templates/filter/app.filter.coffee.erb
293
336
  - lib/rugular/templates/filter/app.filter.spec.coffee.erb
294
337
  - lib/rugular/templates/filter/app.module.coffee.erb
338
+ - lib/rugular/templates/new/.application.sass
295
339
  - lib/rugular/templates/new/.gitignore
296
340
  - lib/rugular/templates/new/Gemfile
341
+ - lib/rugular/templates/new/config.yaml
297
342
  - lib/rugular/templates/new/e2e/app_spec.coffee
298
343
  - lib/rugular/templates/new/karma.conf.js
299
344
  - lib/rugular/templates/new/protractor.conf.js
@@ -303,7 +348,7 @@ files:
303
348
  - lib/rugular/templates/new/src/app/app.module.coffee
304
349
  - lib/rugular/templates/new/src/app/app.routes.coffee
305
350
  - lib/rugular/templates/new/src/app/app.sass
306
- - lib/rugular/templates/new/src/application.sass
351
+ - lib/rugular/templates/new/src/app/backend.contsant.coffee
307
352
  - lib/rugular/templates/new/src/favicon.ico
308
353
  - lib/rugular/templates/new/test/spec_helper.js
309
354
  - lib/rugular/templates/new/vendor_and_bower_components.yaml
@@ -1,4 +0,0 @@
1
- // This is the only file that will be compiled by rugular. Please ensure that
2
- // all of the top level sass files in both the app and components folder are
3
- // imported into this one
4
- @import 'app/app'