Permalink
Browse files

Porting to iron_core - version reading.

  • Loading branch information...
1 parent c46b905 commit f25cb682c50f14aa94f7cacc85a393c6e9576bc8 Andrew Kirilenko committed Apr 27, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 lib/iron_mq/client.rb
View
@@ -1,9 +1,18 @@
+require 'yaml'
+
require 'iron_core'
module IronMQ
- # FIXME: read real version
+ @@version = nil
+
def self.version
- '2.0.0'
+ if @@version.nil?
+ v = YAML.load(File.read(File.dirname(__FILE__) + '/../../VERSION.yml'))
+ $stderr.puts v.inspect
+ @@version = [v[:major].to_s, v[:minor].to_s, v[:patch].to_s].join('.')
+ end
+
+ @@version
end
class Client < IronCore::Client

0 comments on commit f25cb68

Please sign in to comment.