sprite-factory-custom 1.6.4.1 → 1.6.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sf +2 -0
- data/lib/sprite_factory.rb +1 -1
- data/lib/sprite_factory/runner.rb +4 -0
- data/lib/sprite_factory/style.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acdd506066ca2481fb68d44b9559fb608f28cec6
|
4
|
+
data.tar.gz: 153e91bc54d8fc96976fbcfe393e902d8c2b2987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b1edcf0f19fecbb19e710f2fb51b824a4d3dea76ec60241e6b0bfc21af98ea129e932d938db05336d40602ca633d093dd592529946f6c1b76b955989835313
|
7
|
+
data.tar.gz: 7c8cf62d283d5130721c2b6bda41abf6fbd67ea47f3a3f24ac9c2a4cc37a8af9901f23ef7fd7562d000d2fe14000e66d32db2d6a43c9824f2cb30bd58386528a
|
data/bin/sf
CHANGED
@@ -33,6 +33,7 @@ nocomments_help = "suppress comments in generated stylesheet"
|
|
33
33
|
custom_styles_help = "Add custom styles for each sprites (E.g.: --custom-styles='display: inline-block;'"
|
34
34
|
retina_help = "create 50% smaller images & css as well"
|
35
35
|
media_query_help = "wrap generated css with media query css selector"
|
36
|
+
prevent_caching_help = "Add timestamp to image url to prevent caching"
|
36
37
|
|
37
38
|
op.on("--layout [ORIENTATION]", layout_help) {|value| options[:layout] = value }
|
38
39
|
op.on("--style [STYLE]", style_help) {|value| options[:style] = value }
|
@@ -48,6 +49,7 @@ op.on("--margin [PIXELS]", margin_help) {|value| options[:margi
|
|
48
49
|
op.on("--nocomments", nocomments_help) {|value| options[:nocomments] = true }
|
49
50
|
op.on("--retina", retina_help) {|value| options[:retina] = true }
|
50
51
|
op.on("--media_query", media_query_help) {|value| options[:media_query] = true }
|
52
|
+
op.on("--prevent_caching", prevent_caching_help) {|value| options[:prevent_caching_help] = true }
|
51
53
|
|
52
54
|
begin
|
53
55
|
op.parse!(ARGV)
|
data/lib/sprite_factory.rb
CHANGED
@@ -2,7 +2,7 @@ module SpriteFactory
|
|
2
2
|
|
3
3
|
#----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
VERSION = "1.6.4.
|
5
|
+
VERSION = "1.6.4.2"
|
6
6
|
SUMMARY = "Automatic CSS sprite generator"
|
7
7
|
DESCRIPTION = "[tam-vo/sprite-factory v#{VERSION}] Combines individual images from a directory into a single sprite image file and creates an appropriate CSS stylesheet"
|
8
8
|
LIB = File.dirname(__FILE__)
|
data/lib/sprite_factory/style.rb
CHANGED
@@ -59,6 +59,7 @@ only screen and (min-device-pixel-ratio: 1.5) {"
|
|
59
59
|
def self.generate(style_name, selector, url, images, custom_styles, config, max)
|
60
60
|
styles = []
|
61
61
|
divider = config[:retina] ? 2 : 1
|
62
|
+
url = "#{url}?t=#{Time.now.to_i}" if config[:prevent_caching]
|
62
63
|
images.each do |image|
|
63
64
|
attr = [
|
64
65
|
"width: #{image[:cssw] / divider}px",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprite-factory-custom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.4.
|
4
|
+
version: 1.6.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Gordon
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- - '>='
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
-
description: '[tam-vo/sprite-factory v1.6.4.
|
42
|
+
description: '[tam-vo/sprite-factory v1.6.4.2] Combines individual images from a directory
|
43
43
|
into a single sprite image file and creates an appropriate CSS stylesheet'
|
44
44
|
email:
|
45
45
|
- jake@codeincomplete.com
|