Permalink
Browse files

Moneta development moved to https://github.com/minad/moneta

  • Loading branch information...
1 parent eab31e7 commit 9d44a7892f8cdafe92f91e7f77125021144a690d @minad minad committed Dec 19, 2012
Showing with 2 additions and 1,981 deletions.
  1. +0 −3 .gitignore
  2. +0 −20 LICENSE
  3. +0 −56 README
  4. +2 −0 README.md
  5. +0 −60 Rakefile
  6. +0 −99 SPEC.markdown
  7. +0 −4 TODO
  8. +0 −234 benchmarks/various.rb
  9. +0 −29 lib/moneta.rb
  10. +0 −84 lib/moneta/adapters/basic_file.rb
  11. +0 −51 lib/moneta/adapters/couch.rb
  12. +0 −76 lib/moneta/adapters/datamapper.rb
  13. +0 −52 lib/moneta/adapters/file.rb
  14. +0 −62 lib/moneta/adapters/fog.rb
  15. +0 −40 lib/moneta/adapters/lmc.rb
  16. +0 −49 lib/moneta/adapters/memcache.rb
  17. +0 −23 lib/moneta/adapters/memory.rb
  18. +0 −52 lib/moneta/adapters/mongodb.rb
  19. +0 −14 lib/moneta/adapters/rackspace.rb
  20. +0 −41 lib/moneta/adapters/redis.rb
  21. +0 −14 lib/moneta/adapters/s3.rb
  22. +0 −34 lib/moneta/adapters/sdbm.rb
  23. +0 −51 lib/moneta/adapters/tokyo_cabinet.rb
  24. +0 −45 lib/moneta/adapters/tyrant.rb
  25. +0 −50 lib/moneta/adapters/xattr.rb
  26. +0 −53 lib/moneta/adapters/yaml.rb
  27. +0 −72 lib/moneta/builder.rb
  28. +0 −32 moneta.gemspec
  29. +0 −14 script/destroy
  30. +0 −14 script/generate
  31. +0 −62 spec/moneta_basic_file_spec.rb
  32. +0 −17 spec/moneta_couch_spec.rb
  33. +0 −77 spec/moneta_datamapper_spec.rb
  34. +0 −23 spec/moneta_file_spec.rb
  35. +0 −26 spec/moneta_lmc_spec.rb
  36. +0 −18 spec/moneta_memcache_spec.rb
  37. +0 −18 spec/moneta_memory_spec.rb
  38. +0 −15 spec/moneta_mongodb_spec.rb
  39. +0 −21 spec/moneta_rackspace_spec.rb
  40. +0 −15 spec/moneta_redis_spec.rb
  41. +0 −21 spec/moneta_s3_spec.rb
  42. +0 −23 spec/moneta_sdbm_spec.rb
  43. +0 −19 spec/moneta_tokyo_cabinet_spec.rb
  44. +0 −15 spec/moneta_tyrant_spec.rb
  45. +0 −25 spec/moneta_xattr_spec.rb
  46. +0 −25 spec/moneta_yaml_spec.rb
  47. +0 −126 spec/shared.rb
  48. +0 −7 spec/spec_helper.rb
