marionette_dust 0.0.2 → 0.0.3

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -5
  3. data/Rakefile +9 -2
  4. data/lib/dust_engine/dust.rb +4 -4
  5. data/lib/generators/{marionette_dust → md}/common/templates/app.js +5 -2
  6. data/lib/generators/md/common/templates/app.js.coffee +8 -0
  7. data/lib/generators/{marionette_dust → md}/common/templates/controller.js +0 -0
  8. data/lib/generators/md/common/templates/controller.js.coffee +2 -0
  9. data/lib/generators/{marionette_dust → md}/common/templates/entity.js +0 -0
  10. data/lib/generators/md/common/templates/entity.js.coffee +7 -0
  11. data/lib/generators/{marionette_dust → md}/common/templates/template.jst.dust +0 -0
  12. data/lib/generators/{marionette_dust → md}/common/templates/view.js +0 -0
  13. data/lib/generators/md/common/templates/view.js.coffee +3 -0
  14. data/lib/generators/{marionette_dust → md}/helpers.rb +0 -0
  15. data/lib/generators/{marionette_dust → md}/install/install_generator.rb +2 -2
  16. data/lib/generators/{marionette_dust → md}/install/templates/app.js +5 -0
  17. data/lib/generators/{marionette_dust → md}/install/templates/app.js.coffee +0 -0
  18. data/lib/generators/{marionette_dust → md}/scaffold/scaffold_generator.rb +5 -5
  19. data/lib/generators/{marionette_dust → md}/submodule/submodule_generator.rb +4 -5
  20. data/lib/marionette_dust/version.rb +1 -1
  21. data/marionette_dust.gemspec +1 -0
  22. data/test/lib/generators/marionette_dust/install/install_generator_test.rb +47 -0
  23. data/test/lib/generators/marionette_dust/install/templates/app/assets/javascripts/app.js +25 -0
  24. data/test/lib/generators/marionette_dust/install/templates/app/assets/javascripts/app.js.coffee +16 -0
  25. data/test/lib/generators/marionette_dust/install/templates/app/assets/javascripts/application.js +5 -0
  26. data/test/lib/generators/marionette_dust/scaffold_and_submodule/scaffold_generator_test.rb +36 -0
  27. data/test/lib/generators/marionette_dust/scaffold_and_submodule/submodule_generator_test.rb +28 -0
  28. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/app.js +25 -0
  29. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/app.js.coffee +16 -0
  30. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/application.js +5 -0
  31. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/foo/bar/bar_controller.js +3 -0
  32. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/foo/bar/bar_controller.js.coffee +2 -0
  33. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/foo/bar/bar_view.js +5 -0
  34. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/foo/bar/bar_view.js.coffee +3 -0
  35. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/test/test_app.js +13 -0
  36. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/apps/test/test_app.js.coffee +8 -0
  37. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/entities/test.js +9 -0
  38. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/entities/test.js.coffee +7 -0
  39. data/test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/templates/foo/bar/bar.jst.dust +1 -0
  40. data/test/test_helper.rb +23 -0
  41. data/vendor/assets/javascripts/marionette_dust/{dust-full-2.1.0.js → dust-full-2.2.2.js} +742 -673
  42. data/vendor/assets/javascripts/marionette_dust/index.js +1 -1
  43. metadata +57 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba62515c357e66ce29142cabae7c6f674800ca41
4
- data.tar.gz: 873fb60e70579279c896668e5bdfd33e3762725c
3
+ metadata.gz: f7b327b6b68458d0476694b8417306ac159c29fd
4
+ data.tar.gz: b635707c5699b47414ff67bf85569a3ee9f06763
5
5
  SHA512:
