diff options
Diffstat (limited to 'ext/win32ole/win32ole.gemspec')
-rw-r--r-- | ext/win32ole/win32ole.gemspec | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec index b6ea8e8a55..9c137a5d70 100644 --- a/ext/win32ole/win32ole.gemspec +++ b/ext/win32ole/win32ole.gemspec @@ -1,6 +1,16 @@ +source_version = ["", "ext/win32ole/"].find do |dir| + begin + break File.open(File.join(__dir__, "#{dir}win32ole.c")) {|f| + f.gets("\n#define WIN32OLE_VERSION ") + f.gets[/\s*"(.+)"/, 1] + } + rescue Errno::ENOENT + end +end + Gem::Specification.new do |spec| spec.name = "win32ole" - spec.version = "1.8.9" + spec.version = source_version spec.authors = ["Masaki Suketa"] spec.email = ["suke@ruby-lang.org"] |