Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions base64.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
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 = "base64"
spec.version = "0.1.1"
spec.name = name
spec.version = version
spec.authors = ["Yusuke Endoh"]
spec.email = ["mame@ruby-lang.org"]

Expand Down
3 changes: 3 additions & 0 deletions lib/base64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# binary data into purely printable characters.

module Base64

VERSION = "0.1.1"

module_function

# Returns the Base64-encoded version of +bin+.
Expand Down