ember_script-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.gitignore +49 -0
  2. data/.travis.yml +12 -0
  3. data/Appraisals +8 -0
  4. data/Gemfile +2 -18
  5. data/Gemfile.lock +24 -29
  6. data/README.md +18 -4
  7. data/Rakefile +7 -12
  8. data/ember_script-rails.gemspec +21 -51
  9. data/gemfiles/rails3.gemfile +7 -0
  10. data/gemfiles/rails3.gemfile.lock +127 -0
  11. data/gemfiles/rails4.gemfile +8 -0
  12. data/gemfiles/rails4.gemfile.lock +137 -0
  13. data/lib/ember_script/rails/engine.rb +18 -0
  14. data/lib/ember_script/rails/version.rb +5 -0
  15. data/lib/ember_script-rails.rb +2 -1
  16. data/spec/requests/assets_spec.rb +10 -0
  17. data/spec/spec_helper.rb +33 -0
  18. data/spec/support/dummy_app/.gitignore +15 -0
  19. data/spec/support/dummy_app/Gemfile +39 -0
  20. data/spec/support/dummy_app/Gemfile.lock +115 -0
  21. data/spec/support/dummy_app/Rakefile +7 -0
  22. data/spec/support/dummy_app/app/assets/images/rails.png +0 -0
  23. data/spec/support/dummy_app/app/assets/javascripts/application.js.em +1 -0
  24. data/spec/support/dummy_app/app/assets/stylesheets/application.css +13 -0
  25. data/spec/support/dummy_app/app/controllers/application_controller.rb +3 -0
  26. data/spec/support/dummy_app/app/controllers/home_controller.rb +4 -0
  27. data/spec/support/dummy_app/app/helpers/application_helper.rb +2 -0
  28. data/spec/support/dummy_app/app/views/home/index.html.erb +0 -0
  29. data/spec/support/dummy_app/app/views/layouts/application.html.erb +14 -0
  30. data/spec/support/dummy_app/config/application.rb +37 -0
  31. data/spec/support/dummy_app/config/boot.rb +6 -0
  32. data/spec/support/dummy_app/config/database.yml +25 -0
  33. data/spec/support/dummy_app/config/environment.rb +5 -0
  34. data/spec/support/dummy_app/config/environments/development.rb +27 -0
  35. data/spec/support/dummy_app/config/environments/test.rb +28 -0
  36. data/spec/support/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  37. data/spec/support/dummy_app/config/initializers/inflections.rb +15 -0
  38. data/spec/support/dummy_app/config/initializers/mime_types.rb +5 -0
  39. data/spec/support/dummy_app/config/initializers/secret_token.rb +9 -0
  40. data/spec/support/dummy_app/config/initializers/session_store.rb +8 -0
  41. data/spec/support/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  42. data/spec/support/dummy_app/config/locales/en.yml +5 -0
  43. data/spec/support/dummy_app/config/routes.rb +3 -0
  44. data/spec/support/dummy_app/config.ru +4 -0
  45. data/spec/support/dummy_app/lib/assets/.gitkeep +0 -0
  46. data/spec/support/dummy_app/lib/tasks/.gitkeep +0 -0
  47. data/spec/support/dummy_app/log/.gitkeep +0 -0
  48. data/spec/support/dummy_app/public/favicon.ico +0 -0
  49. data/spec/support/dummy_app/script/rails +6 -0
  50. metadata +135 -15
  51. data/lib/ember_script/rails/railtie.rb +0 -15