6
- metadata.gz: c15598ff82efb603ae99e3bede4eda53606ba71679688426b8aecf16e6221facc55e44466c86fe5d738ba5feed7ddae7d87fe0b0483340a4df7da5f027fbf1d7
7
- data.tar.gz: d741e0613351400a3ce5691a2d48a7dfcf9ab8c20a2eb3e2a765d71d87e86e96bc9753a62f30c5bbe03967fc3bb10475a73c3e59a774bc66ca1ce6a79baf5a88
6
+ metadata.gz: cc88109dcbc9b9baef2eab4ecad52d1b346bc45b25a638ed232ef5f2feefbaa4713f3219282f40a1dfd53bd9af03490394a086e9f8689c1569c964d54e6000b6
7
+ data.tar.gz: 2cbc754b5333c6e7db22330bbc6da98d6905890d74551bb911666a55e1ba904da9f59cb4fb2f3cb5b925ee46b6f824a6395a7ad3e5854f18b48719d76911c962
data/README.md CHANGED
@@ -12,7 +12,7 @@ Installation
12
12
  -------
13
13
 
14
14
 
15
- Add marionette_dust in your gemfile:
15
+ Add marionette_dust to your gemfile:
16
16
 
17
17
  ```ruby
18
18
  gem 'marionette_dust'
@@ -26,7 +26,7 @@ $ bundle install
26
26
  Initialize your app with:
27
27
 
28
28
  ```
29
- $ rails generate marionette_dust:install
29
+ $ rails generate md:install
30
30
  ```
31
31
 
32
32
  This adds `//= require marionette_dust` in your application.js manifest and generates the basic scaffold for your marionette application:
@@ -40,16 +40,18 @@ app/
40
40
  └── app.js
41
41
  ```
42
42
 
43
+ You can past an optional argument ( -c ) if you want coffeescript files.
44
+
43
45
  Generators
44
46
  -------
45
- All generators are based on [marionette modules][3], the original idea is described in the exellent book [Backbone.Marionette.js: A Gentle Introduction][4], and the all credits go to [BackboneRails.com][5]
47
+ All generators are based on [marionette modules][3], the original idea is described in the excellent book [Backbone.Marionette.js: A Gentle Introduction][4], and the all credits go to [BackboneRails.com][5]
46
48
 
47
49
  - **Scaffold**
48
50
 
49
51
  Generates a scaffold for a sub-app, under apps folder, running:
50
52
 
51
53
  ```
52
- $ rails generate marionette_dust:scaffold Foo
54
+ $ rails generate md:scaffold Foo [-c]
53
55
  ```
54
56
 
55
57
  will generate:
@@ -69,7 +71,7 @@ app/
69
71
  Generates a submodule under an existent app (previously generated with the Scaffold generator), running:
70
72
 
71
73
  ```
72
- $ rails generate marionette_dust:submodule bar --parent foo
74
+ $ rails generate md:submodule bar --parent foo [-c]
73
75
  ```
74
76
 
75
77
  will generate:
@@ -91,6 +93,19 @@ app/
91
93
  └── bar.jst.dust
92
94
  ```
93
95
 
96
+ About
97
+ -------
98
+ This version includes:
99
+
100
+ * Marionette.js v1.2.2
101
+ * Dust.js v2.2.2
102
+
103
+ Also this project is inspired by:
104
+
105
+ [Backbone on rails][7] and [Dust assets][6]
106
+
107
+
108
+
94
109
  Contributing
95
110
  -------
96
111
 
@@ -100,11 +115,15 @@ Contributing
100
115
  4. Push to the branch (`git push origin my-new-feature`)
101
116
  5. Create new Pull Request
102
117
 
