ember-cli-rails-routes 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +53 -0
  7. data/Rakefile +8 -0
  8. data/ember-cli-rails-routes.gemspec +29 -0
  9. data/lib/ember-cli-rails-routes.rb +8 -0
  10. data/lib/ember-cli/routes/ember_controller.rb +23 -0
  11. data/lib/ember-cli/routes/railtie.rb +9 -0
  12. data/lib/ember-cli/routes/routes_patch.rb +27 -0
  13. data/lib/ember-cli/routes/version.rb +5 -0
  14. data/spec/spec_helper.rb +96 -0
  15. data/test/dummy/.gitignore +17 -0
  16. data/test/dummy/Gemfile +44 -0
  17. data/test/dummy/Gemfile.lock +203 -0
  18. data/test/dummy/README.rdoc +28 -0
  19. data/test/dummy/Rakefile +6 -0
  20. data/test/dummy/app/assets/images/.keep +0 -0
  21. data/test/dummy/app/assets/javascripts/application.js +16 -0
  22. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  23. data/test/dummy/app/controllers/application_controller.rb +5 -0
  24. data/test/dummy/app/controllers/concerns/.keep +0 -0
  25. data/test/dummy/app/helpers/application_helper.rb +2 -0
  26. data/test/dummy/app/mailers/.keep +0 -0
  27. data/test/dummy/app/models/.keep +0 -0
  28. data/test/dummy/app/models/concerns/.keep +0 -0
  29. data/test/dummy/app/views/application/index.html.erb +1 -0
  30. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  31. data/test/dummy/bin/bundle +3 -0
  32. data/test/dummy/bin/rails +8 -0
  33. data/test/dummy/bin/rake +8 -0
  34. data/test/dummy/bin/setup +29 -0
  35. data/test/dummy/bin/spring +15 -0
  36. data/test/dummy/config.ru +4 -0
  37. data/test/dummy/config/application.rb +26 -0
  38. data/test/dummy/config/boot.rb +3 -0
  39. data/test/dummy/config/cucumber.yml +8 -0
  40. data/test/dummy/config/database.yml +28 -0
  41. data/test/dummy/config/environment.rb +5 -0
  42. data/test/dummy/config/environments/development.rb +41 -0
  43. data/test/dummy/config/environments/production.rb +79 -0
  44. data/test/dummy/config/environments/test.rb +42 -0
  45. data/test/dummy/config/initializers/assets.rb +11 -0
  46. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  48. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/test/dummy/config/initializers/inflections.rb +16 -0
  50. data/test/dummy/config/initializers/mime_types.rb +4 -0
  51. data/test/dummy/config/initializers/session_store.rb +3 -0
  52. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  53. data/test/dummy/config/locales/en.yml +23 -0
  54. data/test/dummy/config/routes.rb +3 -0
  55. data/test/dummy/config/secrets.yml +22 -0
  56. data/test/dummy/db/schema.rb +16 -0
  57. data/test/dummy/db/seeds.rb +7 -0
  58. data/test/dummy/features/renders_ember.feature +5 -0
  59. data/test/dummy/features/step_definitions/.gitkeep +0 -0
  60. data/test/dummy/features/step_definitions/navigation.rb +7 -0
  61. data/test/dummy/features/support/capybara_webkit.rb +1 -0
  62. data/test/dummy/features/support/env.rb +17 -0
  63. data/test/dummy/frontend/.bowerrc +4 -0
  64. data/test/dummy/frontend/.editorconfig +34 -0
  65. data/test/dummy/frontend/.ember-cli +9 -0
  66. data/test/dummy/frontend/.gitignore +17 -0
  67. data/test/dummy/frontend/.jshintrc +32 -0
  68. data/test/dummy/frontend/.travis.yml +23 -0
  69. data/test/dummy/frontend/.watchmanconfig +3 -0
  70. data/test/dummy/frontend/README.md +53 -0
  71. data/test/dummy/frontend/app/app.js +18 -0
  72. data/test/dummy/frontend/app/components/.gitkeep +0 -0
  73. data/test/dummy/frontend/app/controllers/.gitkeep +0 -0
  74. data/test/dummy/frontend/app/helpers/.gitkeep +0 -0
  75. data/test/dummy/frontend/app/index.html +25 -0
  76. data/test/dummy/frontend/app/models/.gitkeep +0 -0
  77. data/test/dummy/frontend/app/router.js +14 -0
  78. data/test/dummy/frontend/app/routes/.gitkeep +0 -0
  79. data/test/dummy/frontend/app/styles/app.css +0 -0
  80. data/test/dummy/frontend/app/templates/application.hbs +3 -0
  81. data/test/dummy/frontend/app/templates/components/.gitkeep +0 -0
  82. data/test/dummy/frontend/bower.json +16 -0
  83. data/test/dummy/frontend/config/environment.js +47 -0
  84. data/test/dummy/frontend/ember-cli-build.js +27 -0
  85. data/test/dummy/frontend/package.json +40 -0
  86. data/test/dummy/frontend/public/crossdomain.xml +15 -0
  87. data/test/dummy/frontend/public/robots.txt +3 -0
  88. data/test/dummy/frontend/testem.json +12 -0
  89. data/test/dummy/frontend/tests/.jshintrc +52 -0
  90. data/test/dummy/frontend/tests/helpers/resolver.js +11 -0
  91. data/test/dummy/frontend/tests/helpers/start-app.js +18 -0
  92. data/test/dummy/frontend/tests/index.html +33 -0
  93. data/test/dummy/frontend/tests/test-helper.js +6 -0
  94. data/test/dummy/frontend/tests/unit/.gitkeep +0 -0
  95. data/test/dummy/frontend/vendor/.gitkeep +0 -0
  96. data/test/dummy/lib/assets/.keep +0 -0
  97. data/test/dummy/lib/tasks/.keep +0 -0
  98. data/test/dummy/lib/tasks/cucumber.rake +65 -0
  99. data/test/dummy/log/.keep +0 -0
  100. data/test/dummy/public/404.html +67 -0
  101. data/test/dummy/public/422.html +67 -0
  102. data/test/dummy/public/500.html +66 -0
  103. data/test/dummy/public/favicon.ico +0 -0
  104. data/test/dummy/public/robots.txt +5 -0
  105. data/test/dummy/script/cucumber +10 -0
  106. data/test/dummy/test/controllers/.keep +0 -0
  107. data/test/dummy/test/fixtures/.keep +0 -0
  108. data/test/dummy/test/helpers/.keep +0 -0
  109. data/test/dummy/test/integration/.keep +0 -0
  110. data/test/dummy/test/mailers/.keep +0 -0
  111. data/test/dummy/test/models/.keep +0 -0
  112. data/test/dummy/test/test_helper.rb +10 -0
  113. data/test/dummy/vendor/assets/javascripts/.keep +0 -0
  114. data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
  115. metadata +365 -0
