torba 0.4.1 → 0.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5391cc5aa1ed3603ff47fcffeab1bf2c0b2c168f
4
- data.tar.gz: 454aa67e4144f8c303603cedccc7a55d483e8816
3
+ metadata.gz: 0878e9a6c25f1fceb393accb9e2a96aaec4bcf55
4
+ data.tar.gz: 3b2b74f577118a0c8c029d3b2164571138914e48
5
5
  SHA512:
6
- metadata.gz: 389f26e6a2ca7769f74b30edc661d66cd02686b89d2a5643e41f6d78876e80338ff7f3195f37ff04e69ed8b8ff4d830ed34d8977ce7f8bbfde7574c538f82ea0
7
- data.tar.gz: 6427d86f0ab997e465efa4b01272ebc64f0eb7728cf5dd8d9bdf18184246791e793f1dfc666378d02d3729cb74904868aee38009e2f729124466a74fd0199c98
6
+ metadata.gz: 5fa8a769f0755c370e4f21ff6bd9872e5d407ed74def48264bb835eba144227bdac4d1c7c5b68effd5b5b22613274e0b9f7a59cd63455aa51aa49d862407a931
7
+ data.tar.gz: 595971c2856af882d28734f64555e6845420859c23c0118722f52b72049812a8432080f3837a084bdfaa9696f56a0f76a30fc6d2bef835f52d286f9d30ab5c5e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
2
 
3
+ ## Version 0.4.2
4
+
5
+ ### Bug fixes
6
+
7
+ * Remote url() assets should not be given to asset_path
8
+ * Support both url(data: and url('data: in css
9
+
3
10
  ## Version 0.4.1
4
11
 
5
12
  ### Bug fixes
data/README.md CHANGED
@@ -17,7 +17,7 @@ Production ready.
17
17
 
18
18
  ## Documentation
19
19
 
20
- [Released version](http://rubydoc.info/gems/torba/0.4.1)
20
+ [Released version](http://rubydoc.info/gems/torba/0.4.2)
21
21
 
22
22
  ## Why
23
23
 
@@ -7,8 +7,9 @@ module Torba
7
7
  ( # $1
8
8
  url\( # url(
9
9
  \s* # optional space
10
- (?!data) # no data URIs
11
10
  ['"]? # optional quote
11
+ (?!data) # no data URIs
12
+ (?!http[s]?:\/\/) # no remote URIs
12
13
  (?!\/) # only relative location
13
14
  )
14
15
  ( # $2
@@ -14,6 +14,17 @@ module Torba
14
14
  def test_url_with_data
15
15
  css = "background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaskip);"
16
16
  assert_equal css, filter.call(css, "/current/file")
17
+ css = "background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaskip');"
18
+ assert_equal css, filter.call(css, "/current/file")
19
+ end
20
+
21
+ def test_http_url
22
+ url = 'http://example.com/example.png'
23
+ url_https = url.gsub('http', 'https')
24
+ css = "background-image: url('#{url}');"
25
+ css_https = "background-image: url('#{url_https}');"
26
+ assert_equal css, filter.call(css, url)
27
+ assert_equal css_https, filter.call(css_https, url_https)
17
28
  end
18
29
 
19
30
  def test_absolute_url
data/torba.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "torba"
3
- spec.version = "0.4.1"
3
+ spec.version = "0.4.2"
4
4
  spec.authors = ["Andrii Malyshko"]
5
5
  spec.email = ["mail@nashbridges.me"]
6
6
  spec.description = "Bundler for Sprockets"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrii Malyshko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor