Permalink
Browse files

Merge branch 'strip_cruft' into deving

  • Loading branch information...
2 parents 00e7cf2 + 15a8e64 commit f7d6ca9498806cf96f6decbf03ef0701fae5f037 @jeffWelling jeffWelling committed Feb 9, 2011
View
@@ -1,6 +0,0 @@
-bin/*.log
-pkg
-coverage
-ticgit*gem
-tmp
-.bundle
View
13 Gemfile
@@ -1,13 +0,0 @@
-source :rubygems
-
-gem 'rake'
-gem 'git', '>= 1.0.5'
-
-group :web do
- gem 'sinatra'
- gem 'haml'
-end
-
-group :dev do
- gem 'rspec', '~> 2.0.1'
-end
View
@@ -1,30 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- diff-lcs (1.1.2)
- git (1.2.5)
- haml (3.0.25)
- rack (1.2.1)
- rake (0.8.7)
- rspec (2.4.0)
- rspec-core (~> 2.4.0)
- rspec-expectations (~> 2.4.0)
- rspec-mocks (~> 2.4.0)
- rspec-core (2.4.0)
- rspec-expectations (2.4.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.4.0)
- sinatra (1.1.2)
- rack (~> 1.1)
- tilt (~> 1.2)
- tilt (1.2.2)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- git (>= 1.0.5)
- haml
- rake
- rspec (~> 2.0.1)
- sinatra
View
109 Rakefile
@@ -1,109 +0,0 @@
-# Ensure that the basics are installed before doing anything more
-# complicated.
-%w[rubygems bundler].each do |gem|
- begin
- require gem
- rescue LoadError
- $stderr.puts 'Missing gem: ' << gem
- $load_error = true
- end
-end
-exit 1 if $load_error
-
-require 'bundler/setup'
-require 'rake/gempackagetask'
-
-begin
- require "rspec/core/rake_task"
- namespace :test do
- desc 'Run all RSpec tests'
- RSpec::Core::RakeTask.new
-
- desc 'Remove RSpec temp directories'
- task :clean do
- rmtree Dir.glob('/tmp/ticgit-*')
- end
- end
-rescue LoadError
- $stderr.puts 'RSpec ~> 2.0 needed for testing.'
- $stderr.puts
-end
-
-ti_gemspec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = 'ticgit'
- s.version = '0.4.0'
- s.summary = 'A distributed ticketing system for Git projects.'
- s.files = FileList['bin/ti', 'lib/**/*']
- s.bindir = 'bin'
- s.executables = %w[ti]
- s.default_executable = 'ti'
- s.require_paths = %w[lib bin]
- s.add_dependency('git', '>= 1.0.5')
- s.add_development_dependency('rake', '>= 0.8.7')
- s.add_development_dependency('bundler')
-end
-Rake::GemPackageTask.new(ti_gemspec) { |pkg| pkg.need_tar = true }
-
-ticgitweb_gemspec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = 'ticgitweb'
- s.version = '0.4.0'
- s.summary = 'A distributed ticketing system for Git projects.'
- s.files = FileList['bin/ticgitweb']
- s.bindir = 'bin'
- s.executables = %w[ticgitweb]
- s.default_executable = 'ticgitweb'
- s.add_dependency('haml', '>= 3.0.23')
- s.add_dependency('sinatra', '~> 1.1')
- s.add_dependency('git', '>= 1.0.5')
- s.add_dependency('ticgit', '>= 0.4.0')
-end
-Rake::GemPackageTask.new(ticgitweb_gemspec) { |pkg| pkg.need_tar = true }
-
-desc "Clean out the coverage and pkg directories"
-task :clean do
- rm_rf 'coverage'
- rm_rf 'pkg'
- rm Dir.glob('ticgit*gem')
-end
-
-# Current will not run as a task in all cases. Manually remove with:
-#
-# gem uninstall -axI ticgitweb ticgit
-#
-# instead.
-task :uninstall do
- %w[ticgit ticgitweb].each do |gem|
- puts "Uninstalling #{gem} ... "
- exec "gem uninstall --all --executables --ignore-dependencies #{gem}"
- end
-end
-
-namespace :make do
- desc 'Make ticgit package for ti executable'
- task :ti => "pkg/#{ti_gemspec.name}-#{ti_gemspec.version}.gem" do
- puts "Generating #{ti_gemspec.name}-#{ti_gemspec.version}.gem"
- end
-
- desc 'Make ticgitweb package'
- task :ticgitweb => "pkg/#{ticgitweb_gemspec.name}-#{ticgitweb_gemspec.version}.gem" do
- puts "Generating #{ticgitweb_gemspec.name}-#{ticgitweb_gemspec.version}.gem"
- end
-end # namespace :make
-
-# Rubygems currently can't install both gems at the same time as a task;
-# ticgitweb always says it can't find ticgit. Install manually with:
-#
-# gem install pkg/*gem
-#
-# instead.
-task :install do
- gems = FileList['pkg/*gem']
- gems.sort.each do |gem|
- puts "Installing #{gem} ..."
- system "gem install #{gem}"
- end
-end
-
-task :default => ['make:ti', 'make:ticgitweb']
View
@@ -1,3 +1,3 @@
module TicGit
- VERSION = '2009.05.18'
+ VERSION = '0.9.1'
end
View
@@ -1,30 +0,0 @@
-# Once git has a fix for the glibc in handling .mailmap and another fix for
-# allowing empty mail address to be mapped in .mailmap we won't have to handle
-# them manually.
-
-desc 'Update AUTHORS'
-task :authors do
- authors = Hash.new(0)
-
- `git shortlog -nse`.scan(/(\d+)\s(.+)\s<(.*)>$/) do |count, name, email|
- case name
- when "ahoward"
- name, email = "Ara T. Howard", "ara.t.howard@gmail.com"
- when "Martin Hilbig blueonyx@dev-area.net"
- name, email = "Martin Hilbig", "blueonyx@dev-area.net"
- when "Michael Fellinger m.fellinger@gmail.com"
- name, email = "Michael Fellinger", "m.fellinger@gmail.com"
- end
-
- authors[[name, email]] += count.to_i
- end
-
- File.open('AUTHORS', 'w+') do |io|
- io.puts "Following persons have contributed to #{GEMSPEC.name}."
- io.puts '(Sorted by number of submitted patches, then alphabetically)'
- io.puts ''
- authors.sort_by{|(n,e),c| [-c, n.downcase] }.each do |(name, email), count|
- io.puts("%6d %s <%s>" % [count, name, email])
- end
- end
-end
View
@@ -1,66 +0,0 @@
-desc 'Run all bacon specs with pretty output'
-task :bacon => :install_dependencies do
- require 'open3'
- require 'scanf'
- require 'matrix'
-
- specs = PROJECT_SPECS
-
- some_failed = false
- specs_size = specs.size
- len = specs.map{|s| s.size }.sort.last
- total_tests = total_assertions = total_failures = total_errors = 0
- totals = Vector[0, 0, 0, 0]
-
- red, yellow, green = "\e[31m%s\e[0m", "\e[33m%s\e[0m", "\e[32m%s\e[0m"
- left_format = "%4d/%d: %-#{len + 11}s"
- spec_format = "%d specifications (%d requirements), %d failures, %d errors"
-
- specs.each_with_index do |spec, idx|
- print(left_format % [idx + 1, specs_size, spec])
-
- Open3.popen3(RUBY, spec) do |sin, sout, serr|
- out = sout.read.strip
- err = serr.read.strip
-
- # this is conventional, see spec/innate/state/fiber.rb for usage
- if out =~ /^Bacon::Error: (needed .*)/
- puts(yellow % ("%6s %s" % ['', $1]))
- else
- total = nil
-
- out.each_line do |line|
- scanned = line.scanf(spec_format)
-
- next unless scanned.size == 4
-
- total = Vector[*scanned]
- break
- end
-
- if total
- totals += total
- tests, assertions, failures, errors = total_array = total.to_a
-
- if tests > 0 && failures + errors == 0
- puts((green % "%6d passed") % tests)
- else
- some_failed = true
- puts(red % " failed")
- puts out unless out.empty?
- puts err unless err.empty?
- end
- else
- some_failed = true
- puts(red % " failed")
- puts out unless out.empty?
- puts err unless err.empty?
- end
- end
- end
- end
-
- total_color = some_failed ? red : green
- puts(total_color % (spec_format % totals.to_a))
- exit 1 if some_failed
-end
View
@@ -1,18 +0,0 @@
-desc 'update changelog'
-task :changelog do
- File.open('CHANGELOG', 'w+') do |changelog|
- `git log -z --abbrev-commit`.split("\0").each do |commit|
- next if commit =~ /^Merge: \d*/
- ref, author, time, _, title, _, message = commit.split("\n", 7)
- ref = ref[/commit ([0-9a-f]+)/, 1]
- author = author[/Author: (.*)/, 1].strip
- time = Time.parse(time[/Date: (.*)/, 1]).utc
- title.strip!
-
- changelog.puts "[#{ref} | #{time}] #{author}"
- changelog.puts '', " * #{title}"
- changelog.puts '', message.rstrip if message
- changelog.puts
- end
- end
-end
View
@@ -1,6 +0,0 @@
-require 'cucumber'
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new(:features) do |t|
- t.cucumber_opts = "--format pretty"
-end
View
@@ -1,22 +0,0 @@
-require 'rake/gempackagetask'
-
-task :gemspec => [:manifest, :changelog] do
- gemspec_file = "#{GEMSPEC.name}.gemspec"
- File.open(gemspec_file, 'w+'){|gs| gs.puts(GEMSPEC.to_ruby) }
-end
-
-desc "package and install from gemspec"
-task :install => [:gemspec] do
- sh "gem build #{GEMSPEC.name}.gemspec"
- sh "gem install #{GEMSPEC.name}-#{GEMSPEC.version}.gem"
-end
-
-desc "uninstall the gem"
-task :uninstall => [:clean] do
- sh %{gem uninstall -x #{GEMSPEC.name}}
-end
-
-Rake::GemPackageTask.new(GEMSPEC) do |p|
- p.need_tar = true
- p.need_zip = true
-end
View
@@ -1,76 +0,0 @@
-task :gem_installer do
- class GemInstaller
- def initialize(options = {}, &block)
- @gems = []
- @options = options
-
- run(&block)
- end
-
- def run(&block)
- instance_eval(&block) if block_given?
- end
-
- def gem(name, version = nil, options = {})
- if version.respond_to?(:merge!)
- options = version
- else
- options[:version] = version
- end
-
- @gems << [name, options]
- end
-
- def setup_gemspec(gemspec)
- gemspec.dependencies.each do |dependency|
- dependency.version_requirements.as_list.each do |version|
- gem(dependency.name, version)
- end
- end
-
- setup
- end
-
- def setup
- require 'rubygems'
- require 'rubygems/dependency_installer'
-
- @gems.each do |name, options|
- setup_gem(name, options)
- end
- end
-
- def setup_gem(name, options, try_install = true)
- print "activating #{name} ... "
- Gem.activate(name, *[options[:version]].compact)
- require(options[:lib] || name)
- puts "success."
- rescue LoadError => error
- puts error
- install_gem(name, options) if try_install
- setup_gem(name, options, try_install = false)
- end
-
- def install_gem(name, options)
- installer = Gem::DependencyInstaller.new(options)
-
- temp_argv(options[:extconf]) do
- print "Installing #{name} ... "
- installer.install(name, options[:version])
- puts "done."
- end
- end
-
- def temp_argv(extconf)
- if extconf ||= @options[:extconf]
- old_argv = ARGV.clone
- ARGV.replace(extconf.split(' '))
- end
-
- yield
-
- ensure
- ARGV.replace(old_argv) if extconf
- end
- end
-end
Oops, something went wrong.

0 comments on commit f7d6ca9

Please sign in to comment.