ryankshaw-image_crush 0.0.1 → 0.0.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.
data/LICENSE CHANGED
@@ -18,3 +18,29 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ =======================================================================================
23
+ Most of the original code was from Pablo Brasero Moreno
24
+
25
+ here is his license:
26
+ =======================================================================================
27
+ Copyright (c) 2008 Pablo Brasero Moreno
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining
30
+ a copy of this software and associated documentation files (the
31
+ 'Software'), to deal in the Software without restriction, including
32
+ without limitation the rights to use, copy, modify, merge, publish,
33
+ distribute, sublicense, and/or sell copies of the Software, and to
34
+ permit persons to whom the Software is furnished to do so, subject to
35
+ the following conditions:
36
+
37
+ The above copyright notice and this permission notice shall be
38
+ included in all copies or substantial portions of the Software.
39
+
40
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
41
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
43
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
44
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -1,6 +1,44 @@
1
- = image_crush
1
+ = ImageCrush
2
+
3
+ Reduce the size of PNG and JPEG files using the +pngcrush+ and +jpegtran+ tools,
4
+ as described at http://yuiblog.com/blog/2008/11/14/imageopt-3/
5
+
6
+ == Usage
7
+
8
+ The tools <b>+pngcrush+ and +jpegtran+ must be installed</b> on your system.
9
+
10
+ to get <b>+pngcrush+</b> on a mac with macports just do:
11
+ sudo port install pngcrush
12
+ or on a system with apt (like ubuntu)
13
+ apt-get install pngcrush
14
+ apt-get install libjpeg-progs
15
+
16
+ This will help you install jpegtran from source for macs or Unix/linux
17
+ http://www.phpied.com/installing-jpegtran-mac-unix-linux/
18
+
19
+ Can be used with single files and with directories:
20
+
21
+ require 'image_crush'
22
+ ImageCrush('path/to/image.png')
23
+ ImageCrush('path/to/image.jpg')
24
+ ImageCrush('path/to/dir')
25
+
26
+ == Rake task for Rails
27
+
28
+ ImageCrush also comes with a handy rake task to be used with Ruby on Rails. To
29
+ use it, add the following line to your Rakefile:
30
+
31
+ require 'image_crush'
32
+
33
+ Then, simply invoke the task with:
34
+
35
+ rake crush
36
+
37
+ This will automatically traverse your public/images directory and reduce the
38
+ size of all PNG/JPEG files, including subdirectories.
39
+
40
+
2
41
 
3
- Description goes here.
4
42
 
5
43
  == Note on Patches/Pull Requests
6
44
 
@@ -16,3 +54,4 @@ Description goes here.
16
54
  == Copyright
17
55
 
18
56
  Copyright (c) 2009 Ryan Shaw. See LICENSE for details.
57
+ Copyright (c) 2008 Pablo Brasero Moreno. See LICENSE for further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/image_crush.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{image_crush}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Shaw"]
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'rake'
2
3
  require 'tmpdir'
3
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ryankshaw-image_crush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Shaw