assette 0.1.4 → 0.1.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/assette.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{assette}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Tal Atlas}]
12
- s.date = %q{2012-01-11}
12
+ s.date = %q{2012-01-12}
13
13
  s.description = %q{Renders all asset types (coffeescript/sass/scss) as equals}
14
14
  s.email = %q{me@tal.by}
15
15
  s.executables = [%q{assette}]
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
42
42
  "examples/public/javascripts/test.coffee",
43
43
  "examples/public/javascripts/three.js",
44
44
  "examples/public/javascripts/two.js",
45
+ "examples/public/stylesheets/another2.less",
45
46
  "examples/public/stylesheets/less.less",
46
47
  "examples/public/stylesheets/one.css",
47
48
  "examples/public/stylesheets/one1.sass",
@@ -0,0 +1,11 @@
1
+ #two {
2
+ width: 800px*3
3
+ }
4
+
5
+ #foo2 {
6
+ background: url(/images/mystuff/goa-t.se)
7
+ }
8
+
9
+ #foo3 {
10
+ background: url(/images/mystuff/go_at.se)
11
+ }
@@ -20,7 +20,8 @@ module Assette
20
20
  def post_process file
21
21
  str = file.code
22
22
  PostProcessor::POST_PROCESSORS[target_class.outputs].each do |processor|
23
- p = processor.new(file, :parent => @file)
23
+ p = processor.new(file, str, :parent => @file)
24
+
24
25
  str.replace(p.process)
25
26
  end
26
27
 
@@ -9,9 +9,9 @@ module Assette
9
9
 
10
10
  class Base
11
11
 
12
- def initialize(file, args={})
12
+ def initialize(file, str=nil, args={})
13
13
  @file = file
14
- @str = file.code; @args = args
14
+ @str = str||file.code; @args = args
15
15
  end
16
16
 
17
17
  def should_process?
@@ -8,10 +8,10 @@ module Assette
8
8
 
9
9
  def processor
10
10
  @@i ||= -1
11
-
11
+
12
12
  @str.gsub(URL_MATCHER) do |s|
13
13
  url = Assette.compiled_path @@i+=1, $1
14
-
14
+
15
15
  %Q{url("#{url}")}
16
16
  end
17
17
  end
@@ -26,6 +26,7 @@ describe Assette::PostProcessor do
26
26
  end
27
27
 
28
28
  it "should minify the js" do
29
+ pending
29
30
  subject.all_code.should == ''
30
31
  end
31
32
  end
@@ -42,6 +43,7 @@ describe Assette::PostProcessor do
42
43
  end
43
44
 
44
45
  subject do
46
+ # Assette::File.open('public/stylesheets/another2.less')
45
47
  Assette::File.open('public/stylesheets/two2.scss')
46
48
  end
47
49
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assette
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tal Atlas
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-11 00:00:00 Z
18
+ date: 2012-01-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -389,6 +389,7 @@ files:
389
389
  - examples/public/javascripts/test.coffee
390
390
  - examples/public/javascripts/three.js
391
391
  - examples/public/javascripts/two.js
392
+ - examples/public/stylesheets/another2.less
392
393
  - examples/public/stylesheets/less.less
393
394
  - examples/public/stylesheets/one.css
394
395
  - examples/public/stylesheets/one1.sass