coffee-rails 4.1.0 → 4.1.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +5 -9
- data/lib/coffee/rails/version.rb +1 -1
- metadata +6 -30
- data/.gitignore +0 -3
- data/.travis.yml +0 -17
- data/Gemfile +0 -11
- data/Rakefile +0 -28
- data/coffee-rails.gemspec +0 -24
- data/coffee-rails.gemspec.erb +0 -24
- data/gemfiles/Gemfile-4-0-stable +0 -11
- data/gemfiles/Gemfile-4-1-stable +0 -11
- data/test/assets_generator_test.rb +0 -15
- data/test/assets_test.rb +0 -35
- data/test/controller_generator_test.rb +0 -19
- data/test/scaffold_generator_test.rb +0 -19
- data/test/support/routes.rb +0 -1
- data/test/support/site/index.coffee +0 -1
- data/test/template_handler_test.rb +0 -26
- data/test/test_helper.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d10db1f8b2773dd6926f86a08532c5a12b411a9
|
4
|
+
data.tar.gz: 105fcc06d65ebe9e591c14fcbdf17d1364c48fa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7767da2d9d38ea81ec0eb57ab410cb0c09d6079007f9c4f0935b42ede4314c232ab2bfbe9e73f78b4280731aaa1b59390d16abd45dbc238724f3b32bf2b10c21
|
7
|
+
data.tar.gz: 6b2705c144786fa5c4898945ed49d3fdc121105d2c03e880bc57dafe4ffed52a9590cd0a85fa6eef287c8d3e92fd29be9cf36be719808a40d4d9a6f57e2e0046
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,21 @@
|
|
1
1
|
# Coffee-Rails
|
2
2
|
|
3
|
-
CoffeeScript adapter for the Rails asset pipeline. Also adds support to use CoffeeScript to respond to JavaScript requests (use
|
3
|
+
CoffeeScript adapter for the Rails asset pipeline. Also adds support to use CoffeeScript to respond to JavaScript requests (use `.coffee` views).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Since Rails 3.1 Coffee-Rails is included in the default Gemfile when you create a new application. If you are upgrading to Rails 3.1 you must add the coffee-rails to your Gemfile:
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
group :assets do
|
14
|
-
gem 'coffee-rails'
|
15
|
-
end
|
9
|
+
~~~ruby
|
10
|
+
gem 'coffee-rails'
|
11
|
+
~~~
|
16
12
|
|
17
13
|
## Running tests
|
18
14
|
|
19
15
|
$ bundle install
|
20
16
|
$ bundle exec rake test
|
21
17
|
|
22
|
-
If you need to test against local gems, use Bundler's gem
|
18
|
+
If you need to test against local gems, use Bundler's gem `:path` option in the Gemfile.
|
23
19
|
|
24
20
|
## Code Status
|
25
21
|
|
data/lib/coffee/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffee-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Santiago Pastorino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 4.0.0
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 5.1.x
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 4.0.0
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 5.1.x
|
47
47
|
description: CoffeeScript adapter for the Rails asset pipeline.
|
48
48
|
email:
|
49
49
|
- santiago@wyeworks.com
|
@@ -51,17 +51,9 @@ executables: []
|
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
|
-
- ".gitignore"
|
55
|
-
- ".travis.yml"
|
56
54
|
- CHANGELOG.md
|
57
|
-
- Gemfile
|
58
55
|
- MIT-LICENSE
|
59
56
|
- README.md
|
60
|
-
- Rakefile
|
61
|
-
- coffee-rails.gemspec
|
62
|
-
- coffee-rails.gemspec.erb
|
63
|
-
- gemfiles/Gemfile-4-0-stable
|
64
|
-
- gemfiles/Gemfile-4-1-stable
|
65
57
|
- lib/assets/javascripts/coffee-script.js.erb
|
66
58
|
- lib/coffee-rails.rb
|
67
59
|
- lib/coffee/rails/engine.rb
|
@@ -69,14 +61,6 @@ files:
|
|
69
61
|
- lib/coffee/rails/version.rb
|
70
62
|
- lib/rails/generators/coffee/assets/assets_generator.rb
|
71
63
|
- lib/rails/generators/coffee/assets/templates/javascript.coffee
|
72
|
-
- test/assets_generator_test.rb
|
73
|
-
- test/assets_test.rb
|
74
|
-
- test/controller_generator_test.rb
|
75
|
-
- test/scaffold_generator_test.rb
|
76
|
-
- test/support/routes.rb
|
77
|
-
- test/support/site/index.coffee
|
78
|
-
- test/template_handler_test.rb
|
79
|
-
- test/test_helper.rb
|
80
64
|
homepage: https://github.com/rails/coffee-rails
|
81
65
|
licenses:
|
82
66
|
- MIT
|
@@ -97,16 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
81
|
version: '0'
|
98
82
|
requirements: []
|
99
83
|
rubyforge_project: coffee-rails
|
100
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.5.1
|
101
85
|
signing_key:
|
102
86
|
specification_version: 4
|
103
87
|
summary: CoffeeScript adapter for the Rails asset pipeline.
|
104
|
-
test_files:
|
105
|
-
- test/assets_generator_test.rb
|
106
|
-
- test/assets_test.rb
|
107
|
-
- test/controller_generator_test.rb
|
108
|
-
- test/scaffold_generator_test.rb
|
109
|
-
- test/support/routes.rb
|
110
|
-
- test/support/site/index.coffee
|
111
|
-
- test/template_handler_test.rb
|
112
|
-
- test/test_helper.rb
|
88
|
+
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
before_install:
|
3
|
-
- gem install bundler
|
4
|
-
rvm:
|
5
|
-
- 1.9.3
|
6
|
-
- 2.0.0
|
7
|
-
- 2.1.0
|
8
|
-
- jruby
|
9
|
-
- rbx
|
10
|
-
gemfile:
|
11
|
-
- Gemfile
|
12
|
-
- gemfiles/Gemfile-4-0-stable
|
13
|
-
- gemfiles/Gemfile-4-1-stable
|
14
|
-
notifications:
|
15
|
-
email: false
|
16
|
-
campfire:
|
17
|
-
secure: "CGWvthGkBKNnTnk9YSmf9AXKoiRI33fCl5D3jU4nx3cOPu6kv2R9nMjt9EAo\nOuS4Q85qNSf4VNQ2cUPNiNYSWQ+XiTfivKvDUw/QW9r1FejYyeWarMsSBWA+\n0fADjF1M2dkDIVLgYPfwoXEv7l+j654F1KLKB69F0F/netwP9CQ="
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
Bundler::GemHelper.install_tasks
|
3
|
-
|
4
|
-
require 'rake/testtask'
|
5
|
-
|
6
|
-
Rake::TestTask.new(:test) do |t|
|
7
|
-
t.libs << 'lib'
|
8
|
-
t.libs << 'test'
|
9
|
-
t.pattern = 'test/**/*_test.rb'
|
10
|
-
t.verbose = false
|
11
|
-
end
|
12
|
-
|
13
|
-
task default: :test
|
14
|
-
|
15
|
-
specname = "coffee-rails.gemspec"
|
16
|
-
deps = `git ls-files`.split("\n") - [specname]
|
17
|
-
|
18
|
-
file specname => deps do
|
19
|
-
files = `git ls-files`.split("\n")
|
20
|
-
test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
-
executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
|
-
|
23
|
-
require 'erb'
|
24
|
-
|
25
|
-
File.open specname, 'w:utf-8' do |f|
|
26
|
-
f.write ERB.new(File.read("#{specname}.erb")).result(binding)
|
27
|
-
end
|
28
|
-
end
|
data/coffee-rails.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
$:.push File.expand_path("../lib", __FILE__)
|
2
|
-
require "coffee/rails/version"
|
3
|
-
|
4
|
-
Gem::Specification.new do |s|
|
5
|
-
s.name = "coffee-rails"
|
6
|
-
s.version = Coffee::Rails::VERSION
|
7
|
-
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = ["Santiago Pastorino"]
|
9
|
-
s.email = ["santiago@wyeworks.com"]
|
10
|
-
s.homepage = "https://github.com/rails/coffee-rails"
|
11
|
-
s.summary = %q{CoffeeScript adapter for the Rails asset pipeline.}
|
12
|
-
s.description = %q{CoffeeScript adapter for the Rails asset pipeline.}
|
13
|
-
|
14
|
-
s.rubyforge_project = "coffee-rails"
|
15
|
-
|
16
|
-
s.add_runtime_dependency 'coffee-script', '>= 2.2.0'
|
17
|
-
s.add_runtime_dependency 'railties', '>= 4.0.0', '< 5.0'
|
18
|
-
|
19
|
-
s.files = [".gitignore",".travis.yml","CHANGELOG.md","Gemfile","MIT-LICENSE","README.md","Rakefile","coffee-rails.gemspec","coffee-rails.gemspec.erb","gemfiles/Gemfile-4-0-stable","gemfiles/Gemfile-4-1-stable","lib/assets/javascripts/coffee-script.js.erb","lib/coffee-rails.rb","lib/coffee/rails/engine.rb","lib/coffee/rails/template_handler.rb","lib/coffee/rails/version.rb","lib/rails/generators/coffee/assets/assets_generator.rb","lib/rails/generators/coffee/assets/templates/javascript.coffee","test/assets_generator_test.rb","test/assets_test.rb","test/controller_generator_test.rb","test/scaffold_generator_test.rb","test/support/routes.rb","test/support/site/index.coffee","test/template_handler_test.rb","test/test_helper.rb"]
|
20
|
-
s.test_files = ["test/assets_generator_test.rb","test/assets_test.rb","test/controller_generator_test.rb","test/scaffold_generator_test.rb","test/support/routes.rb","test/support/site/index.coffee","test/template_handler_test.rb","test/test_helper.rb"]
|
21
|
-
s.executables = []
|
22
|
-
s.require_paths = ["lib"]
|
23
|
-
s.license = "MIT"
|
24
|
-
end
|
data/coffee-rails.gemspec.erb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
$:.push File.expand_path("../lib", __FILE__)
|
2
|
-
require "coffee/rails/version"
|
3
|
-
|
4
|
-
Gem::Specification.new do |s|
|
5
|
-
s.name = "coffee-rails"
|
6
|
-
s.version = Coffee::Rails::VERSION
|
7
|
-
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = ["Santiago Pastorino"]
|
9
|
-
s.email = ["santiago@wyeworks.com"]
|
10
|
-
s.homepage = "https://github.com/rails/coffee-rails"
|
11
|
-
s.summary = %q{CoffeeScript adapter for the Rails asset pipeline.}
|
12
|
-
s.description = %q{CoffeeScript adapter for the Rails asset pipeline.}
|
13
|
-
|
14
|
-
s.rubyforge_project = "coffee-rails"
|
15
|
-
|
16
|
-
s.add_runtime_dependency 'coffee-script', '>= 2.2.0'
|
17
|
-
s.add_runtime_dependency 'railties', '>= 4.0.0', '< 5.0'
|
18
|
-
|
19
|
-
s.files = [<%= files.map(&:inspect).join ',' %>]
|
20
|
-
s.test_files = [<%= test_files.map(&:inspect).join ',' %>]
|
21
|
-
s.executables = [<%= executables.map(&:inspect).join ',' %>]
|
22
|
-
s.require_paths = ["lib"]
|
23
|
-
s.license = "MIT"
|
24
|
-
end
|
data/gemfiles/Gemfile-4-0-stable
DELETED
data/gemfiles/Gemfile-4-1-stable
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'rails/generators/coffee/assets/assets_generator'
|
3
|
-
|
4
|
-
class AssetGeneratorTest < Rails::Generators::TestCase
|
5
|
-
tests Coffee::Generators::AssetsGenerator
|
6
|
-
|
7
|
-
destination File.expand_path("../tmp", __FILE__)
|
8
|
-
setup :prepare_destination
|
9
|
-
|
10
|
-
def test_assets
|
11
|
-
run_generator %w(posts)
|
12
|
-
assert_no_file "app/assets/javascripts/posts.js"
|
13
|
-
assert_file "app/assets/javascripts/posts.coffee"
|
14
|
-
end
|
15
|
-
end
|
data/test/assets_test.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'coffee-rails'
|
3
|
-
|
4
|
-
class AssetsTest < ActiveSupport::TestCase
|
5
|
-
def setup
|
6
|
-
require "rails"
|
7
|
-
require "action_controller/railtie"
|
8
|
-
require "sprockets/railtie"
|
9
|
-
|
10
|
-
@app = Class.new(Rails::Application)
|
11
|
-
@app.config.eager_load = false
|
12
|
-
@app.config.active_support.deprecation = :stderr
|
13
|
-
@app.config.assets.enabled = true
|
14
|
-
@app.config.assets.cache_store = [ :file_store, "#{tmp_path}/cache" ]
|
15
|
-
@app.paths["log"] = "#{tmp_path}/log/test.log"
|
16
|
-
@app.initialize!
|
17
|
-
end
|
18
|
-
|
19
|
-
def teardown
|
20
|
-
FileUtils.rm_rf "#{tmp_path}/cache"
|
21
|
-
FileUtils.rm_rf "#{tmp_path}/log"
|
22
|
-
File.delete "#{tmp_path}/coffee-script.js"
|
23
|
-
end
|
24
|
-
|
25
|
-
test "coffee-script.js is included in Sprockets environment" do
|
26
|
-
@app.assets["coffee-script"].write_to("#{tmp_path}/coffee-script.js")
|
27
|
-
|
28
|
-
assert_match "/lib/assets/javascripts/coffee-script.js.erb", @app.assets["coffee-script"].pathname.to_s
|
29
|
-
assert_match "CoffeeScript Compiler", File.open("#{tmp_path}/coffee-script.js").read
|
30
|
-
end
|
31
|
-
|
32
|
-
def tmp_path
|
33
|
-
"#{File.dirname(__FILE__)}/tmp"
|
34
|
-
end
|
35
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'rails/generators/rails/controller/controller_generator'
|
3
|
-
require 'rails/generators/coffee/assets/assets_generator'
|
4
|
-
|
5
|
-
class ControllerGeneratorTest < Rails::Generators::TestCase
|
6
|
-
tests Rails::Generators::ControllerGenerator
|
7
|
-
|
8
|
-
destination File.expand_path("../tmp", __FILE__)
|
9
|
-
setup do
|
10
|
-
prepare_destination
|
11
|
-
copy_routes
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_assets
|
15
|
-
run_generator %w(posts --javascript-engine=coffee --orm=false)
|
16
|
-
assert_no_file "app/assets/javascripts/posts.js"
|
17
|
-
assert_file "app/assets/javascripts/posts.coffee"
|
18
|
-
end
|
19
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'rails/generators/rails/scaffold/scaffold_generator'
|
3
|
-
require 'rails/generators/coffee/assets/assets_generator'
|
4
|
-
|
5
|
-
class ScaffoldGeneratorTest < Rails::Generators::TestCase
|
6
|
-
tests Rails::Generators::ScaffoldGenerator
|
7
|
-
|
8
|
-
destination File.expand_path("../tmp", __FILE__)
|
9
|
-
setup do
|
10
|
-
prepare_destination
|
11
|
-
copy_routes
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_assets
|
15
|
-
run_generator %w(posts --javascript-engine=coffee --orm=false)
|
16
|
-
assert_no_file "app/assets/javascripts/posts.js"
|
17
|
-
assert_file "app/assets/javascripts/posts.coffee"
|
18
|
-
end
|
19
|
-
end
|
data/test/support/routes.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# routes dummy file
|
@@ -1 +0,0 @@
|
|
1
|
-
alert 'hello world'
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'action_controller'
|
3
|
-
require 'coffee-rails'
|
4
|
-
|
5
|
-
class SiteController < ActionController::Base
|
6
|
-
self.view_paths = File.expand_path("../support", __FILE__)
|
7
|
-
end
|
8
|
-
|
9
|
-
DummyApp = ActionDispatch::Routing::RouteSet.new
|
10
|
-
DummyApp.draw do
|
11
|
-
get "site/index"
|
12
|
-
end
|
13
|
-
|
14
|
-
class TemplateHandlerTest < ActiveSupport::TestCase
|
15
|
-
include Rack::Test::Methods
|
16
|
-
|
17
|
-
def app
|
18
|
-
@app ||= DummyApp
|
19
|
-
end
|
20
|
-
|
21
|
-
test "coffee views are served as javascript" do
|
22
|
-
get "/site/index.js"
|
23
|
-
|
24
|
-
assert_match "alert('hello world');\n", last_response.body
|
25
|
-
end
|
26
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Configure Rails Envinronment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'rails'
|
6
|
-
require "rails/test_help"
|
7
|
-
|
8
|
-
# For generators
|
9
|
-
require 'rails/generators/test_case'
|
10
|
-
|
11
|
-
def copy_routes
|
12
|
-
routes = File.expand_path("../support/routes.rb", __FILE__)
|
13
|
-
destination = File.join(destination_root, "config")
|
14
|
-
|
15
|
-
FileUtils.mkdir_p(destination)
|
16
|
-
FileUtils.cp routes, destination
|
17
|
-
end
|