Permalink
Browse files

Remove Hoe and use Bundler to dependency management

  • Loading branch information...
1 parent ec850ea commit a007114ec351c75c891d16c154a989948434db5f @diogenes committed Sep 21, 2011
Showing with 33 additions and 143 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 Gemfile
  3. +0 −20 Manifest.txt
  4. +13 −22 Rakefile
  5. 0 TODO
  6. +11 −33 hubruby.gemspec
  7. +0 −10 script/console
  8. +0 −14 script/destroy
  9. +0 −14 script/generate
  10. +0 −9 spec/spec_helper.rb
  11. +0 −21 tasks/rspec.rake
View
1 .gitignore
@@ -1 +1,2 @@
pkg/*
+Gemfile.lock
View
8 Gemfile
@@ -0,0 +1,8 @@
+source :rubygems
+
+gemspec
+
+group :development do
+ gem 'rake'
+ gem 'rspec'
+end
View
20 Manifest.txt
@@ -1,20 +0,0 @@
-History.txt
-Manifest.txt
-README.rdoc
-Rakefile
-TODO
-hubruby.gemspec
-lib/github/base.rb
-lib/github/finders.rb
-lib/github/models/repository.rb
-lib/github/models/user.rb
-lib/hubruby.rb
-script/console
-script/destroy
-script/generate
-spec/github/github_spec.rb
-spec/github/models/repository_spec.rb
-spec/github/models/user_spec.rb
-spec/spec.opts
-spec/spec_helper.rb
-tasks/rspec.rake
View
35 Rakefile
@@ -1,25 +1,16 @@
-require 'rubygems'
-gem 'hoe', '>= 2.1.0'
-require 'hoe'
-require 'fileutils'
-require './lib/hubruby'
+require 'rake/rdoctask'
+require 'rspec/core/rake_task'
+require 'bundler'
+Bundler::GemHelper.install_tasks
-Hoe.plugin :newgem
-# Hoe.plugin :website
-# Hoe.plugin :cucumberfeatures
+desc 'Run all RSpec tests'
+RSpec::Core::RakeTask.new(:spec)
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.spec 'hubruby' do
- self.summary = 'A simple Ruby library to access the current GitHub API (v3)'
- self.developer 'Diógenes Falcão', 'diogenes {d-o-t} araujo {at} gmail.com'
- self.rubyforge_name = self.name
- self.extra_deps = [['httparty','= 0.6.1']]
- self.version = '0.1.0'
-end
-
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
+task :default => :spec
+task :build => :spec
-# remove_task :default
-task :default => [:spec]
+Rake::RDocTask.new do |rd|
+ rd.main = "README.rdoc"
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
+ rd.rdoc_dir = 'doc'
+end
View
0 TODO
No changes.
View
44 hubruby.gemspec
@@ -1,39 +1,17 @@
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require 'hubruby'
Gem::Specification.new do |s|
- s.name = %q{hubruby}
- s.version = "0.1.0"
+ s.name = 'hubruby'
+ s.version = Hubruby::VERSION.dup
+ s.summary = 'A simple Ruby library for accessing the current GitHub API (v3)'
+ s.author = 'Diógenes Falcão'
+ s.email = 'diogenes.araujo@gmail.com'
+ s.extra_rdoc_files = ['README.rdoc']
+ s.has_rdoc = true
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Di\303\263genes Falc\303\243o"]
- s.date = %q{2011-07-31}
- s.description = %q{A simple Ruby library for accessing the current GitHub API (v2).}
- s.email = ["diogenes {d-o-t} araujo {at} gmail.com"]
- s.extra_rdoc_files = ["History.txt", "Manifest.txt"]
- s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "TODO", "hubruby.gemspec", "lib/github/base.rb", "lib/github/finders.rb", "lib/github/models/repository.rb", "lib/github/models/user.rb", "lib/hubruby.rb", "script/console", "script/destroy", "script/generate", "spec/github/github_spec.rb", "spec/github/models/repository_spec.rb", "spec/github/models/user_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake"]
- s.homepage = %q{http://github.com/diogenes/hubruby}
- s.rdoc_options = ["--main", "README.rdoc"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{hubruby}
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{A simple Ruby library for accessing the current GitHub API (v2).}
+ s.files = Dir['lib/**/*.rb'] + Dir['spec/**/*.*']
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<httparty>, ["= 0.6.1"])
- s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
- s.add_development_dependency(%q<hoe>, [">= 2.6.2"])
- else
- s.add_dependency(%q<httparty>, ["= 0.6.1"])
- s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
- s.add_dependency(%q<hoe>, [">= 2.6.2"])
- end
- else
- s.add_dependency(%q<httparty>, ["= 0.6.1"])
- s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
- s.add_dependency(%q<hoe>, [">= 2.6.2"])
- end
+ s.add_dependency('httparty', '>= 0.6.1')
end
View
10 script/console
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-# File: script/console
-irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
-
-libs = " -r irb/completion"
-# Perhaps use a console_lib to store any extra methods I may want available in the cosole
-# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
-libs << " -r #{File.dirname(__FILE__) + '/../lib/hubruby.rb'}"
-puts "Loading hubruby gem"
-exec "#{irb} #{libs} --simple-prompt"
View
14 script/destroy
@@ -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! [:rubygems, :newgem, :newgem_theme, :test_unit]
-RubiGen::Scripts::Destroy.new.run(ARGV)
View
14 script/generate
@@ -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! [:rubygems, :newgem, :newgem_theme, :test_unit]
-RubiGen::Scripts::Generate.new.run(ARGV)
View
9 spec/spec_helper.rb
@@ -1,10 +1 @@
-begin
- require 'spec'
-rescue LoadError
- require 'rubygems' unless ENV['NO_RUBYGEMS']
- gem 'rspec'
- require 'spec'
-end
-
-$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'hubruby'
View
21 tasks/rspec.rake
@@ -1,21 +0,0 @@
-begin
- require 'spec'
-rescue LoadError
- require 'rubygems' unless ENV['NO_RUBYGEMS']
- require 'spec'
-end
-begin
- require 'spec/rake/spectask'
-rescue LoadError
- puts <<-EOS
-To use rspec for testing you must install rspec gem:
- gem install rspec
-EOS
- exit(0)
-end
-
-desc "Run the specs under spec/models"
-Spec::Rake::SpecTask.new do |t|
- t.spec_opts = ['--options', "spec/spec.opts"]
- t.spec_files = FileList['spec/**/*_spec.rb']
-end

0 comments on commit a007114

Please sign in to comment.