Skip to content
Browse files

Split out VERSION definition to version.rb

  • Loading branch information...
1 parent 0cea519 commit a12623535be4969b902a7861f2c490c1be8fbdd4 @nahi committed Sep 23, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 lib/httpclient.rb
  3. +3 −0 lib/httpclient/version.rb
View
2 Rakefile
@@ -24,7 +24,7 @@ Rake::TestTask.new("test") do |test|
end
Rake::RDocTask.new("doc") do |rdoc|
- load 'lib/httpclient.rb'
+ load 'lib/httpclient/version.rb'
rdoc.rdoc_dir = 'doc'
rdoc.title = "HTTPClient Library Document: Version #{HTTPClient::VERSION}"
rdoc.rdoc_files.include('README.txt')
View
2 lib/httpclient.rb
@@ -11,6 +11,7 @@
require 'digest/sha1'
# Extra library
+require 'httpclient/version'
require 'httpclient/util'
require 'httpclient/ssl_config'
require 'httpclient/connection'
@@ -229,7 +230,6 @@
# ruby -rhttpclient -e 'p HTTPClient.head(ARGV.shift).header["last-modified"]' http://dev.ctor.org/
#
class HTTPClient
- VERSION = '2.2.1'
RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
/: (\S+) (\S+)/ =~ %q$Id$
LIB_NAME = "(#{$1}/#{$2}, #{RUBY_VERSION_STRING})"
View
3 lib/httpclient/version.rb
@@ -0,0 +1,3 @@
+class HTTPClient
+ VERSION = '2.2.1'
+end

0 comments on commit a126235

Please sign in to comment.
Something went wrong with that request. Please try again.