ember-appkit-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +42 -0
  4. data/lib/ember-appkit-rails.rb +1 -0
  5. data/lib/ember/appkit/rails.rb +6 -0
  6. data/lib/ember/appkit/rails/engine.rb +12 -0
  7. data/lib/ember/appkit/rails/version.rb +7 -0
  8. data/lib/generators/ember/bootstrap_generator.rb +47 -0
  9. data/lib/generators/ember/generator_helpers.rb +40 -0
  10. data/lib/generators/ember/route_generator.rb +20 -0
  11. data/lib/generators/templates/application.js +2 -0
  12. data/lib/generators/templates/ember-app.js.es6 +15 -0
  13. data/lib/generators/templates/route.js.es6 +3 -0
  14. data/lib/generators/templates/router.js.es6 +7 -0
  15. data/test/dummy/README.rdoc +28 -0
  16. data/test/dummy/Rakefile +6 -0
  17. data/test/dummy/app/assets/javascripts/application.js +14 -0
  18. data/test/dummy/app/assets/javascripts/components/my-component.js.es6 +4 -0
  19. data/test/dummy/app/assets/javascripts/controllers/index.js.es6 +9 -0
  20. data/test/dummy/app/assets/javascripts/ember-app.js +9 -0
  21. data/test/dummy/app/assets/javascripts/models/person.js.es6 +3 -0
  22. data/test/dummy/app/assets/javascripts/router.js.es6 +7 -0
  23. data/test/dummy/app/assets/javascripts/routes/index.js.es6 +13 -0
  24. data/test/dummy/app/assets/javascripts/templates/application.hbs +2 -0
  25. data/test/dummy/app/assets/javascripts/templates/components/my-component.hbs +1 -0
  26. data/test/dummy/app/assets/javascripts/templates/index.hbs +6 -0
  27. data/test/dummy/app/controllers/application_controller.rb +5 -0
  28. data/test/dummy/app/views/application/show.html +0 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  30. data/test/dummy/bin/bundle +3 -0
  31. data/test/dummy/bin/rails +4 -0
  32. data/test/dummy/bin/rake +4 -0
  33. data/test/dummy/config.ru +4 -0
  34. data/test/dummy/config/application.rb +14 -0
  35. data/test/dummy/config/boot.rb +5 -0
  36. data/test/dummy/config/environment.rb +5 -0
  37. data/test/dummy/config/environments/development.rb +30 -0
  38. data/test/dummy/config/environments/production.rb +80 -0
  39. data/test/dummy/config/environments/test.rb +37 -0
  40. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/test/dummy/config/initializers/inflections.rb +16 -0
  43. data/test/dummy/config/initializers/mime_types.rb +5 -0
  44. data/test/dummy/config/initializers/secret_token.rb +12 -0
  45. data/test/dummy/config/initializers/session_store.rb +3 -0
  46. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/test/dummy/config/locales/en.yml +23 -0
  48. data/test/dummy/config/routes.rb +3 -0
  49. data/test/dummy/log/development.log +3957 -0
  50. data/test/dummy/log/test.log +100 -0
  51. data/test/dummy/public/404.html +58 -0
  52. data/test/dummy/public/422.html +58 -0
  53. data/test/dummy/public/500.html +57 -0
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/009d416d9e579ca73b72e11a882283db +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/0f63b9e77aec7451fc0c21d376f8eb28 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/13c56481151a0f8ff72b183daf16c0ba +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/19c9bc7dbf67a891e93c7a663a62ff1c +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/22d5df6f378a04858f2123ee6e176ff1 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/30095b6d23a5bac343099341a88a9768 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/30e6b42a491dc4952ff020137405d502 +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/32a4bf18777e24ecbd1bb7bf1afb9d41 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/331122f2f78d79778408023cf5bad1e3 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/34b3026e7f937c6a19a0aee7f8451aad +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/36b770b8db4bb47ce9c524d7104be2e9 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/3a168599f447464b14332bdfd140ff00 +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/3b825365f669ab10c71ccee9d64335b6 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/3f60ef531652da88a591066588c06000 +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/3fa9b534ed1d39ba8274b7ab49a38d11 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/4138a0978ec2097970b05e52c1d1cf94 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/61df2fa75b3733030a82b166f1c135e9 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/720ee922899be7948cc2a8b27660ce0b +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/7689ffe6d7c831ee178e07106482b2cc +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/776c336ba7d7935e564e9bf5072e3dd8 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/7bf1770d3a1c8bc1b59a4bc89d5c4bca +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/7d008b32a16b10ea72ea849f47d9a095 +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/832a081f27208b2b977b49b487d2bc89 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/8333b0a9d6f14badf985b50415d5deee +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/8e9feb35d7e388f760d17aaf89b32731 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/8ebc8c58233ab12eee6edfc0feca2492 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/8fc8cc19ffe18f3fb8d3a8506d9169b3 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/91ce00d4fbb2d91206d66229af2dda20 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/9475a88de7edd7f2eb6268573986cbdd +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/aee731d32c121990e31f5d68a034087c +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/b6477f770c118c6b4362a1043ea87879 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/b692b37dad694df23f130ceda8c808dd +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/b7ee576b652da2c60e89e6a466d073f4 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/c0bb6b15bdd48873e96974816e18abe9 +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/c8c4c1b316845f30168739b5795846d6 +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/d05ba20923e543730084eb723e770f12 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/e1658f6900cfc0ba388976a2fd25f94f +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/e2a67ad17895f7711966ca1a5ff7af86 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/e44f5ebcd8f42995512e64b96b63c9cf +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/e610538e56e78934ee9fa328294fcc06 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/e8aa57b28c86586b8b7344feb891c43f +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/ebc77031c7503fcc60aaa5c603aa9138 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/ed5238112abbfd6a794a100804365903 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/f2a13b6bc27457cb7513b583b4e69ed5 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/f46d0d400dce471af50b05c9ac272ba9 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/f8c79edb4a48d7e4f74a6113d25f4699 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/fa20075040efd309e2e2fdb310135e63 +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/fdcd9e39dbe03f947086b7e6c1ce29d2 +0 -0
  106. data/test/dummy/tmp/cache/assets/test/sprockets/009d416d9e579ca73b72e11a882283db +0 -0
  107. data/test/dummy/tmp/cache/assets/test/sprockets/0f63b9e77aec7451fc0c21d376f8eb28 +0 -0
  108. data/test/dummy/tmp/cache/assets/test/sprockets/19c9bc7dbf67a891e93c7a663a62ff1c +0 -0
  109. data/test/dummy/tmp/cache/assets/test/sprockets/22d5df6f378a04858f2123ee6e176ff1 +0 -0
  110. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  111. data/test/dummy/tmp/cache/assets/test/sprockets/30e6b42a491dc4952ff020137405d502 +0 -0
  112. data/test/dummy/tmp/cache/assets/test/sprockets/32a4bf18777e24ecbd1bb7bf1afb9d41 +0 -0
  113. data/test/dummy/tmp/cache/assets/test/sprockets/331122f2f78d79778408023cf5bad1e3 +0 -0
  114. data/test/dummy/tmp/cache/assets/test/sprockets/34b3026e7f937c6a19a0aee7f8451aad +0 -0
  115. data/test/dummy/tmp/cache/assets/test/sprockets/36b770b8db4bb47ce9c524d7104be2e9 +0 -0
  116. data/test/dummy/tmp/cache/assets/test/sprockets/3a168599f447464b14332bdfd140ff00 +0 -0
  117. data/test/dummy/tmp/cache/assets/test/sprockets/3b825365f669ab10c71ccee9d64335b6 +0 -0
  118. data/test/dummy/tmp/cache/assets/test/sprockets/3fa9b534ed1d39ba8274b7ab49a38d11 +0 -0
  119. data/test/dummy/tmp/cache/assets/test/sprockets/720ee922899be7948cc2a8b27660ce0b +0 -0
  120. data/test/dummy/tmp/cache/assets/test/sprockets/7689ffe6d7c831ee178e07106482b2cc +0 -0
  121. data/test/dummy/tmp/cache/assets/test/sprockets/7bf1770d3a1c8bc1b59a4bc89d5c4bca +0 -0
  122. data/test/dummy/tmp/cache/assets/test/sprockets/7d008b32a16b10ea72ea849f47d9a095 +0 -0
  123. data/test/dummy/tmp/cache/assets/test/sprockets/8e9feb35d7e388f760d17aaf89b32731 +0 -0
  124. data/test/dummy/tmp/cache/assets/test/sprockets/8ebc8c58233ab12eee6edfc0feca2492 +0 -0
  125. data/test/dummy/tmp/cache/assets/test/sprockets/91ce00d4fbb2d91206d66229af2dda20 +0 -0
  126. data/test/dummy/tmp/cache/assets/test/sprockets/b692b37dad694df23f130ceda8c808dd +0 -0
  127. data/test/dummy/tmp/cache/assets/test/sprockets/c0bb6b15bdd48873e96974816e18abe9 +0 -0
  128. data/test/dummy/tmp/cache/assets/test/sprockets/c8c4c1b316845f30168739b5795846d6 +0 -0
  129. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  130. data/test/dummy/tmp/cache/assets/test/sprockets/e2a67ad17895f7711966ca1a5ff7af86 +0 -0
  131. data/test/dummy/tmp/cache/assets/test/sprockets/e44f5ebcd8f42995512e64b96b63c9cf +0 -0
  132. data/test/dummy/tmp/cache/assets/test/sprockets/e8aa57b28c86586b8b7344feb891c43f +0 -0
  133. data/test/dummy/tmp/cache/assets/test/sprockets/ed5238112abbfd6a794a100804365903 +0 -0
  134. data/test/dummy/tmp/cache/assets/test/sprockets/f2a13b6bc27457cb7513b583b4e69ed5 +0 -0
  135. data/test/dummy/tmp/cache/assets/test/sprockets/f46d0d400dce471af50b05c9ac272ba9 +0 -0
  136. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  137. data/test/dummy/tmp/cache/assets/test/sprockets/f8c79edb4a48d7e4f74a6113d25f4699 +0 -0
  138. data/test/dummy/tmp/cache/assets/test/sprockets/fdcd9e39dbe03f947086b7e6c1ce29d2 +0 -0
  139. data/test/dummy/tmp/ember-rails/ember-data.js +10204 -0
  140. data/test/dummy/tmp/ember-rails/ember.js +38198 -0
  141. data/test/generators/bootstrap_generator_test.rb +35 -0
  142. data/test/generators/route_generator_test.rb +25 -0
  143. data/test/integration/navigation_test.rb +9 -0
  144. data/test/support/generator_test_support.rb +34 -0
  145. data/test/test_helper.rb +19 -0
  146. metadata +430 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 16b3775c8e387671006ac4f33ef615fe87250dbd
