Skip to content

Commit

Permalink
moving imagemagick to newgem structure
Browse files Browse the repository at this point in the history
  • Loading branch information
for-lesbians committed May 21, 2008
1 parent e089344 commit 911f1b1
Show file tree
Hide file tree
Showing 24 changed files with 2,057 additions and 302 deletions.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions History.txt
@@ -0,0 +1,4 @@
== 0.2.0 2008-05-20

* Add << method to images. Let's you send raw commands to mogrify

5 changes: 2 additions & 3 deletions MIT-LICENSE → License.txt
@@ -1,4 +1,4 @@
Copyright (c) 2005 Corey Johnson probablycorey@gmail.com
Copyright (c) 2008 FIXME full name

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -17,5 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 24 additions & 0 deletions Manifest.txt
@@ -0,0 +1,24 @@
History.txt
License.txt
Manifest.txt
README.txt
Rakefile
config/hoe.rb
config/requirements.rb
lib/mini_magick.rb
lib/mini_magick/version.rb
log/debug.log
script/destroy
script/generate
script/txt2html
setup.rb
tasks/deployment.rake
tasks/environment.rake
tasks/website.rake
test/test_helper.rb
test/test_mini_magick.rb
website/index.html
website/index.txt
website/javascripts/rounded_corners_lite.inc.js
website/stylesheets/screen.css
website/template.rhtml
72 changes: 0 additions & 72 deletions README

This file was deleted.

1 change: 1 addition & 0 deletions README.txt
@@ -0,0 +1 @@
README
72 changes: 4 additions & 68 deletions Rakefile
@@ -1,68 +1,4 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'

$:.unshift(File.dirname(__FILE__) + "/lib")
require 'mini_magick'

PKG_NAME = 'mini_magick'
PKG_VERSION = MiniMagick::VERSION
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

desc 'Default: run unit tests.'
task :default => :test

desc "Clean generated files"
task :clean do
rm FileList['test/output/*.png']
rm_rf 'pkg'
rm_rf 'doc'
end

desc 'Test the mini_magick plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end

desc 'Generate documentation for the mini_magick plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'MiniMagick'
rdoc.options << '--line-numbers --inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end


# Create compressed packages
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = PKG_NAME
s.summary = "Manipulate images with minimal use of memory."
s.description = %q{Uses command-line ImageMagick tools to resize, rotate, and mogrify images.}
s.version = PKG_VERSION

s.author = "Corey Johnson"
s.email = "probablycorey@gmail.com"
s.rubyforge_project = PKG_NAME
s.homepage = "http://gleepglop.com"

s.has_rdoc = true
s.requirements << 'none'
s.require_path = 'lib'
s.autorequire = 'mini_magick'

s.files = [ "Rakefile", "README", "MIT-LICENSE" ]
s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) || item.include?("\.png") }
end

Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_tar = false
p.need_zip = true
end
require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration

Dir['tasks/**/*.rake'].each { |rake| load rake }
70 changes: 70 additions & 0 deletions config/hoe.rb
@@ -0,0 +1,70 @@
require 'mini_magick/version'

AUTHOR = 'Corey Johnson' # can also be an array of Authors
EMAIL = "probablycorey+minimagick@gmail.com"
DESCRIPTION = "Ruby interface to ImageMagick."
GEM_NAME = 'mini_magick' # what ppl will type to install your gem
RUBYFORGE_PROJECT = 'mini_magick' # The unix name for your project
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"

@config_file = "~/.rubyforge/user-config.yml"
@config = nil
RUBYFORGE_USERNAME = "unknown"
def rubyforge_username
unless @config
begin
@config = YAML.load(File.read(File.expand_path(@config_file)))
rescue
puts <<-EOS
ERROR: No rubyforge config file found: #{@config_file}
Run 'rubyforge setup' to prepare your env for access to Rubyforge
- See http://newgem.rubyforge.org/rubyforge.html for more details
EOS
exit
end
end
RUBYFORGE_USERNAME.replace @config["username"]
end


REV = nil
# UNCOMMENT IF REQUIRED:
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
VERS = MiniMagick::VERSION::STRING + (REV ? ".#{REV}" : "")
RDOC_OPTS = ['--quiet', '--title', 'mini_magick documentation',
"--opname", "index.html",
"--line-numbers",
"--main", "README",
"--inline-source"]

class Hoe
def extra_deps
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
@extra_deps
end
end

# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
hoe = Hoe.new(GEM_NAME, VERS) do |p|
p.developer(AUTHOR, EMAIL)
p.description = DESCRIPTION
p.summary = DESCRIPTION
p.url = HOMEPATH
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
p.test_globs = ["test/**/test_*.rb"]
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.

# == Optional
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
#p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]

#p.spec_extras = {} # A hash of extra values to set in the gemspec.

end

CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
hoe.rsync_args = '-av --delete --ignore-errors'
17 changes: 17 additions & 0 deletions config/requirements.rb
@@ -0,0 +1,17 @@
require 'fileutils'
include FileUtils

require 'rubygems'
%w[rake hoe newgem rubigen].each do |req_gem|
begin
require req_gem
rescue LoadError
puts "This Rakefile requires the '#{req_gem}' RubyGem."
puts "Installation: gem install #{req_gem} -y"
exit
end
end

$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))

require 'mini_magick'
1 change: 0 additions & 1 deletion init.rb

This file was deleted.

0 comments on commit 911f1b1

Please sign in to comment.