bagger 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,11 @@
1
1
  # CHANGELOG
2
+ # v 0.6.1
3
+
4
+ * improve CSS URL rewriting
5
+ * fix rewriting for certain multi-URL properties
6
+ * correctly rewrite IE behavior URLs unless the reference objects or default behaviors
7
+
8
+ All changes by Martin Rehfeld
2
9
 
3
10
  # v 0.6.0
4
11
  * Add option to add the manifest itself to the manifest (Christian
data/README.md CHANGED
@@ -33,8 +33,7 @@ on the client side by using the following techniques:
33
33
  source_dir = "/applications/my_app/public"
34
34
 
35
35
  # customize paths for file and cache manifest
36
- manifest_path = File.join(target_dir, 'file_manifest.json') #defaults
37
- to manifest.json
36
+ manifest_path = File.join(target_dir, 'file_manifest.json') # defaults to manifest.json
38
37
 
39
38
  cache_manifest_path = 'cache/cache.manifest' # defaults to cache.manifest
40
39
 
@@ -44,8 +43,8 @@ on the client side by using the following techniques:
44
43
  stylesheets = ["css/style.css", "css/reset.css"]
45
44
  javascripts = ["js/app.js", "js/utils.js"]
46
45
 
47
- # define cache manifest bundles for directorfferent devices
48
- # for convencien, the manfiest defined with `cache_manifest_path`
46
+ # define cache manifest bundles for different devices
47
+ # for convenience, the manifest defined with `cache_manifest_path`
49
48
  # will always contain all resources
50
49
  ipad_resources = ["images/troll-big.png"]
51
50
  iphone_retina_resources = ["images/troll-retina.png"]
@@ -130,4 +129,3 @@ check the build status on [travis.ci](http://travis-ci.org/wooga/bagger)
130
129
 
131
130
  * [jammit](https://github.com/documentcloud/jammit)
132
131
  * [Rails 3 asset pipeline](http://blog.nodeta.com/2011/06/14/rails-3-1-asset-pipeline-in-the-real-world/)
133
- * [assets.io](http://www.assets.io/)
@@ -105,16 +105,15 @@ module Bagger
105
105
  end
106
106
 
107
107
  def rewrite_urls_in_css(stylesheet_path)
108
- url_regex = /(^|[{;,])(.*?url\(\s*['"]?)(.*?)(['"]?\s*\).*?)([,;}]|$)/ui
109
- behavior_regex = /behavior:\s*url/ui
108
+ url_regex = /(url\(\s*['"]?)([^#].*?)(['"]?\s*\).*?)/ui
110
109
  data_regex = /^\s*data:/ui
111
110
  input = File.open(File.join(@target_dir, stylesheet_path)){|f| f.read}
112
111
  output = input.gsub(url_regex) do |full_match|
113
- pre, url_match, post = ($1 + $2), $3, ($4 + $5)
114
- if behavior_regex.match(pre) || data_regex.match(url_match)
112
+ pre, url_match, post = $1, $2, $3
113
+ if data_regex.match(url_match)
115
114
  full_match
116
115
  else
117
- path = Addressable::URI.parse("/") + url_match
116
+ path = Addressable::URI.parse('/') + url_match
118
117
  target_url = @manifest[path.to_s]
119
118
  if target_url
120
119
  pre + @css_path_prefix + target_url + post
@@ -154,7 +153,7 @@ module Bagger
154
153
  def generate_cache_manifests
155
154
  cache_manifests = @options[:cache_manifests] || []
156
155
  if @cache_manifest_path
157
- cache_manifests << {
156
+ cache_manifests << {
158
157
  :target_path => @cache_manifest_path,
159
158
  :files => @manifest.keys
160
159
  }
@@ -1,3 +1,3 @@
1
1
  module Bagger
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
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-07-06 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project: bagger
168
- rubygems_version: 1.8.24
168
+ rubygems_version: 1.8.25
169
169
  signing_key:
170
170
  specification_version: 3
171
171
  summary: Asset packaging for the rest of us