Skip to content

Commit

Permalink
[ruby/open-uri] Expose OpenURI::VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt authored and matzbot committed Apr 13, 2023
1 parent 76aaaf6 commit 61bd694
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/open-uri.gemspec
@@ -1,6 +1,13 @@
name = File.basename(__FILE__, ".gemspec")
version = ["lib", "."].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 = "open-uri"
spec.version = "0.3.0"
spec.name = name
spec.version = version
spec.authors = ["Tanaka Akira"]
spec.email = ["akr@fsij.org"]

Expand Down
3 changes: 3 additions & 0 deletions lib/open-uri.rb
Expand Up @@ -89,6 +89,9 @@ def self.open(name, *rest, &block)
# Author:: Tanaka Akira <akr@m17n.org>

module OpenURI

VERSION = "0.3.0"

Options = {
:proxy => true,
:proxy_http_basic_authentication => true,
Expand Down

0 comments on commit 61bd694

Please sign in to comment.