prettyprint.gemspec in prettyprint-0.1.1 vs prettyprint.gemspec in prettyprint-0.2.0
- old
+ new
@@ -1,7 +1,14 @@
+name = File.basename(__FILE__, ".gemspec")
+version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
+ end rescue nil
+end
+
Gem::Specification.new do |spec|
- spec.name = "prettyprint"
- spec.version = "0.1.1"
+ spec.name = name
+ spec.version = version
spec.authors = ["Tanaka Akira"]
spec.email = ["akr@fsij.org"]
spec.summary = %q{Implements a pretty printing algorithm for readable structure.}
spec.description = %q{Implements a pretty printing algorithm for readable structure.}