zfben_libjs 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,10 +6,12 @@ class Zfben_libjs::Css < Zfben_libjs::Source
6
6
  def after_initialize
7
7
  @options = @options.merge({ :syntax => :sass, :style => :compressed, :cache => false })
8
8
 
9
+ @images = []
10
+
9
11
  if @remote_path || @filepath
10
12
  remote_url = File.dirname(@remote_path || @filepath)
11
13
  @source = import_remote_css @source, remote_url
12
- @images = download_images! remote_url
14
+ download_images! remote_url
13
15
  end
14
16
  end
15
17
 
@@ -71,7 +73,7 @@ class Zfben_libjs::Css < Zfben_libjs::Source
71
73
  end
72
74
 
73
75
  def download_images! remote_url
74
- @source.partition_all(REGEXP_REMOTE_IMAGE).map{ |line|
76
+ @source = @source.partition_all(REGEXP_REMOTE_IMAGE).map{ |line|
75
77
  if REGEXP_REMOTE_IMAGE =~ line
76
78
  url = REGEXP_REMOTE_IMAGE.match(line)[1]
77
79
  path = File.join(@options['src/source'], '.download', self.name + '_' + File.basename(url))
@@ -81,10 +83,10 @@ class Zfben_libjs::Css < Zfben_libjs::Source
81
83
  else
82
84
  path = url
83
85
  end
84
- path
85
- else
86
- nil
86
+ @images.push path
87
+ line = 'url(../' + File.basename(path) + ')'
87
88
  end
88
- }.compact.uniq
89
+ line
90
+ }.join("\n")
89
91
  end
90
92
  end
data/zfben_libjs.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'zfben_libjs'
6
- s.version = '0.0.24'
6
+ s.version = '0.0.25'
7
7
  s.authors = ["Ben"]
8
8
  s.email = ["ben@zfben.com"]
9
9
  s.homepage = "https://github.com/benz303/zfben_libjs"
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  Please follow @zfben on Twitter for announcements, updates, and news.
17
17
  https://twitter.com/zfben
18
+
18
19
  ********************************************************************************
19
20
  }
20
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfben_libjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-18 00:00:00.000000000Z
12
+ date: 2011-09-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
16
- requirement: &11622880 !ruby/object:Gem::Requirement
16
+ requirement: &18608060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11622880
24
+ version_requirements: *18608060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &11621900 !ruby/object:Gem::Requirement
27
+ requirement: &18607000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11621900
35
+ version_requirements: *18607000
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: compass
38
- requirement: &11621000 !ruby/object:Gem::Requirement
38
+ requirement: &18606140 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *11621000
46
+ version_requirements: *18606140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: coffee-script
49
- requirement: &11620380 !ruby/object:Gem::Requirement
49
+ requirement: &18605540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *11620380
57
+ version_requirements: *18605540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: uglifier
60
- requirement: &11619760 !ruby/object:Gem::Requirement
60
+ requirement: &18604920 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *11619760
68
+ version_requirements: *18604920
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
- requirement: &11619060 !ruby/object:Gem::Requirement
71
+ requirement: &18604220 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *11619060
79
+ version_requirements: *18604220
80
80
  description: ''
81
81
  email:
82
82
  - ben@zfben.com
@@ -131,7 +131,7 @@ homepage: https://github.com/benz303/zfben_libjs
131
131
  licenses: []
132
132
  post_install_message: ! "********************************************************************************\n
133
133
  \ Thank you for using zfben_libjs!\n \n Please follow @zfben on Twitter for announcements,
134
- updates, and news.\n https://twitter.com/zfben\n********************************************************************************\n"
134
+ updates, and news.\n https://twitter.com/zfben\n\n********************************************************************************\n"
135
135
  rdoc_options: []
136
136
  require_paths:
137
137
  - lib