@@ -0,0 +1,33 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+
3
+ require 'bundler'
4
+ Bundler.require(:default, :test)
5
+
6
+ require 'ember_script-rails'
7
+
8
+ PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze
9
+ $LOAD_PATH << File.join(PROJECT_ROOT, 'lib')
10
+
11
+ require File.expand_path("../support/dummy_app/config/environment.rb", __FILE__)
12
+
13
+
14
+ # require 'rspec/rails'
15
+
16
+ require 'rspec/core'
17
+
18
+ RSpec::configure do |c|
19
+ c.backtrace_clean_patterns << /vendor\//
20
+ c.backtrace_clean_patterns << /lib\/rspec\/rails/
21
+ end
22
+
23
+ # Extensions break w/ rails edge
24
+ #require 'rspec/rails/extensions'
25
+ require 'rspec/rails/view_rendering'
26
+ require 'rspec/rails/adapters'
27
+ require 'rspec/rails/matchers'
28
+ require 'rspec/rails/fixture_support'
29
+ require 'rspec/rails/mocks'
30
+ require 'rspec/rails/module_inclusion'
31
+ require 'rspec/rails/example'
32
+ require 'rspec/rails/vendor/capybara'
33
+ require 'rspec/rails/vendor/webrat'
@@ -0,0 +1,15 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
@@ -0,0 +1,39 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '3.2.9'
4
+
5
+ # Bundle edge Rails instead:
6
+ # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
+
8
+ gem 'sqlite3'
9
+
10
+ gem 'ember_script'
11
+
12
+ # Gems used only for assets and not required
13
+ # in production environments by default.
14
+ group :assets do
15
+ gem 'sass-rails', '~> 3.2.3'
16
+ gem 'coffee-rails', '~> 3.2.1'
17
+
18
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
19
+ # gem 'therubyracer', :platforms => :ruby
20
+
21
+ gem 'uglifier', '>= 1.0.3'
22
+ end
23
+
24
+ gem 'jquery-rails'
25
+
26
+ # To use ActiveModel has_secure_password
27
+ # gem 'bcrypt-ruby', '~> 3.0.0'
28
+
29
+ # To use Jbuilder templates for JSON
30
+ # gem 'jbuilder'
31
+
32
+ # Use unicorn as the app server
33
+ # gem 'unicorn'
34
+
35
+ # Deploy with Capistrano
36
+ # gem 'capistrano'
37
+
38
+ # To use debugger
39
+ # gem 'debugger'
@@ -0,0 +1,115 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.9)
5
+ actionpack (= 3.2.9)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.9)
8
+ activemodel (= 3.2.9)
9
+ activesupport (= 3.2.9)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.9)
18
+ activesupport (= 3.2.9)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.9)
21
+ activemodel (= 3.2.9)
22
+ activesupport (= 3.2.9)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.9)
26
+ activemodel (= 3.2.9)
27
+ activesupport (= 3.2.9)
28
+ activesupport (3.2.9)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ arel (3.0.2)
32
+ builder (3.0.4)
33
+ coffee-rails (3.2.2)
34
+ coffee-script (>= 2.2.0)
35
+ railties (~> 3.2.0)
36
+ coffee-script (2.2.0)
37
+ coffee-script-source
38
+ execjs
39
+ coffee-script-source (1.4.0)
40
+ ember_script (0.0.3)
41
+ tilt
42
+ erubis (2.7.0)
43
+ execjs (1.4.0)
44
+ multi_json (~> 1.0)
45
+ hike (1.2.1)
46
+ i18n (0.6.1)
47
+ journey (1.0.4)
48
+ jquery-rails (2.1.4)
49
+ railties (>= 3.0, < 5.0)
50
+ thor (>= 0.14, < 2.0)
51
+ json (1.7.5)
52
+ mail (2.4.4)
53
+ i18n (>= 0.4.0)
54
+ mime-types (~> 1.16)
55
+ treetop (~> 1.4.8)
56
+ mime-types (1.19)
57
+ multi_json (1.5.0)
58
+ polyglot (0.3.3)
59
+ rack (1.4.1)
60
+ rack-cache (1.2)
61
+ rack (>= 0.4)
62
+ rack-ssl (1.3.2)
63
+ rack
64
+ rack-test (0.6.2)
65
+ rack (>= 1.0)
66
+ rails (3.2.9)
67
+ actionmailer (= 3.2.9)
68
+ actionpack (= 3.2.9)
69
+ activerecord (= 3.2.9)
70
+ activeresource (= 3.2.9)
71
+ activesupport (= 3.2.9)
72
+ bundler (~> 1.0)
73
+ railties (= 3.2.9)
74
+ railties (3.2.9)
75
+ actionpack (= 3.2.9)
76
+ activesupport (= 3.2.9)
77
+ rack-ssl (~> 1.3.2)
78
+ rake (>= 0.8.7)
79
+ rdoc (~> 3.4)
80
+ thor (>= 0.14.6, < 2.0)
81
+ rake (10.0.3)
82
+ rdoc (3.12)
83
+ json (~> 1.4)
84
+ sass (3.2.4)
85
+ sass-rails (3.2.5)
86
+ railties (~> 3.2.0)
87
+ sass (>= 3.1.10)
88
+ tilt (~> 1.3)
89
+ sprockets (2.2.2)
90
+ hike (~> 1.2)
91
+ multi_json (~> 1.0)
92
+ rack (~> 1.0)
93
+ tilt (~> 1.1, != 1.3.0)
94
+ sqlite3 (1.3.6)
95
+ thor (0.16.0)
96
+ tilt (1.3.3)
97
+ treetop (1.4.12)
98
+ polyglot
99
+ polyglot (>= 0.3.1)
100
+ tzinfo (0.3.35)
101
+ uglifier (1.3.0)
102
+ execjs (>= 0.3.0)
103
+ multi_json (~> 1.0, >= 1.0.2)
104
+
105
+ PLATFORMS
106
+ ruby
107
+
108
+ DEPENDENCIES
109
+ coffee-rails (~> 3.2.1)
110
+ ember_script
111
+ jquery-rails
112
+ rails (= 3.2.9)
113
+ sass-rails (~> 3.2.3)
114
+ sqlite3
115
+ uglifier (>= 1.0.3)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ DummyApp::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,4 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,37 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "active_model/railtie"
4
+ require "action_controller/railtie"
5
+ require 'sprockets/railtie'
6
+
7
+ if defined?(Bundler)
8
+ # If you precompile assets before deploying to production, use this line
9
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
10
+ # If you want your assets lazily compiled in production, use this line
11
+ # Bundler.require(:default, :assets, Rails.env)
12
+ end
13
+
14
+ if Rails.env.development?
15
+ PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')).freeze
16
+ $LOAD_PATH << File.join(PROJECT_ROOT, 'lib')
17
+ require 'ember_script-rails'
18
+ end
19
+
20
+ module DummyApp
21
+ class Application < Rails::Application
22
+ # Configure the default encoding used in templates for Ruby 1.9.
23
+ config.encoding = "utf-8"
24
+
25
+ # Configure sensitive parameters which will be filtered from the log file.
26
+ config.filter_parameters += [:password]
27
+
28
+ # Enable escaping HTML in JSON.
29
+ config.active_support.escape_html_entities_in_json = true
30
+
31
+ # Enable the asset pipeline
32
+ config.assets.enabled = true
33
+
34
+ # Version of your assets, change this if you want to expire all your assets
35
+ config.assets.version = '1.0'
36
+ end
37
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ DummyApp::Application.initialize!
@@ -0,0 +1,27 @@
1
+ DummyApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Print deprecation notices to the Rails logger
17
+ config.active_support.deprecation = :log
18
+
19
+ # Only use best-standards-support built into browsers
20
+ config.action_dispatch.best_standards_support = :builtin
21
+
22
+ # Do not compress assets
23
+ config.assets.compress = false
24
+
25
+ # Expands the lines which load the assets
26
+ config.assets.debug = true
27
+ end
@@ -0,0 +1,28 @@
1
+ DummyApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Show full error reports and disable caching
15
+ config.consider_all_requests_local = true
16
+ config.action_controller.perform_caching = false
17
+
18
+ # Raise exceptions instead of rendering exception templates
19
+ config.action_dispatch.show_exceptions = false
20
+
21
+ # Disable request forgery protection in test environment
22
+ config.action_controller.allow_forgery_protection = false
23
+
24
+ # Print deprecation notices to the stderr
25
+ config.active_support.deprecation = :stderr
26
+
27
+ config.eager_load = false
28
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,9 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ DummyApp::Application.config.secret_token = '1f186a67e9c2eb4b363ff710de1e55269972364290d4bdfd72b58118d89bede3eb4fbeff7c80bc955034755a18ea77c8712e712a4282bc7a53fc70398e579fdf'
8
+
9
+ DummyApp::Application.config.secret_key_base = DummyApp::Application.config.secret_token
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ DummyApp::Application.config.session_store :cookie_store, key: '_dummy_app_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # DummyApp::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ DummyApp::Application.routes.draw do
2
+ get '/' => 'home#index'
3
+ end
@@ -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 DummyApp::Application
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'