forked from nricciar/sinatra-s3
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
52 lines (47 loc) · 1.41 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
$:.unshift "./lib"
require 'rake'
require 'rake/testtask'
require 'rake/gempackagetask'
require 'sinatra-s3'
require 'sinatra-s3/tasks'
spec = Gem::Specification.new do |s|
s.name = "sinatra-s3"
s.version = S3::VERSION
s.author = "David Ricciardi"
s.email = "[email protected]"
s.homepage = "http://github.com/nricciar/sinatra-s3"
s.platform = Gem::Platform::RUBY
s.summary = "An implementation of the Amazon S3 API in Ruby"
s.files = FileList["{bin,lib,public,examples}/**/*"].to_a +
FileList["db/migrate/*"].to_a +
["Rakefile","s3.yml.example"]
s.require_path = "lib"
s.description = File.read("README")
s.executables = ['sinatra-s3']
s.test_files = FileList["{test}/*.rb"].to_a
s.has_rdoc = false
s.extra_rdoc_files = ["README"]
s.add_dependency("sinatra", ">= 1.0")
s.add_dependency("aws-s3", ">= 0.6.2")
s.add_dependency("haml", ">= 2.2.15")
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
namespace :test do
find_file = lambda do |name|
file_name = lambda {|path| File.join(path, "#{name}.rb")}
root = $:.detect do |path|
File.exist?(file_name[path])
end
file_name[root] if root
end
TEST_LOADER = find_file['rake/rake_test_loader']
multiruby = lambda do |glob|
system 'multiruby', TEST_LOADER, *Dir.glob(glob)
end
Rake::TestTask.new(:all) do |test|
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
end