Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:snaka/ruby_gntp

  • Loading branch information...
commit 47de3c0037627404434cf5ceb3bb7f5feafb6f6f 2 parents 9511f14 + 62e912f
@snaka authored
Showing with 24 additions and 13 deletions.
  1. +7 −0 ChangeLog
  2. +17 −13 lib/ruby_gntp.rb
View
7 ChangeLog
@@ -28,3 +28,10 @@
* Merge spidahman's commits. Lot of thanks, spidahman!
* Add some test(spec).
+== Version 0.3.0 - yyyy/mm/dd
+
+== Version 0.3.1 - yyyy/mm/dd
+
+== Version 0.3.2 - 2010/01/26
+* Temporary patchwork fix - The code was commented out that recognize version
+of the OS causes some defects -
View
30 lib/ruby_gntp.rb
@@ -42,7 +42,7 @@ class GNTP
attr_reader :message if $DEBUG
RUBY_GNTP_NAME = 'ruby_gntp'
- RUBY_GNTP_VERSION = '0.3.1'
+ RUBY_GNTP_VERSION = '0.3.3'
def initialize(app_name = 'Ruby/GNTP', host = 'localhost', password = '', port = 23053)
@app_name = app_name
@@ -219,22 +219,26 @@ def output_origin_headers
message << "Origin-Software-Name: #{RUBY_GNTP_NAME}\r\n"
message << "Origin-Software-Version: #{RUBY_GNTP_VERSION}\r\n"
- platformname, platformversion = '', ''
+ platformname = platformversion = ''
+ # These causes a problem... temporary patchwork fix
+ #
# see Proper way to detect Windows platform in Ruby - The Empty Way
# http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/
#
- if Config::CONFIG['host_os'] =~ /mswin/
- ver = `ver`
- if ver.index('[')
- matches = ver.scan(/(.*)\[+(.*)\]+/)[0]
- platformname, platformversion = matches[0], matches[1]
- else
- platformname, platformversion = 'Microsoft Windows', ver
- end
- else
- platformname, platformversion = `uname -s`, `uname -r`
- end
+ #if Config::CONFIG['host_os'] =~ /mswin/
+ # ver = `ver`
+ # if ver.index('[')
+ # matches = ver.scan(/(.*)\[+(.*)\]+/)[0]
+ # platformname, platformversion = matches[0], matches[1]
+ # else
+ # platformname, platformversion = 'Microsoft Windows', ver
+ # end
+ #else
+ # platformname, platformversion = `uname -s`, `uname -r`
+ #end
+ platformname = "Windows"
+ platformname = "0.0"
message << "Origin-Platform-Name: #{platformname.strip}\r\n"
message << "Origin-Platform-Version: #{platformversion.strip}\r\n"
Please sign in to comment.
Something went wrong with that request. Please try again.