Browse files

use parka to build gem

  • Loading branch information...
1 parent 0dbf3ff commit ea76d81cd2be6239a0d23fb458c8c1d855dc5931 @ddollar committed Aug 30, 2010
Showing with 76 additions and 81 deletions.
  1. +1 −1 .gitignore
  2. +11 −0 Gemfile
  3. +32 −0 Gemfile.lock
  4. +21 −39 Rakefile
  5. +8 −41 gem-prune.gemspec
  6. +3 −0 lib/gem-prune.rb
View
2 .gitignore
@@ -1,4 +1,4 @@
-*.sw?
+.bundle
.DS_Store
coverage
rdoc
View
11 Gemfile
@@ -0,0 +1,11 @@
+source "http://rubygems.org"
+
+group :development do
+ gem "parka"
+end
+
+group :test do
+ gem "rcov"
+ gem "rr"
+ gem "rspec", "~> 2.0.0.beta.19"
+end
View
32 Gemfile.lock
@@ -0,0 +1,32 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ crack (0.1.8)
+ diff-lcs (1.1.2)
+ mime-types (1.16)
+ parka (0.4.3)
+ crack
+ rest-client
+ thor
+ rcov (0.9.8)
+ rest-client (1.6.1)
+ mime-types (>= 1.16)
+ rr (1.0.0)
+ rspec (2.0.0.beta.20)
+ rspec-core (= 2.0.0.beta.20)
+ rspec-expectations (= 2.0.0.beta.20)
+ rspec-mocks (= 2.0.0.beta.20)
+ rspec-core (2.0.0.beta.20)
+ rspec-expectations (2.0.0.beta.20)
+ diff-lcs (>= 1.1.2)
+ rspec-mocks (2.0.0.beta.20)
+ thor (0.14.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ parka
+ rcov
+ rr
+ rspec (~> 2.0.0.beta.19)
View
60 Rakefile
@@ -1,47 +1,29 @@
-require 'rubygems'
-require 'rake'
+require "rubygems"
+require "bundler"
+Bundler.setup
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "gem-prune"
- gem.summary = %Q{Identify and remove old Rubygems}
- gem.email = "<ddollar@gmail.com>"
- gem.homepage = "http://github.com/ddollar/gem-prune"
- gem.authors = ["David Dollar"]
- gem.files = Dir['lib/**/*.rb']
- end
+require "rake"
+require "rspec"
+require "rspec/core/rake_task"
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
-end
+$:.unshift File.expand_path("../lib", __FILE__)
+require "gem-prune"
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
-end
+task :default => :spec
+task :release => :man
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
+desc "Run all specs"
+Rspec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = 'spec/**/*_spec.rb'
end
+desc "Generate RCov code coverage report"
+task :rcov => "rcov:build" do
+ %x{ open coverage/index.html }
+end
-task :default => :spec
-
-require 'rake/rdoctask'
-Rake::RDocTask.new do |rdoc|
- if File.exist?('VERSION.yml')
- config = YAML.load(File.read('VERSION.yml'))
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
- else
- version = ""
- end
-
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = "gem-prune #{version}"
- rdoc.rdoc_files.include('README*')
- rdoc.rdoc_files.include('lib/**/*.rb')
+Rspec::Core::RakeTask.new("rcov:build") do |t|
+ t.pattern = 'spec/**/*_spec.rb'
+ t.rcov = true
+ t.rcov_opts = [ "--exclude", Gem.default_dir , "--exclude", "spec" ]
end
View
49 gem-prune.gemspec
@@ -1,42 +1,9 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{gem-prune}
- s.version = "1.4.1"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["David Dollar"]
- s.date = %q{2009-06-18}
- s.default_executable = %q{gem-prune}
- s.email = %q{<ddollar@gmail.com>}
- s.executables = ["gem-prune"]
- s.extra_rdoc_files = [
- "LICENSE",
- "README.rdoc"
- ]
- s.files = [
- "lib/gem/commands/prune_command.rb",
- "lib/gem/prune/gem.rb",
- "lib/gem/prune/version.rb",
- "lib/rubygems_plugin.rb"
- ]
- s.homepage = %q{http://github.com/ddollar/gem-prune}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.4}
- s.summary = %q{Identify and remove old Rubygems}
- s.test_files = [
- "spec/gem-prune_spec.rb",
- "spec/spec_helper.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
+require "rubygems"
+require "parka/specification"
+
+Parka::Specification.new do |gem|
+ gem.name = "gem-prune"
+ gem.version = GemPrune::VERSION
+ gem.summary = "Identify and remove old gems"
+ gem.homepage = "http://github.com/ddollar/gem-prune"
end
View
3 lib/gem-prune.rb
@@ -0,0 +1,3 @@
+module GemPrune
+ VERSION = "2.0.0"
+end

0 comments on commit ea76d81

Please sign in to comment.