coffee-rails 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in coffee-rails.gemspec
4
4
  gemspec
5
5
 
6
- gem "rails", :git => "git://github.com/rails/rails", :branch => "3-1-stable"
6
+ gem "rails", :git => "git://github.com/rails/rails"
7
7
 
8
8
  # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
9
9
  # gem 'ruby-debug'
data/coffee-rails.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.rubyforge_project = "coffee-rails"
15
15
 
16
16
  s.add_runtime_dependency 'coffee-script', '>= 2.2.0'
17
- s.add_runtime_dependency 'railties', '~> 3.1.0'
17
+ s.add_runtime_dependency 'railties', '~> 3.2.0.beta'
18
18
 
19
19
  s.files = `git ls-files`.split("\n")
20
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -0,0 +1 @@
1
+ <%= CoffeeScript::Source.contents %>
data/lib/coffee-rails.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  require 'coffee-script'
2
- require 'coffee/rails/railtie'
2
+ require 'coffee/rails/engine'
3
3
  require 'coffee/rails/template_handler'
4
4
  require 'coffee/rails/version'
@@ -1,8 +1,8 @@
1
- require 'rails/railtie'
1
+ require 'rails/engine'
2
2
 
3
3
  module Coffee
4
4
  module Rails
5
- class Railtie < ::Rails::Railtie
5
+ class Engine < ::Rails::Engine
6
6
  config.app_generators.javascript_engine :coffee
7
7
  end
8
8
  end
@@ -1,5 +1,5 @@
1
1
  module Coffee
2
2
  module Rails
3
- VERSION = "3.1.1"
3
+ VERSION = "3.2.0"
4
4
  end
5
5
  end
@@ -0,0 +1,34 @@
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.active_support.deprecation = :stderr
12
+ @app.config.assets.enabled = true
13
+ @app.config.assets.cache_store = [ :file_store, "#{tmp_path}/cache" ]
14
+ @app.paths["log"] = "#{tmp_path}/log/test.log"
15
+ @app.initialize!
16
+ end
17
+
18
+ def teardown
19
+ FileUtils.rm_rf "#{tmp_path}/cache"
20
+ FileUtils.rm_rf "#{tmp_path}/log"
21
+ File.delete "#{tmp_path}/coffee-script.js"
22
+ end
23
+
24
+ test "coffee-script.js is included in Sprockets environment" do
25
+ @app.assets["coffee-script"].write_to("#{tmp_path}/coffee-script.js")
26
+
27
+ assert_match "/lib/assets/javascripts/coffee-script.js.erb", @app.assets["coffee-script"].pathname.to_s
28
+ assert_match "this.CoffeeScript", File.open("#{tmp_path}/coffee-script.js").read
29
+ end
30
+
31
+ def tmp_path
32
+ "#{File.dirname(__FILE__)}/tmp"
33
+ end
34
+ end
metadata CHANGED
@@ -1,120 +1,93 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: coffee-rails
3
- version: !ruby/object:Gem::Version
4
- hash: 1
5
- prerelease: false
6
- segments:
7
- - 3
8
- - 1
9
- - 1
10
- version: 3.1.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.2.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Santiago Pastorino
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-09-13 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: coffee-script
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2156613220 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 2
32
- - 2
33
- - 0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
34
21
  version: 2.2.0
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: railties
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2156613220
25
+ - !ruby/object:Gem::Dependency
26
+ name: railties
27
+ requirement: &2156612300 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
29
+ requirements:
43
30
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 3
48
- - 1
49
- - 0
50
- version: 3.1.0
31
+ - !ruby/object:Gem::Version
32
+ version: 3.2.0.beta
51
33
  type: :runtime
52
- version_requirements: *id002
34
+ prerelease: false
35
+ version_requirements: *2156612300
53
36
  description: Coffee Script adapter for the Rails asset pipeline.
54
- email:
37
+ email:
55
38
  - santiago@wyeworks.com
56
39
  executables: []
57
-
58
40
  extensions: []
59
-
60
41
  extra_rdoc_files: []
61
-
62
- files:
42
+ files:
63
43
  - .gitignore
64
44
  - Gemfile
65
45
  - MIT-LICENSE
66
46
  - README.markdown
67
47
  - Rakefile
68
48
  - coffee-rails.gemspec
49
+ - lib/assets/javascripts/coffee-script.js.erb
69
50
  - lib/coffee-rails.rb
70
- - lib/coffee/rails/railtie.rb
51
+ - lib/coffee/rails/engine.rb
71
52
  - lib/coffee/rails/template_handler.rb
72
53
  - lib/coffee/rails/version.rb
73
54
  - lib/rails/generators/coffee/assets/assets_generator.rb
74
55
  - lib/rails/generators/coffee/assets/templates/javascript.js.coffee
75
56
  - test/assets_generator_test.rb
57
+ - test/assets_test.rb
76
58
  - test/controller_generator_test.rb
77
59
  - test/scaffold_generator_test.rb
78
60
  - test/support/routes.rb
79
61
  - test/support/site/index.js.coffee
80
62
  - test/template_handler_test.rb
81
63
  - test/test_helper.rb
82
- has_rdoc: true
83
- homepage: ""
64
+ homepage: ''
84
65
  licenses: []
85
-
86
66
  post_install_message:
87
67
  rdoc_options: []
88
-
89
- require_paths:
68
+ require_paths:
90
69
  - lib
91
- required_ruby_version: !ruby/object:Gem::Requirement
70
+ required_ruby_version: !ruby/object:Gem::Requirement
92
71
  none: false
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- hash: 3
97
- segments:
98
- - 0
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
77
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- hash: 3
106
- segments:
107
- - 0
108
- version: "0"
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
109
82
  requirements: []
110
-
111
83
  rubyforge_project: coffee-rails
112
- rubygems_version: 1.3.7
84
+ rubygems_version: 1.8.10
113
85
  signing_key:
114
86
  specification_version: 3
115
87
  summary: Coffee Script adapter for the Rails asset pipeline.
116
- test_files:
88
+ test_files:
117
89
  - test/assets_generator_test.rb
90
+ - test/assets_test.rb
118
91
  - test/controller_generator_test.rb
119
92
  - test/scaffold_generator_test.rb
120
93
  - test/support/routes.rb