forked from akdubya/rack-thumb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
64 lines (55 loc) · 1.72 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
task :default => [:test]
task :spec => :test
name = 'rack-thumb'
version = '0.2.2'
spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.summary = "Drop-in image thumbnailing for your Rack stack."
s.description = "Drop-in image thumbnailing middleware for your Rack stack (Merb, Sinatra, Rails, etc)."
s.author = "Aleksander Williams"
s.email = "[email protected]"
s.homepage = "http://github.com/akdubya/rack-thumb"
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.files = %w(Rakefile README.rdoc) + Dir.glob("{lib,spec,example}/**/*")
s.require_path = "lib"
s.add_dependency("akdubya-mapel", ">= 0.1.1")
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
end
desc "Install as a system gem"
task :install => [ :package ] do
sh %{sudo gem install pkg/#{name}-#{version}.gem}
end
desc "Uninstall as a system gem"
task :uninstall => [ :clean ] do
sh %{sudo gem uninstall #{name}}
end
desc "Create a gemspec file"
task :make_spec do
File.open("#{name}.gemspec", "w") do |file|
file.puts spec.to_ruby
end
end
Rake::TestTask.new(:test) do |t|
t.libs << "spec"
t.test_files = FileList['spec/*_spec.rb']
t.verbose = true
end
Rake::RDocTask.new do |t|
t.rdoc_dir = 'rdoc'
t.title = "Rack Thumb: Drop-in image thumbnailing for your Rack stack"
t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
t.options << '--charset' << 'utf-8'
t.rdoc_files.include('README.rdoc')
t.rdoc_files.include('lib/rack/rack-thumb.rb')
t.rdoc_files.include('lib/rack/rack-thumb/*.rb')
end