View
@@ -1,3 +0,0 @@
-moneta-*.gem
-.idea
-*.swp
View
@@ -1,20 +0,0 @@
-Copyright (c) 2009 Yehuda Katz
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,56 +0,0 @@
-Moneta: A unified interface for key/value stores
-================================================
-
-Moneta provides a standard interface for interacting with various kinds of key/value stores.
-
-Out of the box, it supports:
-
-* File store for xattr
-* Basic File Store
-* Memcache store
-* In-memory store
-* The xattrs in a file system
-* DataMapper
-* S3
-* Berkeley DB
-* Redis
-* SDBM
-* Tokyo
-* CouchDB
-
-All stores support key expiration, but only memcache supports it natively. All other stores
-emulate expiration.
-
-The Moneta API is purposely extremely similar to the Hash API. In order so support an
-identical API across stores, it does not support iteration or partial matches, but that
-might come in a future release.
-
-The API:
-
-#initialize(options):: options differs per-store, and is used to set up the store
-
-#[](key):: retrieve a key. if the key is not available, return nil
-
-#fetch(key, &block):: retrieve a key. if the key is not available, execute the
- block and return its return value.
-
-#fetch(key, value) retrieve a key. if the key is not available, return the value
-
-#[]=(key, value):: set a value for a key. if the key is already used, clobber it.
- keys set using []= will never expire
-
-#delete(key):: delete the key from the store and return the current value
-
-#key?(key):: true if the key exists, false if it does not
-
-#has_key?(key):: alias for key?
-
-#store(key, value, options):: same as []=, but you can supply an :expires_in option,
- which will specify a number of seconds before the key
- should expire. In order to support the same features
- across all stores, only full seconds are supported
-
-#update_key(key, options):: updates an existing key with a new :expires_in option.
- if the key has already expired, it will not be updated.
-
-#clear:: clear all keys in this store
View
@@ -0,0 +1,2 @@
+Moneta development moved to https://github.com/minad/moneta
+===========================================================
View
@@ -1,60 +0,0 @@
-require 'rubygems'
-require 'rake/gempackagetask'
-require 'rubygems/specification'
-require 'spec/rake/spectask'
-require 'date'
-
-GEM = "moneta"
-GEM_VERSION = "0.5.0"
-AUTHOR = "Yehuda Katz"
-EMAIL = "wycats@gmail.com"
-HOMEPAGE = "http://www.yehudakatz.com"
-SUMMARY = "A unified interface to key/value stores"
-
-spec = Gem::Specification.new do |s|
- s.name = GEM
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
- s.summary = SUMMARY
- s.description = s.summary
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- # Uncomment this to add a dependency
- # s.add_dependency "foo"
-
- s.require_path = 'lib'
- s.autorequire = GEM
- s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
-
-desc "install the gem locally"
-task :install => [:package] do
- sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
-end
-
-desc "create a gemspec file"
-task :make_spec do
- File.open("#{GEM}.gemspec", "w") do |file|
- file.puts spec.to_ruby
- end
-end
-
-desc "Run all examples (or a specific spec with TASK=xxxx)"
-Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_opts = ["-cfs"]
- t.spec_files = begin
- if ENV["TASK"]
- ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
- else
- FileList['spec/**/*_spec.rb']
- end
- end
-end
View
@@ -1,99 +0,0 @@
-# Moneta Specification
-
-The purpose of the moneta specification is to create a general-purpose API for interacting with key-value stores. In general, libraries that need to interact with key-value stores should be able to specify that they can use any "moneta-compliant store".
-
-# Moneta Executable Specs
-
-Moneta ships with a set of executable specs which you can use to verify spec-compliance with your moneta adapter.
-
-# Moneta Library
-
-Moneta ships with proof-of-concept adapters for over a dozen key-value stores, including in-memory, memcache, database-backed and S3. These adapters are meant as proofs-of-concept, and while the moneta project intends to maintain them (and will accept patches to improve them), you should not consider them the core of the project.
-
-# Requirements for a Moneta Adapter
-
-(See RFC 2119 for use of MUST, SHOULD, MAY, MUST NOT, and SHOULD NOT)
-
-A Moneta adapter must expose a class with the following characteristics:
-
-## Class Methods
-
-### <code>new(options[Hash]) => Object</code>
-
-Return an instance of the moneta adapter, with the instance methods listed below. The <code>options</code> hash is a required parameter, and the adapter may specify whatever additional requirements it needs to properly instantiate it.
-
-## Instance Methods
-
-### <code>\[\](key[Object]) => Object</code>
-
-Return the value stored in the key-value-store under the provided key. Adapters MUST return a duplicate of the original value, and consumers should expect that adapters might serialize and deserialize the key and value. As a result, both the key and value MUST be objects that can be serialized using Ruby's Marshal system.
-
-### <code>\[\]=(key[Object], value[Object]) => Object(value)</code>
-
-Store the value in the key-value-store under the provided key. Adapters MAY serialize the value using Ruby's Marshal system, and MUST NOT store a reference to the original value in the store, unless Ruby disallows duplication of the original value. Adapters SHOULD NOT simply call <code>dup</code> on the value, unless the value stores no references to other Object. For example, an adapter MAY store a <code>dup</code> of a String, but SHOULD NOT store a <code>dup</code> of <code>["hello", "world"]</code>.
-
-### <code>fetch(key[Object]) => Object</code>
-
-Return the value stored in the key-value-store under the provided key. If no value is stored under the provided key, the adapter MUST raise an IndexError.
-
-### <code>fetch(key[Object], &block) => Object</code>
-
-Return the value stored in the key-value-store under the provided key. If no value is stored under the provided key, the adapter MUST yield to the block, and return the value. The adapter MUST NOT store the value returned from the block in the key-value-store.
-
-### <code>fetch(key[Object], value[Object]) => Object</code>
-
-Return the value stored in the key-value-store under the provided key. If no value is stored under the provided key, the adapter MUST return the default value provided. The adapter MUST NOT store the default value in the key-value-store.
-
-### <code>delete(key[Object]) => Object</code>
-
-Delete the value stored in the key-value-store for the key provided, and return the value previously stored there. After this operation, the key-value-store MUST behave as though no value was stored for the provided key.
-
-### <code>key?(key[Object]) => [TrueClass, FalseClass]</code>
-
-Determine whether a value exists in the key-value-store for the key provided. If a value exists, the adapter MUST return <code>true</code>. Otherwise, the adapter MUST return <code>false</code>.
-
-### <code>store(key[Object], value[Object]) => Object(value)</code>
-
-Behaves the same as <code>[]=</code>, but allows the client to send additional options which can be specified by the adapter (and which may be specified by extensions to this specification).
-
-### <code>update_key(key[Object], options[Hash]) => nil</code>
-
-In this specification, this operation does nothing. However, extensions to this specification may specify semantics for certain values of the <code>options</code> Hash.
-
-### <code>clear</code>
-
-Completely empty all keys and values from the key-value-store. Adapters MAY allow a namespace during initialization, which can scope this operation to a particular subset of keys. After calling <code>clear</code>, a <code>[]</code> operation MUST return nil for every possible key, and a <code>key?</code> query MUST return false for every possible key.
-
-# Additional Options Hashes
-
-The following methods may all take an additional Hash as a final argument. This allows the client to send additional options which can be specified by the adapter (and which may be specified by extensions to this specification).
-
-* fetch
-* store
-* delete
-* key?
-* clear
-
-In the case of methods with optional arguments, the Hash MUST be provided as the final argument, and all optional arguments MUST be specified.
-
-Keys in this Hash MUST be Strings or Symbols. If they are Strings, they MUST be prefixed with a unique namespace. Namespaces MUST be separated from the name of the key with a single ".". The namespace SHOULD be the name of the gem that exposes the key.
-
-Keys in this Hash MUST NOT be Symbols unless this specification or an official extension to this specification defines a Symbol key.
-
-# Key Equality
-
-Adapters MUST consider keys as equal to one another if and only if the value of <code>Marshal.dump(keya)</code> is the same (byte-for-byte) as <code>Marshal.dump(keyb)</code>. This does not mean that adapters are required to use <code>Marshal.dump</code> to calculate the key to use for a given key specified by the consumer of the adapter. However, if an adapter does not, it MUST guarantee that the value returned for every key is identical to the value that would be returned if it did a byte-for-byte comparison of the result of <code>Marshal.dump</code> for every operation involving a key.
-
-# Storage and Serialization
-
-In a Moneta-compliant adapter, any Ruby object that can be serialized using Ruby's marshalling system may be used for keys or values.
-
-Adapters MAY use the marshalling system to serialize Ruby objects. Adapters MUST NOT return an Object from a fetch operation that existed on the heap prior to the fetch operation. The intention of this requirement is to prevent adapters that use the heap for persistence to store direct references to Objects passed into the <code>store</code> or <code>[]=</code> methods.
-
-# Atomicity
-
-The base Moneta specification does not specify any atomicity guarantees. However, extensions to this spec may specify extensions that define additional guarantees for any of the defined operations.
-
-# Expiry
-
-The base Moneta specification does not specify any mechanism for time-based expiry. However, extensions to this spec may specify mechanisms (using <code>store</code> and <code>update_key</code>) to provide expiration semantics.
View
@@ -1,4 +0,0 @@
-TODO:
-Fix LICENSE with your name
-Fix Rakefile with your name and contact info
-Add your code to lib/<%= name %>.rb
Oops, something went wrong.

0 comments on commit 9d44a78

Please sign in to comment.