Permalink
Browse files

moving to tidier gem format

  • Loading branch information...
1 parent 6dcd46f commit 5618c941a33cd99f065905eb305335e11295f39a @nkpart committed Sep 8, 2009
Showing with 139 additions and 117 deletions.
  1. +5 −0 .document
  2. +5 −1 .gitignore
  3. +0 −2 History.txt
  4. +23 −0 LICENSE
  5. +0 −16 Manifest.txt
  6. +0 −25 README.rdoc
  7. +48 −20 Rakefile
  8. +1 −0 VERSION
  9. 0 bin/dget
  10. +41 −15 dget.gemspec
  11. +0 −10 script/console
  12. +0 −14 script/destroy
  13. +0 −14 script/generate
  14. +7 −0 spec/dget_spec.rb
  15. +9 −0 spec/spec_helper.rb
View
@@ -0,0 +1,5 @@
+README.rdoc
+lib/**/*.rb
+bin/*
+features/**/*.feature
+LICENSE
View
@@ -1 +1,5 @@
-tmp
+*.sw?
+.DS_Store
+coverage
+rdoc
+pkg
View
@@ -1,2 +0,0 @@
-=== 0.0.1 / 2009-09-09
-* Some thing
View
23 LICENSE
@@ -0,0 +1,23 @@
+
+(The MIT License)
+
+Copyright (c) 2009 Nick Partridge
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+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.
View
@@ -1,16 +0,0 @@
-History.txt
-Manifest.txt
-README.rdoc
-Rakefile
-bin/dget
-lib/dget.rb
-lib/dget/github.html
-lib/dget/github.rb
-lib/dget/googlecode.rb
-lib/dget/utils.rb
-lib/googlecode.html
-script/console
-script/destroy
-script/generate
-test/test_gh-wiki.rb
-test/test_helper.rb
View
@@ -16,28 +16,3 @@ Examples!
== Install
$ gem install nkpart-dget
-
-== LICENSE:
-
-(The MIT License)
-
-Copyright (c) 2009 Nick Partridge
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-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.
View
@@ -1,20 +1,48 @@
-require 'rubygems'
-gem 'hoe', '>= 2.1.0'
-require 'hoe'
-require 'fileutils'
-require './lib/dget'
-
-Hoe.plugin :newgem
-Hoe.plugin :cucumberfeatures
-
-puts DGet::VERSION
-$hoe = Hoe.spec 'dget' do
- self.developer 'Nick Partridge', 'nkpart@gmail.com'
- self.rubyforge_name = self.name # TODO this is default value
- self.extra_deps = [['nokogiri','>= 0.0']] #TODO pick a version
- self.version = DGet::VERSION
-
-end
-
-require 'newgem/tasks'
-Dir['tasks/**/*.rake'].each { |t| load t }
+require 'rubygems'
+require 'rake'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "dget"
+ gem.summary = %Q{get local copies of github project wikis}
+ gem.description = gem.summary
+ gem.email = "nkpart@gmail.com"
+ gem.homepage = "http://github.com/nkpart/dget"
+ gem.authors = ["Nick Partridge"]
+ gem.add_development_dependency "rspec"
+ # 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
+
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+end
+
+task :spec => :check_dependencies
+
+task :default => :spec
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ if File.exist?('VERSION')
+ version = File.read('VERSION')
+ else
+ version = ""
+ end
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "dget #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
View
@@ -0,0 +1 @@
+0.0.0
View
0 bin/dget 100755 → 100644
No changes.
View
@@ -1,39 +1,65 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE
+# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{dget}
- s.version = "0.0.1"
+ s.version = "0.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Partridge"]
s.date = %q{2009-09-08}
s.default_executable = %q{dget}
- s.description = %q{Documentation getter}
- s.email = ["nkpart@gmail.com"]
+ s.description = %q{get local copies of github project wikis}
+ s.email = %q{nkpart@gmail.com}
s.executables = ["dget"]
- s.extra_rdoc_files = ["History.txt", "Manifest.txt"]
- s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "bin/dget", "lib/dget.rb", "lib/dget/github.html", "lib/dget/github.rb", "lib/dget/googlecode.rb", "lib/dget/utils.rb", "lib/googlecode.html", "script/console", "script/destroy", "script/generate", "test/test_gh-wiki.rb", "test/test_helper.rb"]
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.rdoc"
+ ]
+ s.files = [
+ ".document",
+ ".gitignore",
+ "LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION",
+ "bin/dget",
+ "dget.gemspec",
+ "lib/dget.rb",
+ "lib/dget/github.html",
+ "lib/dget/github.rb",
+ "lib/dget/googlecode.rb",
+ "lib/dget/utils.rb",
+ "lib/googlecode.html",
+ "spec/dget_spec.rb",
+ "spec/spec_helper.rb",
+ "test/test_gh-wiki.rb",
+ "test/test_helper.rb"
+ ]
s.homepage = %q{http://github.com/nkpart/dget}
- s.rdoc_options = ["--main", "README.rdoc"]
+ s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubyforge_project = %q{dget}
s.rubygems_version = %q{1.3.5}
- s.summary = %q{Documentation getter}
- s.test_files = ["test/test_gh-wiki.rb", "test/test_helper.rb"]
+ s.summary = %q{get local copies of github project wikis}
+ s.test_files = [
+ "spec/dget_spec.rb",
+ "spec/spec_helper.rb",
+ "test/test_gh-wiki.rb",
+ "test/test_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
- s.add_runtime_dependency(%q<nokogiri>, [">= 0.0"])
- s.add_development_dependency(%q<hoe>, [">= 2.3.3"])
+ s.add_development_dependency(%q<rspec>, [">= 0"])
else
- s.add_dependency(%q<nokogiri>, [">= 0.0"])
- s.add_dependency(%q<hoe>, [">= 2.3.3"])
+ s.add_dependency(%q<rspec>, [">= 0"])
end
else
- s.add_dependency(%q<nokogiri>, [">= 0.0"])
- s.add_dependency(%q<hoe>, [">= 2.3.3"])
+ s.add_dependency(%q<rspec>, [">= 0"])
end
end
View
@@ -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/dget.rb'}"
-puts "Loading dget gem"
-exec "#{irb} #{libs} --simple-prompt"
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! [:rubygems, :newgem, :newgem_theme, :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! [:rubygems, :newgem, :newgem_theme, :test_unit]
-RubiGen::Scripts::Generate.new.run(ARGV)
View
@@ -0,0 +1,7 @@
+require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+
+describe "Dget" do
+ it "fails" do
+ fail "hey buddy, you should probably rename this file and start specing for real"
+ end
+end
View
@@ -0,0 +1,9 @@
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'dget'
+require 'spec'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+
+end

0 comments on commit 5618c94

Please sign in to comment.