forked from wycats/merb-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
47 lines (39 loc) · 1.45 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
require "rubygems"
require "rake/gempackagetask"
PLUGIN = "merb_sequel"
NAME = "merb_sequel"
VERSION = "0.9.4"
AUTHOR = "Wayne E. Seguin, Lance Carlson"
EMAIL = "[email protected], [email protected]"
HOMEPAGE = "http://merb-plugins.rubyforge.org/merb_sequel/"
SUMMARY = "Merb plugin that provides support for Sequel and Sequel::Model"
specification = Gem::Specification.new do |spec|
spec.name = NAME
spec.email = EMAIL
spec.author = AUTHOR
spec.version = VERSION
spec.summary = SUMMARY
spec.platform = Gem::Platform::RUBY
spec.has_rdoc = true
spec.homepage = HOMEPAGE
spec.description = SUMMARY
spec.autorequire = PLUGIN
spec.require_path = "lib"
spec.extra_rdoc_files = ["README", "LICENSE", 'TODO']
spec.add_dependency("merb-core", ">= 0.9.4")
spec.add_dependency("sequel", ">= 1.4.0")
spec.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,sequel_generators}/**/*")
end
windows = (PLATFORM =~ /win32|cygwin/) rescue nil
SUDO = windows ? "" : "sudo"
Rake::GemPackageTask.new(specification) do |package|
package.gem_spec = specification
end
desc "Install merb_sequel"
task :install => :package do
sh %{#{SUDO} gem install pkg/#{NAME}-#{VERSION} --no-rdoc --no-ri --no-update-sources}
end
desc 'Release the current version on rubyforge'
task :release => :package do
sh %{rubyforge add_release merb #{PLUGIN} #{VERSION} pkg/#{NAME}-#{VERSION}.gem}
end