before :build do
spec = Bundler.load_gemspec(File.join(File.dirname(__FILE__), 'osdn-cli.gemspec'))
FileUtils.chmod 0644, spec.files
- FileUtils.chmod 0755, spec.executables
+ FileUtils.chmod 0755, spec.executables.map{|x| spec.bindir + '/' + x }
end
task :default => :spec
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'osdn/cli/version'
+require 'pathname'
Gem::Specification.new do |spec|
spec.name = "osdn-cli"
spec.description = %q{Non-intaractive manipulation tool for OSDN}
spec.homepage = "https://osdn.jp/projects/osdn-codes/wiki/CommandLineInterface"
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
+ files = (Pathname.glob("exe/**/*") + Pathname.glob("lib/**/*")).map(&:to_s)
+ spec.files = files.reject { |f| f.match(%r{^(test|spec|features)/}) || f.match(%r{(~|\.bak|\.orig|\.rej)$}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]