rails2_asset_pipeline 0.1.18 → 0.1.19

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails2_asset_pipeline (0.1.18)
4
+ rails2_asset_pipeline (0.1.19)
5
5
  sprockets
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -47,6 +47,7 @@ Here you can do configuration of sprockets.
47
47
  # config/initializers/rails2_asset_pipeline.rb
48
48
  if Rails.env.development? # dynamic asset compilation needs these
49
49
  require 'sprockets/sass' # need sass ?
50
+ autoload :Sass, 'sass' # require if used inside rake tasks <-> require 'sass' takes 0.8s
50
51
  require 'sprockets/source_url' # sprockets-source_url for debugable assets in chrome
51
52
  end
52
53
 
@@ -1,3 +1,3 @@
1
1
  module Rails2AssetPipeline
2
- VERSION = '0.1.18'
2
+ VERSION = '0.1.19'
3
3
  end
@@ -16,7 +16,7 @@ module Rails2AssetPipeline
16
16
  )
17
17
 
18
18
  if source_is_relative
19
- source = "#{source}.#{args[2]}" unless source.include?(".")
19
+ source = "#{source}.#{args[2]}" unless source =~ /\.\w+$/
20
20
  super(asset_path(source), *args[1..-1])
21
21
  else
22
22
  super
@@ -36,10 +36,10 @@ module Rails2AssetPipeline
36
36
 
37
37
  asset_with_id = if Rails2AssetPipeline.static?
38
38
  @sprockets_manifest ||= Sprockets::Manifest.new(Rails2AssetPipeline.env, Rails2AssetPipeline.manifest)
39
- @sprockets_manifest.assets[asset] || "NOT_FOUND_IN_MANIFEST_#{asset}"
39
+ @sprockets_manifest.assets[asset] || "DID_NOT_FIND_#{asset}_IN_MANIFEST"
40
40
  else
41
41
  data = Rails2AssetPipeline.env[asset]
42
- data ? "#{asset}?#{data.mtime.to_i}" : "NOT_FOUND_IN_ASSETS_#{asset}"
42
+ data ? "#{asset}?#{data.mtime.to_i}" : "DID_NOT_FIND_#{asset}_IN_ASSETS"
43
43
  end
44
44
 
45
45
  "/assets/#{asset_with_id}"
@@ -56,7 +56,7 @@ describe Rails2AssetPipeline::ViewHelpers do
56
56
  end
57
57
 
58
58
  it "silently fails with unfound assets" do
59
- asset_path("yyy.js").should == "/assets/NOT_FOUND_IN_ASSETS_yyy.js"
59
+ asset_path("yyy.js").should == "/assets/DID_NOT_FIND_yyy.js_IN_ASSETS"
60
60
  end
61
61
 
62
62
  context "development" do
@@ -86,7 +86,7 @@ describe Rails2AssetPipeline::ViewHelpers do
86
86
 
87
87
  it "fails if file is missing from the manifest" do
88
88
  env["yyy.js"] = env["xxx.js"]
89
- asset_path("yyy.js").should == "/assets/NOT_FOUND_IN_MANIFEST_yyy.js"
89
+ asset_path("yyy.js").should == "/assets/DID_NOT_FIND_yyy.js_IN_MANIFEST"
90
90
  end
91
91
  end
92
92
 
@@ -171,6 +171,12 @@ describe Rails2AssetPipeline::ViewHelpers do
171
171
  @compute_public_path.should == ["/assets/xxx.js?123456", "a", "b"]
172
172
  end
173
173
 
174
+ it "converts relative paths with ." do
175
+ env["xxxv1.2/xxx.js"] = env["xxx.js"]
176
+ compute_public_path("xxxv1.2/xxx", "a", "js").should == :super
177
+ @compute_public_path.should == ["/assets/xxxv1.2/xxx.js?123456", "a", "js"]
178
+ end
179
+
174
180
  it "converts relative paths with extension and non-word characters" do
175
181
  env["xx_-x.js"] = env["xxx.js"]
176
182
  compute_public_path("xx_-x.js", "a", "b").should == :super
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails2_asset_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-14 00:00:00.000000000 Z
12
+ date: 2012-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: -251331229004587299
70
+ hash: 1201740303309627877
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  segments:
78
78
  - 0
79
- hash: -251331229004587299
79
+ hash: 1201740303309627877
80
80
  requirements: []
81
81
  rubyforge_project:
82
82
  rubygems_version: 1.8.24