diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | Rakefile | 35 | ||||
-rw-r--r-- | highline.gemspec | 36 |
3 files changed, 40 insertions, 32 deletions
@@ -5,6 +5,7 @@ Below is a complete listing of changes for each revision of HighLine. == 1.6.9 * The new list modes now properly ignore escapes when sizing. +* Added a project gemspec file. == 1.6.8 @@ -34,38 +34,9 @@ task :upload_docs => [:rdoc] do "bbazzarrakk@rubyforge.org:/var/www/gforge-projects/highline/" end -spec = Gem::Specification.new do |spec| - spec.name = "highline" - spec.version = version - spec.platform = Gem::Platform::RUBY - spec.summary = "HighLine is a high-level command-line IO library." - spec.files = Dir.glob("{examples,lib,test}/**/*.rb"). - delete_if { |item| item.include?("CVS") } + - ["Rakefile", "setup.rb"] - - spec.test_files = "test/ts_all.rb" - spec.has_rdoc = true - spec.extra_rdoc_files = %w{README INSTALL TODO CHANGELOG LICENSE} - spec.rdoc_options << '--title' << 'HighLine Documentation' << - '--main' << 'README' - - spec.require_path = 'lib' - - spec.author = "James Edward Gray II" - spec.email = "james@grayproductions.net" - spec.rubyforge_project = "highline" - spec.homepage = "http://highline.rubyforge.org" - spec.description = <<END_DESC -A high-level IO library that provides validation, type conversion, and more for -command-line interfaces. HighLine also includes a complete menu system that can -crank out anything from simple list selection to complete shells with just -minutes of work. -END_DESC -end - -Gem::PackageTask.new(spec) do |pkg| - pkg.need_zip = true - pkg.need_tar = true +load(File.join(File.dirname(__FILE__), "highline.gemspec")) +Gem::PackageTask.new(SPEC) do |package| + # do nothing: I just need a gem but this block is required end desc "Show library's code statistics" diff --git a/highline.gemspec b/highline.gemspec new file mode 100644 index 0000000..52ca72f --- /dev/null +++ b/highline.gemspec @@ -0,0 +1,36 @@ +DIR = File.dirname(__FILE__) +LIB = File.join(DIR, *%w[lib highline.rb]) +VERSION = open(LIB) { |lib| + lib.each { |line| + if v = line[/^\s*VERSION\s*=\s*(['"])(\d\.\d\.\d)\1/, 2] + break v + end + } +} + +SPEC = Gem::Specification.new do |spec| + spec.name = "highline" + spec.version = VERSION + spec.platform = Gem::Platform::RUBY + spec.summary = "HighLine is a high-level command-line IO library." + spec.files = `git ls-files`.split("\n") + + spec.test_files = `git ls-files -- test/*.rb`.split("\n") + spec.has_rdoc = true + spec.extra_rdoc_files = %w{README INSTALL TODO CHANGELOG LICENSE} + spec.rdoc_options << '--title' << 'HighLine Documentation' << + '--main' << 'README' + + spec.require_path = 'lib' + + spec.author = "James Edward Gray II" + spec.email = "james@graysoftinc.com" + spec.rubyforge_project = "highline" + spec.homepage = "http://highline.rubyforge.org" + spec.description = <<END_DESC +A high-level IO library that provides validation, type conversion, and more for +command-line interfaces. HighLine also includes a complete menu system that can +crank out anything from simple list selection to complete shells with just +minutes of work. +END_DESC +end |