wycats / moneta Goto Github PK
View Code? Open in Web Editor NEWa unified interface to key/value stores
Home Page: http://www.yehudakatz.com
a unified interface to key/value stores
Home Page: http://www.yehudakatz.com
The github hosted gem seems dated:
The Moneta::Memcache#key? method in the installed gem looks like:
def key?(key)
!self["key"].nil?
end
which does not work ("key" vs. key).
Is there a way to update the gem?
thanks.
I noticed that some Moneta backends do backend.put(value) and some do backend.put(Marshal.dump(value)). I would like to be able to control which I use, because I have a legacy system that uses the former. But, I also see the value in having the latter.
Furthermore, I can see how one would potentially want to write class-specific marshaling - for example, marshal just @attributes for ActiveRecord objects.
currently the gem does not have spec files in it.
moneta at /Users/kmandrup/.rvm/gems/ruby-1.9.2-p290/bundler/gems/moneta-eab31e7bb849 did not have a valid gemspec. This prevents bundler from installing bins or native extensions, but that may not affect its functionality. The validation message from Rubygems was: ["lib/moneta/datamapper.rb", "lib/moneta/file.rb", "lib/moneta/memcache.rb", "lib/moneta/memory.rb", "lib/moneta/xattr.rb"] are not files
https://github.com/wycats/moneta/issues
time to pass on the baton big guy ?
There doesn't seem to be a way of specifying username and password when instantiating the MongoDB adapter.
I struggled a bit with this gem and memcached.
Line 15 in memcache.rb when using memcached should be:
@cache = Memcached.new(options.delete(:server), options)
and not:
@cache = MemCache.new(options.delete(:server), options)
I noticed Berkeley DB adapter (lib/moneta/adapters/berkeley.rb)removed from latest code, is there a reason behind this??
An error occurred in an after(:all) hook.
Errno::ENOENT: No such file or directory - ./spec/berkeley_test.db
occurred at ./spec/moneta_berkeley_spec.rb:13:in `delete'
If you try to call .fetch("key") {|el| ... } Ruby 1.8.7 and 1.9.2 with the Memory implementation both print "warning: block supersedes default value argument". This is because Moneta's signature is "def fetch(key, value=nil, &block)" and defers to Hash's fetch(key, &block) implementation, which then checks the number of arguments -- i.e. if you pass two arguments to it (and the second is nil, like in my original example) it will print a warning. It's not as clean, but the value
variable should be checked for nil before explicitly calling super with arguments.
The Redis 2.x gem has a different API to go along with several new commands for Redis 2.x. Delete, flush_db and setex are all notable changes. My current fork has support for both 1.x and 2.x side-by-side, but maybe there should be a different module for each version:
You write - "All stores support key expiration, but only memcache supports it natively. All other stores
emulate expiration." - but Redis have EXPIRE command and support it nativelly too (see docs: http://code.google.com/p/redis/wiki/ExpireCommand)
Hi,
The files line in the gemspec doesn't contain all the adapters under lib/moneta/ . I'm not sure if this on purpose, but when moneta is installed via rubygems, these aren't included.
Cheers
Mike
The 0.6.0 version of moneta hosted on rubygems.org is missing the yaml adapter, and yet it's definitely in the 0.6.0 tag.
Are you actively maintaining this project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.