Permalink
Browse files

removed a bunch of the newgem stuff because I dont really want it

  • Loading branch information...
1 parent 3d42968 commit d5d73de2d1197d5b59f47af1db80751ade97fe3c @schacon committed May 27, 2008
View
@@ -1,4 +0,0 @@
-== 0.0.1 2008-05-27
-
-* 1 major enhancement:
- * Initial release
View
File renamed without changes.
View
@@ -1,19 +1,10 @@
bin/git-lh
-config/hoe.rb
-config/requirements.rb
-History.txt
-lib/git-lighthouse
lib/git-lighthouse/base.rb
lib/git-lighthouse/cli.rb
lib/git-lighthouse/lighthouse.rb
lib/git-lighthouse/version.rb
lib/git-lighthouse.rb
-License.txt
-Manifest.txt
-PostInstall.txt
-Rakefile
+LICENSE
README.txt
-setup.rb
spec/cli_spec.rb
spec/spec_helper.rb
-TODO.txt
View
No changes.
View
@@ -78,6 +78,10 @@ Eventually, I will try to add this functionality, too:
*
+== AUTHORS:
+
+* Scott Chacon (schacon@gmail.com)
+
== LICENSE:
(The MIT License)
View
@@ -1,4 +1,37 @@
-require 'config/requirements'
-require 'config/hoe' # setup Hoe + all gem configuration
-
-Dir['tasks/**/*.rake'].each { |rake| load rake }
+require 'rubygems'
+Gem::manage_gems
+require 'rake/gempackagetask'
+require 'spec/rake/spectask'
+
+spec = eval(File.read('git-lighthouse.gemspec'))
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_tar = true
+end
+
+desc "Run all specs in spec directory"
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_opts = ['--color']
+end
+
+namespace :spec do
+ desc "Run rcov on the spec files"
+ Spec::Rake::SpecTask.new(:coverage) do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_opts = ['--color']
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
+ end
+end
+
+desc "Clean out the coverage and pkg directories"
+task :clean do
+ rm_rf 'coverage'
+ rm_rf 'pkg'
+ rm Dir.glob('git-lighthouse*gem')
+end
+
+task :default => "pkg/#{spec.name}-#{spec.version}.gem" do
+ puts "generated latest version"
+end
View
@@ -6,6 +6,6 @@
#
require 'rubygems'
-#require 'git-lighthouse'
-require File.dirname(__FILE__) + '/../lib/git-lighthouse'
+require 'git-lighthouse'
+#require File.dirname(__FILE__) + '/../lib/git-lighthouse'
GitLighthouse::CLI.execute
View
@@ -1,73 +0,0 @@
-require 'git-lighthouse/version'
-
-AUTHOR = 'Scott Chacon' # can also be an array of Authors
-EMAIL = "schacon@gmail.com"
-DESCRIPTION = "description of gem"
-GEM_NAME = 'git-lighthouse' # what ppl will type to install your gem
-RUBYFORGE_PROJECT = 'git-lighthouse' # The unix name for your project
-HOMEPATH = "http://git-lighthouse.rubyforge.org"
-DOWNLOAD_PATH = "http://rubyforge.org/projects/git-lighthouse"
-EXTRA_DEPENDENCIES = [
- ['git', '>= 1.0.5']
-]
-
-@config_file = "~/.rubyforge/user-config.yml"
-@config = nil
-RUBYFORGE_USERNAME = "unknown"
-def rubyforge_username
- unless @config
- begin
- @config = YAML.load(File.read(File.expand_path(@config_file)))
- rescue
- puts <<-EOS
-ERROR: No rubyforge config file found: #{@config_file}
-Run 'rubyforge setup' to prepare your env for access to Rubyforge
- - See http://newgem.rubyforge.org/rubyforge.html for more details
- EOS
- exit
- end
- end
- RUBYFORGE_USERNAME.replace @config["username"]
-end
-
-
-REV = nil
-# UNCOMMENT IF REQUIRED:
-# REV = YAML.load(`svn info`)['Revision']
-VERS = GitLighthouse::VERSION::STRING + (REV ? ".#{REV}" : "")
-RDOC_OPTS = ['--quiet', '--title', 'git-lighthouse documentation',
- "--opname", "index.html",
- "--line-numbers",
- "--main", "README",
- "--inline-source"]
-
-class Hoe
- def extra_deps
- @extra_deps.reject! { |x| Array(x).first == 'hoe' }
- @extra_deps
- end
-end
-
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.new(GEM_NAME, VERS) do |p|
- p.developer(AUTHOR, EMAIL)
- p.description = DESCRIPTION
- p.summary = DESCRIPTION
- p.url = HOMEPATH
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
- p.test_globs = ["test/**/test_*.rb"]
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
-
- # == Optional
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
- #p.extra_deps = EXTRA_DEPENDENCIES
-
- #p.spec_extras = {} # A hash of extra values to set in the gemspec.
- end
-
-CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
-PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
-$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
-$hoe.rsync_args = '-av --delete --ignore-errors'
-$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + "/../PostInstall.txt").read rescue ""
View
@@ -1,15 +0,0 @@
-require 'fileutils'
-include FileUtils
-
-require 'rubygems'
-%w[rake hoe newgem rubigen].each do |req_gem|
- begin
- require req_gem
- rescue LoadError
- puts "This Rakefile requires the '#{req_gem}' RubyGem."
- puts "Installation: gem install #{req_gem} -y"
- exit
- end
-end
-
-$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
View
@@ -0,0 +1,18 @@
+Gem::Specification.new do |s|
+ s.platform = Gem::Platform::RUBY
+ s.name = "git-lighthouse"
+ s.version = "0.1.0"
+ s.date = "2008-05-27"
+ s.author = "Scott Chacon"
+ s.email = "schacon@gmail.com"
+ s.summary = "Provides command line access to a Lighthouse ticketing system for a git based software package."
+ s.files = ["bin/git-lh", "lib/git-lighthouse/base.rb", "lib/git-lighthouse/cli.rb", "lib/git-lighthouse/lighthouse.rb", "lib/git-lighthouse/version.rb", "lib/git-lighthouse.rb", "LICENSE", "README.txt", "spec/cli_spec.rb", "spec/spec_helper.rb"]
+
+ s.bindir = 'bin'
+ s.executables << "git-lh"
+ s.homepage = "http://github/schacon/git-lighthouse"
+
+ s.add_dependency('git', [">= 1.0.7"])
+
+ s.require_path = "lib"
+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/git-lighthouse.rb'}"
-puts "Loading git-lh 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
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-
-GEM_NAME = 'git-lighthouse' # what ppl will type to install your gem
-RUBYFORGE_PROJECT = 'git-lighthouse'
-
-require 'rubygems'
-begin
- require 'newgem'
- require 'rubyforge'
-rescue LoadError
- puts "\n\nGenerating the website requires the newgem RubyGem"
- puts "Install: gem install newgem\n\n"
- exit(1)
-end
-require 'redcloth'
-require 'syntax/convertors/html'
-require 'erb'
-require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
-
-version = GitLighthouse::VERSION::STRING
-download = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
-
-def rubyforge_project_id
- RubyForge.new.autoconfig["group_ids"][RUBYFORGE_PROJECT]
-end
-
-class Fixnum
- def ordinal
- # teens
- return 'th' if (10..19).include?(self % 100)
- # others
- case self % 10
- when 1: return 'st'
- when 2: return 'nd'
- when 3: return 'rd'
- else return 'th'
- end
- end
-end
-
-class Time
- def pretty
- return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
- end
-end
-
-def convert_syntax(syntax, source)
- return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
-end
-
-if ARGV.length >= 1
- src, template = ARGV
- template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
-else
- puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
- exit!
-end
-
-template = ERB.new(File.open(template).read)
-
-title = nil
-body = nil
-File.open(src) do |fsrc|
- title_text = fsrc.readline
- body_text_template = fsrc.read
- body_text = ERB.new(body_text_template).result(binding)
- syntax_items = []
- body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
- ident = syntax_items.length
- element, syntax, source = $1, $2, $3
- syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
- "syntax-temp-#{ident}"
- }
- title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
- body = RedCloth.new(body_text).to_html
- body.gsub!(%r!(?:<pre><code>)?syntax-temp-(\d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
-end
-stat = File.stat(src)
-created = stat.ctime
-modified = stat.mtime
-
-$stdout << template.result(binding)
Oops, something went wrong.

0 comments on commit d5d73de

Please sign in to comment.