master
CouchFoo provides an ActiveRecord API interface to CouchDB — Read more
Would be helpful when reading the homepage of the project on github to display this (or similar):
sudo gem install georgepalmer-couch_foo
For those that forget that github gems start with the username.
Thanks, Seth
Apologies hadn't received notification of this. Just fixed in latest release
In future please message me if you raise an issue here as I don't check regularly.
Hi,
As database_version is a float value, 0.10 is NOT > 0.8 so that this test fails :
if version > 0.8 && CouchRest::VERSION.to_f < 0.21
File : /usr/lib/ruby/gems/1.8/gems/georgepalmer-couch_foo-0.8.3/lib/couch_foo/database.rb
what do you think of this solution ?
module CouchFoo class DatabaseVersion attr_accessor :major, :minor def initialize(version) self.major = 0 self.minor = 0 self.version = version end def version=(version) if version.to_s =~ /(\d)\.(\d+)/ self.major = $1.to_i self.minor = $2.to_i end end def > (version) v = DatabaseVersion.new(version) (self.major > v.major) || ((self.major = v.major) && (self.minor > v.minor)) end def < (version) v = DatabaseVersion.new(version) (v.major > self.major) || ((v.major = self.major) && (v.minor > self.minor)) end end
a little after :
self.database_version = DatabaseVersion.new((JSON.parse(RestClient.get(options[:host]))["version"]).gsub(/-.+/,""))
Nothing else changes.
Apologies I hadn't received notification of this issue. Just pushed fixes and deploying gem to gemcutter now.
Apologies hadn't received notification of this. Just fixed in latest release
In future please message me if you raise an issue here as I don't check regularly.