-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jugyo
committed
Jan 2, 2010
1 parent
e723574
commit f1230ac
Showing
3 changed files
with
34 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,43 @@ | ||
$:.unshift File.dirname(__FILE__) + '/lib' | ||
require 'rubygems' | ||
require 'kvs' | ||
require 'spec/rake/spectask' | ||
require 'rake/clean' | ||
require 'rake/gempackagetask' | ||
require 'rake/rdoctask' | ||
|
||
name = 'kvs' | ||
version = KVS::VERSION | ||
|
||
spec = Gem::Specification.new do |s| | ||
s.name = name | ||
s.version = version | ||
s.summary = "simple key value store." | ||
s.description = "KVS is a simple key value store." | ||
s.files = %w(Rakefile README.markdown ChangeLog) + Dir.glob("{lib,spec}/**/*.rb") | ||
s.authors = %w(jugyo) | ||
s.email = 'jugyo.org@gmail.com' | ||
s.homepage = 'http://github.com/jugyo/kvs' | ||
s.rubyforge_project = 'kvs' | ||
s.has_rdoc = false | ||
require 'rake' | ||
|
||
begin | ||
require 'jeweler' | ||
Jeweler::Tasks.new do |gem| | ||
gem.name = "kvs" | ||
gem.summary = %Q{Key Value Store.} | ||
gem.description = %Q{KVS is a simple key value store.} | ||
gem.email = "jugyo.org@gmail.com" | ||
gem.homepage = "http://github.com/jugyo/kvs" | ||
gem.authors = ["jugyo"] | ||
gem.add_development_dependency "rspec", ">= 1.2.9" | ||
end | ||
rescue LoadError | ||
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" | ||
end | ||
|
||
Rake::GemPackageTask.new(spec) do |p| | ||
p.need_tar = true | ||
require 'spec/rake/spectask' | ||
Spec::Rake::SpecTask.new(:spec) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.spec_files = FileList['spec/**/*_spec.rb'] | ||
end | ||
|
||
task :gemspec do | ||
filename = "#{name}.gemspec" | ||
open(filename, 'w') do |f| | ||
f.write spec.to_ruby | ||
end | ||
puts <<-EOS | ||
Successfully generated gemspec | ||
Name: #{name} | ||
Version: #{version} | ||
File: #{filename} | ||
EOS | ||
Spec::Rake::SpecTask.new(:rcov) do |spec| | ||
spec.libs << 'lib' << 'spec' | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
task :install => [ :package ] do | ||
sh %{sudo gem install pkg/#{name}-#{version}.gem} | ||
end | ||
task :spec => :check_dependencies | ||
|
||
task :uninstall => [ :clean ] do | ||
sh %{sudo gem uninstall #{name}} | ||
end | ||
task :default => :spec | ||
|
||
desc 'run all specs' | ||
Spec::Rake::SpecTask.new do |t| | ||
t.spec_files = FileList['spec/**/*_spec.rb'] | ||
t.spec_opts = ['-c'] | ||
end | ||
require 'rake/rdoctask' | ||
Rake::RDocTask.new do |rdoc| | ||
version = File.exist?('VERSION') ? File.read('VERSION') : "" | ||
|
||
CLEAN.include ['pkg'] | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "kvs #{version}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
require 'yaml' | ||
|
||
module KVS | ||
VERSION = '0.3.0' | ||
|
||
class <<self | ||
attr_accessor :dir | ||
|
||
|