We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c2952a commit 2b0b1a8Copy full SHA for 2b0b1a8
2 files changed
lib/pathname.rb
@@ -14,6 +14,8 @@
14
15
class Pathname
16
17
+ VERSION = "0.2.1"
18
+
19
# :stopdoc:
20
21
# to_path is implemented so Pathname objects are usable with File.open, etc.
pathname.gemspec
@@ -1,6 +1,13 @@
1
+name = File.basename(__FILE__, ".gemspec")
2
+version = ["lib", "ext/lib"].find do |dir|
3
+ break File.foreach(File.join(__dir__, dir, "#{name}.rb")) do |line|
4
+ /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
5
+ end rescue nil
6
+end
7
8
Gem::Specification.new do |spec|
- spec.name = "pathname"
- spec.version = "0.2.1"
9
+ spec.name = name
10
+ spec.version = version
11
spec.authors = ["Tanaka Akira"]
12
spec.email = ["akr@fsij.org"]
13
0 commit comments