4
+ data.tar.gz: 0a4184aa877c03c4d5a832e0bd9871da2e1e94a8
5
+ SHA512:
6
+ metadata.gz: ddad3bd0370b364177f157acff8185661fa25bd85dd25c408b0a206d05da100adbb14e187aa28a7b69bca0b721ebfa2ebb363c23dc059a13535180150c51ae2a
7
+ data.tar.gz: 6612ae0f335946469ede3839779ae658a1a643e263eded384aeeeefddb486085cde696b69dc39b1c5a16dd33660528e23c715c018ea9d056fed1ca9427adb047
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,42 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'EmberAppKit'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:integration_test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/integration/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+ Rake::TestTask.new(:generators_test) do |t|
34
+ t.libs << 'lib'
35
+ t.libs << 'test'
36
+ t.pattern = 'test/generators/**/*_test.rb'
37
+ t.verbose = false
38
+ end
39
+
40
+ task :test => [:generators_test, :integration_test]
41
+
42
+ task default: :test
@@ -0,0 +1 @@
1
+ require 'ember/appkit/rails'
@@ -0,0 +1,6 @@
1
+ require 'ember-rails'
2
+ require 'ember/source'
3
+ require 'ember/appkit/rails/engine'
4
+ require 'es6_module_transpiler/rails'
5
+
6
+ ES6ModuleTranspiler.prefix_pattern = [/^(controllers|models|views|helpers|routes|router|store)/, 'appkit']
@@ -0,0 +1,12 @@
1
+ module Ember
2
+ module Appkit
3
+ module Rails
4
+ class Engine < ::Rails::Engine
5
+ config.handlebars ||= ActiveSupport::OrderedOptions.new
6
+
7
+ config.handlebars.output_type = :amd
8
+ config.handlebars.amd_namespace = 'appkit'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ module Ember
2
+ module Appkit
3
+ module Rails
4
+ VERSION = '0.0.1'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,47 @@
1
+ require 'generators/ember/generator_helpers'
2
+
3
+ module Ember
4
+ module Generators
5
+ class BootstrapGenerator < ::Rails::Generators::Base
6
+ include Ember::Generators::GeneratorHelpers
7
+
8
+ source_root File.expand_path("../../templates", __FILE__)
9
+
10
+ desc "Creates a default Ember.js folder layout in app/assets/javascripts"
11
+
12
+ class_option :ember_path, :type => :string, :aliases => "-d", :default => false, :desc => "Custom ember app path"
13
+ class_option :app_name, :type => :string, :aliases => "-n", :default => false, :desc => "Custom ember app name"
14
+
15
+ def inject_ember
16
+ inject_into_application_file
17
+ end
18
+
19
+
20
+ def create_dir_layout
21
+ %W{models controllers views routes helpers components templates templates/components mixins}.each do |dir|
22
+ empty_directory "#{ember_path}/#{dir}"
23
+ create_file "#{ember_path}/#{dir}/.gitkeep" unless options[:skip_git]
24
+ end
25
+ end
26
+
27
+ def create_router_file
28
+ template "router.js.es6", "#{ember_path}/router.js.es6"
29
+ end
30
+
31
+ def create_ember_app_file
32
+ template "ember-app.js.es6", "#{ember_path}/ember-app.js.es6"
33
+ end
34
+
35
+ private
36
+
37
+ def inject_into_application_file
38
+ application_file = "#{ember_path}/application.js"
39
+ inject_into_file( application_file, :before => /^.*require_tree.*$/) do
40
+ context = instance_eval('binding')
41
+ source = File.expand_path(find_in_source_paths("application.js"))
42
+ ERB.new(::File.binread(source), nil, '-', '@output_buffer').result(context)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,40 @@
1
+ require 'rails/generators'
2
+
3
+ module Ember
4
+ module Generators
5
+ module GeneratorHelpers
6
+
7
+ def ember_path
8
+ if rails_engine?
9
+ options[:ember_path] || "app/assets/javascripts/#{engine_name}"
10
+ else
11
+ options[:ember_path] || "app/assets/javascripts"
12
+ end
13
+ end
14
+
15
+ def rails_engine?
16
+ defined?(ENGINE_PATH)
17
+ end
18
+
19
+ def engine_name
20
+ ENGINE_PATH.split('/')[-2]
21
+ end
22
+
23
+ def application_name
24
+ if options[:app_name]
25
+ options[:app_name]
26
+ else
27
+ "App"
28
+ end
29
+ end
30
+
31
+ def class_name
32
+ (class_path + [file_name]).map!{ |m| m.camelize }.join()
33
+ end
34
+
35
+ def handlebars_template_path
36
+ File.join(class_path, file_name).gsub(/^\//, '')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,20 @@
1
+ require 'generators/ember/generator_helpers'
2
+
3
+ module Ember
4
+ module Generators
5
+ class RouteGenerator < ::Rails::Generators::NamedBase
6
+ include Ember::Generators::GeneratorHelpers
7
+
8
+ source_root File.expand_path("../../templates", __FILE__)
9
+
10
+ desc "Creates a new Ember.js route"
11
+ class_option :ember_path, :type => :string, :aliases => "-d", :default => false, :desc => "Custom ember app path"
12
+
13
+ def create_route_files
14
+ file_path = File.join(ember_path, 'routes', class_path, "#{file_name}.js.es6")
15
+ template "route.js.es6", file_path
16
+ end
17
+ end
18
+ end
19
+ end
20
+
@@ -0,0 +1,2 @@
1
+ //= require jquery
2
+ //= require ember-app
@@ -0,0 +1,15 @@
1
+ //= require ember-appkit
2
+ //= require_self
3
+ //= require router
4
+ //= require_tree ./mixins
5
+ //= require_tree ./models
6
+ //= require_tree ./templates
7
+ //= require_tree ./controllers
8
+ //= require_tree ./components
9
+ //= require_tree ./routes
10
+ //= require_tree ./views
11
+ //= require_tree ./helpers
12
+
13
+
14
+ window.<%= application_name.camelize %> = require('app').default.create();
15
+
@@ -0,0 +1,3 @@
1
+ export default = <%= class_name.camelize %>Route = Ember.Route.extend({
2
+
3
+ });
@@ -0,0 +1,7 @@
1
+ var Router = Ember.Router.extend();
2
+
3
+ Router.map(function() {
4
+
5
+ });
6
+
7
+ export default = Router;
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,14 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require ember-app
@@ -0,0 +1,4 @@
1
+ var MyComponent = Ember.Component.extend({
2
+ });
3
+
4
+ export default = MyComponent;
@@ -0,0 +1,9 @@
1
+ var IndexController = Ember.ObjectController.extend({
2
+ actions: {
3
+ sayHi: function() {
4
+ alert(this.get('name') + ' says hi!');
5
+ }
6
+ }
7
+ });
8
+
9
+ export default = IndexController;
@@ -0,0 +1,9 @@
1
+ //= require ember-appkit
2
+ //= require_self
3
+ //= require router
4
+ //= require_tree ./models
5
+ //= require_tree ./templates
6
+ //= require_tree ./controllers
7
+ //= require_tree ./routes
8
+
9
+ window.App = require('app').default.create();
@@ -0,0 +1,3 @@
1
+ var Person = Ember.Object.extend();
2
+
3
+ export default = Person;
@@ -0,0 +1,7 @@
1
+ var Router = Ember.Router.extend();
2
+
3
+ Router.map(function() {
4
+ this.route('about');
5
+ });
6
+
7
+ export default = Router;
@@ -0,0 +1,13 @@
1
+ import Person from 'appkit/models/person';
2
+
3
+ var IndexRoute = Ember.Route.extend({
4
+ model: function() {
5
+ return Person.create({
6
+ name: 'Joe Doe',
7
+ company: 'B&W',
8
+ job: 'Sound Engineer'
9
+ });
10
+ }
11
+ });
12
+
13
+ export default = IndexRoute;
@@ -0,0 +1,2 @@
1
+ <h1>Test App</h1>
2
+ {{outlet}}
@@ -0,0 +1,6 @@
1
+ <h2>Person</h2>
2
+ {{name}} is a {{job}} at {{company}}.
3
+ <button {{action "sayHi"}}>Hi</button>
4
+
5
+ <h2>Component Example</h2>
6
+ {{my-component name=name}}
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,14 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'action_controller/railtie'
4
+ require 'sprockets/railtie'
5
+ require 'rails/test_unit/railtie'
6
+
7
+ Bundler.require(*Rails.groups)
8
+ require 'ember/appkit/rails'
9
+ require 'jquery-rails'
10
+
11
+ module Dummy
12
+ class Application < Rails::Application; end
13
+ end
14
+