oct.gemspec in oct-0.2.0 vs oct.gemspec in oct-0.3.1
- old
+ new
@@ -1,32 +1,27 @@
# -*- encoding: utf-8 -*-
#
#
-
Gem::Specification.new do |s|
- # wrap 'git' so we can get gem files even on systems without 'git'
+
+ # avoid shelling out to run git every time the gemspec is evaluated
#
# @see spec/gemspec_spec.rb
#
- @gemfiles ||= begin
- filename = File.join(File.dirname(__FILE__), '.gemfiles')
- # backticks blows up on Windows w/o valid binary, use system instead
- if File.directory?('.git') && system('git ls-files bogus-filename')
- files = `git ls-files`
- cached_files = File.exists?(filename) ? File.open(filename, "r") {|f| f.read} : nil
- # maintain EOL
- files.gsub!(/\n/, "\r\n") if cached_files && cached_files.match("\r\n")
- File.open(filename, 'wb') {|f| f.write(files)} if cached_files != files
- else
- files = File.open(filename, "r") {|f| f.read}
- end
- raise "unable to process gemfiles" unless files
- files.gsub(/\r\n/, "\n")
+ gemfiles_cache = File.join(File.dirname(__FILE__), '.gemfiles')
+ if File.exists?(gemfiles_cache)
+ gemfiles = File.open(gemfiles_cache, "r") {|f| f.read}
+ # normalize EOL
+ gemfiles.gsub!(/\r\n/, "\n")
+ else
+ # .gemfiles missing, run 'rake gemfiles' to create it
+ # falling back to 'git ls-files'"
+ gemfiles = `git ls-files`
end
s.name = "oct"
- s.version = File.open(File.join(File.dirname(__FILE__), 'VERSION'), "r") { |f| f.read }
+ s.version = File.open(File.join(File.dirname(__FILE__), 'VERSION'), "r") { |f| f.read }
s.platform = Gem::Platform::RUBY
s.authors = ["Robert Wahler"]
s.email = ["robert@gearheadforhire.com"]
s.homepage = "http://rubygems.org/gems/oct"
s.summary = "Command line octal file permissions"
@@ -34,33 +29,27 @@
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "oct"
s.add_dependency 'term-ansicolor', '>= 1.0.4'
- s.add_dependency 'configatron', '>= 2.5.1'
- s.add_development_dependency "bundler", ">= 1.0.7"
- s.add_development_dependency "rspec", "= 1.3.1"
- s.add_development_dependency "cucumber", ">= 0.9.4"
- s.add_development_dependency "aruba", ">= 0.2.2"
+ s.add_development_dependency "bundler", ">= 1.0.14"
+ s.add_development_dependency "rspec", ">= 2.6.0"
+ s.add_development_dependency "cucumber", "~> 1.0"
+ s.add_development_dependency "aruba", "~> 0.4.3"
s.add_development_dependency "rake", ">= 0.8.7"
- s.add_development_dependency "yard", ">= 0.6.2"
- # Specify a markdown gem for rake doc:generate
- #
- # Without the development dependency, running yard rake
- # tasks will fail. Kramdown chosen to provide a pure Ruby solution.
- s.add_development_dependency "kramdown", ">= 0.12.0"
+ # doc generation
+ s.add_development_dependency "yard", ">= 0.7.2"
+ s.add_development_dependency "redcarpet", ">= 1.17.2"
- s.files = @gemfiles.split("\n")
- s.executables = @gemfiles.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
+ s.files = gemfiles.split("\n")
+ s.executables = gemfiles.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
+ s.require_paths = ["lib"]
- s.require_path = 'lib'
-
- s.has_rdoc = 'yard'
- s.rdoc_options = [
- '--title', 'Oct Documentation',
- '--main', 'README.markdown',
+ s.rdoc_options = [
+ '--title', 'Oct Documentation',
+ '--main', 'README.markdown',
'--line-numbers',
- '--inline-source'
+ '--inline-source'
]
end