task/gemgem.rb in gem-path-0.5.1 vs task/gemgem.rb in gem-path-0.6.0
- old
+ new
@@ -32,11 +32,11 @@
s.files = gem_files
s.test_files = test_files
s.executables = bin_files
end
spec_create.call(spec)
- spec.homepage = "https://github.com/godfat/#{spec.name}"
+ spec.homepage ||= "https://github.com/godfat/#{spec.name}"
self.spec = spec
end
def write
File.open(spec_path, 'w'){ |f| f << split_lines(spec.to_ruby) }
@@ -152,18 +152,12 @@
end
def expand_patterns pathes
# http://git-scm.com/docs/gitignore
pathes.flat_map{ |path|
- case path
- when %r{\*}
- Regexp.escape(path).gsub(/\\\*/, '[^/]*')
- when %r{^/}
- "^#{Regexp.escape(path[1..-1])}"
- else # we didn't implement negative pattern for now
- Regexp.escape(path)
- end
+ # we didn't implement negative pattern for now
+ Regexp.escape(path).sub(%r{^/}, '^').gsub(/\\\*/, '[^/]*')
}
end
def gitignore
@gitignore ||= if File.exist?(path = "#{dir}/.gitignore")
@@ -231,13 +225,9 @@
end # of gem namespace
desc 'Run tests'
task :test do
next if Gemgem.test_files.empty?
-
- require 'bacon'
- Bacon.extend(Bacon::TestUnitOutput)
- Bacon.summary_on_exit
Gemgem.test_files.each{ |file| require "#{Gemgem.dir}/#{file[0..-4]}" }
end
desc 'Trash ignored files'
task :clean => ['gem:spec'] do