Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed all RMagick to Magick. The gem has no dependency on rmagick

  • Loading branch information...
commit 0f673426e49da9b268d858608d6eb63598899dca 1 parent f88f096
Eric Berry authored
View
1  Gemfile
@@ -1,4 +1,3 @@
source 'https://rubygems.org'
-# Specify your gem's dependencies in rmagick-metadata.gemspec
gemspec
View
18 README.md
@@ -1,12 +1,14 @@
-# Rmagick::Metadata
+# Magick::Metadata
-Parses an image using RMagick and parses the metadata.
+Parses an image using ImageMagick and parses the metadata.
+
+For this gem to work, [ImageMagick](http://www.imagemagick.org/script/index.php) must be installed.
## Installation
Add this line to your application's Gemfile:
- gem 'rmagick-metadata'
+ gem 'magick-metadata'
And then execute:
@@ -14,14 +16,14 @@ And then execute:
Or install it yourself as:
- $ gem install rmagick-metadata
+ $ gem install magick-metadata
## Usage
```ruby
image_path = "/my_rails_app/app/assets/images/rails.png"
-data = RMagickMetadata.new(image_path)
+data = MagickMetadata.new(image_path)
# Helpers
assert data.filename_suffix == 'png'
@@ -36,12 +38,12 @@ assert data.compression_percent == 0.0
# Auto-populated
assert data.file_size_of_image == '6646B'
assert data.comment == ''
-assert data.directory =~ /\.*\/rmagick-metadata\/test/
+assert data.directory =~ /\.*\/magick-metadata\/test/
assert data.filename_suffix == 'png'
assert data.filename_with_suffix == 'rails.png'
assert data.layer_canvas_page_geometry == '50x64+0+0'
assert data.current_height_in_pixels == '64'
-assert data.image_filename =~ /\.*\/rmagick-metadata\/test\/rails.png/
+assert data.image_filename =~ /\.*\/magick-metadata\/test\/rails.png/
assert data.calculated_number_of_unique_colors == '2018'
assert data.label == ''
assert data.image_file_format == 'PNG'
@@ -62,7 +64,7 @@ assert data.image_compression_type == 'Zip'
assert data.image_gif_dispose_method == 'Undefined'
assert data.image_size_w_x_h == '50x64'
assert data.page_canvas_height == '64'
-assert data.magick_filename =~ /\.*\/rmagick-metadata\/test\/rails.png/
+assert data.magick_filename =~ /\.*\/magick-metadata\/test\/rails.png/
assert data.page_canvas_offset == '+0+0'
assert data.page_canvas_size == '50x64'
assert data.image_compression_quality == '0'
View
2  lib/rmagick-metadata.rb → lib/magick-metadata.rb
@@ -1,4 +1,4 @@
-class RMagickMetadata
+class MagickMetadata
def initialize( file_path )
View
8 rmagick-metadata.gemspec → magick-metadata.gemspec
@@ -3,13 +3,13 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |gem|
- gem.name = "rmagick-metadata"
+ gem.name = "magick-metadata"
gem.version = "0.0.3"
gem.authors = ["Eric Berry"]
gem.email = ["cavneb@gmail.com"]
- gem.description = %q{Parses an image using RMagick and parses the metadata}
- gem.summary = %q{Parses an image using RMagick and parses the metadata}
- gem.homepage = "http://github.com/cavneb/rmagick-metadata"
+ gem.description = %q{Parses an image using ImageMagick and parses the metadata}
+ gem.summary = %q{Parses an image using ImageMagick and parses the metadata}
+ gem.homepage = "http://github.com/cavneb/magick-metadata"
gem.add_development_dependency "micro_test"
View
10 test/rmagick_metadata_test.rb → test/magick_metadata_test.rb
@@ -1,12 +1,12 @@
require File.expand_path("../test_helper", __FILE__)
-class RMagickMetadataTest < MicroTest::Test
+class MagickMetadataTest < MicroTest::Test
test "initialize and populate data" do
image_path = File.expand_path("../rails.png", __FILE__)
assert File.exist? image_path
- data = ::RMagickMetadata.new(image_path)
+ data = ::MagickMetadata.new(image_path)
# Helpers
assert data.filename_suffix == 'png'
@@ -21,12 +21,12 @@ class RMagickMetadataTest < MicroTest::Test
# Auto-populated
assert data.file_size_of_image == '6646B'
assert data.comment == ''
- assert data.directory =~ /\.*\/rmagick-metadata\/test/
+ assert data.directory =~ /\.*\/magick-metadata\/test/
assert data.filename_suffix == 'png'
assert data.filename_with_suffix == 'rails.png'
assert data.layer_canvas_page_geometry == '50x64+0+0'
assert data.current_height_in_pixels == '64'
- assert data.image_filename =~ /\.*\/rmagick-metadata\/test\/rails.png/
+ assert data.image_filename =~ /\.*\/magick-metadata\/test\/rails.png/
assert data.calculated_number_of_unique_colors == '2018'
assert data.label == ''
assert data.image_file_format == 'PNG'
@@ -47,7 +47,7 @@ class RMagickMetadataTest < MicroTest::Test
assert data.image_gif_dispose_method == 'Undefined'
assert data.image_size_w_x_h == '50x64'
assert data.page_canvas_height == '64'
- assert data.magick_filename =~ /\.*\/rmagick-metadata\/test\/rails.png/
+ assert data.magick_filename =~ /\.*\/magick-metadata\/test\/rails.png/
assert data.page_canvas_offset == '+0+0'
assert data.page_canvas_size == '50x64'
assert data.image_compression_quality == '0'
Please sign in to comment.
Something went wrong with that request. Please try again.