require 'rubygems' require 'rake/gempackagetask' gemspec = Gem::Specification.new do |gem| gem.name = "seomoz-riak-client" gem.summary = %Q{riak-client is a rich client for Riak, the distributed database by Basho.} gem.description = %Q{riak-client is a rich client for Riak, the distributed database by Basho. It supports the full HTTP interface including storage operations, bucket configuration, link-walking and map-reduce.} gem.version = File.read('../VERSION').strip gem.email = "sean@basho.com" gem.homepage = "http://seancribbs.github.com/ripple" gem.authors = ["Sean Cribbs"] gem.add_development_dependency "rspec", "~>2.6.0" gem.add_development_dependency "fakeweb", ">=1.2" gem.add_development_dependency "rack", ">=1.0" gem.add_development_dependency "excon", "~>0.6.1" gem.add_development_dependency 'rake', '~> 0.8.7' gem.add_dependency "i18n", ">=0.4.0" gem.add_dependency "builder", ">= 2.1.2" gem.add_dependency "beefcake", "0.3.2" gem.add_dependency "multi_json", "~>1.0.0" files = FileList["**/*"] # Editor and O/S files files.exclude ".DS_Store", "*~", "\#*", ".\#*", "*.swp", "*.tmproj", "tmtags" # Generated artifacts files.exclude "coverage", "rdoc", "pkg", "doc", ".bundle", "*.rbc", ".rvmrc", ".watchr", ".rspec" # Project-specific files.exclude "Gemfile.lock", %r{spec/support/test_server.yml$}, "bin" # Remove directories files.exclude {|d| File.directory?(d) } gem.files = files.to_a gem.test_files = gem.files.grep(/_spec\.rb$/) end # Gem packaging tasks Rake::GemPackageTask.new(gemspec) do |pkg| pkg.need_zip = false pkg.need_tar = false end task :gem => :gemspec desc %{Build the gemspec file.} task :gemspec do gemspec.validate File.open("#{gemspec.name}.gemspec", 'w'){|f| f.write gemspec.to_ruby } end desc %{Release the gem to RubyGems.org} task :release => :gem do system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem" end require 'rspec/core' require 'rspec/core/rake_task' desc "Run Unit Specs Only" RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = "spec/riak/**/*_spec.rb" spec.rspec_opts = %w[--profile] end namespace :spec do desc "Run Integration Specs Only" RSpec::Core::RakeTask.new(:integration) do |spec| spec.pattern = "spec/integration/**/*_spec.rb" spec.rspec_opts = %w[--profile] end desc "Run All Specs" task :all => %w[ spec spec:integration ] end task :default => "spec:all"