css_sprite 2.3.0 → 2.4.0
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/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +58 -0
- data/lib/css_sprite/sprite.rb +14 -16
- data/lib/css_sprite/version.rb +1 -1
- metadata +18 -19
- data/.ruby-gemset +0 -1
- data/Gemfile.lock +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dfdf5ab1057e164f18b516cc7b7d2247b4c93b9
|
4
|
+
data.tar.gz: 0a77fc8f3a7d6589c3aa9183581c1c8cb68dcb82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 411bf7165836c768374a3647420e03b3a73a9de5508f39774696dcb488f236cba70e9b6c68f044b43132c186530f8fd59893f6368e9db5ffbb8759533456e9fb
|
7
|
+
data.tar.gz: fcf9283b8a0c8d570c00690ee90c52f511fb502bf18da5e31e004b926ad9999b00281a477cdc9cb42131b813a4e0ae4eb359a965ea10099a36e0943521ca2305
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.3.3
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Next Release
|
2
|
+
|
3
|
+
## 2.4.0 (02/27/2017)
|
4
|
+
|
5
|
+
* Use MiniMagick::Tool::Montage
|
6
|
+
|
7
|
+
## 2.3.0 (03/28/2014)
|
8
|
+
|
9
|
+
* Add source_image_path config option
|
10
|
+
|
11
|
+
## 2.2.0 (07/02/2013)
|
12
|
+
|
13
|
+
* Use MiniMagick::CommandBuilder#add_command
|
14
|
+
|
15
|
+
## 2.1.0 (01/13/2013)
|
16
|
+
|
17
|
+
* Change default path to app/assets/images and app/assets/stylesheets
|
18
|
+
* Set default css_image_path to assets
|
19
|
+
|
20
|
+
## 2.0.0 (01/10/2013)
|
21
|
+
|
22
|
+
* Introduce asset-url
|
23
|
+
* Use mini_magick
|
24
|
+
|
25
|
+
## 1.5.0 (01/04/2012)
|
26
|
+
|
27
|
+
* Use Magic::PaletteMatteType
|
28
|
+
* Allow config image_type
|
29
|
+
* Allow disable image optimization
|
30
|
+
* Support hover better
|
31
|
+
* Support active
|
32
|
+
* Support scss engine
|
33
|
+
* Add custom destination image format
|
34
|
+
|
35
|
+
## 1.4.0 (04/08/2010)
|
36
|
+
|
37
|
+
* Add documentations
|
38
|
+
* Use the correct method to detect windows platform
|
39
|
+
* Use css_sprite directory as css_sprite image timestamp
|
40
|
+
* Add restart server task
|
41
|
+
* Hover selectors support
|
42
|
+
* Add image optimization
|
43
|
+
|
44
|
+
## 1.3.0 (04/01/2010)
|
45
|
+
|
46
|
+
* Refactor
|
47
|
+
* Add task to automatic css_sprite
|
48
|
+
* Use css_sprite.yml for configuration
|
49
|
+
|
50
|
+
## 1.1.0 (02/05/2010)
|
51
|
+
|
52
|
+
* Composose image with transparent background and preserve transparancy of sprites
|
53
|
+
* Optional prefix for css classes
|
54
|
+
* Timestamp to trigger reloading
|
55
|
+
|
56
|
+
## 1.0.0 (09/29/2009)
|
57
|
+
|
58
|
+
* First version
|
data/lib/css_sprite/sprite.rb
CHANGED
@@ -92,28 +92,26 @@ class Sprite
|
|
92
92
|
last_y = 0
|
93
93
|
sources.each do |source|
|
94
94
|
source_image = get_image(source)
|
95
|
-
property =
|
96
95
|
x = 0
|
97
96
|
y = last_y
|
98
97
|
results << image_properties(source, directory).merge(:x => x, :y => y)
|
99
98
|
last_y = y + source_image[:height]
|
100
99
|
end
|
101
100
|
|
102
|
-
command = MiniMagick::
|
103
|
-
{
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
command.
|
116
|
-
MiniMagick::Image.new(nil).run(command)
|
101
|
+
command = MiniMagick::Tool::Montage.new
|
102
|
+
sources.each { |source| command << source }
|
103
|
+
command << '-tile'
|
104
|
+
command << '1x'
|
105
|
+
command << '-geometry'
|
106
|
+
command << '+0+0'
|
107
|
+
command << '-background'
|
108
|
+
command << 'None'
|
109
|
+
command << '-gravity'
|
110
|
+
command << 'West'
|
111
|
+
command << '-format'
|
112
|
+
command << @config['format'] || 'PNG'
|
113
|
+
command << dest_image_path
|
114
|
+
command.call
|
117
115
|
results
|
118
116
|
end
|
119
117
|
|
data/lib/css_sprite/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_sprite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mocha
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: css_sprite is a rails plugin/gem to generate css sprite image automatically.
|
@@ -73,13 +73,12 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .rspec
|
78
|
-
- .ruby-
|
79
|
-
- .
|
80
|
-
- .
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- ".ruby-version"
|
79
|
+
- ".travis.yml"
|
80
|
+
- CHANGELOG.md
|
81
81
|
- Gemfile
|
82
|
-
- Gemfile.lock
|
83
82
|
- LICENSE
|
84
83
|
- MIT-LICENSE
|
85
84
|
- README.md
|
@@ -126,17 +125,17 @@ require_paths:
|
|
126
125
|
- lib
|
127
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
127
|
requirements:
|
129
|
-
- -
|
128
|
+
- - ">="
|
130
129
|
- !ruby/object:Gem::Version
|
131
130
|
version: '0'
|
132
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
132
|
requirements:
|
134
|
-
- -
|
133
|
+
- - ">="
|
135
134
|
- !ruby/object:Gem::Version
|
136
135
|
version: '0'
|
137
136
|
requirements: []
|
138
137
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.6.10
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: css_sprite is a rails plugin/gem to generate css sprite image automatically.
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
css_sprite
|
data/Gemfile.lock
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
css_sprite (2.2.0)
|
5
|
-
mini_magick
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
colorize (0.5.8)
|
11
|
-
coveralls (0.6.7)
|
12
|
-
colorize
|
13
|
-
multi_json (~> 1.3)
|
14
|
-
rest-client
|
15
|
-
simplecov (>= 0.7)
|
16
|
-
thor
|
17
|
-
diff-lcs (1.2.1)
|
18
|
-
metaclass (0.0.1)
|
19
|
-
mime-types (1.23)
|
20
|
-
mini_magick (3.5.0)
|
21
|
-
subexec (~> 0.2.1)
|
22
|
-
mocha (0.13.3)
|
23
|
-
metaclass (~> 0.0.1)
|
24
|
-
multi_json (1.7.7)
|
25
|
-
rake (0.9.6)
|
26
|
-
rest-client (1.6.7)
|
27
|
-
mime-types (>= 1.16)
|
28
|
-
rspec (2.13.0)
|
29
|
-
rspec-core (~> 2.13.0)
|
30
|
-
rspec-expectations (~> 2.13.0)
|
31
|
-
rspec-mocks (~> 2.13.0)
|
32
|
-
rspec-core (2.13.1)
|
33
|
-
rspec-expectations (2.13.0)
|
34
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
35
|
-
rspec-mocks (2.13.0)
|
36
|
-
simplecov (0.7.1)
|
37
|
-
multi_json (~> 1.0)
|
38
|
-
simplecov-html (~> 0.7.1)
|
39
|
-
simplecov-html (0.7.1)
|
40
|
-
subexec (0.2.2)
|
41
|
-
thor (0.18.1)
|
42
|
-
|
43
|
-
PLATFORMS
|
44
|
-
ruby
|
45
|
-
|
46
|
-
DEPENDENCIES
|
47
|
-
coveralls
|
48
|
-
css_sprite!
|
49
|
-
mocha
|
50
|
-
rake
|
51
|
-
rspec
|