118
+ [![githalytics.com alpha](https://cruel-carlota.pagodabox.com/0fcf36aa176a3fc30ebbec87bf7b28d2 "githalytics.com")](http://githalytics.com/RobertoDip/marionette_dust-rails)
119
+
103
120
  [1]: http://marionettejs.com/
104
121
  [2]: http://linkedin.github.io/dustjs/
105
122
  [3]: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.module.md
106
123
  [4]: https://leanpub.com/marionette-gentle-introduction
107
124
  [5]: http://www.backbonerails.com/
125
+ [6]: https://github.com/hasmanydevelopers/dust_assets
126
+ [7]: https://github.com/meleyal/backbone-on-rails
108
127
 
109
128
  [Build Status]: https://travis-ci.org/RobertoDip/marionette_dust-rails
110
129
  [Code Climate]: https://codeclimate.com/github/RobertoDip/marionette_dust-rails
data/Rakefile CHANGED
@@ -1,5 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
2
3
 
3
- task :default do
4
- puts "Default task called!"
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'test'
7
+ t.pattern = 'test/**/*_test.rb'
8
+ t.verbose = true
5
9
  end
10
+
11
+ desc "Run tests"
12
+ task :default => :test
@@ -4,8 +4,8 @@ require 'pathname'
4
4
  module MarionetteDust
5
5
  class Dust
6
6
  class << self
7
- def precompile(source, name)
8
- context.call('dust.compile', source, name)
7
+ def precompile(src, name)
8
+ context.call('dust.compile', src, name)
9
9
  end
10
10
 
11
11
  private
@@ -15,11 +15,11 @@ module MarionetteDust
15
15
  end
16
16
 
17
17
  def source
18
- @source ||= path.read
18
+ @source ||= open(path).read
19
19
  end
20
20
 
21
21
  def path
22
- @path ||= assets_path.join('dust-full-2.1.0.js')
22
+ @path ||= assets_path.join('dust-full-2.2.2.js')
23
23
  end
24
24
 
25
25
  def assets_path
@@ -5,6 +5,9 @@
5
5
 
6
6
  var API = {};
7
7
 
8
- <%= app_name %>.on("contacts:list", function () {});
9
-
8
+ <%= sub_app_name %>.addInitializer(function() {
9
+ router = new <%= sub_app_name %>.Router({
10
+ controller: API
11
+ });
12
+ });
10
13
  });
@@ -0,0 +1,8 @@
1
+ <%= app_name %>.module "<%= sub_app_name %>", (<%= sub_app_name %>, <%= app_name %>, Backbone, Marionette, $, _) ->
2
+
3
+ <%= sub_app_name %>.Router = Marionette.AppRouter.extend(appRoutes: {})
4
+
5
+ API = {}
6
+
7
+ <%= sub_app_name %>.addInitializer ->
8
+ router = new <%= sub_app_name %>.Router(controller: API)
@@ -0,0 +1,2 @@
1
+ <%= app_name %>.module "<%= file_name.capitalize %>.<%= sub_app_scope %>", (<%= sub_app_scope %>, <%= app_name %>, Backbone, Marionette, $, _) ->
2
+ <%= sub_app_scope %>.Controller = {}
@@ -0,0 +1,7 @@
1
+ <%= app_name %>.module "Entities", (Entities, <%= app_name %>, Backbone, Marionette, $, _) ->
2
+
3
+ Entities.<%= singular_entity_name %> = Backbone.Model.extend({})
4
+
5
+ Entities.<%= plural_entity_name %>Collection = Backbone.Collection.extend({})
6
+
7
+ API = {}
@@ -0,0 +1,3 @@
1
+ <%= app_name %>.module "<%= file_name.capitalize %>.<%= sub_app_scope %>", (<%= sub_app_scope %>, <%= app_name %>, Backbone, Marionette, $, _) ->
2
+
3
+ <%= sub_app_scope %>.View = Marionette.ItemView.extend(template: "templates/<%= @submodule_name %>.jst.dust")
File without changes
@@ -1,6 +1,6 @@
1
- require 'generators/marionette_dust/helpers'
1
+ require 'generators/md/helpers'
2
2
 
3
- module MarionetteDust
3
+ module Md
4
4
  module Generators
5
5
  class InstallGenerator < Rails::Generators::Base
6
6
  include MarionetteDust::Generators::Helpers
@@ -17,4 +17,9 @@ var <%= app_name %> = new Marionette.Application();
17
17
 
18
18
  <%= app_name %>.on('initialize:after', function () {
19
19
  //Things to do after app initialize
20
+ if (Backbone.history) {
21
+ Backbone.history.start({
22
+ pushState: true
23
+ });
24
+ }
20
25
  });
@@ -1,6 +1,6 @@
1
- require 'generators/marionette_dust/helpers'
1
+ require 'generators/md/helpers'
2
2
 
3
- module MarionetteDust
3
+ module Md
4
4
  module Generators
5
5
  class ScaffoldGenerator < Rails::Generators::NamedBase
6
6
  include MarionetteDust::Generators::Helpers
