rails2_asset_pipeline 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails2_asset_pipeline (0.1.3)
4
+ rails2_asset_pipeline (0.1.4)
5
5
  sprockets
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -80,6 +80,10 @@ module ApplicationHelper
80
80
  end
81
81
  ```
82
82
 
83
+ ### Sass
84
+ - add `sass` to your gems for sass parsing
85
+ - add `sprockets-sass` to your gems for sass @import support
86
+
83
87
 
84
88
  # Todo
85
89
  - read config from Rails 3 style config.assets
@@ -23,7 +23,7 @@ module Rails2AssetPipeline
23
23
  content = File.read(file)
24
24
  rex = /^(@import ['"].*).scss(['"]);/
25
25
  if content =~ rex
26
- File.open(file, 'w'){|f| f.write content.gsub(rex, "\\1.css\\2;") }
26
+ File.open(file, 'w'){|f| f.write content.gsub(rex, "\\1\\2;") }
27
27
  end
28
28
  end
29
29
 
@@ -38,8 +38,8 @@ module Rails2AssetPipeline
38
38
  jammit["javascripts"].each do |pack, assets|
39
39
  File.open("app/assets/javascripts/#{pack}.js", "w") do |f|
40
40
  assets.each do |file|
41
- fuzzy = /[\/*]+$/
42
- f.puts "//= #{file =~ fuzzy ? "require_tree" : "require"} #{file.sub("public/javascripts/", "").sub(".js","").sub(fuzzy,"")}"
41
+ fuzzy = /[\/\*]*\*(.js)?$/
42
+ f.puts "//= #{file =~ fuzzy ? "require_tree ./" : "require "}#{file.sub("public/javascripts/", "").sub(".js","").sub(fuzzy,"")}"
43
43
  end
44
44
  end
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module Rails2AssetPipeline
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -2,7 +2,7 @@ javascripts:
2
2
  pack:
3
3
  - public/javascripts/a.js
4
4
  - public/javascripts/b.js
5
- - public/javascripts/c/**/*
5
+ - public/javascripts/c/**/*.js
6
6
 
7
7
  stylesheets:
8
8
  pack:
@@ -78,7 +78,7 @@ describe "Rails2AssetPipeline Tasks" do
78
78
  run "rake assets:convert_jammit"
79
79
  run("ls app/assets").should == "javascripts\nstylesheets\n"
80
80
  run("ls app/assets/javascripts").should == "a.js\nb.js\npack.js\n"
81
- run("cat app/assets/javascripts/pack.js").should == "//= require a\n//= require b\n//= require_tree c\n"
81
+ run("cat app/assets/javascripts/pack.js").should == "//= require a\n//= require b\n//= require_tree ./c\n"
82
82
  end
83
83
 
84
84
  it "moves and combines stylesheets" do
@@ -103,7 +103,7 @@ describe "Rails2AssetPipeline Tasks" do
103
103
  it "fixes broken inputs" do
104
104
  write "public/stylesheets/c.css.scss", "a{}\n@import \"../global/_tables.scss\";\na{}"
105
105
  run "rake assets:convert_jammit"
106
- run("cat app/assets/stylesheets/c.css.scss").should == "a{}\n@import \"../global/_tables.css\";\na{}"
106
+ run("cat app/assets/stylesheets/c.css.scss").should == "a{}\n@import \"../global/_tables\";\na{}"
107
107
  end
108
108
  end
109
109
  end
@@ -18,13 +18,13 @@ describe Rails2AssetPipeline::ViewHelpers do
18
18
 
19
19
  it "returns a path with md5 on production" do
20
20
  Rails.env = "production"
21
- env["xxx.js"] = mock(:digest => "abc", )
21
+ env["xxx.js"] = mock(:digest => "abc")
22
22
  pipeline_path("xxx.js").should == "/assets/xxx-abc.js"
23
23
  end
24
24
 
25
25
  it "returns a path with md5 on production and complicated file" do
26
26
  Rails.env = "production"
27
- env["xxx.yy.js"] = mock(:digest => "abc", )
27
+ env["xxx.yy.js"] = mock(:digest => "abc")
28
28
  pipeline_path("xxx.yy.js").should == "/assets/xxx-abc.yy.js"
29
29
  end
30
30
 
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.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: 2378466707075981159
70
+ hash: 3376332490525238817
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: 2378466707075981159
79
+ hash: 3376332490525238817
80
80
  requirements: []
81
81
  rubyforge_project:
82
82
  rubygems_version: 1.8.24