engine-assets 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -3,6 +3,6 @@ class EngineAssets::StylesheetsController < EngineAssets::AssetsController
3
3
  private
4
4
 
5
5
  def set_headers
6
- headers['Content-Type'] = 'text/javascript; charset=utf-8'
6
+ headers['Content-Type'] = 'text/css; charset=utf-8'
7
7
  end
8
8
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{engine-assets}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Corey Innis"]
12
- s.date = %q{2009-11-18}
12
+ s.date = %q{2009-12-28}
13
13
  s.description = %q{A Rails Engine, which enables Rails Engines to provide assets (javascript, css and images)}
14
14
  s.email = %q{support@coolerator.net}
15
15
  s.extra_rdoc_files = [
data/lib/engine-assets.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module EngineAssets ; end
2
2
 
3
+ require 'action_view' unless defined?(Railss)
3
4
  require 'engine_assets/public_locator'
4
5
  require 'engine_assets/extensions/rails/assets'
@@ -6,4 +6,9 @@ describe EngineAssets::JavascriptsController do
6
6
  end
7
7
 
8
8
  it_should_behave_like "A controller acting as an AssetsController"
9
+
10
+ it "serves the correct mime type" do
11
+ get :show, :path => 'solo', :format => format
12
+ response.headers['Content-Type'].should =~ /text\/javascript/
13
+ end
9
14
  end
@@ -6,4 +6,9 @@ describe EngineAssets::StylesheetsController do
6
6
  end
7
7
 
8
8
  it_should_behave_like "A controller acting as an AssetsController"
9
+
10
+ it "serves the correct mime type" do
11
+ get :show, :path => 'solo', :format => format
12
+ response.headers['Content-Type'].should =~ /text\/css/
13
+ end
9
14
  end
data/spec/spec_helper.rb CHANGED
@@ -1,31 +1,33 @@
1
- RAILS_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'vanilla'))
1
+ unless defined?(RAILS_PATH)
2
+ RAILS_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'vanilla'))
2
3
 
3
- dir = File.dirname(__FILE__)
4
- $LOAD_PATH.unshift(dir)
4
+ dir = File.dirname(__FILE__)
5
+ $LOAD_PATH.unshift(dir)
5
6
 
6
- def require_files(*segments)
7
- Dir[File.expand_path(File.join(*segments))].each { |file| require file }
8
- end
7
+ def require_files(*segments)
8
+ Dir[File.expand_path(File.join(*segments))].each { |file| require file }
9
+ end
9
10
 
10
- ENV["RAILS_ENV"] = "test"
11
+ ENV["RAILS_ENV"] = "test"
11
12
 
12
- require "#{File.join(RAILS_PATH, 'config', 'environment')}"
13
- require 'engine-assets'
14
- require 'spec'
15
- require 'spec/autorun'
16
- require 'spec/rails'
13
+ require "#{File.join(RAILS_PATH, 'config', 'environment')}"
14
+ require 'engine-assets'
15
+ require 'spec'
16
+ require 'spec/autorun'
17
+ require 'spec/rails'
17
18
 
18
- require_files(dir, 'support', '**', '*.rb')
19
+ require_files(dir, 'support', '**', '*.rb')
19
20
 
20
- Spec::Runner.configure do |config|
21
- include Support::Helpers
21
+ Spec::Runner.configure do |config|
22
+ include Support::Helpers
22
23
 
23
- config.fixture_path = "#{File.dirname(__FILE__)}/../spec/support/fixtures"
24
- config.mock_with :rr
25
- config.use_transactional_fixtures = true
26
- config.use_instantiated_fixtures = false
24
+ config.fixture_path = "#{File.dirname(__FILE__)}/../spec/support/fixtures"
25
+ config.mock_with :rr
26
+ config.use_transactional_fixtures = true
27
+ config.use_instantiated_fixtures = false
27
28
 
28
- def basedir
29
- @basedir ||= "#{File.expand_path(File.join(File.dirname(__FILE__), '..'))}"
29
+ def basedir
30
+ @basedir ||= "#{File.expand_path(File.join(File.dirname(__FILE__), '..'))}"
31
+ end
30
32
  end
31
33
  end
@@ -2,7 +2,7 @@ module Support
2
2
  module Helpers
3
3
  def load_view_fixtures(controller_class)
4
4
  controller_class.prepend_view_path(File.join(File.dirname(__FILE__), '..', 'fixtures', 'app', 'views'))
5
- EngineAssets::PublicLocator.paths << File.join(File.dirname(__FILE__), '..', 'fixtures', 'public')
5
+ EngineAssets::PublicLocator.register(File.join(File.dirname(__FILE__), '..', 'fixtures'))
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engine-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Innis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-18 00:00:00 -05:00
12
+ date: 2009-12-28 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency