Skip to content

Commit

Permalink
Merge pull request #5 from ruby/expose-gem-version
Browse files Browse the repository at this point in the history
Expose Rinda::VERSION
  • Loading branch information
hsbt committed Apr 21, 2023
2 parents 407773c + fa3865a commit 744e26b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/rinda/rinda.rb
Expand Up @@ -18,6 +18,8 @@

module Rinda

VERSION = "0.1.1"

##
# Rinda error base class

Expand Down
11 changes: 9 additions & 2 deletions rinda.gemspec
@@ -1,6 +1,13 @@
name = File.basename(__FILE__, ".gemspec")
version = ["lib/rinda", "."].find do |dir|
break File.foreach(File.join(__dir__, dir, "#{name}.rb")) do |line|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
end rescue nil
end

Gem::Specification.new do |spec|
spec.name = "rinda"
spec.version = "0.1.1"
spec.name = name
spec.version = version
spec.authors = ["Masatoshi SEKI"]
spec.email = ["seki@ruby-lang.org"]

Expand Down

0 comments on commit 744e26b

Please sign in to comment.