Sha256: 48ccb3c9565d075c1d3e37321d734aa3776503f9f4df1ddb7b5f8db58916365e

Contents?: true

Size: 1.5 KB

Versions: 20

Compression:

Stored size: 1.5 KB

Contents

#! /usr/bin/env ruby

lib, version, *ignored = ARGV

unless lib
  lib = File.basename(Dir.pwd)
end

unless version
  mod = lib.capitalize
  require "./lib/#{ lib }"
  version = eval(mod).send(:version)
end

abort('no lib') unless lib
abort('no version') unless version

puts "### gemspec: #{ lib }-#{ version }"

$VERBOSE = nil

shiteless = lambda{|list| list.delete_if{|file| file =~ %r/\.(git|svn|tmp|sw.|bak)$/}}

files       = shiteless[Dir::glob("**/**")]
executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
has_rdoc    = true #File.exist?('doc')
test_files  = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")

extensions = []
%w( Makefile configure extconf.rb rakefile Rakefile mkrf_conf ).each do |ext|
  extensions << ext if File.exists?(ext)
end

template = <<-__

  Gem::Specification::new do |spec|
    spec.name = #{ lib.inspect }
    spec.version = #{ version.inspect }
    spec.platform = Gem::Platform::RUBY
    spec.summary = #{ lib.inspect }

    spec.files = #{ files.inspect }
    spec.executables = #{ executables.inspect }
    
    spec.require_path = "lib"

    spec.has_rdoc = #{ has_rdoc.inspect }
    spec.test_files = #{ test_files.inspect }
    #spec.add_dependency 'lib', '>= version'
    #spec.add_dependency 'fattr'

    spec.extensions.push(*#{ extensions.inspect })

    spec.rubyforge_project = 'codeforpeople'
    spec.author = "Ara T. Howard"
    spec.email = "ara.t.howard@gmail.com"
    spec.homepage = "http://github.com/ahoward/#{ lib }/tree/master"
  end

__

puts template

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/arrayfields-4.7.4/gemspec.rb
session-3.2.0 gemspec.rb
session-3.1.2 gemspec.rb
session-3.1.1 gemspec.rb
redcar-0.5.1 plugins/runnables/vendor/session/gemspec.rb
redcar-0.5 plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.6dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.5dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.4dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.3dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.2dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.5.1dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.4.1 plugins/runnables/vendor/session/gemspec.rb
redcar-0.4 plugins/runnables/vendor/session/gemspec.rb
redcar-0.3.10.1dev plugins/runnables/vendor/session/gemspec.rb
redcar-0.3.10.0dev plugins/runnables/vendor/session/gemspec.rb
session-3.1.0 gemspec.rb
arrayfields-4.7.4 gemspec.rb
options-1.0.0 gemspec.rb
threadify-1.0.0 gemspec.rb