css_sprites 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +6 -6
- data/css_sprites.gemspec +3 -0
- data/lib/css_sprites/cli.rb +3 -3
- data/lib/css_sprites/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a52ba39fae41646385e711d5df239ae41acb11d
|
4
|
+
data.tar.gz: c07f61b096150bb7cbc8f77d1b81057c0dcc3157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5bb72ba3352d76093101589fd5ce1263dd54aede5a69a24a7a9238d04fde1abea1af59b6a68730c6c5ae29f31380b6426ca344cf83a2d67eb8ea7f4afde4ed
|
7
|
+
data.tar.gz: ac7ede2302e99ece723c85689aedce3f47a44ccad1eee69810d90c78ab13a8271f9f94baed3594dfd9d34940092f4330507357de0c5c5eaf021682bfc0e7a42a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Sprites
|
1
|
+
# CSS Sprites
|
2
2
|
|
3
|
-
Sprites finds all
|
3
|
+
CSS Sprites is a Ruby gem that finds all PNG files in the input directory, merges them together into a single PNG file and generates a CSS stylesheet for the output image.
|
4
4
|
|
5
5
|
## Prerequisites
|
6
6
|
|
@@ -15,7 +15,7 @@ $ brew install imagemagick
|
|
15
15
|
And if you're using Ubuntu:
|
16
16
|
|
17
17
|
```bash
|
18
|
-
$ apt-get
|
18
|
+
$ sudo apt-get install libmagickwand-dev
|
19
19
|
```
|
20
20
|
|
21
21
|
## Installation
|
@@ -55,9 +55,9 @@ $ css_sprites path/to/images
|
|
55
55
|
|
56
56
|
Option | Type | Default | Description
|
57
57
|
------ | ---- | ------- | -----------
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
stacking | horizontal or vertical | horizontal | How to order images in the sprite
|
59
|
+
output | string | input directory's parent's path | Where to save the generated files
|
60
|
+
name | string | input directory's name | A name for the base CSS class (and the generated files)
|
61
61
|
|
62
62
|
|
63
63
|
### Examples with options
|
data/css_sprites.gemspec
CHANGED
@@ -17,6 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.required_ruby_version = ">= 1.9"
|
21
|
+
spec.requirements = "ImageMagick Version 6.4.9 or later"
|
22
|
+
|
20
23
|
spec.add_development_dependency "bundler", "~> 1.8"
|
21
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
22
25
|
spec.add_development_dependency "rspec", "~> 3.4.0"
|
data/lib/css_sprites/cli.rb
CHANGED
@@ -27,7 +27,7 @@ class CSSSprites::CLI
|
|
27
27
|
|
28
28
|
def set_options(opts)
|
29
29
|
opts.banner = <<END
|
30
|
-
Usage:
|
30
|
+
Usage: css_sprites [options] input_dir
|
31
31
|
|
32
32
|
Description:
|
33
33
|
Merges png files from the input directory into one png file and generates an adequate stylesheet.
|
@@ -52,7 +52,7 @@ END
|
|
52
52
|
opts.on(
|
53
53
|
'-o',
|
54
54
|
'--output PATH',
|
55
|
-
'The path to the directory to which generated files should be saved. Uses input directory\'s path if no path given.'
|
55
|
+
'The path to the directory to which generated files should be saved. Uses input directory\'s parent\'s path if no path given.'
|
56
56
|
) do |output|
|
57
57
|
@options[:output] = output
|
58
58
|
end
|
@@ -71,7 +71,7 @@ END
|
|
71
71
|
'--version',
|
72
72
|
'Show version'
|
73
73
|
) do
|
74
|
-
puts "Sprites #{ CSSSprites::VERSION }"
|
74
|
+
puts "CSS Sprites #{ CSSSprites::VERSION }"
|
75
75
|
exit
|
76
76
|
end
|
77
77
|
end
|
data/lib/css_sprites/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_sprites
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angelika Tyborska
|
@@ -102,13 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
102
|
requirements:
|
103
103
|
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: '
|
105
|
+
version: '1.9'
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
requirements:
|
111
|
+
requirements:
|
112
|
+
- ImageMagick Version 6.4.9 or later
|
112
113
|
rubyforge_project:
|
113
114
|
rubygems_version: 2.4.6
|
114
115
|
signing_key:
|