@@ -0,0 +1,3 @@
1
+ <h2 id="title">Welcome to Ember</h2>
2
+
3
+ {{outlet}}
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "frontend",
3
+ "dependencies": {
4
+ "ember": "1.13.7",
5
+ "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
6
+ "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
7
+ "ember-data": "1.13.8",
8
+ "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
9
+ "ember-qunit": "0.4.9",
10
+ "ember-qunit-notifications": "0.0.7",
11
+ "ember-resolver": "~0.1.18",
12
+ "jquery": "^1.11.3",
13
+ "loader.js": "ember-cli/loader.js#3.2.1",
14
+ "qunit": "~1.18.0"
15
+ }
16
+ }
@@ -0,0 +1,47 @@
1
+ /* jshint node: true */
2
+
3
+ module.exports = function(environment) {
4
+ var ENV = {
5
+ modulePrefix: 'frontend',
6
+ environment: environment,
7
+ baseURL: '/',
8
+ locationType: 'auto',
9
+ EmberENV: {
10
+ FEATURES: {
11
+ // Here you can enable experimental features on an ember canary build
12
+ // e.g. 'with-controller': true
13
+ }
14
+ },
15
+
16
+ APP: {
17
+ // Here you can pass flags/options to your application instance
18
+ // when it is created
19
+ }
20
+ };
21
+
22
+ if (environment === 'development') {
23
+ // ENV.APP.LOG_RESOLVER = true;
24
+ // ENV.APP.LOG_ACTIVE_GENERATION = true;
25
+ ENV.APP.LOG_TRANSITIONS = true;
26
+ ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
27
+ // ENV.APP.LOG_VIEW_LOOKUPS = true;
28
+ }
29
+
30
+ if (environment === 'test') {
31
+ // Testem prefers this...
32
+ ENV.baseURL = '/';
33
+ ENV.locationType = 'none';
34
+
35
+ // keep test console output quieter
36
+ ENV.APP.LOG_ACTIVE_GENERATION = false;
37
+ ENV.APP.LOG_VIEW_LOOKUPS = false;
38
+
39
+ ENV.APP.rootElement = '#ember-testing';
40
+ }
41
+
42
+ if (environment === 'production') {
43
+
44
+ }
45
+
46
+ return ENV;
47
+ };
@@ -0,0 +1,27 @@
1
+ /* global require, module */
2
+ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
3
+
4
+ module.exports = function(defaults) {
5
+ var app = new EmberApp(defaults, {
6
+ // Add options here
7
+ fingerprint: {
8
+ enabled: true,
9
+ prepend: 'frontend/'
10
+ }
11
+ });
12
+
13
+ // Use `app.import` to add additional libraries to the generated
14
+ // output files.
15
+ //
16
+ // If you need to use different assets in different
17
+ // environments, specify an object as the first parameter. That
18
+ // object's keys should be the environment name and the values
19
+ // should be the asset to use in that environment.
20
+ //
21
+ // If the library that you are including contains AMD or ES6
22
+ // modules that you would like to import into your application
23
+ // please specify an object with the list of modules as keys
24
+ // along with the exports of each module as its value.
25
+
26
+ return app.toTree();
27
+ };
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "frontend",
3
+ "version": "0.0.0",
4
+ "description": "Small description for frontend goes here",
5
+ "private": true,
6
+ "directories": {
7
+ "doc": "doc",
8
+ "test": "tests"
9
+ },
10
+ "scripts": {
11
+ "build": "ember build",
12
+ "start": "ember server",
13
+ "test": "ember test"
14
+ },
15
+ "repository": "",
16
+ "engines": {
17
+ "node": ">= 0.10.0"
18
+ },
19
+ "author": "",
20
+ "license": "MIT",
21
+ "devDependencies": {
22
+ "broccoli-asset-rev": "^2.1.2",
23
+ "ember-cli": "1.13.8",
24
+ "ember-cli-app-version": "0.5.0",
25
+ "ember-cli-babel": "^5.1.3",
26
+ "ember-cli-content-security-policy": "0.4.0",
27
+ "ember-cli-dependency-checker": "^1.0.1",
28
+ "ember-cli-htmlbars": "0.7.9",
29
+ "ember-cli-htmlbars-inline-precompile": "^0.2.0",
30
+ "ember-cli-ic-ajax": "0.2.1",
31
+ "ember-cli-inject-live-reload": "^1.3.1",
32
+ "ember-cli-qunit": "^1.0.0",
33
+ "ember-cli-release": "0.2.3",
34
+ "ember-cli-sri": "^1.0.3",
35
+ "ember-cli-uglify": "^1.2.0",
36
+ "ember-data": "1.13.8",
37
+ "ember-disable-proxy-controllers": "^1.0.0",
38
+ "ember-export-application-global": "^1.0.3"
39
+ }
40
+ }
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
3
+ <cross-domain-policy>
4
+ <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
5
+
6
+ <!-- Most restrictive policy: -->
7
+ <site-control permitted-cross-domain-policies="none"/>
8
+
9
+ <!-- Least restrictive policy: -->
10
+ <!--
11
+ <site-control permitted-cross-domain-policies="all"/>
12
+ <allow-access-from domain="*" to-ports="*" secure="false"/>
13
+ <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
14
+ -->
15
+ </cross-domain-policy>
@@ -0,0 +1,3 @@
1
+ # http://www.robotstxt.org
2
+ User-agent: *
3
+ Disallow:
@@ -0,0 +1,12 @@
1
+ {
2
+ "framework": "qunit",
3
+ "test_page": "tests/index.html?hidepassed",
4
+ "disable_watching": true,
5
+ "launch_in_ci": [
6
+ "PhantomJS"
7
+ ],
8
+ "launch_in_dev": [
9
+ "PhantomJS",
10
+ "Chrome"
11
+ ]
12
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "predef": [
3
+ "document",
4
+ "window",
5
+ "location",
6
+ "setTimeout",
7
+ "$",
8
+ "-Promise",
9
+ "define",
10
+ "console",
11
+ "visit",
12
+ "exists",
13
+ "fillIn",
14
+ "click",
15
+ "keyEvent",
16
+ "triggerEvent",
17
+ "find",
18
+ "findWithAssert",
19
+ "wait",
20
+ "DS",
21
+ "andThen",
22
+ "currentURL",
23
+ "currentPath",
24
+ "currentRouteName"
25
+ ],
26
+ "node": false,
27
+ "browser": false,
28
+ "boss": true,
29
+ "curly": true,
30
+ "debug": false,
31
+ "devel": false,
32
+ "eqeqeq": true,
33
+ "evil": true,
34
+ "forin": false,
35
+ "immed": false,
36
+ "laxbreak": false,
37
+ "newcap": true,
38
+ "noarg": true,
39
+ "noempty": false,
40
+ "nonew": false,
41
+ "nomen": false,
42
+ "onevar": false,
43
+ "plusplus": false,
44
+ "regexp": false,
45
+ "undef": true,
46
+ "sub": true,
47
+ "strict": false,
48
+ "white": false,
49
+ "eqnull": true,
50
+ "esnext": true,
51
+ "unused": true
52
+ }
@@ -0,0 +1,11 @@
1
+ import Resolver from 'ember/resolver';
2
+ import config from '../../config/environment';
3
+
4
+ var resolver = Resolver.create();
5
+
6
+ resolver.namespace = {
7
+ modulePrefix: config.modulePrefix,
8
+ podModulePrefix: config.podModulePrefix
9
+ };
10
+
11
+ export default resolver;
@@ -0,0 +1,18 @@
1
+ import Ember from 'ember';
2
+ import Application from '../../app';
3
+ import config from '../../config/environment';
4
+
5
+ export default function startApp(attrs) {
6
+ var application;
7
+
8
+ var attributes = Ember.merge({}, config.APP);
9
+ attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
10
+
11
+ Ember.run(function() {
12
+ application = Application.create(attributes);
13
+ application.setupForTesting();
14
+ application.injectTestHelpers();
15
+ });
16
+
17
+ return application;
18
+ }
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <title>Frontend Tests</title>
7
+ <meta name="description" content="">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+
10
+ {{content-for 'head'}}
11
+ {{content-for 'test-head'}}
12
+
13
+ <link rel="stylesheet" href="assets/vendor.css">
14
+ <link rel="stylesheet" href="assets/frontend.css">
15
+ <link rel="stylesheet" href="assets/test-support.css">
16
+
17
+ {{content-for 'head-footer'}}
18
+ {{content-for 'test-head-footer'}}
19
+ </head>
20
+ <body>
21
+
22
+ {{content-for 'body'}}
23
+ {{content-for 'test-body'}}
24
+ <script src="assets/vendor.js"></script>
25
+ <script src="assets/test-support.js"></script>
26
+ <script src="assets/frontend.js"></script>
27
+ <script src="testem.js"></script>
28
+ <script src="assets/test-loader.js"></script>
29
+
30
+ {{content-for 'body-footer'}}
31
+ {{content-for 'test-body-footer'}}
32
+ </body>
33
+ </html>
@@ -0,0 +1,6 @@
1
+ import resolver from './helpers/resolver';
2
+ import {
3
+ setResolver
4
+ } from 'ember-qunit';
5
+
6
+ setResolver(resolver);
File without changes
File without changes
File without changes
@@ -0,0 +1,65 @@
1
+ # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
+ # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
+ # files.
6
+
7
+
8
+ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
9
+
10
+ vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
11
+ $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
12
+
13
+ begin
14
+ require 'cucumber/rake/task'
15
+
16
+ namespace :cucumber do
17
+ Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t|
18
+ t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
19
+ t.fork = true # You may get faster startup if you set this to false
20
+ t.profile = 'default'
21
+ end
22
+
23
+ Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t|
24
+ t.binary = vendored_cucumber_bin
25
+ t.fork = true # You may get faster startup if you set this to false
26
+ t.profile = 'wip'
27
+ end
28
+
29
+ Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
30
+ t.binary = vendored_cucumber_bin
31
+ t.fork = true # You may get faster startup if you set this to false
32
+ t.profile = 'rerun'
33
+ end
34
+
35
+ desc 'Run all features'
36
+ task :all => [:ok, :wip]
37
+
38
+ task :statsetup do
39
+ require 'rails/code_statistics'
40
+ ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
41
+ ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
42
+ end
43
+ end
44
+ desc 'Alias for cucumber:ok'
45
+ task :cucumber => 'cucumber:ok'
46
+
47
+ task :default => :cucumber
48
+
49
+ task :features => :cucumber do
50
+ STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
51
+ end
52
+
53
+ # In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
54
+ task 'test:prepare' do
55
+ end
56
+
57
+ task :stats => 'cucumber:statsetup'
58
+ rescue LoadError
59
+ desc 'cucumber rake task not available (cucumber not installed)'
60
+ task :cucumber do
61
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
62
+ end
63
+ end
64
+
65
+ end
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>