@@ -22,8 +22,8 @@ module MarionetteDust
22
22
  desc: ""
23
23
 
24
24
  def parse_options
25
- js = options.javascript
26
- @ext = js ? ".js.coffee" : ".js"
25
+ coffee = options.coffeescript
26
+ @ext = coffee ? ".js.coffee" : ".js"
27
27
  end
28
28
 
29
29
  def create_marionette_entity
@@ -34,7 +34,7 @@ module MarionetteDust
34
34
  def create_marionette_app
35
35
  empty_directory File.join(apps_path, file_name.downcase)
36
36
  file = File.join(apps_path, file_name.downcase, sub_app_file_name)
37
- template "app.js", file
37
+ template "app#{@ext}", file
38
38
  end
39
39
 
40
40
  def create_subapp
@@ -1,6 +1,6 @@
1
- require 'generators/marionette_dust/helpers'
1
+ require 'generators/md/helpers'
2
2
 
3
- module MarionetteDust
3
+ module Md
4
4
  module Generators
5
5
  class SubmoduleGenerator < Rails::Generators::NamedBase
6
6
  include MarionetteDust::Generators::Helpers
@@ -23,11 +23,10 @@ module MarionetteDust
23
23
  desc: "Parent app (required)"
24
24
 
25
25
  def parse_options
26
- js = options.javascript
27
- @ext = js ? ".js.coffee" : ".js"
26
+ coffee = options.coffeescript
27
+ @ext = coffee ? ".js.coffee" : ".js"
28
28
  @parent_name = options.parent
29
29
  @submodule_name = file_name
30
- puts "#{@parent_name}"
31
30
  end
32
31
 
33
32
  def create_subapp
