]> git.saurik.com Git - redis.git/blob - client-libraries/ruby/Rakefile
Lua client added thanks to Daniele Alessandri
[redis.git] / client-libraries / ruby / Rakefile
1 require 'rubygems'
2 require 'rake/gempackagetask'
3 require 'rubygems/specification'
4 require 'date'
5 require 'spec/rake/spectask'
6 require 'tasks/redis.tasks'
7
8
9 GEM = 'redis'
10 GEM_VERSION = '0.0.2'
11 AUTHORS = ['Ezra Zygmuntowicz', 'Taylor Weibley']
12 EMAIL = "ez@engineyard.com"
13 HOMEPAGE = "http://github.com/ezmobius/redis-rb"
14 SUMMARY = "Ruby client library for redis key value storage server"
15
16 spec = Gem::Specification.new do |s|
17 s.name = GEM
18 s.version = GEM_VERSION
19 s.platform = Gem::Platform::RUBY
20 s.has_rdoc = true
21 s.extra_rdoc_files = ["LICENSE"]
22 s.summary = SUMMARY
23 s.description = s.summary
24 s.authors = AUTHORS
25 s.email = EMAIL
26 s.homepage = HOMEPAGE
27
28 # Uncomment this to add a dependency
29 # s.add_dependency "foo"
30
31 s.require_path = 'lib'
32 s.autorequire = GEM
33 s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{lib,spec}/**/*")
34 end
35
36 task :default => :spec
37
38 desc "Run specs"
39 Spec::Rake::SpecTask.new do |t|
40 t.spec_files = FileList['spec/**/*_spec.rb']
41 t.spec_opts = %w(-fs --color)
42 end
43
44 Rake::GemPackageTask.new(spec) do |pkg|
45 pkg.gem_spec = spec
46 end
47
48 desc "install the gem locally"
49 task :install => [:package] do
50 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
51 end
52
53 desc "create a gemspec file"
54 task :make_spec do
55 File.open("#{GEM}.gemspec", "w") do |file|
56 file.puts spec.to_ruby
57 end
58 end