rays.gemspec in rays-0.1.3 vs rays.gemspec in rays-0.1.4

- old
+ new

@@ -1,64 +1,43 @@ # -*- mode: ruby; coding: utf-8 -*- -$: << File.join(File.dirname(__FILE__), 'lib') +$: << File.expand_path('../lib', __FILE__) -require 'rake' require 'rays/module' -MODULE = Rays -NAME = MODULE.name.downcase +Gem::Specification.new do |s| + def glob (*patterns) + patterns.map {|pat| Dir.glob(pat).to_a}.flatten + end + mod = Rays + name = mod.name.downcase + rdocs = glob *%w[README .doc/ext/**/*.cpp] -FILES = FileList[*%W[ - README - ChangeLog - Rakefile - #{NAME}.gemspec - VERSION - task/**/*.rake - ext/**/*.rb - ext/**/*.h - ext/**/*.cpp - include/**/*.h - lib/**/*.rb - src/**/*.h - src/**/*.cpp - src/**/*.mm - test/**/*.rb -]] - -RDOCS = FileList[*%W[ - README - .doc/ext/**/*.cpp -]] - - -Gem::Specification.new do |s| - s.name = NAME + s.name = name s.summary = 'A Drawing Engine using OpenGL.' s.description = 'This library helps you to develop graphics application with OpenGL.' - s.version = MODULE.version + s.version = mod.version s.authors = %w[snori] s.email = 'snori@xord.org' - s.homepage = "http://github.com/xord/#{NAME}" + s.homepage = "http://github.com/xord/#{name}" s.platform = Gem::Platform::RUBY s.required_ruby_version = '>=1.9.0' - s.require_paths << 'ext' + s.add_runtime_dependency 'bundler' s.add_runtime_dependency 'xot' s.add_runtime_dependency 'rucy' s.add_development_dependency 'rake' s.add_development_dependency 'gemcutter' - s.files = FILES.to_a - s.test_files = FileList['test/**/test_*.rb'].to_a - + s.files = `git ls-files`.split $/ + s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f} + s.test_files = s.files.grep %r{^(test|spec|features)/} + s.extra_rdoc_files = rdocs.to_a s.has_rdoc = true - s.extra_rdoc_files = RDOCS.to_a s.extensions << 'Rakefile' end