@@ -1,3 +1,3 @@
1
1
  module MarionetteDust
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files`.split($/)
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+
19
20
  spec.require_paths = ["lib"]
20
21
 
21
22
  spec.add_dependency 'rails', '>= 3.1'
@@ -0,0 +1,47 @@
1
+ require 'test_helper'
2
+
3
+ class InstallGeneratorTest < Rails::Generators::TestCase
4
+ tests Md::Generators::InstallGenerator
5
+ destination File.expand_path("../templates", __FILE__)
6
+
7
+ test "creates the folder structure" do
8
+ run_generator
9
+
10
+ assert_directory "app/assets/javascripts/entities"
11
+ assert_directory "app/assets/templates"
12
+ assert_directory "app/assets/javascripts/apps"
13
+ end
14
+
15
+ test "creates the default application file(javascript)" do
16
+ run_generator
17
+
18
+ assert_file "app/assets/javascripts/app.js"
19
+ end
20
+
21
+ test "creates the coffeescript application file if required" do
22
+ run_generator %w(-c)
23
+
24
+ assert_file "app/assets/javascripts/app.js.coffee"
25
+ end
26
+
27
+ test "genereates the manifest(default)" do
28
+ run_generator
29
+
30
+ assert_file "app/assets/javascripts/application.js"
31
+ end
32
+
33
+ test "injects the required libraries(default)" do
34
+ run_generator
35
+
36
+ assert_file "app/assets/javascripts/application.js", /require marionette_dust/
37
+ assert_file "app/assets/javascripts/application.js", /require app/
38
+ end
39
+
40
+ test "injects the required paths(default)" do
41
+ run_generator
42
+
43
+ assert_file "app/assets/javascripts/application.js", /require_tree \.\/apps/
44
+ assert_file "app/assets/javascripts/application.js", /require_tree \.\/entities/
45
+ assert_file "app/assets/javascripts/application.js", /require_tree \.\.\/templates/
46
+ end
47
+ end
@@ -0,0 +1,25 @@
1
+ var Class = new Marionette.Application();
2
+
3
+ Class.addRegions({
4
+ //Add application regions here
5
+ });
6
+
7
+ //Navigate to specific route
8
+ Class.navigate = function (route, options) {
9
+ options || (options = {});
10
+ Backbone.history.navigate(route, options);
11
+ };
12
+
13
+ //Returns current route
14
+ Class.getCurrentRoute = function () {
15
+ return Backbone.history.fragment;
16
+ };
17
+
18
+ Class.on('initialize:after', function () {
19
+ //Things to do after app initialize
20
+ if (Backbone.history) {
21
+ Backbone.history.start({
22
+ pushState: true
23
+ });
24
+ }
25
+ });
@@ -0,0 +1,16 @@
1
+ Class = new Marionette.Application()
2
+
3
+ #Add application regions here
4
+ Class.addRegions {}
5
+
6
+ #Navigate to specific route
7
+ Class.navigate = (route, options) ->
8
+ options or (options = {})
9
+ Backbone.history.navigate route, options
10
+
11
+ #Returns current route
12
+ Class.getCurrentRoute = ->
13
+ Backbone.history.fragment
14
+
15
+ Class.on "initialize:after", ->
16
+ #Things to do after app initialize
@@ -0,0 +1,5 @@
1
+ //= require marionette_dust
2
+ //= require app
3
+ //= require_tree ./apps
4
+ //= require_tree ./entities
5
+ //= require_tree ../templates
@@ -0,0 +1,36 @@
1
+ require 'test_helper'
2
+
3
+ class ScaffoldGeneratorTest < Rails::Generators::TestCase
4
+ tests Md::Generators::ScaffoldGenerator
5
+ destination File.expand_path("../templates", __FILE__)
6
+
7
+ test "creates the folder structure" do
8
+ run_generator %w(test)
9
+
10
+ assert_directory "app/assets/javascripts/apps/test"
11
+ end
12
+
13
+ test "creates the sub application file" do
14
+ run_generator %w(test)
15
+
16
+ assert_file "app/assets/javascripts/apps/test/test_app.js"
17
+ end
18
+
19
+ test "creates the entities file" do
20
+ run_generator %w(test)
21
+
22
+ assert_file "app/assets/javascripts/entities/test.js"
23
+ end
24
+
25
+ test "creates coffeescript sub application file if requried" do
26
+ run_generator %w(test -c)
27
+
28
+ assert_file "app/assets/javascripts/apps/test/test_app.js.coffee"
29
+ end
30
+
31
+ test "creates coffeescript entities file if required" do
32
+ run_generator %w(test -c)
33
+
34
+ assert_file "app/assets/javascripts/entities/test.js.coffee"
35
+ end
36
+ end
@@ -0,0 +1,28 @@
1
+ require 'test_helper'
2
+
3
+ class SubmoduleGeneratorTest < Rails::Generators::TestCase
4
+ tests Md::Generators::SubmoduleGenerator
5
+ destination File.expand_path("../templates", __FILE__)
6
+
7
+ test "creates the folder structure" do
8
+ run_generator %w(bar --parent foo)
9
+
10
+ assert_directory "app/assets/javascripts/apps/foo"
11
+ assert_directory "app/assets/javascripts/apps/foo/bar"
12
+ assert_directory "app/assets/javascripts/entities"
13
+ end
14
+
15
+ test "creates the submodule application" do
16
+ run_generator %w(bar --parent foo)
17
+
18
+ assert_file "app/assets/javascripts/apps/foo/bar/bar_view.js"
19
+ assert_file "app/assets/javascripts/apps/foo/bar/bar_controller.js"
20
+ end
21
+
22
+ test "creates the submodule application with coffeescript files if required" do
23
+ run_generator %w(bar --parent foo -c)
24
+
25
+ assert_file "app/assets/javascripts/apps/foo/bar/bar_view.js.coffee"
26
+ assert_file "app/assets/javascripts/apps/foo/bar/bar_controller.js.coffee"
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ var Class = new Marionette.Application();
2
+
3
+ Class.addRegions({
4
+ //Add application regions here
5
+ });
6
+
7
+ //Navigate to specific route
8
+ Class.navigate = function (route, options) {
9
+ options || (options = {});
10
+ Backbone.history.navigate(route, options);
11
+ };
12
+
13
+ //Returns current route
14
+ Class.getCurrentRoute = function () {
15
+ return Backbone.history.fragment;
16
+ };
17
+
18
+ Class.on('initialize:after', function () {
19
+ //Things to do after app initialize
20
+ if (Backbone.history) {
21
+ Backbone.history.start({
22
+ pushState: true
23
+ });
24
+ }
25
+ });
@@ -0,0 +1,16 @@
1
+ Class = new Marionette.Application()
2
+
3
+ #Add application regions here
4
+ Class.addRegions {}
5
+
6
+ #Navigate to specific route
7
+ Class.navigate = (route, options) ->
8
+ options or (options = {})
9
+ Backbone.history.navigate route, options
10
+
11
+ #Returns current route
12
+ Class.getCurrentRoute = ->
13
+ Backbone.history.fragment
14
+
15
+ Class.on "initialize:after", ->
16
+ #Things to do after app initialize
@@ -0,0 +1,5 @@
1
+ //= require marionette_dust
2
+ //= require app
3
+ //= require_tree ./apps
4
+ //= require_tree ./entities
5
+ //= require_tree ../templates
@@ -0,0 +1,3 @@
1
+ Class.module("Bar.Bar", function (Bar, Class, Backbone, Marionette, $, _) {
2
+ Bar.Controller = {};
3
+ });
@@ -0,0 +1,2 @@
1
+ Class.module "Bar.Bar", (Bar, Class, Backbone, Marionette, $, _) ->
2
+ Bar.Controller = {}
@@ -0,0 +1,5 @@
1
+ Class.module("Bar.Bar", function (Bar, Class, Backbone, Marionette, $, _) {
2
+ Bar.View = Marionette.ItemView.extend({
3
+ template: "templates/bar.jst.dust"
4
+ });
5
+ });
@@ -0,0 +1,3 @@
1
+ Class.module "Bar.Bar", (Bar, Class, Backbone, Marionette, $, _) ->
2
+
3
+ Bar.View = Marionette.ItemView.extend(template: "templates/bar.jst.dust")
@@ -0,0 +1,13 @@
1
+ Class.module("TestsApp", function (TestsApp, Class, Backbone, Marionette, $, _) {
2
+ TestsApp.Router = Marionette.AppRouter.extend({
3
+ appRoutes: {}
4
+ });
5
+
6
+ var API = {};
7
+
8
+ TestsApp.addInitializer(function() {
9
+ router = new TestsApp.Router({
10
+ controller: API
11
+ });
12
+ });
13
+ });
@@ -0,0 +1,8 @@
1
+ Class.module "TestsApp", (TestsApp, Class, Backbone, Marionette, $, _) ->
2
+
3
+ TestsApp.Router = Marionette.AppRouter.extend(appRoutes: {})
4
+
5
+ API = {}
6
+
7
+ TestsApp.addInitializer ->
8
+ router = new TestsApp.Router(controller: API)
@@ -0,0 +1,9 @@
1
+ Class.module("Entities", function (Entities, Class, Backbone, Marionette, $, _) {
2
+
3
+ Entities.Test = Backbone.Model.extend({});
4
+
5
+ Entities.TestsCollection = Backbone.Collection.extend({});
6
+
7
+ var API = {};
8
+
9
+ });
@@ -0,0 +1,7 @@
1
+ Class.module "Entities", (Entities, Class, Backbone, Marionette, $, _) ->
2
+
3
+ Entities.Test = Backbone.Model.extend({})
4
+
5
+ Entities.TestsCollection = Backbone.Collection.extend({})
6
+
7
+ API = {}
@@ -0,0 +1,23 @@
1
+ require 'bundler'
2
+ Bundler.require
3
+
4
+ require 'test/unit'
5
+ require 'rails/all'
6
+ require 'rails/generators'
7
+ require 'rails/generators/test_case'
8
+
9
+ class TestApp < Rails::Application
10
+ config.root = File.dirname(__FILE__)
11
+ end
12
+ Rails.application = TestApp
13
+
14
+ module Rails
15
+ def self.root
16
+ @root ||= File.expand_path("../../vendor/assets/javascripts/marionette_dust/", __FILE__)
17
+ end
18
+ end
19
+ Rails.application.config.root = Rails.root
20
+
21
+ require 'generators/md/install/install_generator'
22
+ require 'generators/md/scaffold/scaffold_generator'
23
+ require 'generators/md/submodule/submodule_generator'