Sha256: 428372bfdc5bf600ba2ef992872aad60bdebf7789981d7d4f8013cc2837e9a3d
Contents?: true
Size: 1.96 KB
Versions: 1
Compression:
Stored size: 1.96 KB
Contents
require 'rubygems' require 'rake/gempackagetask' require 'rubygems/specification' require 'date' require 'spec/rake/spectask' GEM = "even_better_nested_set" GEM_VERSION = "0.2" AUTHOR = "Jonas Nicklas" EMAIL = "jonas.nicklas@gmail.com" HOMEPAGE = "http://github.com/jnicklas/even_better_nested_set/tree/master" SUMMARY = "A cool acts_as_nested_set alternative" spec = Gem::Specification.new do |s| s.name = GEM s.version = GEM_VERSION s.platform = Gem::Platform::RUBY s.has_rdoc = true s.extra_rdoc_files = ['README.md', 'LICENSE'] s.summary = SUMMARY s.description = s.summary s.author = AUTHOR s.email = EMAIL s.homepage = HOMEPAGE s.require_path = 'lib' s.autorequire = GEM s.files = %w(LICENSE README.md Rakefile init.rb) + Dir.glob("{lib,spec}/**/*") end Rake::GemPackageTask.new(spec) do |pkg| pkg.gem_spec = spec end desc "install the plugin locally" task :install => [:package] do sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION} --no-update-sources} end desc "create a gemspec file" task :make_spec do File.open("#{GEM}.gemspec", "w") do |file| file.puts spec.to_ruby end end namespace :jruby do desc "Run :package and install the resulting .gem with jruby" task :install => :package do sh %{#{SUDO} jruby -S gem install pkg/#{GEM}-#{GEM_VERSION}.gem --no-rdoc --no-ri} end end file_list = FileList['spec/*_spec.rb'] namespace :spec do desc "Run all examples with RCov" Spec::Rake::SpecTask.new('rcov') do |t| t.spec_files = file_list t.rcov = true t.rcov_dir = "doc/coverage" t.rcov_opts = ['--exclude', 'spec'] t.spec_opts = ['--color'] end desc "Generate an html report" Spec::Rake::SpecTask.new('report') do |t| t.spec_files = file_list t.rcov = true t.rcov_dir = "doc/coverage" t.rcov_opts = ['--exclude', 'spec'] t.spec_opts = ['--color', "--format", "html:doc/reports/specs.html"] t.fail_on_error = false end end desc 'Default: run unit tests.' task :default => 'spec:rcov'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chrislloyd-even_better_nested_set-0.2 | Rakefile |