Permalink
Browse files

use jeweler for easier github integration and project management

  • Loading branch information...
1 parent fa3a965 commit f69769fe02ad37365104239c14e12fd8c9aa8e6a @jackdempsey committed May 19, 2009
Showing with 56 additions and 72 deletions.
  1. +2 −2 LICENSE
  2. +6 −2 README.rdoc
  3. +39 −38 Rakefile
  4. +0 −14 script/destroy
  5. +0 −14 script/generate
  6. +9 −2 spec/spec_helper.rb
View
@@ -1,4 +1,4 @@
-Copyright (c) 2009 YOUR NAME
+Copyright (c) 2009 Jack Dempsey
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,3 +1,7 @@
-=== beet
+= beet
-Beet is a gem that provides a simple method for building ruby projects based on templates.
+Description goes here.
+
+== Copyright
+
+Copyright (c) 2009 Jack Dempsey. See LICENSE for details.
View
@@ -1,47 +1,48 @@
require 'rubygems'
-require 'rake/gempackagetask'
-require 'rubygems/specification'
-require 'date'
-
-GEM = "beet"
-GEM_VERSION = "0.0.1"
-AUTHOR = "Jack Dempsey"
-EMAIL = "jack.dempsey@gmail.com"
-HOMEPAGE = "http://jackndempsey.blogspot.com"
-SUMMARY = "A gem that provides a simple method for building ruby projects based on templates."
-
-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.rdoc", "LICENSE", 'TODO']
- s.summary = SUMMARY
- s.description = s.summary
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- # Uncomment this to add a dependency
- s.add_dependency "thor"
-
- s.require_path = 'lib'
- s.autorequire = GEM
- s.files = %w(LICENSE README.rdoc Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
+require 'rake'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "beet"
+ gem.summary = %Q{TODO}
+ gem.email = "jack.dempsey@gmail.com"
+ gem.homepage = "http://github.com/jackdempsey/beet"
+ gem.authors = ["Jack Dempsey"]
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
end
-desc "install the gem locally"
-task :install => [:package] do
- sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
-desc "create a gemspec file"
-task :make_spec do
- File.open("#{GEM}.gemspec", "w") do |file|
- file.puts spec.to_ruby
+
+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 = "beet #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end
+
View
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/destroy'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit]
-RubiGen::Scripts::Destroy.new.run(ARGV)
View
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
-
-begin
- require 'rubigen'
-rescue LoadError
- require 'rubygems'
- require 'rubigen'
-end
-require 'rubigen/scripts/generate'
-
-ARGV.shift if ['--help', '-h'].include?(ARGV[0])
-RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit]
-RubiGen::Scripts::Generate.new.run(ARGV)
View
@@ -1,2 +1,9 @@
-$TESTING=true
-$:.push File.join(File.dirname(__FILE__), '..', 'lib')
+require 'spec'
+
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'beet'
+
+Spec::Runner.configure do |config|
+
+end

0 comments on commit f69769f

Please sign in to comment.