[DRE-commits] [ruby-moneta] 01/09: New upstream version 0.8.0
Daisuke Higuchi
dai at moszumanska.debian.org
Fri Jul 28 13:50:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
dai pushed a commit to branch exp/debian
in repository ruby-moneta.
commit 3e0b1651058562d5183a16a4a4f7bba788fd6858
Author: HIGUCHI Daisuke (VDR dai) <dai at debian.org>
Date: Fri Jul 28 20:38:17 2017 +0900
New upstream version 0.8.0
---
.travis.yml | 6 +-
CHANGES | 6 +
CONTRIBUTORS | 2 +
Gemfile | 75 +-
LICENSE | 2 +-
README.md | 141 +-
checksums.yaml.gz | Bin 268 -> 267 bytes
lib/active_support/cache/moneta_store.rb | 6 +-
lib/moneta.rb | 6 +-
lib/moneta/adapters/activerecord.rb | 16 +-
lib/moneta/adapters/cassandra.rb | 16 +-
lib/moneta/adapters/couch.rb | 2 +-
lib/moneta/adapters/datamapper.rb | 10 +-
lib/moneta/adapters/daybreak.rb | 2 +-
lib/moneta/adapters/fog.rb | 4 +-
lib/moneta/adapters/lmdb.rb | 2 +-
lib/moneta/adapters/localmemcache.rb | 2 +-
lib/moneta/adapters/memcached/dalli.rb | 6 +-
lib/moneta/adapters/memcached/native.rb | 2 +-
lib/moneta/adapters/mongo.rb | 170 +--
lib/moneta/adapters/mongo/base.rb | 63 +
lib/moneta/adapters/mongo/moped.rb | 113 ++
.../adapters/{mongo.rb => mongo/official.rb} | 72 +-
lib/moneta/adapters/pstore.rb | 6 +-
lib/moneta/adapters/restclient.rb | 2 +-
lib/moneta/adapters/sequel.rb | 20 +-
lib/moneta/cache.rb | 2 +-
lib/moneta/logger.rb | 4 +-
lib/moneta/mixins.rb | 8 +-
lib/moneta/shared.rb | 4 +-
lib/moneta/stack.rb | 4 +-
lib/moneta/synchronize.rb | 4 +-
lib/moneta/transformer.rb | 10 +-
lib/moneta/transformer/config.rb | 78 +-
lib/moneta/version.rb | 2 +-
lib/rack/cache/moneta.rb | 2 +-
lib/rack/moneta_cookies.rb | 4 +-
lib/rack/moneta_rest.rb | 2 +-
lib/rack/moneta_store.rb | 8 +-
lib/rack/session/moneta.rb | 16 +-
metadata.yml | 199 +--
moneta.gemspec | 1 +
script/benchmarks | 193 +--
script/generate-specs | 1493 ++++++++++----------
script/install-bundle | 2 +-
script/install-kyotocabinet | 4 +-
script/memusage | 2 +-
script/upload-bundle | 2 +-
spec/action_dispatch/session_moneta_store_spec.rb | 10 +-
spec/active_support/cache_moneta_store_spec.rb | 40 +-
...apter_activerecord_exisiting_connection_spec.rb | 4 +-
spec/moneta/adapter_activerecord_spec.rb | 12 +-
spec/moneta/adapter_cassandra_spec.rb | 2 +-
.../adapter_cassandra_with_default_expires_spec.rb | 2 +-
spec/moneta/adapter_couch_spec.rb | 2 +-
spec/moneta/adapter_datamapper_spec.rb | 12 +-
spec/moneta/adapter_daybreak_spec.rb | 2 +-
spec/moneta/adapter_dbm_spec.rb | 2 +-
spec/moneta/adapter_file_spec.rb | 2 +-
spec/moneta/adapter_fog_spec.rb | 8 +-
spec/moneta/adapter_gdbm_spec.rb | 2 +-
spec/moneta/adapter_hbase_spec.rb | 2 +-
spec/moneta/adapter_kyotocabinet_spec.rb | 2 +-
spec/moneta/adapter_leveldb_spec.rb | 2 +-
spec/moneta/adapter_lmdb_spec.rb | 2 +-
spec/moneta/adapter_lmdb_with_db_spec.rb | 2 +-
spec/moneta/adapter_localmemcache_spec.rb | 2 +-
spec/moneta/adapter_lruhash_spec.rb | 2 +-
spec/moneta/adapter_memcached_dalli_spec.rb | 2 +-
...er_memcached_dalli_with_default_expires_spec.rb | 2 +-
spec/moneta/adapter_memcached_native_spec.rb | 2 +-
...r_memcached_native_with_default_expires_spec.rb | 2 +-
spec/moneta/adapter_memcached_spec.rb | 2 +-
.../adapter_memcached_with_default_expires_spec.rb | 2 +-
...r_mongo_spec.rb => adapter_mongo_moped_spec.rb} | 10 +-
...apter_mongo_moped_with_default_expires_spec.rb} | 4 +-
...ongo_spec.rb => adapter_mongo_official_spec.rb} | 6 +-
...er_mongo_official_with_default_expires_spec.rb} | 4 +-
spec/moneta/adapter_mongo_spec.rb | 8 +-
.../adapter_mongo_with_default_expires_spec.rb | 2 +-
spec/moneta/adapter_pstore_spec.rb | 2 +-
.../adapter_redis_with_default_expires_spec.rb | 2 +-
spec/moneta/adapter_restclient_spec.rb | 2 +-
spec/moneta/adapter_sdbm_spec.rb | 2 +-
spec/moneta/adapter_sequel_spec.rb | 2 +-
spec/moneta/adapter_sqlite_spec.rb | 2 +-
spec/moneta/adapter_tdb_spec.rb | 2 +-
spec/moneta/adapter_tokyocabinet_bdb_spec.rb | 2 +-
spec/moneta/adapter_tokyocabinet_hdb_spec.rb | 2 +-
spec/moneta/adapter_yaml_spec.rb | 2 +-
spec/moneta/cache_file_memory_spec.rb | 2 +-
spec/moneta/expires_file_spec.rb | 6 +-
.../expires_memory_with_default_expires_spec.rb | 2 +-
spec/moneta/mutex_spec.rb | 2 +-
spec/moneta/optionmerger_spec.rb | 52 +-
spec/moneta/pool_spec.rb | 2 +-
spec/moneta/semaphore_spec.rb | 2 +-
spec/moneta/shared_tcp_spec.rb | 4 +-
spec/moneta/shared_unix_spec.rb | 4 +-
spec/moneta/stack_file_memory_spec.rb | 2 +-
spec/moneta/stack_memory_file_spec.rb | 2 +-
spec/moneta/standard_activerecord_spec.rb | 2 +-
.../standard_activerecord_with_expires_spec.rb | 2 +-
spec/moneta/standard_cassandra_spec.rb | 2 +-
spec/moneta/standard_client_tcp_spec.rb | 2 +-
spec/moneta/standard_client_unix_spec.rb | 4 +-
spec/moneta/standard_couch_spec.rb | 2 +-
spec/moneta/standard_couch_with_expires_spec.rb | 2 +-
spec/moneta/standard_datamapper_spec.rb | 4 +-
.../standard_datamapper_with_expires_spec.rb | 4 +-
.../standard_datamapper_with_repository_spec.rb | 4 +-
spec/moneta/standard_daybreak_spec.rb | 2 +-
spec/moneta/standard_daybreak_with_expires_spec.rb | 2 +-
spec/moneta/standard_dbm_spec.rb | 2 +-
spec/moneta/standard_dbm_with_expires_spec.rb | 2 +-
spec/moneta/standard_file_spec.rb | 2 +-
spec/moneta/standard_file_with_expires_spec.rb | 2 +-
spec/moneta/standard_fog_spec.rb | 8 +-
spec/moneta/standard_fog_with_expires_spec.rb | 10 +-
spec/moneta/standard_gdbm_spec.rb | 2 +-
spec/moneta/standard_gdbm_with_expires_spec.rb | 2 +-
spec/moneta/standard_hashfile_spec.rb | 2 +-
spec/moneta/standard_hashfile_with_expires_spec.rb | 2 +-
spec/moneta/standard_hbase_spec.rb | 2 +-
spec/moneta/standard_hbase_with_expires_spec.rb | 2 +-
spec/moneta/standard_kyotocabinet_spec.rb | 2 +-
.../standard_kyotocabinet_with_expires_spec.rb | 2 +-
spec/moneta/standard_leveldb_spec.rb | 2 +-
spec/moneta/standard_leveldb_with_expires_spec.rb | 2 +-
spec/moneta/standard_lmdb_spec.rb | 2 +-
spec/moneta/standard_lmdb_with_expires_spec.rb | 2 +-
spec/moneta/standard_localmemcache_spec.rb | 2 +-
.../standard_localmemcache_with_expires_spec.rb | 2 +-
spec/moneta/standard_lruhash_spec.rb | 2 +-
spec/moneta/standard_lruhash_with_expires_spec.rb | 2 +-
spec/moneta/standard_memcached_dalli_spec.rb | 2 +-
spec/moneta/standard_memcached_native_spec.rb | 2 +-
spec/moneta/standard_memcached_spec.rb | 2 +-
spec/moneta/standard_memory_spec.rb | 2 +-
spec/moneta/standard_memory_with_compress_spec.rb | 2 +-
spec/moneta/standard_memory_with_expires_spec.rb | 2 +-
...tandard_memory_with_json_key_serializer_spec.rb | 2 +-
.../standard_memory_with_json_serializer_spec.rb | 2 +-
...ndard_memory_with_json_value_serializer_spec.rb | 2 +-
spec/moneta/standard_memory_with_prefix_spec.rb | 2 +-
.../standard_memory_with_snappy_compress_spec.rb | 2 +-
..._redis_spec.rb => standard_mongo_moped_spec.rb} | 4 +-
...hed_spec.rb => standard_mongo_official_spec.rb} | 4 +-
spec/moneta/standard_mongo_spec.rb | 2 +-
spec/moneta/standard_null_spec.rb | 2 +-
spec/moneta/standard_pstore_spec.rb | 2 +-
spec/moneta/standard_pstore_with_expires_spec.rb | 2 +-
spec/moneta/standard_redis_spec.rb | 2 +-
spec/moneta/standard_restclient_spec.rb | 2 +-
spec/moneta/standard_riak_spec.rb | 2 +-
spec/moneta/standard_riak_with_expires_spec.rb | 2 +-
spec/moneta/standard_sdbm_spec.rb | 2 +-
spec/moneta/standard_sdbm_with_expires_spec.rb | 2 +-
spec/moneta/standard_sequel_spec.rb | 2 +-
spec/moneta/standard_sequel_with_expires_spec.rb | 2 +-
spec/moneta/standard_sqlite_spec.rb | 2 +-
spec/moneta/standard_sqlite_with_expires_spec.rb | 2 +-
spec/moneta/standard_tdb_spec.rb | 2 +-
spec/moneta/standard_tdb_with_expires_spec.rb | 2 +-
spec/moneta/standard_tokyocabinet_spec.rb | 2 +-
.../standard_tokyocabinet_with_expires_spec.rb | 2 +-
spec/moneta/standard_tokyotyrant_spec.rb | 2 +-
.../standard_tokyotyrant_with_expires_spec.rb | 2 +-
spec/moneta/standard_yaml_spec.rb | 2 +-
spec/moneta/standard_yaml_with_expires_spec.rb | 2 +-
spec/moneta/transformer_bencode_spec.rb | 2 +-
spec/moneta/transformer_bert_spec.rb | 2 +-
spec/moneta/transformer_bson_spec.rb | 2 +-
spec/moneta/transformer_bzip2_spec.rb | 2 +-
spec/moneta/transformer_json_spec.rb | 2 +-
spec/moneta/transformer_key_inspect_spec.rb | 2 +-
spec/moneta/transformer_key_marshal_spec.rb | 2 +-
spec/moneta/transformer_key_to_s_spec.rb | 2 +-
spec/moneta/transformer_key_yaml_spec.rb | 2 +-
spec/moneta/transformer_lz4_spec.rb | 2 +-
spec/moneta/transformer_lzma_spec.rb | 2 +-
spec/moneta/transformer_lzo_spec.rb | 2 +-
spec/moneta/transformer_marshal_base64_spec.rb | 2 +-
spec/moneta/transformer_marshal_city128_spec.rb | 2 +-
spec/moneta/transformer_marshal_city32_spec.rb | 2 +-
spec/moneta/transformer_marshal_city64_spec.rb | 2 +-
spec/moneta/transformer_marshal_escape_spec.rb | 2 +-
spec/moneta/transformer_marshal_hex_spec.rb | 2 +-
spec/moneta/transformer_marshal_hmac_spec.rb | 2 +-
spec/moneta/transformer_marshal_md5_spec.rb | 2 +-
spec/moneta/transformer_marshal_md5_spread_spec.rb | 2 +-
spec/moneta/transformer_marshal_prefix_spec.rb | 2 +-
spec/moneta/transformer_marshal_qp_spec.rb | 2 +-
spec/moneta/transformer_marshal_rmd160_spec.rb | 2 +-
spec/moneta/transformer_marshal_sha1_spec.rb | 2 +-
spec/moneta/transformer_marshal_sha256_spec.rb | 2 +-
spec/moneta/transformer_marshal_sha384_spec.rb | 2 +-
spec/moneta/transformer_marshal_sha512_spec.rb | 2 +-
spec/moneta/transformer_marshal_spec.rb | 2 +-
spec/moneta/transformer_marshal_truncate_spec.rb | 2 +-
spec/moneta/transformer_marshal_uuencode_spec.rb | 2 +-
spec/moneta/transformer_msgpack_spec.rb | 2 +-
spec/moneta/transformer_ox_spec.rb | 2 +-
spec/moneta/transformer_php_spec.rb | 2 +-
spec/moneta/transformer_quicklz_spec.rb | 2 +-
spec/moneta/transformer_snappy_spec.rb | 2 +-
spec/moneta/transformer_tnet_spec.rb | 2 +-
spec/moneta/transformer_value_marshal_spec.rb | 2 +-
spec/moneta/transformer_value_yaml_spec.rb | 2 +-
spec/moneta/transformer_yaml_spec.rb | 2 +-
spec/moneta/transformer_zlib_spec.rb | 2 +-
spec/moneta/weak_create_spec.rb | 8 +-
spec/moneta/weak_increment_spec.rb | 8 +-
spec/monetaspecs.rb | 962 ++++++-------
214 files changed, 2065 insertions(+), 2215 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 0857954..6c234dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,10 @@
language: ruby
rvm:
+ - 2.1.0
- 2.0.0
- 1.9.3
- - 1.8.7
- jruby-19mode
- - jruby-18mode
- rbx-19mode
- - rbx-18mode
before_install:
#- script/install-kyotocabinet
- sudo apt-get install -qq libtokyocabinet8 libtokyocabinet-dev liblzo2-dev libtdb-dev libleveldb-dev tokyotyrant
@@ -42,9 +40,7 @@ env:
- "SCRIPT='benchmarks normal_large'"
matrix:
allow_failures:
- - rvm: jruby-18mode
- rvm: jruby-19mode
- - rvm: rbx-18mode
- rvm: rbx-19mode
- env: "SCRIPT='parallel-tests unstable'"
script: "eval bundle exec ruby script/$SCRIPT"
diff --git a/CHANGES b/CHANGES
index 37eb654..8786ef2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+0.8.0
+
+* Rename Moneta::Adapters::Mongo to Moneta::Adapters::MongoOfficial
+* Add Moneta::Adapters::MongoMoped
+* Drop Ruby 1.8 support
+
0.7.20
* Adapters::LRUHash: add option :max_value
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 80e7d11..ce055cc 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1,9 +1,11 @@
Adrian Madrid <aemadrid at gmail.com>
Alejandro Crosa <acrosa at sharing.local>
Anthony Eden <anthonyeden at gmail.com>
+AtoxIO <atoxhybrid at gmail.com>
Benjamin Yu <benjaminlyu at gmail.com>
Ben Schwarz <ben.schwarz at gmail.com>
Daniel Mendler <mail at daniel-mendler.de>
+Denis Defreyne <denis.defreyne at stoneship.org>
Derek Kastner <dkastner at gmail.com>
Dylan Egan <me at dylanegan.com>
Hampton Catlin <hcatlin at gmail.com>
diff --git a/Gemfile b/Gemfile
index 9645e1b..4418379 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,10 +1,3 @@
-# Rails 4 requires Ruby >= 1.9
-def rails_version
- v = ['>= 3.2.11']
- v << '< 4.0.0' unless RUBY_VERSION >= '1.9'
- v
-end
-
source 'https://rubygems.org'
gemspec
@@ -16,26 +9,26 @@ gem 'rspec-retry'
gem 'tnetstring'
gem 'bencode'
gem 'multi_json'
-gem 'bson_ext', :platforms => :ruby
-gem 'bson', :platforms => :jruby
-gem 'ox', :platforms => :ruby
-gem 'msgpack', :platforms => :ruby
-gem 'msgpack-jruby', :platforms => :jruby
-gem 'bert', :platforms => :ruby
+gem 'bson_ext', platforms: :ruby
+gem 'bson', platforms: :jruby
+gem 'ox', platforms: :ruby
+gem 'msgpack', platforms: :ruby
+gem 'msgpack-jruby', platforms: :jruby
+gem 'bert', platforms: :ruby
gem 'php_serialize'
# Compressors used by Transformer
if RUBY_VERSION < '2.0'
- gem 'bzip2-ruby', :platforms => :mri # Only on mri currently
+ gem 'bzip2-ruby', platforms: :mri # Only on mri currently
end
-gem 'lz4-ruby', :platforms => :ruby
-gem 'ruby-lzma', :platforms => :ruby
-gem 'lzoruby', :platforms => :ruby
-gem 'snappy', :platforms => :ruby
-gem 'qlzruby', :platforms => :ruby
+gem 'lz4-ruby', platforms: :ruby
+gem 'ruby-lzma', platforms: :ruby
+gem 'lzoruby', platforms: :ruby
+gem 'snappy', platforms: :ruby
+gem 'qlzruby', platforms: :ruby
# Hash transformer library
-gem 'cityhash', :platforms => :ruby
+gem 'cityhash', platforms: :ruby
# Backends
gem 'faraday'
@@ -44,50 +37,44 @@ gem 'dm-core'
gem 'dm-migrations'
gem 'dm-mysql-adapter'
# FIXME: Use fog master because of failing tests, fixed after 1.11.1
-gem 'fog', :github => 'fog/fog'
-gem 'activerecord', *rails_version
+gem 'fog', github: 'fog/fog'
+gem 'activerecord', '>= 3.2.11'
gem 'redis'
gem 'mongo'
+gem 'moped'
gem 'sequel'
gem 'dalli'
gem 'riak-client'
gem 'cassandra'
gem 'tokyotyrant'
-#gem 'ruby-tokyotyrant', :platforms => :ruby
+#gem 'ruby-tokyotyrant', platforms: :ruby
#gem 'hbaserb'
#gem 'localmemcache'
-gem 'tdb', :platforms => :ruby
-gem 'leveldb-ruby', :platforms => :ruby
-if RUBY_VERSION >= '1.9'
- gem 'lmdb', :platforms => :mri
-end
+gem 'tdb', platforms: :ruby
+gem 'leveldb-ruby', platforms: :ruby
+gem 'lmdb', platforms: :mri
if RUBY_VERSION < '2.0'
- gem 'tokyocabinet', :platforms => :ruby
+ gem 'tokyocabinet', platforms: :ruby
end
#if RUBY_VERSION < '2.0' && !defined?(JRUBY_VERSION)
# FIXME: We have to check manually for jruby
# otherwise bundle install --deployment doesn't work
-# gem 'kyotocabinet-ruby', :github => 'minad/kyotocabinet-ruby'
+# gem 'kyotocabinet-ruby', github: 'minad/kyotocabinet-ruby'
#end
-gem 'memcached', :platforms => :ruby
-gem 'jruby-memcached', :platforms => :jruby
-gem 'sqlite3', :platforms => :ruby
-gem 'activerecord-jdbc-adapter', :platforms => :jruby
-gem 'activerecord-jdbcmysql-adapter', :platforms => :jruby
-gem 'mysql2', '>= 0.3.12b5', :platforms => :ruby
+gem 'memcached', platforms: :ruby
+gem 'jruby-memcached', platforms: :jruby
+gem 'sqlite3', platforms: :ruby
+gem 'activerecord-jdbc-adapter', platforms: :jruby
+gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
+gem 'mysql2', '>= 0.3.12b5', platforms: :ruby
# gdbm for jruby needs ffi
-gem 'ffi', :platforms => :jruby
-gem 'gdbm', :platforms => :jruby
+gem 'ffi', platforms: :jruby
+gem 'gdbm', platforms: :jruby
# Rack integration testing
gem 'rack'
gem 'rack-cache'
# Rails integration testing
-gem 'actionpack', *rails_version
+gem 'actionpack', '>= 3.2.11'
gem 'minitest', '~> 4.7.4'
-
-# Fix versions for old ruby 1.8
-if RUBY_VERSION < '1.9'
- gem 'nokogiri', '< 1.6'
-end
diff --git a/LICENSE b/LICENSE
index df8c657..50c86c2 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 - 2013 Daniel Mendler, Yehuda Katz
+Copyright (c) 2009 - 2014 Daniel Mendler, Yehuda Katz
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/README.md b/README.md
index ec2c043..840b293 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Moneta: A unified interface for key/value stores
-[](http://rubygems.org/gems/moneta) [](http://travis-ci.org/minad/moneta) [](https://gemnasium.com/minad/moneta) [](https://codeclimate.com/github/minad/moneta)
+[](http://rubygems.org/gems/moneta) [](http://travis-ci.org/minad/moneta) [](https://gemnasium.com/minad/moneta) [](https://codeclimate.com/github/minad/moneta) [](https:/ [...]
+[](https://flattr.com/submit/auto?user_id=min4d&url=https://github.com/minad/moneta&title=Moneta&language=&tags=github&category=software)
Moneta provides a standard interface for interacting with various kinds of key/value stores. Moneta supports the well-known
NoSQL and document based stores.
@@ -18,7 +19,7 @@ A short overview of the features:
* Atomic creation of entries (Method `#create`)
* Shared/distributed database-wide synchronization primitives `Moneta::Mutex` and `Moneta::Semaphore`
* Includes a simple pure-ruby key/value server (`Moneta::Server`) and client (`Moneta::Adapters::Client`)
-* Integration with [Rails](http://rubyonrails.org/), [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache), [Sinatra](http://sinatrarb.com/) and [Ramaze](http://ramaze.net/).
+* Integration with [Rails](http://rubyonrails.org/), [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache), [Sinatra](http://sinatrarb.com/), [Padrino](http://padrinorb.com) and [Ramaze](http://ramaze.net/).
If you are not yet convinced, you might ask why? What are the goals of the project?
@@ -28,7 +29,6 @@ same for template languages.
* To hide a lot of different and maybe complex APIs behind one well-designed and simple Moneta API
* Give people a starting point or example code to start working with their favourite key/value store. Feel free to copy code, please mention Moneta then :)
* Create a reusable piece of code, since similar things are solved over and over again ([Rails](http://rubyonrails.org/) brings its own cache stores, and many frameworks do the same...)
-* See also http://yehudakatz.com/2009/02/12/whats-the-point/
Moneta is tested thoroughly using [Travis-CI](http://travis-ci.org/minad/moneta).
@@ -54,7 +54,7 @@ Now you are ready to go:
require 'moneta'
# Create a simple file store
-store = Moneta.new(:File, :dir => 'moneta')
+store = Moneta.new(:File, dir: 'moneta')
# Store some entries
store['key'] = 'value'
@@ -115,7 +115,7 @@ Out of the box, it supports the following backends. Use the backend name symbol
* [Simple Samba database TDB](http://tdb.samba.org/) (`:TDB`)
* Document databases:
* [CouchDB](http://couchdb.apache.org/) (`:Couch`)
- * [MongoDB](http://www.mongodb.org/) (`:Mongo`)
+ * [MongoDB](http://www.mongodb.org/) (`:Mongo`, `:MongoOffical` or `:MongoMoped`)
* Moneta network protocols:
* Moneta key/value client (`:Client` works with `Moneta::Server`)
* Moneta HTTP/REST client (`:RestClient` works with `Rack::MonetaRest`)
@@ -130,7 +130,7 @@ to upgrade to a real key/value store.
### Backend feature matrix
-__NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable on rubydoc.info than on github. [Go there!](http://rubydoc.info/github/minad/moneta/master/file/README.md#backend-matrix)
+__NOTE:__ <a name="backend-matrix"></a>The backend matrix is much more readable on rubydoc.info than on github. [Go there!](http://rubydoc.info/github/minad/moneta/master/file/README.md#backend-matrix)
<table>
@@ -138,7 +138,11 @@ __NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable
<tr><th colspan="2">Persistent stores</th><th colspan="7"></th></tr>
-<tr><td>Mongo</td><td>mongo</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
+<tr><td>Mongo</td><td>mongo or moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
+
+<tr><td>MongoOfficial</td><td>mongo</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
+
+<tr><td>MongoMoped</td><td>moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
<tr><td>Redis</td><td>redis</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://redis.io/">Redis</a> database</td></tr>
@@ -210,9 +214,9 @@ __NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable
</table>
-* [1]: Make adapters thread-safe by using `Moneta::Lock` or by passing the option `:threadsafe => true` to `Moneta#new`. There is also `Moneta::Pool` which can be used to share a store between multiple threads if the store is multi-process safe. I recommend to add the option `:threadsafe` to ensure thread-safety since for example under JRuby and Rubinius even the basic datastructures are not thread safe due to the lack of a global interpreter lock (GIL). This differs from MRI where some [...]
+* [1]: Make adapters thread-safe by using `Moneta::Lock` or by passing the option `threadsafe: true` to `Moneta#new`. There is also `Moneta::Pool` which can be used to share a store between multiple threads if the store is multi-process safe. I recommend to add the option `:threadsafe` to ensure thread-safety since for example under JRuby and Rubinius even the basic datastructures are not thread safe due to the lack of a global interpreter lock (GIL). This differs from MRI where some ada [...]
* [2]: Share a Moneta store between multiple processes using `Moneta::Shared` (See below).
-* [3]: Add expiration support by using `Moneta::Expires` or by passing the option `:expires => true` to `Moneta#new`.
+* [3]: Add expiration support by using `Moneta::Expires` or by passing the option `expires: true` to `Moneta#new`.
* [4]: There are some servers which use the memcached protocol but which are persistent (e.g. [MemcacheDB](http://memcachedb.org/), [Kai](http://sourceforge.net/apps/mediawiki/kai), [IronCache](http://dev.iron.io/cache/reference/memcache/), [Roma](https://github.com/roma/roma/tree), [Flare](http://labs.gree.jp/Top/OpenSource/Flare-en.html) and [Kumofs](https://github.com/etolabo/kumofs))
* [5]: Depends on server
* [6]: Store is multi-process safe because it is an in-memory store, values are not shared between multiple processes
@@ -334,9 +338,9 @@ This allows you to store arbitrary Ruby objects. You can tune some options
when you call `Moneta.new`. However for very fine tuning use `Moneta.build`.
~~~ ruby
-store = Moneta.new(:Memcached, :server => 'localhost:11211')
+store = Moneta.new(:Memcached, server: 'localhost:11211')
store['key'] = 'value'
-store['hash_key'] = {:a => 1, :b => 2}
+store['hash_key'] = {a: 1, b: 2}
store['object_key'] = MarshallableRubyObject.new
~~~
@@ -348,7 +352,7 @@ store = Moneta.build do
use :Expires
# Transform key using Marshal and Base64 and value using Marshal
- use :Transformer, :key => [:marshal, :base64], :value => :marshal
+ use :Transformer, key: [:marshal, :base64], value: :marshal
# IMPORTANT: adapter must be defined last for the builder to function properly.
@@ -361,16 +365,16 @@ You can also directly access the underlying adapters if you don't want
to use the Moneta stack.
~~~ ruby
-db = Moneta::Adapters::File.new(:dir => 'directory')
-db['key'] = {:a => 1, :b => 2} # This will fail since you can only store Strings
+db = Moneta::Adapters::File.new(dir: 'directory')
+db['key'] = {a: 1, b: 2} # This will fail since you can only store Strings
# However for Mongo and Couch this works
# The hash will be mapped directly to a Mongo/Couch document.
db = Moneta::Adapters::Couch.new
-db['key'] = {:a => 1, :b => 2}
+db['key'] = {a: 1, b: 2}
db = Moneta::Adapters::Mongo.new
-db['key'] = {:a => 1, :b => 2}
+db['key'] = {a: 1, b: 2}
~~~
### Expiration
@@ -386,19 +390,19 @@ cache = Moneta.build do
end
# Expires in 60 seconds
-cache.store(key, value, :expires => 60)
+cache.store(key, value, expires: 60)
# Never expire
-cache.store(key, value, :expires => 0)
-cache.store(key, value, :expires => false)
+cache.store(key, value, expires: 0)
+cache.store(key, value, expires: false)
# Update expires time if value is found
-cache.load(key, :expires => 30)
-cache.key?(key, :expires => 30)
+cache.load(key, expires: 30)
+cache.key?(key, expires: 30)
# Or remove the expiration if found
-cache.load(key, :expires => false)
-cache.key?(key, :expires => 0)
+cache.load(key, expires: false)
+cache.key?(key, expires: 0)
~~~
You can add the expires feature to other backends using the `Moneta::Expires` proxy. But be aware
@@ -406,15 +410,15 @@ that expired values are not deleted automatically if they are not looked up.
~~~ ruby
# Using the :expires option
-cache = Moneta.new(:File, :dir => '...', :expires => true)
+cache = Moneta.new(:File, dir: '...', expires: true)
# or manually by using the proxy...
-cache = Moneta::Expires.new(Moneta::Adapters::File.new(:dir => '...'))
+cache = Moneta::Expires.new(Moneta::Adapters::File.new(dir: '...'))
# or using the builder...
cache = Moneta.build do
use :Expires
- adapter :File, :dir => '...'
+ adapter :File, dir: '...'
end
~~~
@@ -441,9 +445,9 @@ if you have a `Moneta::Transformer` somewhere in your proxy stack which transfor
~~~ ruby
store.increment('counter') # returns 1, counter created
-store.load('counter', :raw => true) # returns 1
+store.load('counter', raw: true) # returns 1
-store.store('counter', '10', :raw => true)
+store.store('counter', '10', raw: true)
store.increment('counter') # returns 11
~~~
@@ -540,11 +544,11 @@ For raw data access as described before the class `Moneta::OptionMerger` is used
~~~ ruby
# All methods after 'with' get the options passed
-store.with(:raw => true).load('key')
+store.with(raw: true).load('key')
# You can also specify the methods
-store.with(:raw => true, :only => :load).load('key')
-store.with(:raw => true, :except => [:key?, :increment]).load('key')
+store.with(raw: true, only: :load).load('key')
+store.with(raw: true, except: [:key?, :increment]).load('key')
# Syntactic sugar for raw access
store.raw.load('key')
@@ -565,8 +569,8 @@ short_lived_store['key'] = 'value'
You can add proxies to an existing store. This is useful if you want to compress only a few values for example.
~~~ ruby
-compressed_store = store.with(:prefix => 'compressed') do
- use :Transformer, :value => :zlib
+compressed_store = store.with(prefix: 'compressed') do
+ use :Transformer, value: :zlib
end
store['key'] = 'this value will not be compressed'
@@ -579,18 +583,19 @@ compressed_store['key'] = 'value will be compressed'
Inspired by [redis-store](https://github.com/jodosha/redis-store) there exist integration classes for [Rails](http://rubyonrails.org/) and [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache). You can also use all the Rack middlewares together with Rails and the [Sinatra](http://sinatrarb.com/) framework. There exist the following integration classes:
-* Rack, Rails and Sinatra
+* [Rack](http://rack.github.com/), [Rails](http://rubyonrails.org/) and [Sinatra](http://sinatrarb.com/)
* `Rack::Session::Moneta` is a Rack middleware to use Moneta for storing sessions
* `Rack::MonetaStore` is a Rack middleware which places a Moneta store in the environment and enables per-request caching
* `Rack::MonetaCookies` is a Rack middleware which uses Moneta to store cookies
* `Rack::MonetaRest` is a Rack application which exposes a Moneta store via REST/HTTP
* `Rack::Cache::Moneta` provides meta and entity stores for Rack-Cache
-* Rails
+* [Rails](http://rubyonrails.org/)
* `ActionDispatch::Session::MonetaStore` is a Rails middleware to use Moneta for storing sessions
* `ActiveSupport::Cache::MonetaStore` is a Rails cache implementation which uses a Moneta store as backend
-* Ramaze
- * `Ramaze::Cache::Moneta` is integrated into the [Ramaze](http://ramaze.net/) project and allows Ramaze to use
+* [Ramaze](http://ramaze.net/)
+ * `Ramaze::Cache::Moneta` is integrated into the Ramaze project and allows Ramaze to use
Moneta as caching store
+* [Padrino](http://padrinorb.com) adopted Moneta to replace their cache stores in padrino-cache.
### Rack
@@ -602,10 +607,17 @@ You can use Moneta as a [Rack](http://rack.github.com/) session store. Use it in
require 'rack/session/moneta'
# Use only the adapter name
-use Rack::Session::Moneta, :store => :Redis
+use Rack::Session::Moneta, store: :Redis
# Use Moneta.new
-use Rack::Session::Moneta, :store => Moneta.new(:Memory, :expires => true)
+use Rack::Session::Moneta, store: Moneta.new(:Memory, expires: true)
+
+# Set rack options
+use Rack::Session::Moneta, key: 'rack.session',
+domain: 'foo.com',
+path: '/',
+expire_after: 2592000,
+store: Moneta.new(:Memory, expires: true)
# Use the Moneta builder
use Rack::Session::Moneta do
@@ -617,11 +629,11 @@ end
#### Moneta middleware
There is a simple middleware which places a Moneta store in the Rack environment at `env['rack.moneta_store']`. It supports per-request
-caching if you add the option `:cache => true`. Use it in your `config.ru` like this:
+caching if you add the option `cache: true`. Use it in your `config.ru` like this:
~~~ ruby
# Add Rack::MonetaStore somewhere in your rack stack
-use Rack::MonetaStore, :Memory, :cache => true
+use Rack::MonetaStore, :Memory, cache: true
run lambda { |env|
env['rack.moneta_store'] # is a Moneta store with per-request caching
@@ -629,7 +641,7 @@ run lambda { |env|
# Pass it a block like the one passed to Moneta.build
use Rack::MonetaStore do
- use :Transformer, :value => :zlib
+ use :Transformer, value: :zlib
adapter :Cookie
end
@@ -651,7 +663,7 @@ end
# Or pass it a block like the one passed to Moneta.build
run Rack::MonetaRest.new do
- use :Transformer, :value => :zlib
+ use :Transformer, value: :zlib
adapter :Memory
end
~~~
@@ -664,8 +676,8 @@ You can use Moneta as a [Rack-Cache](https://github.com/rtomayko/rack-cache) sto
require 'rack/cache/moneta'
use Rack::Cache,
- :metastore => 'moneta://Memory?expires=true',
- :entitystore => 'moneta://Memory?expires=true'
+ metastore: 'moneta://Memory?expires=true',
+ entitystore: 'moneta://Memory?expires=true'
# Or used named Moneta stores
Rack::Cache::Moneta['named_metastore'] = Moneta.build do
@@ -673,8 +685,8 @@ Rack::Cache::Moneta['named_metastore'] = Moneta.build do
adapter :Memory
end
use Rack::Cache,
- :metastore => 'moneta://named_metastore',
- :entity_store => 'moneta://named_entitystore'
+ metastore: 'moneta://named_metastore',
+ entity_store: 'moneta://named_entitystore'
~~~
#### Cookies
@@ -686,7 +698,7 @@ to use all the transformers on the cookies (e.g. `:prefix`, `:marshal` and `:hma
~~~ ruby
require 'rack/moneta_cookies'
-use Rack::MonetaCookies, :domain => 'example.com', :path => '/path'
+use Rack::MonetaCookies, domain: 'example.com', path: '/path'
run lambda { |env|
req = Rack::Request.new(env)
req.cookies #=> is now a Moneta store!
@@ -708,13 +720,13 @@ Add the session store in your application configuration `config/environments/*.r
require 'moneta'
# Only by adapter name
-config.cache_store :moneta_store, :store => :Memory
+config.cache_store :moneta_store, store: :Memory
# Use Moneta.new
-config.cache_store :moneta_store, :store => Moneta.new(:Memory)
+config.cache_store :moneta_store, store: Moneta.new(:Memory)
# Use the Moneta builder
-config.cache_store :moneta_store, :store => Moneta.build do
+config.cache_store :moneta_store, store: Moneta.build do
use :Expires
adapter :Memory
end
@@ -729,19 +741,31 @@ Moneta cache store doesn't support matchers. If you need these features use a di
require 'moneta'
# Only by adapter name
-config.cache_store :moneta_store, :store => :Memory
+config.cache_store :moneta_store, store: :Memory
# Use Moneta.new
-config.cache_store :moneta_store, :store => Moneta.new(:Memory)
+config.cache_store :moneta_store, store: Moneta.new(:Memory)
# Use the Moneta builder
-config.cache_store :moneta_store, :store => Moneta.build do
+config.cache_store :moneta_store, store: Moneta.build do
use :Expires
adapter :Memory
end
~~~
-------
+### Padrino
+
+[Padrino](http://padrinorb.com/) adopted Moneta to replace their cache stores in padrino-cache. You use it like this
+
+~~~ ruby
+# Global Padrino caching
+# Don't forget the expires: [true, Integer] if you want expiration support!
+Padrino.cache = Moneta.new(:Memory, expires: true)
+
+# Application caching
+# Don't forget the expires: [true, Integer] if you want expiration support!
+set :cache, Moneta.new(:Memory, expires: true)
+~~~
## Advanced
@@ -755,14 +779,14 @@ they will share the same data which will also be persistet in the database `shar
require 'moneta'
store = Moneta.build do
- use :Transformer, :key => :marshal, :value => :marshal
+ use :Transformer, key: :marshal, value: :marshal
use :Shared do
use :Cache do
cache do
adapter :LRUHash
end
backend do
- adapter :GDBM, :file => 'shared.db'
+ adapter :GDBM, file: 'shared.db'
end
end
end
@@ -794,7 +818,7 @@ Person.adapter :memory, Moneta.new(:Redis)
## Testing and Benchmarks
-Testing is done using [Travis-CI](http://travis-ci.org/minad/moneta). Currently we support Ruby 1.8.7 and 1.9.3.
+Testing is done using [Travis-CI](http://travis-ci.org/minad/moneta). Currently we support Ruby >= 1.9.3.
Benchmarks for each store are done on [Travis-CI](http://travis-ci.org/minad/moneta) for each build. Take a look there
to compare the speed of the different key value stores for different key/value sizes and size distributions.
@@ -834,7 +858,6 @@ Don't forget to edit the README.md and the CHANGES.
* [Horcrux](https://github.com/technoweenie/horcrux): Used at github, supports batch operations but only Memcached backend
* [ActiveSupport::Cache::Store](http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html): The Rails cache store abstraction
-* [Padrino::Cache::Store](http://www.padrinorb.com/api/Padrino/Cache/Store.html): The Padrino cache store abstraction. Padrino is currently considering switching to Moneta, see https://github.com/padrino/padrino-framework/pull/1018
* [ToyStore](https://github.com/jnunemaker/toystore): ORM mapper for key/value stores
* [ToyStore Adapter](https://github.com/jnunemaker/adapter): Adapter to key/value stores used by ToyStore, Moneta can be used directly with the ToyStore Memory adapter
* [Cache](https://github.com/seamusabshere/cache): Rubygem cache wraps Memcached and Redis
diff --git a/checksums.yaml.gz b/checksums.yaml.gz
index ed30eac..9b5e630 100644
Binary files a/checksums.yaml.gz and b/checksums.yaml.gz differ
diff --git a/lib/active_support/cache/moneta_store.rb b/lib/active_support/cache/moneta_store.rb
index 7eac7b1..fc089dc 100644
--- a/lib/active_support/cache/moneta_store.rb
+++ b/lib/active_support/cache/moneta_store.rb
@@ -4,21 +4,21 @@ module ActiveSupport
class MonetaStore < Store
def initialize(options = nil)
raise ArgumentError, 'Option :store is required' unless @store = options.delete(:store)
- @store = ::Moneta.new(@store, :expires => true) if Symbol === @store
+ @store = ::Moneta.new(@store, expires: true) if Symbol === @store
super(options)
extend Strategy::LocalCache
end
def increment(key, amount = 1, options = nil)
options = merged_options(options)
- instrument(:increment, key, :amount => amount) do
+ instrument(:increment, key, amount: amount) do
@store.increment(namespaced_key(key, options), amount, moneta_options(options))
end
end
def decrement(key, amount = 1, options = nil)
options = merged_options(options)
- instrument(:decrement, key, :amount => amount) do
+ instrument(:decrement, key, amount: amount) do
@store.increment(namespaced_key(key, options), -amount, moneta_options(options))
end
end
diff --git a/lib/moneta.rb b/lib/moneta.rb
index b7ba191..ea1ebb3 100644
--- a/lib/moneta.rb
+++ b/lib/moneta.rb
@@ -47,6 +47,8 @@ module Moneta
autoload :MemcachedNative, 'moneta/adapters/memcached/native'
autoload :Memory, 'moneta/adapters/memory'
autoload :Mongo, 'moneta/adapters/mongo'
+ autoload :MongoMoped, 'moneta/adapters/mongo/moped'
+ autoload :MongoOfficial, 'moneta/adapters/mongo/official'
autoload :Null, 'moneta/adapters/null'
autoload :PStore, 'moneta/adapters/pstore'
autoload :Redis, 'moneta/adapters/redis'
@@ -98,7 +100,7 @@ module Moneta
serializer = options.include?(:serializer) ? options.delete(:serializer) : :marshal
key_serializer = options.include?(:key_serializer) ? options.delete(:key_serializer) : serializer
value_serializer = options.include?(:value_serializer) ? options.delete(:value_serializer) : serializer
- transformer = { :key => [key_serializer, :prefix], :value => [value_serializer], :prefix => options.delete(:prefix) }
+ transformer = { key: [key_serializer, :prefix], value: [value_serializer], prefix: options.delete(:prefix) }
transformer[:value] << (Symbol === compress ? compress : :zlib) if compress
raise ArgumentError, 'Name must be Symbol' unless Symbol === name
case name
@@ -123,7 +125,7 @@ module Moneta
a = Adapters.const_get(name).new(options)
build do
use :Logger, Hash === logger ? logger : {} if logger
- use :Expires, :expires => options[:expires] if !a.supports?(:expires) && expires
+ use :Expires, expires: options[:expires] if !a.supports?(:expires) && expires
use :Transformer, transformer
use :Lock if threadsafe
adapter a
diff --git a/lib/moneta/adapters/activerecord.rb b/lib/moneta/adapters/activerecord.rb
index 89c5dd7..826f139 100644
--- a/lib/moneta/adapters/activerecord.rb
+++ b/lib/moneta/adapters/activerecord.rb
@@ -60,12 +60,12 @@ module Moneta
table.connection_pool.with_connection do |conn|
unless table.table_exists?
- conn.create_table(table.table_name, :id => false) do |t|
+ conn.create_table(table.table_name, id: false) do |t|
# Do not use binary key (Issue #17)
- t.string :k, :null => false
+ t.string :k, null: false
t.binary :v
end
- conn.add_index(table.table_name, :k, :unique => true)
+ conn.add_index(table.table_name, :k, unique: true)
end
end
@@ -86,14 +86,14 @@ module Moneta
# (see Proxy#key?)
def key?(key, options = {})
@table.connection_pool.with_connection do
- !@table.where(:k => key).empty?
+ !@table.where(k: key).empty?
end
end
# (see Proxy#load)
def load(key, options = {})
@table.connection_pool.with_connection do
- record = @table.select(:v).where(:k => key).first
+ record = @table.select(:v).where(k: key).first
record && record.v
end
end
@@ -101,7 +101,7 @@ module Moneta
# (see Proxy#store)
def store(key, value, options = {})
@table.connection_pool.with_connection do
- record = @table.select(:k).where(:k => key).first_or_initialize
+ record = @table.select(:k).where(k: key).first_or_initialize
record.v = value
record.save
value
@@ -114,7 +114,7 @@ module Moneta
# (see Proxy#delete)
def delete(key, options = {})
@table.connection_pool.with_connection do
- if record = @table.where(:k => key).first
+ if record = @table.where(k: key).first
record.destroy
record.v
end
@@ -125,7 +125,7 @@ module Moneta
def increment(key, amount = 1, options = {})
@table.connection_pool.with_connection do
@table.transaction do
- if record = @table.where(:k => key).lock.first
+ if record = @table.where(k: key).lock.first
value = Utils.to_int(record.v) + amount
record.v = value.to_s
record.save
diff --git a/lib/moneta/adapters/cassandra.rb b/lib/moneta/adapters/cassandra.rb
index 6d659ff..85ea0fe 100644
--- a/lib/moneta/adapters/cassandra.rb
+++ b/lib/moneta/adapters/cassandra.rb
@@ -33,12 +33,12 @@ module Moneta
"#{options[:host] || '127.0.0.1'}:#{options[:port] || 9160}",
options)
unless @backend.keyspaces.include?(keyspace)
- cf_def = ::Cassandra::ColumnFamily.new(:keyspace => keyspace, :name => @cf.to_s)
- ks_def = ::Cassandra::Keyspace.new(:name => keyspace,
- :strategy_class => 'SimpleStrategy',
- :strategy_options => { 'replication_factor' => '1' },
- :replication_factor => 1,
- :cf_defs => [cf_def])
+ cf_def = ::Cassandra::ColumnFamily.new(keyspace: keyspace, name: @cf.to_s)
+ ks_def = ::Cassandra::Keyspace.new(name: keyspace,
+ strategy_class: 'SimpleStrategy',
+ strategy_options: { 'replication_factor' => '1' },
+ replication_factor: 1,
+ cf_defs: [cf_def])
# Wait for keyspace to be created (issue #24)
10.times do
begin
@@ -68,14 +68,14 @@ module Moneta
def load(key, options = {})
if value = @backend.get(@cf, key)
expires = expires_value(options, nil)
- @backend.insert(@cf, key, {'value' => value['value'] }, :ttl => expires || nil) if expires != nil
+ @backend.insert(@cf, key, {'value' => value['value'] }, ttl: expires || nil) if expires != nil
value['value']
end
end
# (see Proxy#store)
def store(key, value, options = {})
- @backend.insert(@cf, key, {'value' => value}, :ttl => expires_value(options) || nil)
+ @backend.insert(@cf, key, {'value' => value}, ttl: expires_value(options) || nil)
value
end
diff --git a/lib/moneta/adapters/couch.rb b/lib/moneta/adapters/couch.rb
index 2e89ee9..c6cdbde 100644
--- a/lib/moneta/adapters/couch.rb
+++ b/lib/moneta/adapters/couch.rb
@@ -30,7 +30,7 @@ module Moneta
@value_field = options[:value_field] || 'value'
@type_field = options[:type_field] || 'type'
url = "http://#{options[:host] || '127.0.0.1'}:#{options[:port] || 5984}/#{options[:db] || 'moneta'}"
- @backend = options[:backend] || ::Faraday.new(:url => url)
+ @backend = options[:backend] || ::Faraday.new(url: url)
create_db
end
diff --git a/lib/moneta/adapters/datamapper.rb b/lib/moneta/adapters/datamapper.rb
index 6fdc75d..03ef58d 100644
--- a/lib/moneta/adapters/datamapper.rb
+++ b/lib/moneta/adapters/datamapper.rb
@@ -12,8 +12,8 @@ module Moneta
class Store
include ::DataMapper::Resource
- property :k, String, :key => true, :length => 255
- property :v, Text, :lazy => false
+ property :k, String, key: true, length: 255
+ property :v, Text, lazy: false
self.raise_on_save_failure = true
end
@@ -46,9 +46,9 @@ module Moneta
def store(key, value, options = {})
context do
if record = Store.get(key)
- record.update(:k => key, :v => value)
+ record.update(k: key, v: value)
else
- Store.create(:k => key, :v => value)
+ Store.create(k: key, v: value)
end
value
end
@@ -60,7 +60,7 @@ module Moneta
# (see Proxy#create)
def create(key, value, options = {})
context do
- Store.create(:k => key, :v => value)
+ Store.create(k: key, v: value)
true
end
rescue
diff --git a/lib/moneta/adapters/daybreak.rb b/lib/moneta/adapters/daybreak.rb
index d3324ab..69cc8b3 100644
--- a/lib/moneta/adapters/daybreak.rb
+++ b/lib/moneta/adapters/daybreak.rb
@@ -12,7 +12,7 @@ module Moneta
@backend = options[:backend] ||
begin
raise ArgumentError, 'Option :file is required' unless options[:file]
- ::Daybreak::DB.new(options[:file], :serializer => ::Daybreak::Serializer::None)
+ ::Daybreak::DB.new(options[:file], serializer: ::Daybreak::Serializer::None)
end
end
diff --git a/lib/moneta/adapters/fog.rb b/lib/moneta/adapters/fog.rb
index 4e70203..7874fd2 100644
--- a/lib/moneta/adapters/fog.rb
+++ b/lib/moneta/adapters/fog.rb
@@ -16,7 +16,7 @@ module Moneta
def initialize(options = {})
raise ArgumentError, 'Option :dir is required' unless dir = options.delete(:dir)
@backend = options[:backend] || ::Fog::Storage.new(options)
- @directory = @backend.directories.get(dir) || @backend.directories.create(:key => dir)
+ @directory = @backend.directories.get(dir) || @backend.directories.create(key: dir)
end
# (see Proxy#key?)
@@ -42,7 +42,7 @@ module Moneta
# (see Proxy#store)
def store(key, value, options = {})
value = value.dup if value.frozen? # HACK: Fog needs unfrozen string
- @directory.files.create(options.merge(:key => key, :body => value))
+ @directory.files.create(options.merge(key: key, body: value))
value
end
diff --git a/lib/moneta/adapters/lmdb.rb b/lib/moneta/adapters/lmdb.rb
index fd86413..3f0da4b 100644
--- a/lib/moneta/adapters/lmdb.rb
+++ b/lib/moneta/adapters/lmdb.rb
@@ -26,7 +26,7 @@ module Moneta
::LMDB.new(dir, options)
end
- @db = @backend.database(db, :create => true)
+ @db = @backend.database(db, create: true)
end
# (see Proxy#key?)
diff --git a/lib/moneta/adapters/localmemcache.rb b/lib/moneta/adapters/localmemcache.rb
index 6884bee..48676f9 100644
--- a/lib/moneta/adapters/localmemcache.rb
+++ b/lib/moneta/adapters/localmemcache.rb
@@ -15,7 +15,7 @@ module Moneta
@backend = options[:backend] ||
begin
raise ArgumentError, 'Option :file is required' unless options[:file]
- ::LocalMemCache.new(:filename => options[:file])
+ ::LocalMemCache.new(filename: options[:file])
end
end
diff --git a/lib/moneta/adapters/memcached/dalli.rb b/lib/moneta/adapters/memcached/dalli.rb
index eaa7ea4..a7ee6a4 100644
--- a/lib/moneta/adapters/memcached/dalli.rb
+++ b/lib/moneta/adapters/memcached/dalli.rb
@@ -30,14 +30,14 @@ module Moneta
value = @backend.get(key)
if value
expires = expires_value(options, nil)
- @backend.set(key, value, expires || nil, :raw => true) if expires != nil
+ @backend.set(key, value, expires || nil, raw: true) if expires != nil
value
end
end
# (see Proxy#store)
def store(key, value, options = {})
- @backend.set(key, value, expires_value(options) || nil, :raw => true)
+ @backend.set(key, value, expires_value(options) || nil, raw: true)
value
end
@@ -76,7 +76,7 @@ module Moneta
# (see Defaults#create)
def create(key, value, options = {})
- @backend.add(key, value, expires_value(options) || nil, :raw => true)
+ @backend.add(key, value, expires_value(options) || nil, raw: true)
end
# (see Proxy#close)
diff --git a/lib/moneta/adapters/memcached/native.rb b/lib/moneta/adapters/memcached/native.rb
index 9369823..bfc7649 100644
--- a/lib/moneta/adapters/memcached/native.rb
+++ b/lib/moneta/adapters/memcached/native.rb
@@ -22,7 +22,7 @@ module Moneta
self.default_expires = options.delete(:expires)
@backend = options[:backend] ||
begin
- options.merge!(:prefix_key => options.delete(:namespace)) if options[:namespace]
+ options.merge!(prefix_key: options.delete(:namespace)) if options[:namespace]
# We don't want a limitation on the key charset. Therefore we use the binary protocol.
# It is also faster.
options[:binary_protocol] = true unless options.include?(:binary_protocol)
diff --git a/lib/moneta/adapters/mongo.rb b/lib/moneta/adapters/mongo.rb
index 5db8931..925e358 100644
--- a/lib/moneta/adapters/mongo.rb
+++ b/lib/moneta/adapters/mongo.rb
@@ -1,169 +1,11 @@
-require 'mongo'
-
module Moneta
module Adapters
- # MongoDB backend
- #
- # Supports expiration, documents will be automatically removed starting
- # with mongodb >= 2.2 (see {http://docs.mongodb.org/manual/tutorial/expire-data/}).
- #
- # You can store hashes directly using this adapter.
- #
- # @example Store hashes
- # db = Moneta::Adapters::Mongo.new
- # db['key'] = {a: 1, b: 2}
- #
- # @api public
- class Mongo
- include Defaults
- include ExpiresSupport
-
- supports :create, :increment
- attr_reader :backend
-
- # @param [Hash] options
- # @option options [String] :collection ('moneta') MongoDB collection name
- # @option options [String] :host ('127.0.0.1') MongoDB server host
- # @option options [String] :user Username used to authenticate
- # @option options [String] :password Password used to authenticate
- # @option options [Integer] :port (MongoDB default port) MongoDB server port
- # @option options [String] :db ('moneta') MongoDB database
- # @option options [Integer] :expires Default expiration time
- # @option options [String] :expires_field ('expiresAt') Document field to store expiration time
- # @option options [String] :value_field ('value') Document field to store value
- # @option options [String] :type_field ('type') Document field to store value type
- # @option options [::Mongo::MongoClient] :backend Use existing backend instance
- # @option options Other options passed to `Mongo::MongoClient#new`
- def initialize(options = {})
- self.default_expires = options.delete(:expires)
- collection = options.delete(:collection) || 'moneta'
- db = options.delete(:db) || 'moneta'
- @expires_field = options.delete(:expires_field) || 'expiresAt'
- @value_field = options.delete(:value_field) || 'value'
- @type_field = options.delete(:type_field) || 'type'
- @backend = options[:backend] ||
- begin
- host = options.delete(:host) || '127.0.0.1'
- port = options.delete(:port) || ::Mongo::MongoClient::DEFAULT_PORT
- user = options.delete(:user)
- password = options.delete(:password)
- ::Mongo::MongoClient.new(host, port, options)
- end
- db = @backend.db(db)
- db.authenticate(user, password, true) if user && password
- @collection = db.collection(collection)
- if @backend.server_version >= '2.2'
- @collection.ensure_index([[@expires_field, ::Mongo::ASCENDING]], :expireAfterSeconds => 0)
- else
- warn 'Moneta::Adapters::Mongo - You are using MongoDB version < 2.2, expired documents will not be deleted'
- end
- end
-
- # (see Proxy#load)
- def load(key, options = {})
- key = to_binary(key)
- doc = @collection.find_one('_id' => key)
- if doc && (!doc[@expires_field] || doc[@expires_field] >= Time.now)
- expires = expires_at(options, nil)
- @collection.update({ '_id' => key },
- # @expires_field must be a Time object (BSON date datatype)
- { '$set' => { @expires_field => expires || nil } }) if expires != nil
- doc_to_value(doc)
- end
- end
-
- # (see Proxy#store)
- def store(key, value, options = {})
- key = to_binary(key)
- @collection.update({ '_id' => key },
- value_to_doc(key, value, options),
- { :upsert => true })
- value
- end
-
- # (see Proxy#delete)
- def delete(key, options = {})
- value = load(key, options)
- @collection.remove('_id' => to_binary(key)) if value
- value
- end
-
- # (see Proxy#increment)
- def increment(key, amount = 1, options = {})
- @collection.find_and_modify(:query => { '_id' => to_binary(key) },
- :update => { '$inc' => { @value_field => amount } },
- :new => true,
- :upsert => true)[@value_field]
- end
-
- # (see Proxy#create)
- def create(key, value, options = {})
- key = to_binary(key)
- @collection.insert(value_to_doc(key, value, options))
- true
- rescue ::Mongo::OperationFailure => ex
- raise if ex.error_code != 11000 # duplicate key error
- false
- end
-
- # (see Proxy#clear)
- def clear(options = {})
- @collection.remove
- self
- end
-
- # (see Proxy#close)
- def close
- @backend.close
- nil
- end
-
- protected
-
- def doc_to_value(doc)
- case doc[@type_field]
- when 'Hash'
- doc = doc.dup
- doc.delete('_id')
- doc.delete(@type_field)
- doc.delete(@expires_field)
- doc
- when 'Number'
- doc[@value_field]
- else
- doc[@value_field].to_s
- end
- end
-
- def value_to_doc(key, value, options)
- case value
- when Hash
- value.merge('_id' => key,
- @type_field => 'Hash',
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil)
- when Float, Fixnum
- { '_id' => key,
- @type_field => 'Number',
- @value_field => value,
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil }
- when String
- intvalue = value.to_i
- { '_id' => key,
- @type_field => 'String',
- @value_field => intvalue.to_s == value ? intvalue : to_binary(value),
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil }
- else
- raise ArgumentError, "Invalid value type: #{value.class}"
- end
- end
-
- def to_binary(s)
- s = s.dup if s.frozen? # HACK: BSON::Binary needs unfrozen string
- ::BSON::Binary.new(s)
- end
+ begin
+ require 'moneta/adapters/mongo/official'
+ Mongo = MongoOfficial
+ rescue LoadError
+ require 'moneta/adapters/mongo/moped'
+ Mongo = MongoMoped
end
end
end
diff --git a/lib/moneta/adapters/mongo/base.rb b/lib/moneta/adapters/mongo/base.rb
new file mode 100644
index 0000000..603471a
--- /dev/null
+++ b/lib/moneta/adapters/mongo/base.rb
@@ -0,0 +1,63 @@
+module Moneta
+ module Adapters
+ # @api private
+ class MongoBase
+ include Defaults
+ include ExpiresSupport
+
+ supports :create, :increment
+ attr_reader :backend
+
+ DEFAULT_PORT = 27017
+
+ def initialize(options = {})
+ self.default_expires = options.delete(:expires)
+ @expires_field = options.delete(:expires_field) || 'expiresAt'
+ @value_field = options.delete(:value_field) || 'value'
+ @type_field = options.delete(:type_field) || 'type'
+ end
+
+ protected
+
+ def doc_to_value(doc)
+ case doc[@type_field]
+ when 'Hash'
+ doc = doc.dup
+ doc.delete('_id')
+ doc.delete(@type_field)
+ doc.delete(@expires_field)
+ doc
+ when 'Number'
+ doc[@value_field]
+ else
+ doc[@value_field].to_s
+ end
+ end
+
+ def value_to_doc(key, value, options)
+ case value
+ when Hash
+ value.merge('_id' => key,
+ @type_field => 'Hash',
+ # @expires_field must be a Time object (BSON date datatype)
+ @expires_field => expires_at(options) || nil)
+ when Float, Fixnum
+ { '_id' => key,
+ @type_field => 'Number',
+ @value_field => value,
+ # @expires_field must be a Time object (BSON date datatype)
+ @expires_field => expires_at(options) || nil }
+ when String
+ intvalue = value.to_i
+ { '_id' => key,
+ @type_field => 'String',
+ @value_field => intvalue.to_s == value ? intvalue : to_binary(value),
+ # @expires_field must be a Time object (BSON date datatype)
+ @expires_field => expires_at(options) || nil }
+ else
+ raise ArgumentError, "Invalid value type: #{value.class}"
+ end
+ end
+ end
+ end
+end
diff --git a/lib/moneta/adapters/mongo/moped.rb b/lib/moneta/adapters/mongo/moped.rb
new file mode 100644
index 0000000..85a9103
--- /dev/null
+++ b/lib/moneta/adapters/mongo/moped.rb
@@ -0,0 +1,113 @@
+require 'moneta/adapters/mongo/base'
+require 'moped'
+
+module Moneta
+ module Adapters
+ # MongoDB backend
+ #
+ # Supports expiration, documents will be automatically removed starting
+ # with mongodb >= 2.2 (see {http://docs.mongodb.org/manual/tutorial/expire-data/}).
+ #
+ # You can store hashes directly using this adapter.
+ #
+ # @example Store hashes
+ # db = Moneta::Adapters::MongoMoped.new
+ # db['key'] = {a: 1, b: 2}
+ #
+ # @api public
+ class MongoMoped < MongoBase
+ # @param [Hash] options
+ # @option options [String] :collection ('moneta') MongoDB collection name
+ # @option options [String] :host ('127.0.0.1') MongoDB server host
+ # @option options [String] :user Username used to authenticate
+ # @option options [String] :password Password used to authenticate
+ # @option options [Integer] :port (MongoDB default port) MongoDB server port
+ # @option options [String] :db ('moneta') MongoDB database
+ # @option options [Integer] :expires Default expiration time
+ # @option options [String] :expires_field ('expiresAt') Document field to store expiration time
+ # @option options [String] :value_field ('value') Document field to store value
+ # @option options [String] :type_field ('type') Document field to store value type
+ # @option options [::Moped::Session] :backend Use existing backend instance
+ # @option options Other options passed to `Moped::Session#new`
+ def initialize(options = {})
+ super(options)
+ collection = options.delete(:collection) || 'moneta'
+ db = options.delete(:db) || 'moneta'
+ user = options.delete(:user)
+ password = options.delete(:password)
+ @backend = options[:backend] ||
+ begin
+ host = options.delete(:host) || '127.0.0.1'
+ port = options.delete(:port) || 27017
+ ::Moped::Session.new(["#{host}:#{port}"])
+ end
+ @backend.use(db)
+ @backend.login(user, password) if user && password
+ @collection = @backend[collection]
+ if @backend.command(buildinfo: 1)['version'] >= '2.2'
+ @collection.indexes.create({ @expires_field => 1 }, expireAfterSeconds: 0)
+ else
+ warn 'Moneta::Adapters::Mongo - You are using MongoDB version < 2.2, expired documents will not be deleted'
+ end
+ end
+
+ # (see Proxy#load)
+ def load(key, options = {})
+ key = to_binary(key)
+ doc = @collection.find(_id: key).one
+ if doc && (!doc[@expires_field] || doc[@expires_field] >= Time.now)
+ # @expires_field must be a Time object (BSON date datatype)
+ expires = expires_at(options, nil)
+ @collection.find(_id: key).update(:$set => { @expires_field => expires || nil }) if expires != nil
+ doc_to_value(doc)
+ end
+ end
+
+ # (see Proxy#store)
+ def store(key, value, options = {})
+ key = to_binary(key)
+ @collection.find(_id: key).upsert(value_to_doc(key, value, options))
+ value
+ end
+
+ # (see Proxy#delete)
+ def delete(key, options = {})
+ value = load(key, options)
+ @collection.find(_id: to_binary(key)).remove if value
+ value
+ end
+
+ # (see Proxy#increment)
+ def increment(key, amount = 1, options = {})
+ @backend.with(safe: true, consistency: :strong) do |safe|
+ safe[@collection.name].find(_id: to_binary(key)).modify({:$inc => { @value_field => amount }},
+ new: true, upsert: true)[@value_field]
+ end
+ end
+
+ # (see Proxy#create)
+ def create(key, value, options = {})
+ key = to_binary(key)
+ @backend.with(safe: true, consistency: :strong) do |safe|
+ safe[@collection.name].insert(value_to_doc(key, value, options))
+ end
+ true
+ rescue ::Moped::Errors::MongoError => ex
+ raise if ex.details['code'] != 11000 # duplicate key error
+ false
+ end
+
+ # (see Proxy#clear)
+ def clear(options = {})
+ @collection.drop
+ self
+ end
+
+ protected
+
+ def to_binary(s)
+ ::Moped::BSON::Binary.new(:generic, s)
+ end
+ end
+ end
+end
diff --git a/lib/moneta/adapters/mongo.rb b/lib/moneta/adapters/mongo/official.rb
similarity index 63%
copy from lib/moneta/adapters/mongo.rb
copy to lib/moneta/adapters/mongo/official.rb
index 5db8931..62bbc80 100644
--- a/lib/moneta/adapters/mongo.rb
+++ b/lib/moneta/adapters/mongo/official.rb
@@ -1,3 +1,4 @@
+require 'moneta/adapters/mongo/base'
require 'mongo'
module Moneta
@@ -10,17 +11,11 @@ module Moneta
# You can store hashes directly using this adapter.
#
# @example Store hashes
- # db = Moneta::Adapters::Mongo.new
+ # db = Moneta::Adapters::MongoOfficial.new
# db['key'] = {a: 1, b: 2}
#
# @api public
- class Mongo
- include Defaults
- include ExpiresSupport
-
- supports :create, :increment
- attr_reader :backend
-
+ class MongoOfficial < MongoBase
# @param [Hash] options
# @option options [String] :collection ('moneta') MongoDB collection name
# @option options [String] :host ('127.0.0.1') MongoDB server host
@@ -35,25 +30,22 @@ module Moneta
# @option options [::Mongo::MongoClient] :backend Use existing backend instance
# @option options Other options passed to `Mongo::MongoClient#new`
def initialize(options = {})
- self.default_expires = options.delete(:expires)
+ super(options)
collection = options.delete(:collection) || 'moneta'
db = options.delete(:db) || 'moneta'
- @expires_field = options.delete(:expires_field) || 'expiresAt'
- @value_field = options.delete(:value_field) || 'value'
- @type_field = options.delete(:type_field) || 'type'
+ user = options.delete(:user)
+ password = options.delete(:password)
@backend = options[:backend] ||
begin
host = options.delete(:host) || '127.0.0.1'
port = options.delete(:port) || ::Mongo::MongoClient::DEFAULT_PORT
- user = options.delete(:user)
- password = options.delete(:password)
::Mongo::MongoClient.new(host, port, options)
end
db = @backend.db(db)
db.authenticate(user, password, true) if user && password
@collection = db.collection(collection)
if @backend.server_version >= '2.2'
- @collection.ensure_index([[@expires_field, ::Mongo::ASCENDING]], :expireAfterSeconds => 0)
+ @collection.ensure_index([[@expires_field, ::Mongo::ASCENDING]], expireAfterSeconds: 0)
else
warn 'Moneta::Adapters::Mongo - You are using MongoDB version < 2.2, expired documents will not be deleted'
end
@@ -77,7 +69,7 @@ module Moneta
key = to_binary(key)
@collection.update({ '_id' => key },
value_to_doc(key, value, options),
- { :upsert => true })
+ { upsert: true })
value
end
@@ -90,10 +82,10 @@ module Moneta
# (see Proxy#increment)
def increment(key, amount = 1, options = {})
- @collection.find_and_modify(:query => { '_id' => to_binary(key) },
- :update => { '$inc' => { @value_field => amount } },
- :new => true,
- :upsert => true)[@value_field]
+ @collection.find_and_modify(query: { '_id' => to_binary(key) },
+ update: { '$inc' => { @value_field => amount } },
+ new: true,
+ upsert: true)[@value_field]
end
# (see Proxy#create)
@@ -120,46 +112,6 @@ module Moneta
protected
- def doc_to_value(doc)
- case doc[@type_field]
- when 'Hash'
- doc = doc.dup
- doc.delete('_id')
- doc.delete(@type_field)
- doc.delete(@expires_field)
- doc
- when 'Number'
- doc[@value_field]
- else
- doc[@value_field].to_s
- end
- end
-
- def value_to_doc(key, value, options)
- case value
- when Hash
- value.merge('_id' => key,
- @type_field => 'Hash',
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil)
- when Float, Fixnum
- { '_id' => key,
- @type_field => 'Number',
- @value_field => value,
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil }
- when String
- intvalue = value.to_i
- { '_id' => key,
- @type_field => 'String',
- @value_field => intvalue.to_s == value ? intvalue : to_binary(value),
- # @expires_field must be a Time object (BSON date datatype)
- @expires_field => expires_at(options) || nil }
- else
- raise ArgumentError, "Invalid value type: #{value.class}"
- end
- end
-
def to_binary(s)
s = s.dup if s.frozen? # HACK: BSON::Binary needs unfrozen string
::BSON::Binary.new(s)
diff --git a/lib/moneta/adapters/pstore.rb b/lib/moneta/adapters/pstore.rb
index d0fb7d1..7a0cba4 100644
--- a/lib/moneta/adapters/pstore.rb
+++ b/lib/moneta/adapters/pstore.rb
@@ -77,11 +77,7 @@ module Moneta
protected
def new_store(options)
- if RUBY_VERSION > '1.9'
- ::PStore.new(options[:file], options[:threadsafe])
- else
- ::PStore.new(options[:file])
- end
+ ::PStore.new(options[:file], options[:threadsafe])
end
end
end
diff --git a/lib/moneta/adapters/restclient.rb b/lib/moneta/adapters/restclient.rb
index 4aad749..62fe7f2 100644
--- a/lib/moneta/adapters/restclient.rb
+++ b/lib/moneta/adapters/restclient.rb
@@ -14,7 +14,7 @@ module Moneta
# @option options [Faraday connection] :backend Use existing backend instance
def initialize(options = {})
raise ArgumentError, 'Option :url is required' unless url = options[:url]
- @backend = options[:backend] || ::Faraday.new(:url => url)
+ @backend = options[:backend] || ::Faraday.new(url: url)
end
# (see Proxy#key?)
diff --git a/lib/moneta/adapters/sequel.rb b/lib/moneta/adapters/sequel.rb
index 76c0bf7..d61898d 100644
--- a/lib/moneta/adapters/sequel.rb
+++ b/lib/moneta/adapters/sequel.rb
@@ -27,7 +27,7 @@ module Moneta
::Sequel.connect(db, options)
end
@backend.create_table?(table) do
- String :k, :null => false, :primary_key => true
+ String :k, null: false, primary_key: true
Blob :v
end
@table = @backend[table]
@@ -35,21 +35,21 @@ module Moneta
# (see Proxy#key?)
def key?(key, options = {})
- @table[:k => key] != nil
+ @table[k: key] != nil
end
# (see Proxy#load)
def load(key, options = {})
- record = @table[:k => key]
+ record = @table[k: key]
record && record[:v]
end
# (see Proxy#store)
def store(key, value, options = {})
begin
- @table.insert(:k => key, :v => blob(value))
+ @table.insert(k: key, v: blob(value))
rescue UniqueConstraintViolation
- @table.where(:k => key).update(:v => blob(value))
+ @table.where(k: key).update(v: blob(value))
end
value
rescue ::Sequel::DatabaseError
@@ -59,7 +59,7 @@ module Moneta
# (see Proxy#store)
def create(key, value, options = {})
- @table.insert(:k => key, :v => blob(value))
+ @table.insert(k: key, v: blob(value))
true
rescue UniqueConstraintViolation
false
@@ -69,12 +69,12 @@ module Moneta
def increment(key, amount = 1, options = {})
@backend.transaction do
locked_table = @table.for_update
- if record = locked_table[:k => key]
+ if record = locked_table[k: key]
value = Utils.to_int(record[:v]) + amount
- locked_table.where(:k => key).update(:v => blob(value.to_s))
+ locked_table.where(k: key).update(v: blob(value.to_s))
value
else
- locked_table.insert(:k => key, :v => blob(amount.to_s))
+ locked_table.insert(k: key, v: blob(amount.to_s))
amount
end
end
@@ -87,7 +87,7 @@ module Moneta
# (see Proxy#delete)
def delete(key, options = {})
if value = load(key, options)
- @table.filter(:k => key).delete
+ @table.filter(k: key).delete
value
end
end
diff --git a/lib/moneta/cache.rb b/lib/moneta/cache.rb
index bd86107..f7fef78 100644
--- a/lib/moneta/cache.rb
+++ b/lib/moneta/cache.rb
@@ -4,7 +4,7 @@ module Moneta
# @example Add `Moneta::Cache` to proxy stack
# Moneta.build do
# use(:Cache) do
- # adapter { adapter :File, :dir => 'data' }
+ # adapter { adapter :File, dir: 'data' }
# cache { adapter :Memory }
# end
# end
diff --git a/lib/moneta/logger.rb b/lib/moneta/logger.rb
index e8c5c0e..b43eb95 100644
--- a/lib/moneta/logger.rb
+++ b/lib/moneta/logger.rb
@@ -64,10 +64,10 @@ module Moneta
def wrap(method, *args)
ret = yield
- @logger.log(:method => method, :args => args, :return => (method == :clear ? 'self' : ret))
+ @logger.log(method: method, args: args, return: (method == :clear ? 'self' : ret))
ret
rescue Exception => error
- @logger.log(:method => method, :args => args, :error => error)
+ @logger.log(method: method, args: args, error: error)
raise
end
end
diff --git a/lib/moneta/mixins.rb b/lib/moneta/mixins.rb
index 995cc75..1cc8699 100644
--- a/lib/moneta/mixins.rb
+++ b/lib/moneta/mixins.rb
@@ -17,14 +17,14 @@ module Moneta
options ? OptionMerger.new(adapter, options) : adapter
end
- # Return Moneta store with default option :raw => true
+ # Return Moneta store with default option raw: true
#
# @return [OptionMerger]
# @api public
def raw
@raw_store ||=
begin
- store = with(:raw => true, :only => [:load, :store, :create, :delete])
+ store = with(raw: true, only: [:load, :store, :create, :delete])
store.instance_variable_set(:@raw_store, store)
store
end
@@ -36,7 +36,7 @@ module Moneta
# @return [OptionMerger]
# @api public
def prefix(prefix)
- with(:prefix => prefix, :except => :clear)
+ with(prefix: prefix, except: :clear)
end
# Return Moneta store with default expiration time
@@ -45,7 +45,7 @@ module Moneta
# @return [OptionMerger]
# @api public
def expires(expires)
- with(:expires => expires, :only => [:store, :create, :increment])
+ with(expires: expires, only: [:store, :create, :increment])
end
end
diff --git a/lib/moneta/shared.rb b/lib/moneta/shared.rb
index 321f195..6d0089d 100644
--- a/lib/moneta/shared.rb
+++ b/lib/moneta/shared.rb
@@ -3,9 +3,9 @@ module Moneta
#
# @example Share a store
# Moneta.build do
- # use :Transformer, :key => :marshal, :value => :marshal
+ # use :Transformer, key: :marshal, value: :marshal
# use :Shared do
- # adapter :GDBM, :file => 'shared.db'
+ # adapter :GDBM, file: 'shared.db'
# end
# end
#
diff --git a/lib/moneta/stack.rb b/lib/moneta/stack.rb
index cffd07f..0b845d6 100644
--- a/lib/moneta/stack.rb
+++ b/lib/moneta/stack.rb
@@ -6,8 +6,8 @@ module Moneta
# Moneta.build do
# use(:Stack) do
# add { adapter :Redis }
- # add { adapter :File, :dir => 'data' }
- # add { adapter :File, :dir => 'replicate' }
+ # add { adapter :File, dir: 'data' }
+ # add { adapter :File, dir: 'replicate' }
# end
# end
#
diff --git a/lib/moneta/synchronize.rb b/lib/moneta/synchronize.rb
index 20b4007..021eff2 100644
--- a/lib/moneta/synchronize.rb
+++ b/lib/moneta/synchronize.rb
@@ -80,7 +80,7 @@ module Moneta
protected
def enter_primitive
- @store.create(@lock, '', :expires => false)
+ @store.create(@lock, '', expires: false)
end
def leave_primitive
@@ -105,7 +105,7 @@ module Moneta
def initialize(store, counter, max = 1)
raise 'Store must support feature :increment' unless store.supports?(:increment)
@store, @counter, @max = store, counter, max
- @store.increment(@counter, 0, :expires => false) # Ensure that counter exists
+ @store.increment(@counter, 0, expires: false) # Ensure that counter exists
end
protected
diff --git a/lib/moneta/transformer.rb b/lib/moneta/transformer.rb
index a915a32..7da08f9 100644
--- a/lib/moneta/transformer.rb
+++ b/lib/moneta/transformer.rb
@@ -4,17 +4,17 @@ module Moneta
#
# @example Add `Moneta::Transformer` to proxy stack
# Moneta.build do
- # transformer :key => [:marshal, :escape], :value => [:marshal]
- # adapter :File, :dir => 'data'
+ # transformer key: [:marshal, :escape], value: [:marshal]
+ # adapter :File, dir: 'data'
# end
#
# @example Bypass serialization
- # store.store('key', 'value', :raw => true)
+ # store.store('key', 'value', raw: true)
# store['key'] # raises an Exception
- # store.load('key', :raw => true) # returns 'value'
+ # store.load('key', raw: true) # returns 'value'
#
# store['key'] = 'value'
- # store.load('key', :raw => true) # returns "\x04\bI\"\nvalue\x06:\x06ET"
+ # store.load('key', raw: true) # returns "\x04\bI\"\nvalue\x06:\x06ET"
#
# @api public
class Transformer < Proxy
diff --git a/lib/moneta/transformer/config.rb b/lib/moneta/transformer/config.rb
index 37209f0..5fe4db2 100644
--- a/lib/moneta/transformer/config.rb
+++ b/lib/moneta/transformer/config.rb
@@ -2,47 +2,45 @@ module Moneta
class Transformer
# Available key/value transformers
TRANSFORMER = {
- # Name => [ Type, Load, Dump, Library ],
- :bencode => [ :serialize, '::BEncode.load(%s)', '::BEncode.dump(%s)', 'bencode' ],
- :bert => [ :serialize, '::BERT.decode(%s)', '::BERT.encode(%s)', 'bert' ],
- :bson => [ :serialize, "::BSON.deserialize(%s)['v']", "::BSON.serialize('v'=>%s).to_s", 'bson' ],
- :json => [ :serialize, '::MultiJson.load(%s)', '::MultiJson.dump(%s)', 'multi_json' ],
- :marshal => [ :serialize, '::Marshal.load(%s)', '::Marshal.dump(%s)' ],
- :msgpack => [ :serialize, '::MessagePack.unpack(%s)', '::MessagePack.pack(%s)', 'msgpack' ],
- :ox => [ :serialize, '::Ox.parse_obj(%s)', '::Ox.dump(%s)', 'ox' ],
- :php => [ :serialize, '::PHP.unserialize(%s)', '::PHP.serialize(%s)', 'php_serialize' ],
- :tnet => [ :serialize, '::TNetstring.parse(%s).first', '::TNetstring.dump(%s)', 'tnetstring' ],
- :yaml => [ :serialize, '::YAML.load(%s)', '::YAML.dump(%s)', 'yaml' ],
- :bzip2 => [ :compress, '::Bzip2.uncompress(%s)', '::Bzip2.compress(%s)', 'bzip2' ],
- :lz4 => [ :compress, '::LZ4.uncompress(%s)', '::LZ4.compress(%s)', 'lz4-ruby' ],
- :lzma => [ :compress, '::LZMA.decompress(%s)', '::LZMA.compress(%s)', 'lzma' ],
- :lzo => [ :compress, '::LZO.decompress(%s)', '::LZO.compress(%s)', 'lzoruby' ],
- :snappy => [ :compress, '::Snappy.inflate(%s)', '::Snappy.deflate(%s)', 'snappy' ],
- :quicklz => [ :compress, '::QuickLZ.decompress(%s)', '::QuickLZ.compress(%s)', 'qlzruby' ],
- :zlib => [ :compress, '::Zlib::Inflate.inflate(%s)', '::Zlib::Deflate.deflate(%s)', 'zlib' ],
- :base64 => RUBY_VERSION > '1.9' ?
- [ :encode, "%s.unpack('m0').first", "[%s].pack('m0')" ] :
- [ :encode, "%s.unpack('m').first", "[%s].pack('m').gsub(\"\n\", '')" ],
- :escape => [ :encode, 'Helper.unescape(%s)', 'Helper.escape(%s)' ],
- :hex => [ :encode, "[%s].pack('H*')", "%s.unpack('H*').first" ],
- :qp => [ :encode, "%s.unpack('M').first", "[%s].pack('M')" ],
- :uuencode => [ :encode, "%s.unpack('u').first", "[%s].pack('u')" ],
- :hmac => [ :hmac, 'Helper.hmacverify(%s, options[:secret] || @secret)',
+ # Name: [ Type, Load, Dump, Library ],
+ bencode: [ :serialize, '::BEncode.load(%s)', '::BEncode.dump(%s)', 'bencode' ],
+ bert: [ :serialize, '::BERT.decode(%s)', '::BERT.encode(%s)', 'bert' ],
+ bson: [ :serialize, "::BSON.deserialize(%s)['v']", "::BSON.serialize('v'=>%s).to_s", 'bson' ],
+ json: [ :serialize, '::MultiJson.load(%s)', '::MultiJson.dump(%s)', 'multi_json' ],
+ marshal: [ :serialize, '::Marshal.load(%s)', '::Marshal.dump(%s)' ],
+ msgpack: [ :serialize, '::MessagePack.unpack(%s)', '::MessagePack.pack(%s)', 'msgpack' ],
+ ox: [ :serialize, '::Ox.parse_obj(%s)', '::Ox.dump(%s)', 'ox' ],
+ php: [ :serialize, '::PHP.unserialize(%s)', '::PHP.serialize(%s)', 'php_serialize' ],
+ tnet: [ :serialize, '::TNetstring.parse(%s).first', '::TNetstring.dump(%s)', 'tnetstring' ],
+ yaml: [ :serialize, '::YAML.load(%s)', '::YAML.dump(%s)', 'yaml' ],
+ bzip2: [ :compress, '::Bzip2.uncompress(%s)', '::Bzip2.compress(%s)', 'bzip2' ],
+ lz4: [ :compress, '::LZ4.uncompress(%s)', '::LZ4.compress(%s)', 'lz4-ruby' ],
+ lzma: [ :compress, '::LZMA.decompress(%s)', '::LZMA.compress(%s)', 'lzma' ],
+ lzo: [ :compress, '::LZO.decompress(%s)', '::LZO.compress(%s)', 'lzoruby' ],
+ snappy: [ :compress, '::Snappy.inflate(%s)', '::Snappy.deflate(%s)', 'snappy' ],
+ quicklz: [ :compress, '::QuickLZ.decompress(%s)', '::QuickLZ.compress(%s)', 'qlzruby' ],
+ zlib: [ :compress, '::Zlib::Inflate.inflate(%s)', '::Zlib::Deflate.deflate(%s)', 'zlib' ],
+ base64: [ :encode, "%s.unpack('m0').first", "[%s].pack('m0')" ],
+ escape: [ :encode, 'Helper.unescape(%s)', 'Helper.escape(%s)' ],
+ hex: [ :encode, "[%s].pack('H*')", "%s.unpack('H*').first" ],
+ qp: [ :encode, "%s.unpack('M').first", "[%s].pack('M')" ],
+ uuencode: [ :encode, "%s.unpack('u').first", "[%s].pack('u')" ],
+ hmac: [ :hmac, 'Helper.hmacverify(%s, options[:secret] || @secret)',
'Helper.hmacsign(%s, options[:secret] || @secret)', 'openssl' ],
- :truncate => [ :truncate, nil, 'Helper.truncate(%s, @maxlen)', 'digest/md5' ],
- :md5 => [ :digest, nil, '::Digest::MD5.hexdigest(%s)', 'digest/md5' ],
- :rmd160 => [ :digest, nil, '::Digest::RMD160.hexdigest(%s)', 'digest/rmd160' ],
- :sha1 => [ :digest, nil, '::Digest::SHA1.hexdigest(%s)', 'digest/sha1' ],
- :sha256 => [ :digest, nil, '::Digest::SHA256.hexdigest(%s)', 'digest/sha2' ],
- :sha384 => [ :digest, nil, '::Digest::SHA384.hexdigest(%s)', 'digest/sha2' ],
- :sha512 => [ :digest, nil, '::Digest::SHA512.hexdigest(%s)', 'digest/sha2' ],
- :city32 => [ :digest, nil, '::CityHash.hash32(%s).to_s(16)', 'cityhash' ],
- :city64 => [ :digest, nil, '::CityHash.hash64(%s).to_s(16)', 'cityhash' ],
- :city128 => [ :digest, nil, '::CityHash.hash128(%s).to_s(16)', 'cityhash' ],
- :prefix => [ :prefix, nil, '(options[:prefix] || @prefix)+%s' ],
- :spread => [ :spread, nil, 'Helper.spread(%s)' ],
- :to_s => [ :string, nil, '%s.to_s' ],
- :inspect => [ :string, nil, '%s.inspect' ],
+ truncate: [ :truncate, nil, 'Helper.truncate(%s, @maxlen)', 'digest/md5' ],
+ md5: [ :digest, nil, '::Digest::MD5.hexdigest(%s)', 'digest/md5' ],
+ rmd160: [ :digest, nil, '::Digest::RMD160.hexdigest(%s)', 'digest/rmd160' ],
+ sha1: [ :digest, nil, '::Digest::SHA1.hexdigest(%s)', 'digest/sha1' ],
+ sha256: [ :digest, nil, '::Digest::SHA256.hexdigest(%s)', 'digest/sha2' ],
+ sha384: [ :digest, nil, '::Digest::SHA384.hexdigest(%s)', 'digest/sha2' ],
+ sha512: [ :digest, nil, '::Digest::SHA512.hexdigest(%s)', 'digest/sha2' ],
+ city32: [ :digest, nil, '::CityHash.hash32(%s).to_s(16)', 'cityhash' ],
+ city64: [ :digest, nil, '::CityHash.hash64(%s).to_s(16)', 'cityhash' ],
+ city128: [ :digest, nil, '::CityHash.hash128(%s).to_s(16)', 'cityhash' ],
+ prefix: [ :prefix, nil, '(options[:prefix] || @prefix)+%s' ],
+ spread: [ :spread, nil, 'Helper.spread(%s)' ],
+ to_s: [ :string, nil, '%s.to_s' ],
+ inspect: [ :string, nil, '%s.inspect' ],
}
# Allowed value transformers (Read it like a regular expression!)
diff --git a/lib/moneta/version.rb b/lib/moneta/version.rb
index 68a616b..0615ac8 100644
--- a/lib/moneta/version.rb
+++ b/lib/moneta/version.rb
@@ -1,5 +1,5 @@
module Moneta
# Moneta version number
# @api public
- VERSION = '0.7.20'
+ VERSION = '0.8.0'
end
diff --git a/lib/rack/cache/moneta.rb b/lib/rack/cache/moneta.rb
index 745dcaf..d1fdfc1 100644
--- a/lib/rack/cache/moneta.rb
+++ b/lib/rack/cache/moneta.rb
@@ -82,7 +82,7 @@ module Rack
def write(body, ttl = 0)
buf = StringIO.new
key, size = slurp(body) { |part| buf.write(part) }
- @cache.store(key, buf.string, ttl == 0 ? {} : {:expires => ttl})
+ @cache.store(key, buf.string, ttl == 0 ? {} : {expires: ttl})
[key, size]
end
diff --git a/lib/rack/moneta_cookies.rb b/lib/rack/moneta_cookies.rb
index c7db767..abf1214 100644
--- a/lib/rack/moneta_cookies.rb
+++ b/lib/rack/moneta_cookies.rb
@@ -14,12 +14,12 @@ module Rack
#
# @example config.ru
# # Give it some options
- # use Rack::MonetaCookies, :domain => 'example.com', :path => '/path'
+ # use Rack::MonetaCookies, domain: 'example.com', path: '/path'
#
# @example config.ru
# # Pass it a block like the one passed to Moneta.build
# use Rack::MonetaCookies do
- # use :Transformer, :key => :prefix, :prefix => 'moneta.'
+ # use :Transformer, key: :prefix, prefix: 'moneta.'
# adapter :Cookie
# end
#
diff --git a/lib/rack/moneta_rest.rb b/lib/rack/moneta_rest.rb
index 5f1df1c..a950bec 100644
--- a/lib/rack/moneta_rest.rb
+++ b/lib/rack/moneta_rest.rb
@@ -11,7 +11,7 @@ module Rack
# @example config.ru
# # Pass it a block like the one passed to Moneta.build
# run Rack::MonetaRest.new do
- # use :Transformer, :value => :zlib
+ # use :Transformer, value: :zlib
# adapter :Memory
# end
#
diff --git a/lib/rack/moneta_store.rb b/lib/rack/moneta_store.rb
index a7a5df3..f9e5656 100644
--- a/lib/rack/moneta_store.rb
+++ b/lib/rack/moneta_store.rb
@@ -2,11 +2,11 @@ require 'moneta'
module Rack
# A Rack middleware that inserts a Moneta store in the environment
- # and supports per-request caching via the the option `:cache => true`.
+ # and supports per-request caching via the the option `cache: true`.
#
# @example config.ru
# # Add Rack::MonetaStore somewhere in your rack stack
- # use Rack::MonetaStore, :Memory, :cache => true
+ # use Rack::MonetaStore, :Memory, cache: true
#
# run lambda { |env|
# env['rack.moneta_store'] # is a Moneta store with per-request caching
@@ -15,7 +15,7 @@ module Rack
# @example config.ru
# # Pass it a block like the one passed to Moneta.build
# use Rack::MonetaStore do
- # use :Transformer, :value => :zlib
+ # use :Transformer, value: :zlib
# adapter :Cookie
# end
#
@@ -38,7 +38,7 @@ module Rack
end
def call(env)
- env['rack.moneta_store'] = @cache ? ::Moneta::Cache.new(:cache => ::Moneta::Adapters::Memory.new, :adapter => @store) : @store
+ env['rack.moneta_store'] = @cache ? ::Moneta::Cache.new(cache: ::Moneta::Adapters::Memory.new, adapter: @store) : @store
@app.call(env)
end
end
diff --git a/lib/rack/session/moneta.rb b/lib/rack/session/moneta.rb
index 9429458..466855e 100644
--- a/lib/rack/session/moneta.rb
+++ b/lib/rack/session/moneta.rb
@@ -4,6 +4,18 @@ require 'thread'
module Rack
module Session
+ # Rack::Session::Moneta stores sessions in a Moneta store.
+ #
+ # Example:
+ #
+ # use Rack::Session::Moneta, key: 'rack.session',
+ # domain: 'foo.com',
+ # path: '/',
+ # expire_after: 2592000,
+ # store: Moneta.new(...)
+ #
+ # You can use all options supported by `Rack::Session::Abstract::ID`.
+ #
# @api public
class Moneta < Abstract::ID
attr_reader :mutex, :pool
@@ -15,7 +27,7 @@ module Rack
@pool = ::Moneta.build(&block)
else
raise ArgumentError, 'Block or option :store is required' unless @pool = options[:store]
- @pool = ::Moneta.new(@pool, :expires => true) if Symbol === @pool
+ @pool = ::Moneta.new(@pool, expires: true) if Symbol === @pool
end
@pool = ::Moneta::WeakCreate.new(@pool) unless @pool.supports?(:create)
@mutex = ::Mutex.new
@@ -43,7 +55,7 @@ module Rack
def set_session(env, session_id, new_session, options)
with_lock(env) do
@pool.store(session_id, new_session,
- options[:expire_after] ? { :expires => options[:expire_after] } : {})
+ options[:expire_after] ? { expires: options[:expire_after] } : {})
session_id
end
end
diff --git a/metadata.yml b/metadata.yml
index 3ac4e09..7265d48 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: moneta
version: !ruby/object:Gem::Version
- version: 0.7.20
+ version: 0.8.0
platform: ruby
authors:
- Daniel Mendler
@@ -10,7 +10,7 @@ authors:
autorequire:
bindir: bin
cert_chain: []
-date: 2013-09-30 00:00:00.000000000 Z
+date: 2014-07-06 00:00:00.000000000 Z
dependencies: []
description: A unified interface to key/value stores
email:
@@ -58,6 +58,9 @@ files:
- lib/moneta/adapters/memcached/native.rb
- lib/moneta/adapters/memory.rb
- lib/moneta/adapters/mongo.rb
+- lib/moneta/adapters/mongo/base.rb
+- lib/moneta/adapters/mongo/moped.rb
+- lib/moneta/adapters/mongo/official.rb
- lib/moneta/adapters/null.rb
- lib/moneta/adapters/pstore.rb
- lib/moneta/adapters/redis.rb
@@ -138,6 +141,10 @@ files:
- spec/moneta/adapter_memcached_spec.rb
- spec/moneta/adapter_memcached_with_default_expires_spec.rb
- spec/moneta/adapter_memory_spec.rb
+- spec/moneta/adapter_mongo_moped_spec.rb
+- spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb
+- spec/moneta/adapter_mongo_official_spec.rb
+- spec/moneta/adapter_mongo_official_with_default_expires_spec.rb
- spec/moneta/adapter_mongo_spec.rb
- spec/moneta/adapter_mongo_with_default_expires_spec.rb
- spec/moneta/adapter_pstore_spec.rb
@@ -216,6 +223,8 @@ files:
- spec/moneta/standard_memory_with_json_value_serializer_spec.rb
- spec/moneta/standard_memory_with_prefix_spec.rb
- spec/moneta/standard_memory_with_snappy_compress_spec.rb
+- spec/moneta/standard_mongo_moped_spec.rb
+- spec/moneta/standard_mongo_official_spec.rb
- spec/moneta/standard_mongo_spec.rb
- spec/moneta/standard_null_spec.rb
- spec/moneta/standard_pstore_spec.rb
@@ -299,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - '>='
- !ruby/object:Gem::Version
- version: '0'
+ version: '1.9'
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - '>='
@@ -307,189 +316,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.0.0
+rubygems_version: 2.2.2
signing_key:
specification_version: 4
summary: A unified interface to key/value stores, including Redis, Memcached, TokyoCabinet,
ActiveRecord and many more
-test_files:
-- spec/action_dispatch/fixtures/session_autoload_test/foo.rb
-- spec/action_dispatch/session_moneta_store_spec.rb
-- spec/active_support/cache_moneta_store_spec.rb
-- spec/helper.rb
-- spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
-- spec/moneta/adapter_activerecord_spec.rb
-- spec/moneta/adapter_cassandra_spec.rb
-- spec/moneta/adapter_cassandra_with_default_expires_spec.rb
-- spec/moneta/adapter_client_spec.rb
-- spec/moneta/adapter_cookie_spec.rb
-- spec/moneta/adapter_couch_spec.rb
-- spec/moneta/adapter_datamapper_spec.rb
-- spec/moneta/adapter_daybreak_spec.rb
-- spec/moneta/adapter_dbm_spec.rb
-- spec/moneta/adapter_file_spec.rb
-- spec/moneta/adapter_fog_spec.rb
-- spec/moneta/adapter_gdbm_spec.rb
-- spec/moneta/adapter_hbase_spec.rb
-- spec/moneta/adapter_kyotocabinet_spec.rb
-- spec/moneta/adapter_leveldb_spec.rb
-- spec/moneta/adapter_lmdb_spec.rb
-- spec/moneta/adapter_lmdb_with_db_spec.rb
-- spec/moneta/adapter_localmemcache_spec.rb
-- spec/moneta/adapter_lruhash_spec.rb
-- spec/moneta/adapter_memcached_dalli_spec.rb
-- spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb
-- spec/moneta/adapter_memcached_native_spec.rb
-- spec/moneta/adapter_memcached_native_with_default_expires_spec.rb
-- spec/moneta/adapter_memcached_spec.rb
-- spec/moneta/adapter_memcached_with_default_expires_spec.rb
-- spec/moneta/adapter_memory_spec.rb
-- spec/moneta/adapter_mongo_spec.rb
-- spec/moneta/adapter_mongo_with_default_expires_spec.rb
-- spec/moneta/adapter_pstore_spec.rb
-- spec/moneta/adapter_redis_spec.rb
-- spec/moneta/adapter_redis_with_default_expires_spec.rb
-- spec/moneta/adapter_restclient_spec.rb
-- spec/moneta/adapter_riak_spec.rb
-- spec/moneta/adapter_sdbm_spec.rb
-- spec/moneta/adapter_sequel_spec.rb
-- spec/moneta/adapter_sqlite_spec.rb
-- spec/moneta/adapter_tdb_spec.rb
-- spec/moneta/adapter_tokyocabinet_bdb_spec.rb
-- spec/moneta/adapter_tokyocabinet_hdb_spec.rb
-- spec/moneta/adapter_tokyotyrant_spec.rb
-- spec/moneta/adapter_yaml_spec.rb
-- spec/moneta/builder_spec.rb
-- spec/moneta/cache_file_memory_spec.rb
-- spec/moneta/cache_memory_null_spec.rb
-- spec/moneta/expires_file_spec.rb
-- spec/moneta/expires_memory_spec.rb
-- spec/moneta/expires_memory_with_default_expires_spec.rb
-- spec/moneta/lock_spec.rb
-- spec/moneta/mutex_spec.rb
-- spec/moneta/null_adapter_spec.rb
-- spec/moneta/optionmerger_spec.rb
-- spec/moneta/pool_spec.rb
-- spec/moneta/proxy_expires_memory_spec.rb
-- spec/moneta/proxy_redis_spec.rb
-- spec/moneta/semaphore_spec.rb
-- spec/moneta/shared_tcp_spec.rb
-- spec/moneta/shared_unix_spec.rb
-- spec/moneta/stack_file_memory_spec.rb
-- spec/moneta/stack_memory_file_spec.rb
-- spec/moneta/standard_activerecord_spec.rb
-- spec/moneta/standard_activerecord_with_expires_spec.rb
-- spec/moneta/standard_cassandra_spec.rb
-- spec/moneta/standard_client_tcp_spec.rb
-- spec/moneta/standard_client_unix_spec.rb
-- spec/moneta/standard_couch_spec.rb
-- spec/moneta/standard_couch_with_expires_spec.rb
-- spec/moneta/standard_datamapper_spec.rb
-- spec/moneta/standard_datamapper_with_expires_spec.rb
-- spec/moneta/standard_datamapper_with_repository_spec.rb
-- spec/moneta/standard_daybreak_spec.rb
-- spec/moneta/standard_daybreak_with_expires_spec.rb
-- spec/moneta/standard_dbm_spec.rb
-- spec/moneta/standard_dbm_with_expires_spec.rb
-- spec/moneta/standard_file_spec.rb
-- spec/moneta/standard_file_with_expires_spec.rb
-- spec/moneta/standard_fog_spec.rb
-- spec/moneta/standard_fog_with_expires_spec.rb
-- spec/moneta/standard_gdbm_spec.rb
-- spec/moneta/standard_gdbm_with_expires_spec.rb
-- spec/moneta/standard_hashfile_spec.rb
-- spec/moneta/standard_hashfile_with_expires_spec.rb
-- spec/moneta/standard_hbase_spec.rb
-- spec/moneta/standard_hbase_with_expires_spec.rb
-- spec/moneta/standard_kyotocabinet_spec.rb
-- spec/moneta/standard_kyotocabinet_with_expires_spec.rb
-- spec/moneta/standard_leveldb_spec.rb
-- spec/moneta/standard_leveldb_with_expires_spec.rb
-- spec/moneta/standard_lmdb_spec.rb
-- spec/moneta/standard_lmdb_with_expires_spec.rb
-- spec/moneta/standard_localmemcache_spec.rb
-- spec/moneta/standard_localmemcache_with_expires_spec.rb
-- spec/moneta/standard_lruhash_spec.rb
-- spec/moneta/standard_lruhash_with_expires_spec.rb
-- spec/moneta/standard_memcached_dalli_spec.rb
-- spec/moneta/standard_memcached_native_spec.rb
-- spec/moneta/standard_memcached_spec.rb
-- spec/moneta/standard_memory_spec.rb
-- spec/moneta/standard_memory_with_compress_spec.rb
-- spec/moneta/standard_memory_with_expires_spec.rb
-- spec/moneta/standard_memory_with_json_key_serializer_spec.rb
-- spec/moneta/standard_memory_with_json_serializer_spec.rb
-- spec/moneta/standard_memory_with_json_value_serializer_spec.rb
-- spec/moneta/standard_memory_with_prefix_spec.rb
-- spec/moneta/standard_memory_with_snappy_compress_spec.rb
-- spec/moneta/standard_mongo_spec.rb
-- spec/moneta/standard_null_spec.rb
-- spec/moneta/standard_pstore_spec.rb
-- spec/moneta/standard_pstore_with_expires_spec.rb
-- spec/moneta/standard_redis_spec.rb
-- spec/moneta/standard_restclient_spec.rb
-- spec/moneta/standard_riak_spec.rb
-- spec/moneta/standard_riak_with_expires_spec.rb
-- spec/moneta/standard_sdbm_spec.rb
-- spec/moneta/standard_sdbm_with_expires_spec.rb
-- spec/moneta/standard_sequel_spec.rb
-- spec/moneta/standard_sequel_with_expires_spec.rb
-- spec/moneta/standard_sqlite_spec.rb
-- spec/moneta/standard_sqlite_with_expires_spec.rb
-- spec/moneta/standard_tdb_spec.rb
-- spec/moneta/standard_tdb_with_expires_spec.rb
-- spec/moneta/standard_tokyocabinet_spec.rb
-- spec/moneta/standard_tokyocabinet_with_expires_spec.rb
-- spec/moneta/standard_tokyotyrant_spec.rb
-- spec/moneta/standard_tokyotyrant_with_expires_spec.rb
-- spec/moneta/standard_yaml_spec.rb
-- spec/moneta/standard_yaml_with_expires_spec.rb
-- spec/moneta/transformer_bencode_spec.rb
-- spec/moneta/transformer_bert_spec.rb
-- spec/moneta/transformer_bson_spec.rb
-- spec/moneta/transformer_bzip2_spec.rb
-- spec/moneta/transformer_json_spec.rb
-- spec/moneta/transformer_key_inspect_spec.rb
-- spec/moneta/transformer_key_marshal_spec.rb
-- spec/moneta/transformer_key_to_s_spec.rb
-- spec/moneta/transformer_key_yaml_spec.rb
-- spec/moneta/transformer_lz4_spec.rb
-- spec/moneta/transformer_lzma_spec.rb
-- spec/moneta/transformer_lzo_spec.rb
-- spec/moneta/transformer_marshal_base64_spec.rb
-- spec/moneta/transformer_marshal_city128_spec.rb
-- spec/moneta/transformer_marshal_city32_spec.rb
-- spec/moneta/transformer_marshal_city64_spec.rb
-- spec/moneta/transformer_marshal_escape_spec.rb
-- spec/moneta/transformer_marshal_hex_spec.rb
-- spec/moneta/transformer_marshal_hmac_spec.rb
-- spec/moneta/transformer_marshal_md5_spec.rb
-- spec/moneta/transformer_marshal_md5_spread_spec.rb
-- spec/moneta/transformer_marshal_prefix_spec.rb
-- spec/moneta/transformer_marshal_qp_spec.rb
-- spec/moneta/transformer_marshal_rmd160_spec.rb
-- spec/moneta/transformer_marshal_sha1_spec.rb
-- spec/moneta/transformer_marshal_sha256_spec.rb
-- spec/moneta/transformer_marshal_sha384_spec.rb
-- spec/moneta/transformer_marshal_sha512_spec.rb
-- spec/moneta/transformer_marshal_spec.rb
-- spec/moneta/transformer_marshal_truncate_spec.rb
-- spec/moneta/transformer_marshal_uuencode_spec.rb
-- spec/moneta/transformer_msgpack_spec.rb
-- spec/moneta/transformer_ox_spec.rb
-- spec/moneta/transformer_php_spec.rb
-- spec/moneta/transformer_quicklz_spec.rb
-- spec/moneta/transformer_snappy_spec.rb
-- spec/moneta/transformer_tnet_spec.rb
-- spec/moneta/transformer_value_marshal_spec.rb
-- spec/moneta/transformer_value_yaml_spec.rb
-- spec/moneta/transformer_yaml_spec.rb
-- spec/moneta/transformer_zlib_spec.rb
-- spec/moneta/weak_create_spec.rb
-- spec/moneta/weak_increment_spec.rb
-- spec/monetaspecs.rb
-- spec/quality_spec.rb
-- spec/rack/cache_moneta_spec.rb
-- spec/rack/moneta_cookies_spec.rb
-- spec/rack/moneta_store_spec.rb
-- spec/rack/session_moneta_spec.rb
+test_files: []
diff --git a/moneta.gemspec b/moneta.gemspec
index ee05cea..f413b4c 100644
--- a/moneta.gemspec
+++ b/moneta.gemspec
@@ -17,4 +17,5 @@ Gem::Specification.new do |s|
s.licenses = %w(MIT)
s.require_paths = %w(lib)
s.summary = %{A unified interface to key/value stores, including Redis, Memcached, TokyoCabinet, ActiveRecord and many more}
+ s.required_ruby_version = '>= 1.9'
end
diff --git a/script/benchmarks b/script/benchmarks
index 3316c87..dea7846 100755
--- a/script/benchmarks
+++ b/script/benchmarks
@@ -31,103 +31,104 @@ class MonetaBenchmarks
STORES = {
# SDBM accepts only very short key/value pairs (1k for both)
- # :SDBM => { :file => "#{DIR}/sdbm" },
+ # SDBM: { file: "#{DIR}/sdbm" },
# YAML is too slow
- # :YAML => { :file => "#{DIR}/yaml" },
- :ActiveRecord => { :table => 'activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :username => 'root', :database => 'moneta' } },
- :Cassandra => {},
- :Client => {},
- :Couch => {},
- :DBM => { :file => "#{DIR}/dbm" },
- :DataMapper => { :setup => 'mysql://root:@localhost/moneta', :table => 'datamapper' },
- :Daybreak => { :file => "#{DIR}/daybreak" },
- :File => { :dir => "#{DIR}/file" },
- :GDBM => { :file => "#{DIR}/gdbm" },
- :HBase => {},
- :HashFile => { :dir => "#{DIR}/hashfile" },
- :KyotoCabinet => { :file => "#{DIR}/kyotocabinet.kch" },
- :LRUHash => {},
- :LevelDB => { :dir => "#{DIR}/leveldb" },
- :LocalMemCache => { :file => "#{DIR}/lmc" },
- :LMDB => { :dir => "#{DIR}/lmdb" },
- :MemcachedDalli => {},
- :MemcachedNative => {},
- :Memory => {},
- :Mongo => {},
- :PStore => { :file => "#{DIR}/pstore" },
- :Redis => {},
- :RestClient => { :url => 'http://localhost:8808/' },
- :Riak => {},
- :Sequel => { :table => 'sequel',
- :db => (defined?(JRUBY_VERSION) ?
+ # YAML: { file: "#{DIR}/yaml" },
+ ActiveRecord: { table: 'activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), username: 'root', database: 'moneta' } },
+ Cassandra: {},
+ Client: {},
+ Couch: {},
+ DBM: { file: "#{DIR}/dbm" },
+ DataMapper: { setup: 'mysql://root:@localhost/moneta', table: 'datamapper' },
+ Daybreak: { file: "#{DIR}/daybreak" },
+ File: { dir: "#{DIR}/file" },
+ GDBM: { file: "#{DIR}/gdbm" },
+ HBase: {},
+ HashFile: { dir: "#{DIR}/hashfile" },
+ KyotoCabinet: { file: "#{DIR}/kyotocabinet.kch" },
+ LRUHash: {},
+ LevelDB: { dir: "#{DIR}/leveldb" },
+ LocalMemCache: { file: "#{DIR}/lmc" },
+ LMDB: { dir: "#{DIR}/lmdb" },
+ MemcachedDalli: {},
+ MemcachedNative: {},
+ Memory: {},
+ MongoMoped: {},
+ MongoOfficial: {},
+ PStore: { file: "#{DIR}/pstore" },
+ Redis: {},
+ RestClient: { url: 'http://localhost:8808/' },
+ Riak: {},
+ Sequel: { table: 'sequel',
+ db: (defined?(JRUBY_VERSION) ?
'jdbc:mysql://localhost/moneta?user=root' :
'mysql2://root:@localhost/moneta') },
- :Sqlite => { :file => ':memory:' },
- :TDB => { :file => "#{DIR}/tdb" },
- :TokyoCabinet => { :file => "#{DIR}/tokyocabinet" },
- :TokyoTyrant => {},
+ Sqlite: { file: ':memory:' },
+ TDB: { file: "#{DIR}/tdb" },
+ TokyoCabinet: { file: "#{DIR}/tokyocabinet" },
+ TokyoTyrant: {},
}
CONFIGS = {
- :uniform_small => {
- :runs => 3,
- :keys => 1000,
- :min_key_len => 1,
- :max_key_len => 32,
- :key_dist => :uniform,
- :min_val_len => 0,
- :max_val_len => 256,
- :val_dist => :uniform
+ uniform_small: {
+ runs: 3,
+ keys: 1000,
+ min_key_len: 1,
+ max_key_len: 32,
+ key_dist: :uniform,
+ min_val_len: 0,
+ max_val_len: 256,
+ val_dist: :uniform
},
- :uniform_medium => {
- :runs => 3,
- :keys => 1000,
- :min_key_len => 3,
- :max_key_len => 128,
- :key_dist => :uniform,
- :min_val_len => 0,
- :max_val_len => 1024,
- :val_dist => :uniform
+ uniform_medium: {
+ runs: 3,
+ keys: 1000,
+ min_key_len: 3,
+ max_key_len: 128,
+ key_dist: :uniform,
+ min_val_len: 0,
+ max_val_len: 1024,
+ val_dist: :uniform
},
- :uniform_large => {
- :runs => 3,
- :keys => 100,
- :min_key_len => 3,
- :max_key_len => 128,
- :key_dist => :uniform,
- :min_val_len => 0,
- :max_val_len => 10240,
- :val_dist => :uniform
+ uniform_large: {
+ runs: 3,
+ keys: 100,
+ min_key_len: 3,
+ max_key_len: 128,
+ key_dist: :uniform,
+ min_val_len: 0,
+ max_val_len: 10240,
+ val_dist: :uniform
},
- :normal_small => {
- :runs => 3,
- :keys => 1000,
- :min_key_len => 1,
- :max_key_len => 32,
- :key_dist => :normal,
- :min_val_len => 0,
- :max_val_len => 256,
- :val_dist => :normal
+ normal_small: {
+ runs: 3,
+ keys: 1000,
+ min_key_len: 1,
+ max_key_len: 32,
+ key_dist: :normal,
+ min_val_len: 0,
+ max_val_len: 256,
+ val_dist: :normal
},
- :normal_medium => {
- :runs => 3,
- :keys => 1000,
- :min_key_len => 3,
- :max_key_len => 128,
- :key_dist => :normal,
- :min_val_len => 0,
- :max_val_len => 1024,
- :val_dist => :normal
+ normal_medium: {
+ runs: 3,
+ keys: 1000,
+ min_key_len: 3,
+ max_key_len: 128,
+ key_dist: :normal,
+ min_val_len: 0,
+ max_val_len: 1024,
+ val_dist: :normal
},
- :normal_large => {
- :runs => 3,
- :keys => 100,
- :min_key_len => 3,
- :max_key_len => 128,
- :key_dist => :normal,
- :min_val_len => 0,
- :max_val_len => 10240,
- :val_dist => :normal
+ normal_large: {
+ runs: 3,
+ keys: 100,
+ min_key_len: 3,
+ max_key_len: 128,
+ key_dist: :normal,
+ min_val_len: 0,
+ max_val_len: 10240,
+ val_dist: :normal
},
}
@@ -206,13 +207,13 @@ class MonetaBenchmarks
def log(level, data); end
end
- Rack::Server.start(:app => Rack::Builder.app do
+ Rack::Server.start(app: Rack::Builder.app do
use Rack::Lint
- run Rack::MonetaRest.new(:store => :Memory)
+ run Rack::MonetaRest.new(store: :Memory)
end,
- :environment => :none,
- :server => :webrick,
- :Port => 8808)
+ environment: :none,
+ server: :webrick,
+ Port: 8808)
rescue Exception => ex
puts "\e[31mFailed to start Rack server - #{ex.message}\e[0m"
end
@@ -227,7 +228,7 @@ class MonetaBenchmarks
if name == :DataMapper
begin
require 'dm-core'
- DataMapper.setup(:default, :adapter => :in_memory)
+ DataMapper.setup(:default, adapter: :in_memory)
rescue LoadError => ex
puts "\e[31mFailed to load DataMapper - #{ex.message}\e[0m"
end
@@ -298,10 +299,10 @@ class MonetaBenchmarks
store = Moneta.new(name, options.dup)
@stats[name] = {
- :write => [],
- :read => [],
- :sum => [],
- :error => []
+ write: [],
+ read: [],
+ sum: [],
+ error: []
}
%w(Rehearse Measure).each do |type|
diff --git a/script/generate-specs b/script/generate-specs
index 7b3b06f..3fbd742 100755
--- a/script/generate-specs
+++ b/script/generate-specs
@@ -19,43 +19,43 @@ class Specs
end
def new(options)
- Specs.new({:specs => specs, :key => key, :value => value}.merge(options))
+ Specs.new({specs: specs, key: key, value: value}.merge(options))
end
def without_path
- new(:key => key - %w(path))
+ new(key: key - %w(path))
end
def stringvalues_only
- new(:value => %w(string))
+ new(value: %w(string))
end
def simplekeys_only
- new(:key => %w(string hash integer))
+ new(key: %w(string hash integer))
end
def simplevalues_only
- new(:value => %w(string hash integer))
+ new(value: %w(string hash integer))
end
def without_increment
- new(:specs => specs - [:increment, :concurrent_increment] + [:not_increment])
+ new(specs: specs - [:increment, :concurrent_increment] + [:not_increment])
end
def without_large
- new(:specs => specs - [:store_large])
+ new(specs: specs - [:store_large])
end
def without_concurrent
- new(:specs => specs - [:concurrent_increment, :concurrent_create])
+ new(specs: specs - [:concurrent_increment, :concurrent_create])
end
def without_persist
- new(:specs => specs - [:persist, :multiprocess, :concurrent_increment, :concurrent_create] + [:not_persist])
+ new(specs: specs - [:persist, :multiprocess, :concurrent_increment, :concurrent_create] + [:not_persist])
end
def without_multiprocess
- new(:specs => specs - [:multiprocess, :concurrent_increment, :concurrent_create])
+ new(specs: specs - [:multiprocess, :concurrent_increment, :concurrent_create])
end
def with_expires
@@ -66,60 +66,60 @@ class Specs
end
a << :create_expires if a.include?(:create)
a << :expires
- new(:specs => a)
+ new(specs: a)
end
def with_native_expires
a = specs.dup
a << :create_expires if a.include?(:create)
- new(:specs => a + [:expires])
+ new(specs: a + [:expires])
end
def without_marshallable
- new(:specs => specs - [:marshallable_value, :marshallable_key])
+ new(specs: specs - [:marshallable_value, :marshallable_key])
end
def without_transform
- new(:specs => specs - [:marshallable_value, :marshallable_key, :transform_value])
+ new(specs: specs - [:marshallable_value, :marshallable_key, :transform_value])
end
def returnsame
- new(:specs => specs - [:returndifferent] + [:returnsame])
+ new(specs: specs - [:returndifferent] + [:returnsame])
end
def without_marshallable_key
- new(:specs => specs - [:marshallable_key])
+ new(specs: specs - [:marshallable_key])
end
def without_marshallable_value
- new(:specs => specs - [:marshallable_value])
+ new(specs: specs - [:marshallable_value])
end
def without_store
- new(:specs => specs - [:store, :store_large, :transform_value, :marshallable_value])
+ new(specs: specs - [:store, :store_large, :transform_value, :marshallable_value])
end
def with_default_expires
- new(:specs => specs + [:default_expires])
+ new(specs: specs + [:default_expires])
end
def without_create
- new(:specs => specs - [:create, :concurrent_create, :create_expires] + [:not_create])
+ new(specs: specs - [:create, :concurrent_create, :create_expires] + [:not_create])
end
end
-ADAPTER_SPECS = Specs.new(:specs => [:null, :store, :returndifferent, :increment, :concurrent_increment, :concurrent_create, :persist, :multiprocess, :create, :features, :store_large], :key => %w(string path), :value => %w(string path))
-STANDARD_SPECS = Specs.new(:specs => [:null, :store, :returndifferent, :marshallable_key, :marshallable_value, :transform_value, :increment, :concurrent_increment, :concurrent_create, :persist, :multiprocess, :create, :features, :store_large])
-TRANSFORMER_SPECS = Specs.new(:specs => [:null, :store, :returndifferent, :transform_value, :increment, :create, :features, :store_large])
+ADAPTER_SPECS = Specs.new(specs: [:null, :store, :returndifferent, :increment, :concurrent_increment, :concurrent_create, :persist, :multiprocess, :create, :features, :store_large], key: %w(string path), value: %w(string path))
+STANDARD_SPECS = Specs.new(specs: [:null, :store, :returndifferent, :marshallable_key, :marshallable_value, :transform_value, :increment, :concurrent_increment, :concurrent_create, :persist, :multiprocess, :create, :features, :store_large])
+TRANSFORMER_SPECS = Specs.new(specs: [:null, :store, :returndifferent, :transform_value, :increment, :create, :features, :store_large])
header = "# coding: binary\n# Generated by #{File.basename(__FILE__)}\n"
TESTS = {
'standard_client_tcp' => {
- :preamble => "start_server(Moneta::Adapters::Memory.new)\n",
- :store => :Client,
- :specs => STANDARD_SPECS,
- :tests => %{
+ preamble: "start_server(Moneta::Adapters::Memory.new)\n",
+ store: :Client,
+ specs: STANDARD_SPECS,
+ tests: %{
it 'supports multiple clients' do
client = Moneta.new(:Client)
client['shared_key'] = 'shared_val'
@@ -137,424 +137,434 @@ end
}
},
'standard_client_unix' => {
- :preamble => "start_server(Moneta::Adapters::Memory.new, :socket => File.join(make_tempdir, 'standard_client_unix'))\n",
- :store => :Client,
- :options => ":socket => File.join(make_tempdir, 'standard_client_unix')",
- :specs => STANDARD_SPECS
+ preamble: "start_server(Moneta::Adapters::Memory.new, socket: File.join(make_tempdir, 'standard_client_unix'))\n",
+ store: :Client,
+ options: "socket: File.join(make_tempdir, 'standard_client_unix')",
+ specs: STANDARD_SPECS
},
'standard_restclient' => {
- :preamble => "start_restserver\n",
- :store => :RestClient,
- :options => ":url => 'http://localhost:8808/moneta/'",
- :specs => STANDARD_SPECS.without_increment.without_create
+ preamble: "start_restserver\n",
+ store: :RestClient,
+ options: "url: 'http://localhost:8808/moneta/'",
+ specs: STANDARD_SPECS.without_increment.without_create
},
'standard_memory' => {
- :store => :Memory,
- :specs => STANDARD_SPECS.without_persist
+ store: :Memory,
+ specs: STANDARD_SPECS.without_persist
},
'standard_memory_with_expires' => {
- :store => :Memory,
- :options => ':expires => true',
- :specs => STANDARD_SPECS.with_expires.without_persist
+ store: :Memory,
+ options: 'expires: true',
+ specs: STANDARD_SPECS.with_expires.without_persist
},
'standard_memory_with_compress' => {
- :store => :Memory,
- :options => ':compress => true',
- :load_value => 'Marshal.load(::Zlib::Inflate.inflate(value))',
- :specs => STANDARD_SPECS.without_persist
+ store: :Memory,
+ options: 'compress: true',
+ load_value: 'Marshal.load(::Zlib::Inflate.inflate(value))',
+ specs: STANDARD_SPECS.without_persist
},
'standard_memory_with_prefix' => {
- :store => :Memory,
- :options => ':prefix => "moneta"',
- :specs => STANDARD_SPECS.without_persist
+ store: :Memory,
+ options: 'prefix: "moneta"',
+ specs: STANDARD_SPECS.without_persist
},
'standard_memory_with_json_serializer' => {
- :store => :Memory,
- :options => ':serializer => :json',
- :load_value => '::MultiJson.load(value)',
- :specs => STANDARD_SPECS.without_marshallable.simplekeys_only.simplevalues_only.without_persist
+ store: :Memory,
+ options: 'serializer: :json',
+ load_value: '::MultiJson.load(value)',
+ specs: STANDARD_SPECS.without_marshallable.simplekeys_only.simplevalues_only.without_persist
},
'standard_memory_with_json_key_serializer' => {
- :store => :Memory,
- :options => ':key_serializer => :json',
- :specs => STANDARD_SPECS.without_marshallable_key.simplekeys_only.without_persist,
+ store: :Memory,
+ options: 'key_serializer: :json',
+ specs: STANDARD_SPECS.without_marshallable_key.simplekeys_only.without_persist,
},
'standard_memory_with_json_value_serializer' => {
- :store => :Memory,
- :options => ':value_serializer => :json',
- :specs => STANDARD_SPECS.without_marshallable_value.simplevalues_only.without_persist,
- :load_value => '::MultiJson.load(value)'
+ store: :Memory,
+ options: 'value_serializer: :json',
+ specs: STANDARD_SPECS.without_marshallable_value.simplevalues_only.without_persist,
+ load_value: '::MultiJson.load(value)'
},
'standard_memory_with_snappy_compress' => {
- :store => :Memory,
- :options => ':compress => :snappy',
- :load_value => 'Marshal.load(::Snappy.inflate(value))',
- :specs => STANDARD_SPECS.without_persist
+ store: :Memory,
+ options: 'compress: :snappy',
+ load_value: 'Marshal.load(::Snappy.inflate(value))',
+ specs: STANDARD_SPECS.without_persist
},
'standard_lruhash' => {
- :store => :LRUHash,
- :specs => STANDARD_SPECS.without_persist
+ store: :LRUHash,
+ specs: STANDARD_SPECS.without_persist
},
'standard_lruhash_with_expires' => {
- :store => :LRUHash,
- :options => ':expires => true',
- :specs => STANDARD_SPECS.with_expires.without_persist,
+ store: :LRUHash,
+ options: 'expires: true',
+ specs: STANDARD_SPECS.with_expires.without_persist,
},
'standard_file' => {
- :store => :File,
- :options => ':dir => File.join(make_tempdir, "simple_file")',
- :specs => STANDARD_SPECS
+ store: :File,
+ options: 'dir: File.join(make_tempdir, "simple_file")',
+ specs: STANDARD_SPECS
},
'standard_file_with_expires' => {
- :store => :File,
- :options => ':dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.with_expires
+ store: :File,
+ options: 'dir: File.join(make_tempdir, "simple_file_with_expires"), expires: true',
+ specs: STANDARD_SPECS.with_expires
},
'standard_hashfile' => {
- :store => :HashFile,
- :options => ':dir => File.join(make_tempdir, "simple_hashfile")',
- :specs => STANDARD_SPECS
+ store: :HashFile,
+ options: 'dir: File.join(make_tempdir, "simple_hashfile")',
+ specs: STANDARD_SPECS
},
'standard_hashfile_with_expires' => {
- :store => :HashFile,
- :options => ':dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.with_expires
+ store: :HashFile,
+ options: 'dir: File.join(make_tempdir, "simple_hashfile_with_expires"), expires: true',
+ specs: STANDARD_SPECS.with_expires
},
'standard_cassandra' => {
- :store => :Cassandra,
- :options => ':keyspace => "simple_cassandra"',
- :specs => STANDARD_SPECS.without_increment.without_create.with_native_expires,
+ store: :Cassandra,
+ options: 'keyspace: "simple_cassandra"',
+ specs: STANDARD_SPECS.without_increment.without_create.with_native_expires,
},
'standard_hbase' => {
- :store => :HBase,
- :options => ':table => "simple_hbase"',
- :specs => STANDARD_SPECS.without_create
+ store: :HBase,
+ options: 'table: "simple_hbase"',
+ specs: STANDARD_SPECS.without_create
},
'standard_hbase_with_expires' => {
- :store => :HBase,
- :options => ':table => "simple_hbase", :expires => true',
- :specs => STANDARD_SPECS.with_expires,
+ store: :HBase,
+ options: 'table: "simple_hbase", expires: true',
+ specs: STANDARD_SPECS.with_expires,
},
'standard_dbm' => {
- :store => :DBM,
- :options => ':file => File.join(make_tempdir, "simple_dbm")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :DBM,
+ options: 'file: File.join(make_tempdir, "simple_dbm")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_dbm_with_expires' => {
- :store => :DBM,
- :options => ':file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :DBM,
+ options: 'file: File.join(make_tempdir, "simple_dbm_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_tdb' => {
- :store => :TDB,
- :options => ':file => File.join(make_tempdir, "simple_tdb")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :TDB,
+ options: 'file: File.join(make_tempdir, "simple_tdb")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_tdb_with_expires' => {
- :store => :TDB,
- :options => ':file => File.join(make_tempdir, "simple_tdb_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :TDB,
+ options: 'file: File.join(make_tempdir, "simple_tdb_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_daybreak' => {
- :store => :Daybreak,
- :options => ':file => File.join(make_tempdir, "simple_daybreak")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :Daybreak,
+ options: 'file: File.join(make_tempdir, "simple_daybreak")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_daybreak_with_expires' => {
- :store => :Daybreak,
- :options => ':file => File.join(make_tempdir, "simple_daybreak_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :Daybreak,
+ options: 'file: File.join(make_tempdir, "simple_daybreak_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_gdbm' => {
- :store => :GDBM,
- :options => ':file => File.join(make_tempdir, "simple_gdbm")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :GDBM,
+ options: 'file: File.join(make_tempdir, "simple_gdbm")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_gdbm_with_expires' => {
- :store => :GDBM,
- :options => ':file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :GDBM,
+ options: 'file: File.join(make_tempdir, "simple_gdbm_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_sdbm' => {
- :store => :SDBM,
- :options => ':file => File.join(make_tempdir, "simple_sdbm")',
- :specs => STANDARD_SPECS.without_multiprocess.without_large
+ store: :SDBM,
+ options: 'file: File.join(make_tempdir, "simple_sdbm")',
+ specs: STANDARD_SPECS.without_multiprocess.without_large
},
'standard_sdbm_with_expires' => {
- :store => :SDBM,
- :options => ':file => File.join(make_tempdir, "simple_sdbm_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires.without_large
+ store: :SDBM,
+ options: 'file: File.join(make_tempdir, "simple_sdbm_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires.without_large
},
'standard_leveldb' => {
- :store => :LevelDB,
- :options => ':dir => File.join(make_tempdir, "simple_leveldb")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :LevelDB,
+ options: 'dir: File.join(make_tempdir, "simple_leveldb")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_leveldb_with_expires' => {
- :store => :LevelDB,
- :options => ':dir => File.join(make_tempdir, "simple_leveldb_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :LevelDB,
+ options: 'dir: File.join(make_tempdir, "simple_leveldb_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_lmdb' => {
- :store => :LMDB,
- :options => ':dir => File.join(make_tempdir, "simple_lmdb")',
- :specs => STANDARD_SPECS.without_concurrent
+ store: :LMDB,
+ options: 'dir: File.join(make_tempdir, "simple_lmdb")',
+ specs: STANDARD_SPECS.without_concurrent
},
'standard_lmdb_with_expires' => {
- :store => :LMDB,
- :options => ':dir => File.join(make_tempdir, "simple_lmdb_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_concurrent.with_expires
+ store: :LMDB,
+ options: 'dir: File.join(make_tempdir, "simple_lmdb_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_concurrent.with_expires
},
'standard_pstore' => {
- :store => :PStore,
- :options => ':file => File.join(make_tempdir, "simple_pstore")',
- :load_value => 'value',
- :specs => STANDARD_SPECS
+ store: :PStore,
+ options: 'file: File.join(make_tempdir, "simple_pstore")',
+ load_value: 'value',
+ specs: STANDARD_SPECS
},
'standard_pstore_with_expires' => {
- :store => :PStore,
- :options => ':file => File.join(make_tempdir, "simple_pstore_with_expires"), :expires => true',
- :load_value => 'value',
- :specs => STANDARD_SPECS.with_expires
+ store: :PStore,
+ options: 'file: File.join(make_tempdir, "simple_pstore_with_expires"), expires: true',
+ load_value: 'value',
+ specs: STANDARD_SPECS.with_expires
},
'standard_yaml' => {
- :store => :YAML,
- :options => ':file => File.join(make_tempdir, "simple_yaml")',
- :specs => STANDARD_SPECS.without_marshallable_value.without_concurrent,
- :load_value => 'value'
+ store: :YAML,
+ options: 'file: File.join(make_tempdir, "simple_yaml")',
+ specs: STANDARD_SPECS.without_marshallable_value.without_concurrent,
+ load_value: 'value'
},
'standard_yaml_with_expires' => {
- :store => :YAML,
- :options => ':file => File.join(make_tempdir, "simple_yaml_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_marshallable_value.with_expires.without_concurrent,
- :load_value => 'value'
+ store: :YAML,
+ options: 'file: File.join(make_tempdir, "simple_yaml_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_marshallable_value.with_expires.without_concurrent,
+ load_value: 'value'
},
'standard_localmemcache' => {
- :store => :LocalMemCache,
- :options => ':file => File.join(make_tempdir, "simple_localmemcache")',
- :specs => STANDARD_SPECS.without_increment.without_create
+ store: :LocalMemCache,
+ options: 'file: File.join(make_tempdir, "simple_localmemcache")',
+ specs: STANDARD_SPECS.without_increment.without_create
},
'standard_localmemcache_with_expires' => {
- :store => :LocalMemCache,
- :options => ':file => File.join(make_tempdir, "simple_localmemcache_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_increment.without_create.with_expires
+ store: :LocalMemCache,
+ options: 'file: File.join(make_tempdir, "simple_localmemcache_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_increment.without_create.with_expires
},
'standard_tokyocabinet' => {
- :store => :TokyoCabinet,
- :options => ':file => File.join(make_tempdir, "simple_tokyocabinet")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :TokyoCabinet,
+ options: 'file: File.join(make_tempdir, "simple_tokyocabinet")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_tokyocabinet_with_expires' => {
- :store => :TokyoCabinet,
- :options => ':file => File.join(make_tempdir, "simple_tokyocabinet_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :TokyoCabinet,
+ options: 'file: File.join(make_tempdir, "simple_tokyocabinet_with_expires"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_tokyotyrant' => {
- :store => :TokyoTyrant,
- :specs => STANDARD_SPECS
+ store: :TokyoTyrant,
+ specs: STANDARD_SPECS
},
'standard_tokyotyrant_with_expires' => {
- :store => :TokyoTyrant,
- :options => ':expires => true',
- :specs => STANDARD_SPECS.with_expires
+ store: :TokyoTyrant,
+ options: 'expires: true',
+ specs: STANDARD_SPECS.with_expires
},
'standard_kyotocabinet' => {
- :store => :KyotoCabinet,
- :options => ':file => File.join(make_tempdir, "simple_kyotocabinet.kch")',
- :specs => STANDARD_SPECS.without_multiprocess
+ store: :KyotoCabinet,
+ options: 'file: File.join(make_tempdir, "simple_kyotocabinet.kch")',
+ specs: STANDARD_SPECS.without_multiprocess
},
'standard_kyotocabinet_with_expires' => {
- :store => :KyotoCabinet,
- :options => ':file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true',
- :specs => STANDARD_SPECS.without_multiprocess.with_expires
+ store: :KyotoCabinet,
+ options: 'file: File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), expires: true',
+ specs: STANDARD_SPECS.without_multiprocess.with_expires
},
'standard_sqlite' => {
- :store => :Sqlite,
- :options => ':file => File.join(make_tempdir, "simple_sqlite")',
- :specs => STANDARD_SPECS.without_concurrent
+ store: :Sqlite,
+ options: 'file: File.join(make_tempdir, "simple_sqlite")',
+ specs: STANDARD_SPECS.without_concurrent
},
'standard_sqlite_with_expires' => {
- :store => :Sqlite,
- :options => ':file => File.join(make_tempdir, "simple_sqlite_with_expires"), :expires => true',
- :specs => STANDARD_SPECS.with_expires.without_concurrent
+ store: :Sqlite,
+ options: 'file: File.join(make_tempdir, "simple_sqlite_with_expires"), expires: true',
+ specs: STANDARD_SPECS.with_expires.without_concurrent
},
'standard_redis' => {
- :store => :Redis,
- :specs => STANDARD_SPECS.with_native_expires,
+ store: :Redis,
+ specs: STANDARD_SPECS.with_native_expires,
},
'standard_memcached' => {
- :store => :Memcached,
- :specs => STANDARD_SPECS.with_native_expires,
- :options => ':namespace => "simple_memcached"'
+ store: :Memcached,
+ specs: STANDARD_SPECS.with_native_expires,
+ options: 'namespace: "simple_memcached"'
},
'standard_memcached_dalli' => {
- :store => :MemcachedDalli,
- :specs => STANDARD_SPECS.with_native_expires,
- :options => ':namespace => "simple_memcached_dalli"'
+ store: :MemcachedDalli,
+ specs: STANDARD_SPECS.with_native_expires,
+ options: 'namespace: "simple_memcached_dalli"'
},
'standard_memcached_native' => {
- :store => :MemcachedNative,
- :specs => STANDARD_SPECS.with_native_expires,
- :options => ':namespace => "simple_memcached_native"'
+ store: :MemcachedNative,
+ specs: STANDARD_SPECS.with_native_expires,
+ options: 'namespace: "simple_memcached_native"'
},
'standard_riak' => {
- :store => :Riak,
- :options => ":bucket => 'standard_riak'",
+ store: :Riak,
+ options: "bucket: 'standard_riak'",
# We don't want Riak warnings in tests
- :preamble => "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n",
- :specs => STANDARD_SPECS.without_increment.without_create
+ preamble: "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n",
+ specs: STANDARD_SPECS.without_increment.without_create
},
'standard_riak_with_expires' => {
- :store => :Riak,
- :options => ":bucket => 'standard_riak_with_expires', :expires => true",
+ store: :Riak,
+ options: "bucket: 'standard_riak_with_expires', expires: true",
# We don't want Riak warnings in tests
- :preamble => "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n",
- :specs => STANDARD_SPECS.without_increment.with_expires.without_create
+ preamble: "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n",
+ specs: STANDARD_SPECS.without_increment.with_expires.without_create
},
'standard_couch' => {
- :store => :Couch,
- :options => ":db => 'standard_couch'",
- :load_value => '::Marshal.load(value.unpack(\'m\').first)',
- :specs => STANDARD_SPECS.without_increment
+ store: :Couch,
+ options: "db: 'standard_couch'",
+ load_value: '::Marshal.load(value.unpack(\'m\').first)',
+ specs: STANDARD_SPECS.without_increment
},
'standard_couch_with_expires' => {
- :store => :Couch,
- :options => ":db => 'standard_couch_with_expires', :expires => true",
- :specs => STANDARD_SPECS.without_increment.with_expires,
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ store: :Couch,
+ options: "db: 'standard_couch_with_expires', expires: true",
+ specs: STANDARD_SPECS.without_increment.with_expires,
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_mongo' => {
- :store => :Mongo,
- :options => ":db => 'standard_mongo'",
- :specs => STANDARD_SPECS.with_native_expires
+ store: :Mongo,
+ options: "db: 'standard_mongo'",
+ specs: STANDARD_SPECS.with_native_expires
+ },
+ 'standard_mongo_moped' => {
+ store: :MongoMoped,
+ options: "db: 'standard_mongo_moped'",
+ specs: STANDARD_SPECS.with_native_expires
+ },
+ 'standard_mongo_official' => {
+ store: :MongoOfficial,
+ options: "db: 'standard_mongo_official'",
+ specs: STANDARD_SPECS.with_native_expires
},
'standard_null' => {
- :store => :Null,
- :specs => STANDARD_SPECS.without_increment.without_create.without_store.without_persist
+ store: :Null,
+ specs: STANDARD_SPECS.without_increment.without_create.without_store.without_persist
},
'null_adapter' => {
- :build => 'Moneta::Adapters::Null.new',
- :specs => Specs.new(:specs => [:null, :not_increment, :not_create, :not_persist])
+ build: 'Moneta::Adapters::Null.new',
+ specs: Specs.new(specs: [:null, :not_increment, :not_create, :not_persist])
},
'standard_sequel' => {
- :store => :Sequel,
- :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel"',
- :load_value => '::Marshal.load(value)',
- :specs => STANDARD_SPECS
+ store: :Sequel,
+ options: 'db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "simple_sequel"',
+ load_value: '::Marshal.load(value)',
+ specs: STANDARD_SPECS
},
'standard_sequel_with_expires' => {
- :store => :Sequel,
- :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel_with_expires", :expires => true',
- :specs => STANDARD_SPECS.with_expires,
- :load_value => '::Marshal.load(value)'
+ store: :Sequel,
+ options: 'db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "simple_sequel_with_expires", expires: true',
+ specs: STANDARD_SPECS.with_expires,
+ load_value: '::Marshal.load(value)'
},
'standard_datamapper' => {
- :store => :DataMapper,
- :specs => STANDARD_SPECS.without_increment,
- :options => ':setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper"',
+ store: :DataMapper,
+ specs: STANDARD_SPECS.without_increment,
+ options: 'setup: "mysql://root:@localhost/moneta", table: "simple_datamapper"',
# DataMapper needs default repository to be setup
- :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ preamble: "require 'dm-core'\nDataMapper.setup(:default, adapter: :in_memory)\n",
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_datamapper_with_expires' => {
- :store => :DataMapper,
- :options => ':setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_expires", :expires => true',
+ store: :DataMapper,
+ options: 'setup: "mysql://root:@localhost/moneta", table: "simple_datamapper_with_expires", expires: true',
# DataMapper needs default repository to be setup
- :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
- :specs => STANDARD_SPECS.without_increment.with_expires,
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ preamble: "require 'dm-core'\nDataMapper.setup(:default, adapter: :in_memory)\n",
+ specs: STANDARD_SPECS.without_increment.with_expires,
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_datamapper_with_repository' => {
- :store => :DataMapper,
- :specs => STANDARD_SPECS.without_increment,
- :options => ':repository => :repo, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_repository"',
+ store: :DataMapper,
+ specs: STANDARD_SPECS.without_increment,
+ options: 'repository: :repo, setup: "mysql://root:@localhost/moneta", table: "simple_datamapper_with_repository"',
# DataMapper needs default repository to be setup
- :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ preamble: "require 'dm-core'\nDataMapper.setup(:default, adapter: :in_memory)\n",
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_activerecord' => {
- :store => :ActiveRecord,
- :specs => STANDARD_SPECS,
- :options => ":table => 'standard_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }",
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ store: :ActiveRecord,
+ specs: STANDARD_SPECS,
+ options: "table: 'standard_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' }",
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_activerecord_with_expires' => {
- :store => :ActiveRecord,
- :options => ":table => 'standard_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :expires => true",
- :specs => STANDARD_SPECS.with_expires,
- :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+ store: :ActiveRecord,
+ options: "table: 'standard_activerecord_with_expires', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' }, expires: true",
+ specs: STANDARD_SPECS.with_expires,
+ load_value: '::Marshal.load(value.unpack(\'m\').first)'
},
'standard_fog' => {
- :store => :Fog,
- :specs => STANDARD_SPECS.without_increment.without_create,
- :options => ":aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'standard_fog'",
+ store: :Fog,
+ specs: STANDARD_SPECS.without_increment.without_create,
+ options: "aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'standard_fog'",
# Put Fog into testing mode
- :preamble => "require 'fog'\nFog.mock!\n"
+ preamble: "require 'fog'\nFog.mock!\n"
},
'standard_fog_with_expires' => {
- :store => :Fog,
- :options => ":aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'standard_fog_with_expires',
- :expires => true",
+ store: :Fog,
+ options: "aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'standard_fog_with_expires',
+ expires: true",
# Put Fog into testing mode
- :preamble => "require 'fog'\nFog.mock!\n",
- :specs => STANDARD_SPECS.without_increment.without_create.with_expires
+ preamble: "require 'fog'\nFog.mock!\n",
+ specs: STANDARD_SPECS.without_increment.without_create.with_expires
},
'weak_create' => {
# Put Fog into testing mode
- :preamble => "require 'fog'\nFog.mock!\n",
- :build => %{Moneta.build do
+ preamble: "require 'fog'\nFog.mock!\n",
+ build: %{Moneta.build do
use :WeakCreate
adapter :Fog,
- :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'weak_create'
+ aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'weak_create'
end},
- :specs => ADAPTER_SPECS.without_increment.without_concurrent.returnsame
+ specs: ADAPTER_SPECS.without_increment.without_concurrent.returnsame
},
'weak_increment' => {
# Put Fog into testing mode
- :preamble => "require 'fog'\nFog.mock!\n",
- :build => %{Moneta.build do
+ preamble: "require 'fog'\nFog.mock!\n",
+ build: %{Moneta.build do
use :WeakIncrement
adapter :Fog,
- :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'weak_increment'
+ aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'weak_increment'
end},
- :specs => ADAPTER_SPECS.without_create.without_concurrent.returnsame
+ specs: ADAPTER_SPECS.without_create.without_concurrent.returnsame
},
'expires_memory' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Expires
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_transform.with_expires.without_persist.returnsame
+ specs: STANDARD_SPECS.without_transform.with_expires.without_persist.returnsame
},
'expires_memory_with_default_expires' => {
- :build => %{Moneta.build do
- use :Expires, :expires => 1
+ build: %{Moneta.build do
+ use :Expires, expires: 1
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_transform.with_expires.with_default_expires.without_persist.returnsame
+ specs: STANDARD_SPECS.without_transform.with_expires.with_default_expires.without_persist.returnsame
},
'expires_file' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Expires
- use :Transformer, :key => [:marshal, :escape], :value => :marshal
- adapter :File, :dir => File.join(make_tempdir, "expires-file")
+ use :Transformer, key: [:marshal, :escape], value: :marshal
+ adapter :File, dir: File.join(make_tempdir, "expires-file")
end},
- :specs => STANDARD_SPECS.with_expires.stringvalues_only,
- :tests => %{
+ specs: STANDARD_SPECS.with_expires.stringvalues_only,
+ tests: %{
it 'deletes expired value in underlying file storage' do
- store.store('foo', 'bar', :expires => 2)
+ store.store('foo', 'bar', expires: 2)
store['foo'].should == 'bar'
sleep 1
store['foo'].should == 'bar'
@@ -566,31 +576,31 @@ end
}
},
'proxy_redis' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Proxy
use :Proxy
adapter :Redis
end},
- :specs => ADAPTER_SPECS.with_expires
+ specs: ADAPTER_SPECS.with_expires
},
'proxy_expires_memory' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Proxy
use :Expires
use :Proxy
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_transform.with_expires.returnsame.without_persist
+ specs: STANDARD_SPECS.without_transform.with_expires.returnsame.without_persist
},
'cache_file_memory' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use(:Cache) do
- adapter { adapter :File, :dir => File.join(make_tempdir, "cache_file_memory") }
+ adapter { adapter :File, dir: File.join(make_tempdir, "cache_file_memory") }
cache { adapter :Memory }
end
end},
- :specs => ADAPTER_SPECS.returnsame,
- :tests => %{
+ specs: ADAPTER_SPECS.returnsame,
+ tests: %{
it 'stores loaded values in cache' do
store.adapter['foo'] = 'bar'
store.cache['foo'].should be_nil
@@ -604,22 +614,22 @@ end
}
},
'cache_memory_null' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use(:Cache) do
adapter(Moneta::Adapters::Memory.new)
cache(Moneta::Adapters::Null.new)
end
end},
- :specs => ADAPTER_SPECS.without_persist.returnsame
+ specs: ADAPTER_SPECS.without_persist.returnsame
},
'shared_tcp' => {
- :build => %{Moneta.build do
- use(:Shared, :port => 9001) do
- adapter :PStore, :file => File.join(make_tempdir, 'shared_tcp')
+ build: %{Moneta.build do
+ use(:Shared, port: 9001) do
+ adapter :PStore, file: File.join(make_tempdir, 'shared_tcp')
end
end},
- :specs => ADAPTER_SPECS,
- :tests => %{
+ specs: ADAPTER_SPECS,
+ tests: %{
it 'shares values' do
store['shared_key'] = 'shared_value'
second = new_store
@@ -630,13 +640,13 @@ end
}
},
'shared_unix' => {
- :build => %{Moneta.build do
- use(:Shared, :socket => File.join(make_tempdir, 'shared_unix.socket')) do
- adapter :PStore, :file => File.join(make_tempdir, 'shared_unix')
+ build: %{Moneta.build do
+ use(:Shared, socket: File.join(make_tempdir, 'shared_unix.socket')) do
+ adapter :PStore, file: File.join(make_tempdir, 'shared_unix')
end
end},
- :specs => ADAPTER_SPECS,
- :tests => %{
+ specs: ADAPTER_SPECS,
+ tests: %{
it 'shares values' do
store['shared_key'] = 'shared_value'
second = new_store
@@ -647,165 +657,165 @@ end
}
},
'stack_file_memory' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use(:Stack) do
add(Moneta.new(:Null))
add(Moneta::Adapters::Null.new)
- add { adapter :File, :dir => File.join(make_tempdir, "stack_file_memory") }
+ add { adapter :File, dir: File.join(make_tempdir, "stack_file_memory") }
add { adapter :Memory }
end
end},
- :specs => ADAPTER_SPECS.without_increment.without_create
+ specs: ADAPTER_SPECS.without_increment.without_create
},
'stack_memory_file' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use(:Stack) do
add { adapter :Memory }
- add { adapter :File, :dir => File.join(make_tempdir, "stack_memory_file") }
+ add { adapter :File, dir: File.join(make_tempdir, "stack_memory_file") }
end
end},
- :specs => ADAPTER_SPECS.returnsame
+ specs: ADAPTER_SPECS.returnsame
},
'lock' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Lock
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_transform.returnsame.without_persist
+ specs: STANDARD_SPECS.without_transform.returnsame.without_persist
},
'pool' => {
- :build => %{Moneta.build do
+ build: %{Moneta.build do
use :Pool do
- adapter :File, :dir => File.join(make_tempdir, "pool")
+ adapter :File, dir: File.join(make_tempdir, "pool")
end
end},
- :specs => ADAPTER_SPECS
+ specs: ADAPTER_SPECS
},
'transformer_zlib' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :zlib
+ build: %{Moneta.build do
+ use :Transformer, value: :zlib
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::Zlib::Inflate.inflate(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::Zlib::Inflate.inflate(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::ZlibValue.should_not be_nil
end}
},
'transformer_bzip2' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :bzip2
+ build: %{Moneta.build do
+ use :Transformer, value: :bzip2
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::Bzip2.uncompress(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::Bzip2.uncompress(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::Bzip2Value.should_not be_nil
end}
},
'transformer_lzo' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :lzo
+ build: %{Moneta.build do
+ use :Transformer, value: :lzo
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::LZO.decompress(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::LZO.decompress(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::LzoValue.should_not be_nil
end}
},
'transformer_lz4' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :lz4
+ build: %{Moneta.build do
+ use :Transformer, value: :lz4
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::LZ4.uncompress(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::LZ4.uncompress(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::Lz4Value.should_not be_nil
end}
},
'transformer_lzma' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :lzma
+ build: %{Moneta.build do
+ use :Transformer, value: :lzma
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::LZMA.decompress(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::LZMA.decompress(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::LzmaValue.should_not be_nil
end}
},
'transformer_snappy' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :snappy
+ build: %{Moneta.build do
+ use :Transformer, value: :snappy
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::Snappy.inflate(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::Snappy.inflate(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::SnappyValue.should_not be_nil
end}
},
'transformer_quicklz' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :quicklz
+ build: %{Moneta.build do
+ use :Transformer, value: :quicklz
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.stringvalues_only,
- :load_value => '::QuickLZ.decompress(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.stringvalues_only,
+ load_value: '::QuickLZ.decompress(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::QuicklzValue.should_not be_nil
end}
},
'transformer_json' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :json, :value => :json
+ build: %{Moneta.build do
+ use :Transformer, key: :json, value: :json
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::MultiJson.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::MultiJson.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::JsonKeyJsonValue.should_not be_nil
end}
},
'transformer_bert' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :bert, :value => :bert
+ build: %{Moneta.build do
+ use :Transformer, key: :bert, value: :bert
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::BERT.decode(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::BERT.decode(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::BertKeyBertValue.should_not be_nil
end}
},
'transformer_bencode' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :bencode, :value => :bencode
+ build: %{Moneta.build do
+ use :Transformer, key: :bencode, value: :bencode
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::BEncode.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::BEncode.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::BencodeKeyBencodeValue.should_not be_nil
@@ -813,408 +823,408 @@ end}
},
'transformer_bson' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :bson, :value => :bson
+ build: %{Moneta.build do
+ use :Transformer, key: :bson, value: :bson
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => "::BSON.deserialize(value)['v']",
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: "::BSON.deserialize(value)['v']",
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::BsonKeyBsonValue.should_not be_nil
end}
},
'transformer_ox' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :ox, :value => :ox
+ build: %{Moneta.build do
+ use :Transformer, key: :ox, value: :ox
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS,
- :load_value => '::Ox.parse_obj(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS,
+ load_value: '::Ox.parse_obj(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::OxKeyOxValue.should_not be_nil
end}
},
'transformer_php' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :php, :value => :php
+ build: %{Moneta.build do
+ use :Transformer, key: :php, value: :php
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::PHP.unserialize(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::PHP.unserialize(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::PhpKeyPhpValue.should_not be_nil
end}
},
'transformer_tnet' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :tnet, :value => :tnet
+ build: %{Moneta.build do
+ use :Transformer, key: :tnet, value: :tnet
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::TNetstring.parse(value).first',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::TNetstring.parse(value).first',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::TnetKeyTnetValue.should_not be_nil
end}
},
'transformer_msgpack' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :msgpack, :value => :msgpack
+ build: %{Moneta.build do
+ use :Transformer, key: :msgpack, value: :msgpack
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
- :load_value => '::MessagePack.unpack(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS.simplekeys_only.simplevalues_only,
+ load_value: '::MessagePack.unpack(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MsgpackKeyMsgpackValue.should_not be_nil
end}
},
'transformer_marshal' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :marshal, :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: :marshal, value: :marshal
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS,
- :load_value => '::Marshal.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS,
+ load_value: '::Marshal.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalKeyMarshalValue.should_not be_nil
end}
},
'transformer_key_marshal' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: :marshal
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.returnsame,
- :load_value => 'value',
- :tests => %{
+ specs: TRANSFORMER_SPECS.returnsame,
+ load_value: 'value',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalKey.should_not be_nil
end}
},
'transformer_key_to_s' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :to_s
+ build: %{Moneta.build do
+ use :Transformer, key: :to_s
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.returnsame.simplekeys_only,
- :load_value => 'value',
- :tests => %{
+ specs: TRANSFORMER_SPECS.returnsame.simplekeys_only,
+ load_value: 'value',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::To_sKey.should_not be_nil
end}
},
'transformer_key_inspect' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :inspect
+ build: %{Moneta.build do
+ use :Transformer, key: :inspect
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.returnsame.simplekeys_only,
- :load_value => 'value',
- :tests => %{
+ specs: TRANSFORMER_SPECS.returnsame.simplekeys_only,
+ load_value: 'value',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::InspectKey.should_not be_nil
end}
},
'transformer_value_marshal' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, value: :marshal
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS,
- :load_value => '::Marshal.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS,
+ load_value: '::Marshal.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalValue.should_not be_nil
end}
},
'transformer_yaml' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :yaml, :value => :yaml
+ build: %{Moneta.build do
+ use :Transformer, key: :yaml, value: :yaml
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS,
- :load_value => '::YAML.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS,
+ load_value: '::YAML.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::YamlKeyYamlValue.should_not be_nil
end}
},
'transformer_key_yaml' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :yaml
+ build: %{Moneta.build do
+ use :Transformer, key: :yaml
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS.returnsame,
- :load_value => 'value',
- :tests => %{
+ specs: TRANSFORMER_SPECS.returnsame,
+ load_value: 'value',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::YamlKey.should_not be_nil
end}
},
'transformer_value_yaml' => {
- :build => %{Moneta.build do
- use :Transformer, :value => :yaml
+ build: %{Moneta.build do
+ use :Transformer, value: :yaml
adapter :Memory
end},
- :specs => TRANSFORMER_SPECS,
- :load_value => '::YAML.load(value)',
- :tests => %{
+ specs: TRANSFORMER_SPECS,
+ load_value: '::YAML.load(value)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::YamlValue.should_not be_nil
end}
},
'transformer_marshal_hmac' => {
- :build => %{Moneta.build do
- use :Transformer, :key => :marshal, :value => [:marshal, :hmac], :secret => 'secret'
+ build: %{Moneta.build do
+ use :Transformer, key: :marshal, value: [:marshal, :hmac], secret: 'secret'
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :load_value => '::Marshal.load(::Moneta::Transformer::Helper.hmacverify(value, \'secret\'))',
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ load_value: '::Marshal.load(::Moneta::Transformer::Helper.hmacverify(value, \'secret\'))',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalKeyMarshalHmacValue.should_not be_nil
end}
},
'transformer_marshal_base64' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :base64], :value => [:marshal, :base64]
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :base64], value: [:marshal, :base64]
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :load_value => '::Marshal.load(value.unpack(\'m\').first)',
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ load_value: '::Marshal.load(value.unpack(\'m\').first)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalBase64KeyMarshalBase64Value.should_not be_nil
end}
},
'transformer_marshal_hex' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :hex], :value => [:marshal, :hex]
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :hex], value: [:marshal, :hex]
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :load_value => '::Marshal.load([value].pack(\'H*\'))',
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ load_value: '::Marshal.load([value].pack(\'H*\'))',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalHexKeyMarshalHexValue.should_not be_nil
end}
},
'transformer_marshal_prefix' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :prefix], :value => :marshal, :prefix => 'moneta'
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :prefix], value: :marshal, prefix: 'moneta'
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalPrefixKeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_uuencode' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :uuencode], :value => [:marshal, :uuencode]
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :uuencode], value: [:marshal, :uuencode]
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :load_value => '::Marshal.load(value.unpack(\'u\').first)',
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ load_value: '::Marshal.load(value.unpack(\'u\').first)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalUuencodeKeyMarshalUuencodeValue.should_not be_nil
end}
},
'transformer_marshal_qp' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :qp], :value => [:marshal, :qp]
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :qp], value: [:marshal, :qp]
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :load_value => '::Marshal.load(value.unpack(\'M\').first)',
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ load_value: '::Marshal.load(value.unpack(\'M\').first)',
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalQpKeyMarshalQpValue.should_not be_nil
end}
},
'transformer_marshal_escape' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :escape], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :escape], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalEscapeKeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_md5' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :md5], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :md5], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalMd5KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_sha1' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :sha1], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :sha1], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalSha1KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_sha256' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :sha256], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :sha256], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalSha256KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_sha384' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :sha384], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :sha384], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalSha384KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_sha512' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :sha512], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :sha512], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalSha512KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_rmd160' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :rmd160], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :rmd160], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalRmd160KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_md5_spread' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :md5, :spread], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :md5, :spread], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalMd5SpreadKeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_city32' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :city32], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :city32], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalCity32KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_city64' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :city64], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :city64], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalCity64KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_city128' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :city128], :value => :marshal
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :city128], value: :marshal
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalCity128KeyMarshalValue.should_not be_nil
end}
},
'transformer_marshal_truncate' => {
- :build => %{Moneta.build do
- use :Transformer, :key => [:marshal, :truncate], :value => :marshal, :maxlen => 64
+ build: %{Moneta.build do
+ use :Transformer, key: [:marshal, :truncate], value: :marshal, maxlen: 64
adapter :Memory
end},
- :specs => STANDARD_SPECS.without_persist,
- :tests => %{
+ specs: STANDARD_SPECS.without_persist,
+ tests: %{
it 'compile transformer class' do
store.should_not be_nil
Moneta::Transformer::MarshalTruncateKeyMarshalValue.should_not be_nil
end}
},
'adapter_activerecord' => {
- :build => "Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })",
- :specs => ADAPTER_SPECS,
- :tests => %{
+ build: "Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })",
+ specs: ADAPTER_SPECS,
+ tests: %{
it 'updates an existing key/value' do
store['foo/bar'] = '1'
store['foo/bar'] = '2'
- store.table.where(:k => 'foo/bar').count.should == 1
+ store.table.where(k: 'foo/bar').count.should == 1
end
it 'supports different tables same database' do
- store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
- store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
+ store1 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord1', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })
+ store2 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord2', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })
store1['key'] = 'value1'
store2['key'] = 'value2'
@@ -1226,8 +1236,8 @@ it 'supports different tables same database' do
end
it 'supports different databases same table' do
- store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root' })
- store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root' })
+ store1 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta_activerecord1', username: 'root' })
+ store2 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta_activerecord2', username: 'root' })
store1['key'] = 'value1'
store2['key'] = 'value2'
@@ -1239,51 +1249,51 @@ it 'supports different databases same table' do
end}
},
'adapter_activerecord_exisiting_connection' => {
- :preamble => "require 'active_record'\nActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root'\n",
- :build => "Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord_existing_connection')",
- :specs => ADAPTER_SPECS
+ preamble: "require 'active_record'\nActiveRecord::Base.establish_connection adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root'\n",
+ build: "Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord_existing_connection')",
+ specs: ADAPTER_SPECS
},
'adapter_client' => {
- :preamble => "start_server(Moneta::Adapters::Memory.new)\n",
- :build => "Moneta::Adapters::Client.new",
- :specs => ADAPTER_SPECS
+ preamble: "start_server(Moneta::Adapters::Memory.new)\n",
+ build: "Moneta::Adapters::Client.new",
+ specs: ADAPTER_SPECS
},
'adapter_restclient' => {
- :preamble => "start_restserver\n",
- :build => "Moneta::Adapters::RestClient.new(:url => 'http://localhost:8808/moneta/')",
- :specs => ADAPTER_SPECS.without_increment.without_create
+ preamble: "start_restserver\n",
+ build: "Moneta::Adapters::RestClient.new(url: 'http://localhost:8808/moneta/')",
+ specs: ADAPTER_SPECS.without_increment.without_create
},
'adapter_cassandra' => {
- :build => "Moneta::Adapters::Cassandra.new(:keyspace => 'adapter_cassandra')",
- :specs => ADAPTER_SPECS.without_increment.without_create.with_native_expires
+ build: "Moneta::Adapters::Cassandra.new(keyspace: 'adapter_cassandra')",
+ specs: ADAPTER_SPECS.without_increment.without_create.with_native_expires
},
'adapter_cassandra_with_default_expires' => {
- :build => %{Moneta::Adapters::Cassandra.new(:keyspace => 'adapter_cassandra_with_default_expires', :expires => 1)},
- :specs => ADAPTER_SPECS.without_increment.without_create.with_native_expires.with_default_expires
+ build: %{Moneta::Adapters::Cassandra.new(keyspace: 'adapter_cassandra_with_default_expires', expires: 1)},
+ specs: ADAPTER_SPECS.without_increment.without_create.with_native_expires.with_default_expires
},
'adapter_hbase' => {
- :build => "Moneta::Adapters::HBase.new(:table => 'adapter_hbase')",
- :specs => ADAPTER_SPECS.without_create
+ build: "Moneta::Adapters::HBase.new(table: 'adapter_hbase')",
+ specs: ADAPTER_SPECS.without_create
},
'adapter_cookie' => {
- :build => 'Moneta::Adapters::Cookie.new',
- :specs => ADAPTER_SPECS.without_persist.returnsame
+ build: 'Moneta::Adapters::Cookie.new',
+ specs: ADAPTER_SPECS.without_persist.returnsame
},
'adapter_couch' => {
- :build => "Moneta::Adapters::Couch.new(:db => 'adapter_couch')",
- :specs => ADAPTER_SPECS.without_increment.simplevalues_only.without_path
+ build: "Moneta::Adapters::Couch.new(db: 'adapter_couch')",
+ specs: ADAPTER_SPECS.without_increment.simplevalues_only.without_path
},
'adapter_datamapper' => {
- :build => 'Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "adapter_datamapper")',
+ build: 'Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "adapter_datamapper")',
# DataMapper needs default repository to be setup
- :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
- :specs => ADAPTER_SPECS.without_increment,
- :tests => %q{
+ preamble: "require 'dm-core'\nDataMapper.setup(:default, adapter: :in_memory)\n",
+ specs: ADAPTER_SPECS.without_increment,
+ tests: %q{
it 'does not cross contaminate when storing' do
- first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
+ first = Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "datamapper_first")
first.clear
- second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
+ second = Moneta::Adapters::DataMapper.new(repository: :sample, setup: "mysql://root:@localhost/moneta", table: "datamapper_second")
second.clear
first['key'] = 'value'
@@ -1294,10 +1304,10 @@ it 'does not cross contaminate when storing' do
end
it 'does not cross contaminate when deleting' do
- first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
+ first = Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "datamapper_first")
first.clear
- second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
+ second = Moneta::Adapters::DataMapper.new(repository: :sample, setup: "mysql://root:@localhost/moneta", table: "datamapper_second")
second.clear
first['key'] = 'value'
@@ -1310,73 +1320,73 @@ end
}
},
'adapter_dbm' => {
- :build => 'Moneta::Adapters::DBM.new(:file => File.join(make_tempdir, "adapter_dbm"))',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::DBM.new(file: File.join(make_tempdir, "adapter_dbm"))',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_tdb' => {
- :build => 'Moneta::Adapters::TDB.new(:file => File.join(make_tempdir, "adapter_tdb"))',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::TDB.new(file: File.join(make_tempdir, "adapter_tdb"))',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_daybreak' => {
- :build => 'Moneta::Adapters::Daybreak.new(:file => File.join(make_tempdir, "adapter_daybreak"))',
- :specs => ADAPTER_SPECS.without_multiprocess.returnsame
+ build: 'Moneta::Adapters::Daybreak.new(file: File.join(make_tempdir, "adapter_daybreak"))',
+ specs: ADAPTER_SPECS.without_multiprocess.returnsame
},
'adapter_file' => {
- :build => 'Moneta::Adapters::File.new(:dir => File.join(make_tempdir, "adapter_file"))',
- :specs => ADAPTER_SPECS
+ build: 'Moneta::Adapters::File.new(dir: File.join(make_tempdir, "adapter_file"))',
+ specs: ADAPTER_SPECS
},
'adapter_fog' => {
- :build => "Moneta::Adapters::Fog.new(:aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'adapter_fog')",
+ build: "Moneta::Adapters::Fog.new(aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'adapter_fog')",
# Put Fog into testing mode
- :preamble => "require 'fog'\nFog.mock!\n",
+ preamble: "require 'fog'\nFog.mock!\n",
# Fog returns same object in mocking mode (in-memory store)
- :specs => ADAPTER_SPECS.without_increment.without_create.returnsame
+ specs: ADAPTER_SPECS.without_increment.without_create.returnsame
},
'adapter_gdbm' => {
- :build => 'Moneta::Adapters::GDBM.new(:file => File.join(make_tempdir, "adapter_gdbm"))',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::GDBM.new(file: File.join(make_tempdir, "adapter_gdbm"))',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_localmemcache' => {
- :build => 'Moneta::Adapters::LocalMemCache.new(:file => File.join(make_tempdir, "adapter_localmemcache"))',
- :specs => ADAPTER_SPECS.without_increment.without_create
+ build: 'Moneta::Adapters::LocalMemCache.new(file: File.join(make_tempdir, "adapter_localmemcache"))',
+ specs: ADAPTER_SPECS.without_increment.without_create
},
'adapter_memcached_dalli' => {
- :build => 'Moneta::Adapters::MemcachedDalli.new(:namespace => "adapter_memcached_dalli")',
- :specs => ADAPTER_SPECS.with_native_expires
+ build: 'Moneta::Adapters::MemcachedDalli.new(namespace: "adapter_memcached_dalli")',
+ specs: ADAPTER_SPECS.with_native_expires
},
'adapter_memcached_dalli_with_default_expires' => {
- :build => %{Moneta::Adapters::MemcachedDalli.new(:expires => 1)},
- :specs => ADAPTER_SPECS.with_native_expires.with_default_expires
+ build: %{Moneta::Adapters::MemcachedDalli.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_native_expires.with_default_expires
},
'adapter_memcached_native' => {
- :build => 'Moneta::Adapters::MemcachedNative.new(:namespace => "adapter_memcached_native")',
- :specs => ADAPTER_SPECS.with_native_expires
+ build: 'Moneta::Adapters::MemcachedNative.new(namespace: "adapter_memcached_native")',
+ specs: ADAPTER_SPECS.with_native_expires
},
'adapter_memcached_native_with_default_expires' => {
- :build => %{Moneta::Adapters::MemcachedNative.new(:expires => 1)},
- :specs => ADAPTER_SPECS.with_native_expires.with_default_expires
+ build: %{Moneta::Adapters::MemcachedNative.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_native_expires.with_default_expires
},
'adapter_memcached' => {
- :build => 'Moneta::Adapters::Memcached.new(:namespace => "adapter_memcached")',
- :specs => ADAPTER_SPECS.with_native_expires
+ build: 'Moneta::Adapters::Memcached.new(namespace: "adapter_memcached")',
+ specs: ADAPTER_SPECS.with_native_expires
},
'adapter_memcached_with_default_expires' => {
- :build => %{Moneta::Adapters::Memcached.new(:expires => 1)},
- :specs => ADAPTER_SPECS.with_native_expires.with_default_expires
+ build: %{Moneta::Adapters::Memcached.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_native_expires.with_default_expires
},
'adapter_memory' => {
- :build => 'Moneta::Adapters::Memory.new',
- :specs => STANDARD_SPECS.without_transform.returnsame.without_persist
+ build: 'Moneta::Adapters::Memory.new',
+ specs: STANDARD_SPECS.without_transform.returnsame.without_persist
},
'adapter_lruhash' => {
- :build => 'Moneta::Adapters::LRUHash.new',
- :specs => ADAPTER_SPECS.without_persist.returnsame,
- :tests => %{
+ build: 'Moneta::Adapters::LRUHash.new',
+ specs: ADAPTER_SPECS.without_persist.returnsame,
+ tests: %{
it 'deletes oldest' do
- store = Moneta::Adapters::LRUHash.new(:max_size => 10)
+ store = Moneta::Adapters::LRUHash.new(max_size: 10)
store[0] = 'y'
(1..1000).each do |i|
store[i] = 'x'
@@ -1390,87 +1400,110 @@ it 'deletes oldest' do
end}
},
'adapter_mongo' => {
- :build => 'Moneta::Adapters::Mongo.new(:db => "adapter_mongo")',
- :specs => ADAPTER_SPECS.with_native_expires.simplevalues_only,
- :tests => %{
+ build: 'Moneta::Adapters::Mongo.new(db: "adapter_mongo")',
+ specs: ADAPTER_SPECS.with_native_expires.simplevalues_only
+ },
+ 'adapter_mongo_with_default_expires' => {
+ build: %{Moneta::Adapters::Mongo.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_expires.with_default_expires.simplevalues_only
+ },
+ 'adapter_mongo_moped' => {
+ build: 'Moneta::Adapters::MongoMoped.new(db: "adapter_mongo")',
+ specs: ADAPTER_SPECS.with_native_expires.simplevalues_only,
+ tests: %{
it 'automatically deletes expired document' do
- store.store('key', 'val', :expires => 5)
+ store.store('key', 'val', expires: 5)
+ store.instance_variable_get(:@collection).find('_id' => ::Moped::BSON::Binary.new(:generic, 'key')).one.should_not be_nil
+ sleep 70 # Mongo needs up to 60 seconds
+ store.instance_variable_get(:@collection).find('_id' => ::Moped::BSON::Binary.new(:generic, 'key')).one.should be_nil
+end}
+ },
+ 'adapter_mongo_moped_with_default_expires' => {
+ build: %{Moneta::Adapters::MongoMoped.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_expires.with_default_expires.simplevalues_only
+ },
+ 'adapter_mongo_official' => {
+ build: 'Moneta::Adapters::MongoOfficial.new(db: "adapter_mongo")',
+ specs: ADAPTER_SPECS.with_native_expires.simplevalues_only,
+ tests: %{
+it 'automatically deletes expired document' do
+ store.store('key', 'val', expires: 5)
store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should_not be_nil
sleep 70 # Mongo needs up to 60 seconds
store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should be_nil
end}
},
- 'adapter_mongo_with_default_expires' => {
- :build => %{Moneta::Adapters::Mongo.new(:expires => 1)},
- :specs => ADAPTER_SPECS.with_expires.with_default_expires.simplevalues_only
+ 'adapter_mongo_official_with_default_expires' => {
+ build: %{Moneta::Adapters::MongoOfficial.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_expires.with_default_expires.simplevalues_only
},
'adapter_pstore' => {
- :build => 'Moneta::Adapters::PStore.new(:file => File.join(make_tempdir, "adapter_pstore"))',
- :specs => STANDARD_SPECS.without_transform
+ build: 'Moneta::Adapters::PStore.new(file: File.join(make_tempdir, "adapter_pstore"))',
+ specs: STANDARD_SPECS.without_transform
},
'adapter_redis' => {
- :build => 'Moneta::Adapters::Redis.new',
- :specs => ADAPTER_SPECS.with_native_expires
+ build: 'Moneta::Adapters::Redis.new',
+ specs: ADAPTER_SPECS.with_native_expires
},
'adapter_redis_with_default_expires' => {
- :build => %{Moneta::Adapters::Redis.new(:expires => 1)},
- :specs => ADAPTER_SPECS.with_native_expires.with_default_expires
+ build: %{Moneta::Adapters::Redis.new(expires: 1)},
+ specs: ADAPTER_SPECS.with_native_expires.with_default_expires
},
'adapter_riak' => {
- :build => 'Moneta::Adapters::Riak.new',
- :options => ":bucket => 'adapter_riak'",
- :specs => ADAPTER_SPECS.without_increment.without_create,
+ build: 'Moneta::Adapters::Riak.new',
+ options: ":bucket => 'adapter_riak'",
+ specs: ADAPTER_SPECS.without_increment.without_create,
# We don't want Riak warnings in tests
- :preamble => "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n"
+ preamble: "require 'riak'\n\nRiak.disable_list_keys_warnings = true\n\n"
},
'adapter_sdbm' => {
- :build => 'Moneta::Adapters::SDBM.new(:file => File.join(make_tempdir, "adapter_sdbm"))',
- :specs => ADAPTER_SPECS.without_multiprocess.without_large
+ build: 'Moneta::Adapters::SDBM.new(file: File.join(make_tempdir, "adapter_sdbm"))',
+ specs: ADAPTER_SPECS.without_multiprocess.without_large
},
'adapter_lmdb' => {
- :build => 'Moneta::Adapters::LMDB.new(:dir => File.join(make_tempdir, "adapter_lmdb"))',
- :specs => ADAPTER_SPECS.without_concurrent
+ build: 'Moneta::Adapters::LMDB.new(dir: File.join(make_tempdir, "adapter_lmdb"))',
+ specs: ADAPTER_SPECS.without_concurrent
},
'adapter_lmdb_with_db' => {
- :build => 'Moneta::Adapters::LMDB.new(:dir => File.join(make_tempdir, "adapter_lmdb"), :db => "adapter_lmdb_with_db")',
- :specs => ADAPTER_SPECS.without_concurrent
+ build: 'Moneta::Adapters::LMDB.new(dir: File.join(make_tempdir, "adapter_lmdb"), db: "adapter_lmdb_with_db")',
+ specs: ADAPTER_SPECS.without_concurrent
},
'adapter_leveldb' => {
- :build => 'Moneta::Adapters::LevelDB.new(:dir => File.join(make_tempdir, "adapter_leveldb"))',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::LevelDB.new(dir: File.join(make_tempdir, "adapter_leveldb"))',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_sequel' => {
- :build => 'Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "adapter_sequel")',
- :specs => ADAPTER_SPECS
+ build: 'Moneta::Adapters::Sequel.new(db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "adapter_sequel")',
+ specs: ADAPTER_SPECS
},
'adapter_sqlite' => {
- :build => 'Moneta::Adapters::Sqlite.new(:file => File.join(make_tempdir, "adapter_sqlite"))',
- :specs => ADAPTER_SPECS.without_concurrent
+ build: 'Moneta::Adapters::Sqlite.new(file: File.join(make_tempdir, "adapter_sqlite"))',
+ specs: ADAPTER_SPECS.without_concurrent
},
'adapter_kyotocabinet' => {
- :build => 'Moneta::Adapters::KyotoCabinet.new(:file => File.join(make_tempdir, "adapter_kyotocabinet.kch"))',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::KyotoCabinet.new(file: File.join(make_tempdir, "adapter_kyotocabinet.kch"))',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_tokyocabinet_bdb' => {
- :build => 'Moneta::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_bdb"), :type => :bdb)',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::TokyoCabinet.new(file: File.join(make_tempdir, "adapter_tokyocabinet_bdb"), type: :bdb)',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_tokyocabinet_hdb' => {
- :build => 'Moneta::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_hdb"), :type => :hdb)',
- :specs => ADAPTER_SPECS.without_multiprocess
+ build: 'Moneta::Adapters::TokyoCabinet.new(file: File.join(make_tempdir, "adapter_tokyocabinet_hdb"), type: :hdb)',
+ specs: ADAPTER_SPECS.without_multiprocess
},
'adapter_tokyotyrant' => {
- :build => 'Moneta::Adapters::TokyoTyrant.new',
- :specs => ADAPTER_SPECS
+ build: 'Moneta::Adapters::TokyoTyrant.new',
+ specs: ADAPTER_SPECS
},
'adapter_yaml' => {
- :build => 'Moneta::Adapters::YAML.new(:file => File.join(make_tempdir, "adapter_yaml"))',
- :specs => STANDARD_SPECS.simplevalues_only.simplekeys_only.without_transform.without_concurrent
+ build: 'Moneta::Adapters::YAML.new(file: File.join(make_tempdir, "adapter_yaml"))',
+ specs: STANDARD_SPECS.simplevalues_only.simplekeys_only.without_transform.without_concurrent
},
'mutex' => {
- :store => :Memory,
- :specs => Specs.new,
- :tests => %{
+ store: :Memory,
+ specs: Specs.new,
+ tests: %{
it 'should have #lock' do
mutex = Moneta::Mutex.new(store, 'mutex')
mutex.lock.should be_true
@@ -1525,9 +1558,9 @@ end
}
},
'semaphore' => {
- :store => :Memory,
- :specs => Specs.new,
- :tests => %{
+ store: :Memory,
+ specs: Specs.new,
+ tests: %{
it 'should have #lock' do
mutex = Moneta::Semaphore.new(store, 'semaphore')
mutex.lock.should be_true
@@ -1595,17 +1628,17 @@ end
}
},
'optionmerger' => {
- :store => :Memory,
- :specs => Specs.new,
- :tests => %{
+ store: :Memory,
+ specs: Specs.new,
+ tests: %{
it '#with should return OptionMerger' do
- options = {:optionname => :optionvalue}
+ options = {optionname: :optionvalue}
merger = store.with(options)
merger.should be_instance_of(Moneta::OptionMerger)
end
it 'saves default options' do
- options = {:optionname => :optionvalue}
+ options = {optionname: :optionvalue}
merger = store.with(options)
Moneta::OptionMerger::METHODS.each do |method|
merger.default_options[method].should equal(options)
@@ -1615,42 +1648,42 @@ end
PREFIX = [['alpha', nil], ['beta', nil], ['alpha', 'beta']]
it 'merges options' do
- merger = store.with(:opt1 => :val1, :opt2 => :val2).with(:opt2 => :overwrite, :opt3 => :val3)
+ merger = store.with(opt1: :val1, opt2: :val2).with(opt2: :overwrite, opt3: :val3)
Moneta::OptionMerger::METHODS.each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3}
end
end
it 'merges options only for some methods' do
PREFIX.each do |(alpha,beta)|
- options = {:opt1 => :val1, :opt2 => :val2, :prefix => alpha}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :only => :clear)
+ options = {opt1: :val1, opt2: :val2, prefix: alpha}
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, only: :clear)
(Moneta::OptionMerger::METHODS - [:clear]).each do |method|
merger.default_options[method].should equal(options)
end
- merger.default_options[:clear].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "\#{alpha}\#{beta}"}
+ merger.default_options[:clear].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "\#{alpha}\#{beta}"}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :only => [:load, :store])
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, only: [:load, :store])
(Moneta::OptionMerger::METHODS - [:load, :store]).each do |method|
merger.default_options[method].should equal(options)
end
- merger.default_options[:load].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "\#{alpha}\#{beta}"}
- merger.default_options[:store].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "\#{alpha}\#{beta}"}
+ merger.default_options[:load].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "\#{alpha}\#{beta}"}
+ merger.default_options[:store].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "\#{alpha}\#{beta}"}
end
end
it 'merges options except for some methods' do
PREFIX.each do |(alpha,beta)|
- options = {:opt1 => :val1, :opt2 => :val2, :prefix => alpha}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :except => :clear, :prefix => beta)
+ options = {opt1: :val1, opt2: :val2, prefix: alpha}
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, except: :clear, prefix: beta)
(Moneta::OptionMerger::METHODS - [:clear]).each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "\#{alpha}\#{beta}"}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "\#{alpha}\#{beta}"}
end
merger.default_options[:clear].should equal(options)
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :except => [:load, :store])
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, except: [:load, :store])
(Moneta::OptionMerger::METHODS - [:load, :store]).each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "\#{alpha}\#{beta}"}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "\#{alpha}\#{beta}"}
end
merger.default_options[:load].should equal(options)
merger.default_options[:store].should equal(options)
@@ -1658,29 +1691,29 @@ it 'merges options except for some methods' do
end
it 'has method #raw' do
- store.raw.default_options.should == {:store=>{:raw=>true},:create=>{:raw=>true},:load=>{:raw=>true},:delete=>{:raw=>true}}
+ store.raw.default_options.should == {store:{raw:true},create:{raw:true},load:{raw:true},delete:{raw:true}}
store.raw.should equal(store.raw.raw)
end
it 'has method #expires' do
- store.expires(10).default_options.should == {:store=>{:expires=>10},:create=>{:expires=>10},:increment=>{:expires=>10}}
+ store.expires(10).default_options.should == {store:{expires:10},create:{expires:10},increment:{expires:10}}
end
it 'has method #prefix' do
- store.prefix('a').default_options.should == {:store=>{:prefix=>'a'},:load=>{:prefix=>'a'},:create=>{:prefix=>'a'},
- :delete=>{:prefix=>'a'},:key? => {:prefix=>'a'},:increment=>{:prefix=>'a'}}
+ store.prefix('a').default_options.should == {store:{prefix:'a'},load:{prefix:'a'},create:{prefix:'a'},
+ delete:{prefix:'a'},key?: {prefix:'a'},increment:{prefix:'a'}}
- store.prefix('a').prefix('b').default_options.should == {:store=>{:prefix=>'ab'},:load=>{:prefix=>'ab'},:create=>{:prefix=>'ab'},
- :delete=>{:prefix=>'ab'},:key? => {:prefix=>'ab'},:increment=>{:prefix=>'ab'}}
+ store.prefix('a').prefix('b').default_options.should == {store:{prefix:'ab'},load:{prefix:'ab'},create:{prefix:'ab'},
+ delete:{prefix:'ab'},key?: {prefix:'ab'},increment:{prefix:'ab'}}
- store.raw.prefix('b').default_options.should == {:store=>{:raw=>true,:prefix=>'b'},:load=>{:raw=>true,:prefix=>'b'},:create=>{:raw=>true,:prefix=>'b'},:delete=>{:raw=>true,:prefix=>'b'},:key? => {:prefix=>'b'},:increment=>{:prefix=>'b'}}
+ store.raw.prefix('b').default_options.should == {store:{raw:true,prefix:'b'},load:{raw:true,prefix:'b'},create:{raw:true,prefix:'b'},delete:{raw:true,prefix:'b'},key?: {prefix:'b'},increment:{prefix:'b'}}
- store.prefix('a').raw.default_options.should == {:store=>{:raw=>true,:prefix=>'a'},:load=>{:raw=>true,:prefix=>'a'},:create=>{:raw=>true,:prefix=>'a'},:delete=>{:raw=>true,:prefix=>'a'},:key? => {:prefix=>'a'},:increment=>{:prefix=>'a'}}
+ store.prefix('a').raw.default_options.should == {store:{raw:true,prefix:'a'},load:{raw:true,prefix:'a'},create:{raw:true,prefix:'a'},delete:{raw:true,prefix:'a'},key?: {prefix:'a'},increment:{prefix:'a'}}
end
it 'supports adding proxis using #with' do
- compressed_store = store.with(:prefix => 'compressed') do
- use :Transformer, :value => :zlib
+ compressed_store = store.with(prefix: 'compressed') do
+ use :Transformer, value: :zlib
end
store['key'] = 'uncompressed value'
compressed_store['key'] = 'compressed value'
@@ -1768,7 +1801,7 @@ it 'fetches a key with a block with fetch, if the key is not available' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(#{key1}, options).should be_false
store.load(#{key1}, options).should be_nil
@@ -1902,8 +1935,8 @@ SPECS['multiprocess'] = %{it 'supports access by multiple instances/processes' d
store2.close
end}
-SPECS['expires'] = %{it 'supports expires on store and []', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+SPECS['expires'] = %{it 'supports expires on store and []', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store['key1'].should == 'val1'
sleep 1
store['key1'].should == 'val1'
@@ -1912,14 +1945,14 @@ SPECS['expires'] = %{it 'supports expires on store and []', :retry => 3 do
end
it 'supports strict expires on store and []' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store['key1'].should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store['key1'].should be_nil
end
-it 'supports expires on store and fetch', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+it 'supports expires on store and fetch', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.fetch('key1').should == 'val1'
sleep 1
store.fetch('key1').should == 'val1'
@@ -1928,28 +1961,28 @@ it 'supports expires on store and fetch', :retry => 3 do
end
it 'supports strict expires on store and fetch' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.fetch('key1').should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.fetch('key1').should be_nil
end
it 'supports 0 as no-expires on store and []' do
- store.store('key1', 'val1', :expires => 0)
+ store.store('key1', 'val1', expires: 0)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
it 'supports false as no-expires on store and []' do
- store.store('key1', 'val1', :expires => false)
+ store.store('key1', 'val1', expires: false)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
-it 'supports expires on store and load', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+it 'supports expires on store and load', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.load('key1').should == 'val1'
sleep 1
store.load('key1').should == 'val1'
@@ -1958,14 +1991,14 @@ it 'supports expires on store and load', :retry => 3 do
end
it 'supports strict expires on store and load' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.load('key1').should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.load('key1').should be_nil
end
-it 'supports expires on store and #key?', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+it 'supports expires on store and #key?', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.key?('key1').should be_true
sleep 1
store.key?('key1').should be_true
@@ -1974,17 +2007,17 @@ it 'supports expires on store and #key?', :retry => 3 do
end
it 'supports strict expires on store and #key?' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.key?('key1').should be_true
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.key?('key1').should be_false
end
-it 'supports updating the expiration time in load', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+it 'supports updating the expiration time in load', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
- store.load('key2', :expires => 5).should == 'val2'
+ store.load('key2', expires: 5).should == 'val2'
store['key2'].should == 'val2'
sleep 3
store['key2'].should == 'val2'
@@ -1993,24 +2026,24 @@ it 'supports updating the expiration time in load', :retry => 3 do
end
it 'supports 0 as no-expires in load' do
- store.store('key1', 'val1', :expires => 2)
- store.load('key1', :expires => 0).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.load('key1', expires: 0).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'supports false as no-expires in load' do
- store.store('key1', 'val1', :expires => 2)
- store.load('key1', :expires => false).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.load('key1', expires: false).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
-it 'supports updating the expiration time in #key?', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+it 'supports updating the expiration time in #key?', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
- store.key?('key2', :expires => 5).should be_true
+ store.key?('key2', expires: 5).should be_true
store['key2'].should == 'val2'
sleep 3
store['key2'].should == 'val2'
@@ -2019,24 +2052,24 @@ it 'supports updating the expiration time in #key?', :retry => 3 do
end
it 'supports 0 as no-expires in #key?' do
- store.store('key1', 'val1', :expires => 2)
- store.key?('key1', :expires => 0).should be_true
+ store.store('key1', 'val1', expires: 2)
+ store.key?('key1', expires: 0).should be_true
sleep 3
store['key1'].should == 'val1'
end
it 'supports false as no-expires in #key?' do
- store.store('key1', 'val1', :expires => 2)
- store.key?('key1', :expires => false ).should be_true
+ store.store('key1', 'val1', expires: 2)
+ store.key?('key1', expires: false ).should be_true
sleep 3
store['key1'].should == 'val1'
end
-it 'supports updating the expiration time in fetch', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+it 'supports updating the expiration time in fetch', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store['key1'].should == 'val1'
sleep 1
- store.fetch('key1', nil, :expires => 5).should == 'val1'
+ store.fetch('key1', nil, expires: 5).should == 'val1'
store['key1'].should == 'val1'
sleep 3
store['key1'].should == 'val1'
@@ -2045,28 +2078,28 @@ it 'supports updating the expiration time in fetch', :retry => 3 do
end
it 'supports 0 as no-expires in fetch' do
- store.store('key1', 'val1', :expires => 2)
- store.fetch('key1', nil, :expires => 0).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.fetch('key1', nil, expires: 0).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'supports false as no-expires in fetch' do
- store.store('key1', 'val1', :expires => 2)
- store.fetch('key1', nil, :expires => false).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.fetch('key1', nil, expires: false).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'strictly respects expires in delete' do
- store.store('key2', 'val2', :expires => 2)
+ store.store('key2', 'val2', expires: 2)
store['key2'].should == 'val2'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.delete('key2').should be_nil
end
-it 'respects expires in delete', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+it 'respects expires in delete', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
store['key2'].should == 'val2'
@@ -2074,8 +2107,8 @@ it 'respects expires in delete', :retry => 3 do
store.delete('key2').should be_nil
end
-it 'supports the #expires syntactic sugar', :retry => 3 do
- store.store('persistent_key', 'persistent_value', :expires => 0)
+it 'supports the #expires syntactic sugar', retry: 3 do
+ store.store('persistent_key', 'persistent_value', expires: 0)
store.expires(1).store('key2', 'val2')
store['key2'].should == 'val2'
sleep 2
@@ -2084,32 +2117,32 @@ it 'supports the #expires syntactic sugar', :retry => 3 do
end
it 'supports false as no-expires on store and []' do
- store.store('key1', 'val1', :expires => false)
+ store.store('key1', 'val1', expires: false)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
-it 'does not update the expiration time in #key? when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+it 'does not update the expiration time in #key? when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.key?('key1').should be_true
- store.key?('key1', :expires => nil).should be_true
+ store.key?('key1', expires: nil).should be_true
sleep 2
store.key?('key1').should be_false
end
-it 'does not update the expiration time in fetch when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+it 'does not update the expiration time in fetch when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.fetch('key1').should == 'val1'
- store.fetch('key1', :expires => nil).should == 'val1'
+ store.fetch('key1', expires: nil).should == 'val1'
sleep 2
store.fetch('key1').should be_nil
end
-it 'does not update the expiration time in load when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+it 'does not update the expiration time in load when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.load('key1').should == 'val1'
- store.load('key1', :expires => nil).should == 'val1'
+ store.load('key1', expires: nil).should == 'val1'
sleep 2
store.load('key1').should be_nil
end}
@@ -2142,10 +2175,10 @@ SPECS['concurrent_increment'] = %{def increment_thread(name)
s = new_store
100.times do |i|
100.times do |j|
- s.increment("counter\#{j}", 1, :expires => false)
+ s.increment("counter\#{j}", 1, expires: false)
Thread.pass if rand(1000) >= 995
end
- s.store("\#{name}\#{i}", i.to_s, :expires => false)
+ s.store("\#{name}\#{i}", i.to_s, expires: false)
end
s.close
end
@@ -2172,7 +2205,7 @@ SPECS['concurrent_create'] = %{def create_thread(name)
Thread.new do
s = new_store
1000.times do |i|
- s[i.to_s].should == name if s.create(i.to_s, name, :expires => false)
+ s[i.to_s].should == name if s.create(i.to_s, name, expires: false)
Thread.pass if rand(100) >= 99
end
s.close
@@ -2194,9 +2227,9 @@ SPECS['increment'] = %{it 'initializes in #increment with 1' do
store.key?('inckey').should be_true
store.raw['inckey'].should == '1'
store.raw.load('inckey').should == '1'
- store.load('inckey', :raw => true).should == '1'
+ store.load('inckey', raw: true).should == '1'
- store.delete('inckey', :raw => true).should == '1'
+ store.delete('inckey', raw: true).should == '1'
store.key?('inckey').should be_false
end
@@ -2204,14 +2237,14 @@ it 'initializes in #increment with higher value' do
store.increment('inckey', 42).should == 42
store.key?('inckey').should be_true
store.raw['inckey'].should == '42'
- store.delete('inckey', :raw => true).should == '42'
+ store.delete('inckey', raw: true).should == '42'
end
it 'initializes in #increment with 0' do
store.increment('inckey', 0).should == 0
store.key?('inckey').should be_true
store.raw['inckey'].should == '0'
- store.delete('inckey', :raw => true).should == '0'
+ store.delete('inckey', raw: true).should == '0'
end
it 'initializes in #decrement with 0' do
@@ -2253,7 +2286,7 @@ it 'supports decrementing existing value' do
end
it 'interprets raw value as integer' do
- store.store('inckey', '42', :raw => true)
+ store.store('inckey', '42', raw: true)
store.increment('inckey').should == 43
store.raw['inckey'].should == '43'
end
@@ -2318,15 +2351,15 @@ SPECS['not_create'] = %{it 'does not support #create' do
end}
SPECS['create_expires'] = %{it 'creates the given key and expires it' do
- store.create('key','value', :expires => 1).should be_true
+ store.create('key','value', expires: 1).should be_true
store['key'].should == 'value'
sleep 2
store.key?('key').should be_false
end
it 'does not change expires if the key exists' do
- store.store('key', 'value', :expires => false).should == 'value'
- store.create('key','another value', :expires => 1).should be_false
+ store.store('key', 'value', expires: false).should == 'value'
+ store.create('key','another value', expires: 1).should be_false
store['key'].should == 'value'
sleep 2
store['key'].should == 'value'
@@ -2383,11 +2416,11 @@ end}
SPECS['transform_value'] = %{it 'allows to bypass transformer with :raw' do
store['key'] = 'value'
- load_value(store.load('key', :raw => true)).should == 'value'
+ load_value(store.load('key', raw: true)).should == 'value'
- store.store('key', 'value', :raw => true)
- store.load('key', :raw => true).should == 'value'
- store.delete('key', :raw => true).should == 'value'
+ store.store('key', 'value', raw: true)
+ store.load('key', raw: true).should == 'value'
+ store.delete('key', raw: true).should == 'value'
end
it 'allows to bypass transformer with raw syntactic sugar' do
@@ -2404,12 +2437,12 @@ it 'allows to bypass transformer with raw syntactic sugar' do
end
it 'returns unmarshalled value' do
- store.store('key', 'unmarshalled value', :raw => true)
- store.load('key', :raw => true).should == 'unmarshalled value'
+ store.store('key', 'unmarshalled value', raw: true)
+ store.load('key', raw: true).should == 'unmarshalled value'
end
it 'might raise exception on invalid value' do
- store.store('key', 'unmarshalled value', :raw => true)
+ store.store('key', 'unmarshalled value', raw: true)
begin
store['key'].should == load_value('unmarshalled value')
@@ -2426,30 +2459,30 @@ end}
SPECS['transform_value_expires'] = %{it 'allows to bypass transformer with :raw' do
store['key'] = 'value'
- load_value(store.load('key', :raw => true)).should == 'value'
+ load_value(store.load('key', raw: true)).should == 'value'
store['key'] = [1,2,3]
- load_value(store.load('key', :raw => true)).should == [[1,2,3]]
+ load_value(store.load('key', raw: true)).should == [[1,2,3]]
store['key'] = nil
- load_value(store.load('key', :raw => true)).should == [nil]
+ load_value(store.load('key', raw: true)).should == [nil]
store['key'] = false
- load_value(store.load('key', :raw => true)).should be_false
+ load_value(store.load('key', raw: true)).should be_false
- store.store('key', 'value', :expires => 10)
- load_value(store.load('key', :raw => true)).first.should == 'value'
- load_value(store.load('key', :raw => true)).last.should respond_to(:to_int)
+ store.store('key', 'value', expires: 10)
+ load_value(store.load('key', raw: true)).first.should == 'value'
+ load_value(store.load('key', raw: true)).last.should respond_to(:to_int)
- store.store('key', 'value', :raw => true)
- store.load('key', :raw => true).should == 'value'
- store.delete('key', :raw => true).should == 'value'
+ store.store('key', 'value', raw: true)
+ store.load('key', raw: true).should == 'value'
+ store.delete('key', raw: true).should == 'value'
end
it 'returns unmarshalled value' do
- store.store('key', 'unmarshalled value', :raw => true)
- store.load('key', :raw => true).should == 'unmarshalled value'
+ store.store('key', 'unmarshalled value', raw: true)
+ store.load('key', raw: true).should == 'unmarshalled value'
end
it 'might raise exception on invalid value' do
- store.store('key', 'unmarshalled value', :raw => true)
+ store.store('key', 'unmarshalled value', raw: true)
begin
store['key'].should == load_value('unmarshalled value')
@@ -2509,7 +2542,7 @@ TESTS.each do |name, options|
opts = options.delete(:options)
opts = ', ' << opts if opts
- build ||= "Moneta.new(#{store.inspect}#{opts}, :logger => {:file => File.join(make_tempdir, '#{name}.log')})"
+ build ||= "Moneta.new(#{store.inspect}#{opts}, logger: {file: File.join(make_tempdir, '#{name}.log')})"
code = %{#{header}require 'helper'
diff --git a/script/install-bundle b/script/install-bundle
index 7b38123..4c1b7f2 100755
--- a/script/install-bundle
+++ b/script/install-bundle
@@ -16,7 +16,7 @@ end
BUNDLE_FILE = "moneta-bundle-#{RUBY_VERSION}-#{ruby}.tar.gz"
-if system("curl -f -u moneta:#{ENV['DAV_PW']} -k -o #{BUNDLE_FILE} https://mendler.net/dav/#{BUNDLE_FILE}")
+if system("curl -f -u moneta:#{ENV['DAV_PW']} -k -o #{BUNDLE_FILE} https://qxqx.de/dav/#{BUNDLE_FILE}")
cmd 'rm -rf .bundle'
cmd "tar -xpf #{BUNDLE_FILE}"
cmd "rm -f #{BUNDLE_FILE}"
diff --git a/script/install-kyotocabinet b/script/install-kyotocabinet
index 7f466da..4e0de6a 100755
--- a/script/install-kyotocabinet
+++ b/script/install-kyotocabinet
@@ -1,6 +1,6 @@
#!/bin/bash
-if `wget --no-check-certificate --quiet -O kyotocabinet.tar.gz https://moneta:$DAV_PW@mendler.net/dav/kyotocabinet.tar.gz`; then
+if `wget --no-check-certificate --quiet -O kyotocabinet.tar.gz https://moneta:$DAV_PW@qxqx.de/dav/kyotocabinet.tar.gz`; then
tar -xf kyotocabinet.tar.gz
else
wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
@@ -11,7 +11,7 @@ else
make
cd ..
tar -czf kyotocabinet.tar.gz kyotocabinet-*
- curl -u moneta:$DAV_PW -k -T kyotocabinet.tar.gz https://mendler.net/dav/ || echo 'Nothing uploaded'
+ curl -u moneta:$DAV_PW -k -T kyotocabinet.tar.gz https://qxqx.de/dav/ || echo 'Nothing uploaded'
fi
cd kyotocabinet-*
sudo make install
diff --git a/script/memusage b/script/memusage
index 4ded731..1fba923 100755
--- a/script/memusage
+++ b/script/memusage
@@ -31,7 +31,7 @@ stats
%q{require 'moneta'
Moneta.new(:Memory)
-Moneta.new(:File, :dir => 'filestore')
+Moneta.new(:File, dir: 'filestore')
Moneta.new(:MemcachedNative)
Moneta.new(:MemcachedDalli)}.each_line do |line|
puts line
diff --git a/script/upload-bundle b/script/upload-bundle
index 71ce528..2477948 100755
--- a/script/upload-bundle
+++ b/script/upload-bundle
@@ -1,2 +1,2 @@
#!/bin/bash
-curl -f -u moneta:$DAV_PW -k -T moneta-bundle-*.tar.gz https://mendler.net/dav/ || echo 'Nothing uploaded'
+curl -f -u moneta:$DAV_PW -k -T moneta-bundle-*.tar.gz https://qxqx.de/dav/ || echo 'Nothing uploaded'
diff --git a/spec/action_dispatch/session_moneta_store_spec.rb b/spec/action_dispatch/session_moneta_store_spec.rb
index a9aebb9..f17324c 100644
--- a/spec/action_dispatch/session_moneta_store_spec.rb
+++ b/spec/action_dispatch/session_moneta_store_spec.rb
@@ -20,11 +20,11 @@ class MonetaStoreTest < ActionDispatch::IntegrationTest
end
def get_session_value
- render :text => "foo: #{session[:foo].inspect}"
+ render text: "foo: #{session[:foo].inspect}"
end
def get_session_id
- render :text => "#{request.session_options[:id]}"
+ render text: "#{request.session_options[:id]}"
end
def call_reset_session
@@ -157,7 +157,7 @@ class MonetaStoreTest < ActionDispatch::IntegrationTest
reset!
- get '/set_session_value', :_session_id => session_id
+ get '/set_session_value', _session_id: session_id
assert_response :success
assert_not_equal session_id, cookies['_session_id']
end
@@ -183,11 +183,11 @@ class MonetaStoreTest < ActionDispatch::IntegrationTest
def with_test_route_set
with_routing do |set|
set.draw do
- get ':action', :to => ::MonetaStoreTest::TestController
+ get ':action', to: ::MonetaStoreTest::TestController
end
@app = ActionDispatch::MiddlewareStack.new do |middleware|
- middleware.use ActionDispatch::Session::MonetaStore, :key => '_session_id', :store => :Memory
+ middleware.use ActionDispatch::Session::MonetaStore, key: '_session_id', store: :Memory
end.build(set)
yield
diff --git a/spec/active_support/cache_moneta_store_spec.rb b/spec/active_support/cache_moneta_store_spec.rb
index 4ac00b4..b80505d 100644
--- a/spec/active_support/cache_moneta_store_spec.rb
+++ b/spec/active_support/cache_moneta_store_spec.rb
@@ -13,9 +13,9 @@ describe ActiveSupport::Cache::MonetaStore do
before(:each) do
@events.clear
- @store = ActiveSupport::Cache::MonetaStore.new(:store => Moneta.new(:Memory))
- @rabbit = OpenStruct.new :name => 'bunny'
- @white_rabbit = OpenStruct.new :color => 'white'
+ @store = ActiveSupport::Cache::MonetaStore.new(store: Moneta.new(:Memory))
+ @rabbit = OpenStruct.new name: 'bunny'
+ @white_rabbit = OpenStruct.new color: 'white'
@store.write 'rabbit', @rabbit
@store.delete 'counter'
@@ -32,7 +32,7 @@ describe ActiveSupport::Cache::MonetaStore do
end
it 'writes the data with expiration time' do
- @store.write 'rabbit', @white_rabbit, :expires_in => 1.second
+ @store.write 'rabbit', @white_rabbit, expires_in: 1.second
@store.read('rabbit').should == @white_rabbit
sleep 2
@store.read('rabbit').should be_nil
@@ -53,8 +53,8 @@ describe ActiveSupport::Cache::MonetaStore do
@store.fetch('rub-a-dub').should be_nil
@store.fetch('rub-a-dub') { 'Flora de Cana' }
@store.fetch('rub-a-dub').should == 'Flora de Cana'
- @store.fetch('rabbit', :force => true) # force cache miss
- @store.fetch('rabbit', :force => true, :expires_in => 1.second) { @white_rabbit }
+ @store.fetch('rabbit', force: true) # force cache miss
+ @store.fetch('rabbit', force: true, expires_in: 1.second) { @white_rabbit }
@store.fetch('rabbit').should == @white_rabbit
sleep 2
@store.fetch('rabbit').should be_nil
@@ -76,24 +76,24 @@ describe ActiveSupport::Cache::MonetaStore do
it 'increments a key' do
3.times { @store.increment 'counter' }
- @store.read('counter', :raw => true).should == '3'
+ @store.read('counter', raw: true).should == '3'
end
it 'decrements a key' do
3.times { @store.increment 'counter' }
2.times { @store.decrement 'counter' }
- @store.read('counter', :raw => true).should == '1'
+ @store.read('counter', raw: true).should == '1'
end
it 'increments a key by given value' do
@store.increment 'counter', 3
- @store.read('counter', :raw => true).should == '3'
+ @store.read('counter', raw: true).should == '3'
end
it 'decrements a key by given value' do
3.times { @store.increment 'counter' }
@store.decrement 'counter', 2
- @store.read('counter', :raw => true).should == '1'
+ @store.read('counter', raw: true).should == '1'
end
describe 'notifications' do
@@ -105,13 +105,13 @@ describe ActiveSupport::Cache::MonetaStore do
read, generate, write = @events
read.name.should == 'cache_read.active_support'
- read.payload.should == { :key => 'radiohead', :super_operation => :fetch }
+ read.payload.should == { key: 'radiohead', super_operation: :fetch }
generate.name.should == 'cache_generate.active_support'
- generate.payload.should == { :key => 'radiohead' }
+ generate.payload.should == { key: 'radiohead' }
write.name.should == 'cache_write.active_support'
- write.payload.should == { :key => 'radiohead' }
+ write.payload.should == { key: 'radiohead' }
end
it 'notifies on #read' do
@@ -121,7 +121,7 @@ describe ActiveSupport::Cache::MonetaStore do
read = @events.first
read.name.should == 'cache_read.active_support'
- read.payload.should == { :key => 'metallica', :hit => false }
+ read.payload.should == { key: 'metallica', hit: false }
end
it 'notifies on #write' do
@@ -131,7 +131,7 @@ describe ActiveSupport::Cache::MonetaStore do
write = @events.first
write.name.should == 'cache_write.active_support'
- write.payload.should == { :key => 'depeche mode' }
+ write.payload.should == { key: 'depeche mode' }
end
it 'notifies on #delete' do
@@ -141,7 +141,7 @@ describe ActiveSupport::Cache::MonetaStore do
delete = @events.first
delete.name.should == 'cache_delete.active_support'
- delete.payload.should == { :key => 'the new cardigans' }
+ delete.payload.should == { key: 'the new cardigans' }
end
it 'notifies on #exist?' do
@@ -151,7 +151,7 @@ describe ActiveSupport::Cache::MonetaStore do
exist = @events.first
exist.name.should == 'cache_exist?.active_support'
- exist.payload.should == { :key => 'the smiths' }
+ exist.payload.should == { key: 'the smiths' }
end
it 'notifies on #increment' do
@@ -161,7 +161,7 @@ describe ActiveSupport::Cache::MonetaStore do
increment = @events.first
increment.name.should == 'cache_increment.active_support'
- increment.payload.should == { :key => 'pearl jam', :amount => 1 }
+ increment.payload.should == { key: 'pearl jam', amount: 1 }
end
it 'notifies on #decrement' do
@@ -171,7 +171,7 @@ describe ActiveSupport::Cache::MonetaStore do
decrement = @events.first
decrement.name.should == 'cache_decrement.active_support'
- decrement.payload.should == { :key => 'placebo', :amount => 1 }
+ decrement.payload.should == { key: 'placebo', amount: 1 }
end
it 'should notify on clear' do
@@ -181,7 +181,7 @@ describe ActiveSupport::Cache::MonetaStore do
clear = @events.first
clear.name.should == 'cache_clear.active_support'
- clear.payload.should == { :key => nil }
+ clear.payload.should == { key: nil }
end
end
diff --git a/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb b/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
index 21dde9b..5608a9e 100644
--- a/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
+++ b/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
@@ -4,13 +4,13 @@ require 'helper'
describe_moneta "adapter_activerecord_exisiting_connection" do
require 'active_record'
- ActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root'
+ ActiveRecord::Base.establish_connection adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root'
def features
[:create, :increment]
end
def new_store
- Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord_existing_connection')
+ Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord_existing_connection')
end
def load_value(value)
diff --git a/spec/moneta/adapter_activerecord_spec.rb b/spec/moneta/adapter_activerecord_spec.rb
index 540aee6..dc59e1e 100644
--- a/spec/moneta/adapter_activerecord_spec.rb
+++ b/spec/moneta/adapter_activerecord_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_activerecord" do
end
def new_store
- Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
+ Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })
end
def load_value(value)
@@ -34,12 +34,12 @@ describe_moneta "adapter_activerecord" do
it 'updates an existing key/value' do
store['foo/bar'] = '1'
store['foo/bar'] = '2'
- store.table.where(:k => 'foo/bar').count.should == 1
+ store.table.where(k: 'foo/bar').count.should == 1
end
it 'supports different tables same database' do
- store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
- store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
+ store1 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord1', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })
+ store2 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord2', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' })
store1['key'] = 'value1'
store2['key'] = 'value2'
@@ -51,8 +51,8 @@ describe_moneta "adapter_activerecord" do
end
it 'supports different databases same table' do
- store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root' })
- store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root' })
+ store1 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta_activerecord1', username: 'root' })
+ store2 = Moneta::Adapters::ActiveRecord.new(table: 'adapter_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta_activerecord2', username: 'root' })
store1['key'] = 'value1'
store2['key'] = 'value2'
diff --git a/spec/moneta/adapter_cassandra_spec.rb b/spec/moneta/adapter_cassandra_spec.rb
index 1b10fe4..75ee9a8 100644
--- a/spec/moneta/adapter_cassandra_spec.rb
+++ b/spec/moneta/adapter_cassandra_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_cassandra" do
end
def new_store
- Moneta::Adapters::Cassandra.new(:keyspace => 'adapter_cassandra')
+ Moneta::Adapters::Cassandra.new(keyspace: 'adapter_cassandra')
end
def load_value(value)
diff --git a/spec/moneta/adapter_cassandra_with_default_expires_spec.rb b/spec/moneta/adapter_cassandra_with_default_expires_spec.rb
index 5f81143..5c189ab 100644
--- a/spec/moneta/adapter_cassandra_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_cassandra_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_cassandra_with_default_expires" do
end
def new_store
- Moneta::Adapters::Cassandra.new(:keyspace => 'adapter_cassandra_with_default_expires', :expires => 1)
+ Moneta::Adapters::Cassandra.new(keyspace: 'adapter_cassandra_with_default_expires', expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_couch_spec.rb b/spec/moneta/adapter_couch_spec.rb
index 1880c9c..723e27f 100644
--- a/spec/moneta/adapter_couch_spec.rb
+++ b/spec/moneta/adapter_couch_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_couch" do
end
def new_store
- Moneta::Adapters::Couch.new(:db => 'adapter_couch')
+ Moneta::Adapters::Couch.new(db: 'adapter_couch')
end
def load_value(value)
diff --git a/spec/moneta/adapter_datamapper_spec.rb b/spec/moneta/adapter_datamapper_spec.rb
index 6218340..af820a0 100644
--- a/spec/moneta/adapter_datamapper_spec.rb
+++ b/spec/moneta/adapter_datamapper_spec.rb
@@ -4,13 +4,13 @@ require 'helper'
describe_moneta "adapter_datamapper" do
require 'dm-core'
- DataMapper.setup(:default, :adapter => :in_memory)
+ DataMapper.setup(:default, adapter: :in_memory)
def features
[:create]
end
def new_store
- Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "adapter_datamapper")
+ Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "adapter_datamapper")
end
def load_value(value)
@@ -33,10 +33,10 @@ describe_moneta "adapter_datamapper" do
it_should_behave_like 'store_pathkey_stringvalue'
it_should_behave_like 'store_large'
it 'does not cross contaminate when storing' do
- first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
+ first = Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "datamapper_first")
first.clear
- second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
+ second = Moneta::Adapters::DataMapper.new(repository: :sample, setup: "mysql://root:@localhost/moneta", table: "datamapper_second")
second.clear
first['key'] = 'value'
@@ -47,10 +47,10 @@ describe_moneta "adapter_datamapper" do
end
it 'does not cross contaminate when deleting' do
- first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
+ first = Moneta::Adapters::DataMapper.new(setup: "mysql://root:@localhost/moneta", table: "datamapper_first")
first.clear
- second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
+ second = Moneta::Adapters::DataMapper.new(repository: :sample, setup: "mysql://root:@localhost/moneta", table: "datamapper_second")
second.clear
first['key'] = 'value'
diff --git a/spec/moneta/adapter_daybreak_spec.rb b/spec/moneta/adapter_daybreak_spec.rb
index c177fa5..14a31d5 100644
--- a/spec/moneta/adapter_daybreak_spec.rb
+++ b/spec/moneta/adapter_daybreak_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_daybreak" do
end
def new_store
- Moneta::Adapters::Daybreak.new(:file => File.join(make_tempdir, "adapter_daybreak"))
+ Moneta::Adapters::Daybreak.new(file: File.join(make_tempdir, "adapter_daybreak"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_dbm_spec.rb b/spec/moneta/adapter_dbm_spec.rb
index bb3dc0e..650ec8a 100644
--- a/spec/moneta/adapter_dbm_spec.rb
+++ b/spec/moneta/adapter_dbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_dbm" do
end
def new_store
- Moneta::Adapters::DBM.new(:file => File.join(make_tempdir, "adapter_dbm"))
+ Moneta::Adapters::DBM.new(file: File.join(make_tempdir, "adapter_dbm"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_file_spec.rb b/spec/moneta/adapter_file_spec.rb
index eb9ceb2..186a5f7 100644
--- a/spec/moneta/adapter_file_spec.rb
+++ b/spec/moneta/adapter_file_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_file" do
end
def new_store
- Moneta::Adapters::File.new(:dir => File.join(make_tempdir, "adapter_file"))
+ Moneta::Adapters::File.new(dir: File.join(make_tempdir, "adapter_file"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_fog_spec.rb b/spec/moneta/adapter_fog_spec.rb
index a4a42d7..9c57332 100644
--- a/spec/moneta/adapter_fog_spec.rb
+++ b/spec/moneta/adapter_fog_spec.rb
@@ -10,10 +10,10 @@ describe_moneta "adapter_fog" do
end
def new_store
- Moneta::Adapters::Fog.new(:aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'adapter_fog')
+ Moneta::Adapters::Fog.new(aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'adapter_fog')
end
def load_value(value)
diff --git a/spec/moneta/adapter_gdbm_spec.rb b/spec/moneta/adapter_gdbm_spec.rb
index bccc99a..e7545d2 100644
--- a/spec/moneta/adapter_gdbm_spec.rb
+++ b/spec/moneta/adapter_gdbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_gdbm" do
end
def new_store
- Moneta::Adapters::GDBM.new(:file => File.join(make_tempdir, "adapter_gdbm"))
+ Moneta::Adapters::GDBM.new(file: File.join(make_tempdir, "adapter_gdbm"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_hbase_spec.rb b/spec/moneta/adapter_hbase_spec.rb
index a3f896e..e66fb22 100644
--- a/spec/moneta/adapter_hbase_spec.rb
+++ b/spec/moneta/adapter_hbase_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_hbase" do
end
def new_store
- Moneta::Adapters::HBase.new(:table => 'adapter_hbase')
+ Moneta::Adapters::HBase.new(table: 'adapter_hbase')
end
def load_value(value)
diff --git a/spec/moneta/adapter_kyotocabinet_spec.rb b/spec/moneta/adapter_kyotocabinet_spec.rb
index ceb4302..5c37e40 100644
--- a/spec/moneta/adapter_kyotocabinet_spec.rb
+++ b/spec/moneta/adapter_kyotocabinet_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_kyotocabinet" do
end
def new_store
- Moneta::Adapters::KyotoCabinet.new(:file => File.join(make_tempdir, "adapter_kyotocabinet.kch"))
+ Moneta::Adapters::KyotoCabinet.new(file: File.join(make_tempdir, "adapter_kyotocabinet.kch"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_leveldb_spec.rb b/spec/moneta/adapter_leveldb_spec.rb
index 3e5537c..481d124 100644
--- a/spec/moneta/adapter_leveldb_spec.rb
+++ b/spec/moneta/adapter_leveldb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_leveldb" do
end
def new_store
- Moneta::Adapters::LevelDB.new(:dir => File.join(make_tempdir, "adapter_leveldb"))
+ Moneta::Adapters::LevelDB.new(dir: File.join(make_tempdir, "adapter_leveldb"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_lmdb_spec.rb b/spec/moneta/adapter_lmdb_spec.rb
index e32bd8e..63f5146 100644
--- a/spec/moneta/adapter_lmdb_spec.rb
+++ b/spec/moneta/adapter_lmdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_lmdb" do
end
def new_store
- Moneta::Adapters::LMDB.new(:dir => File.join(make_tempdir, "adapter_lmdb"))
+ Moneta::Adapters::LMDB.new(dir: File.join(make_tempdir, "adapter_lmdb"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_lmdb_with_db_spec.rb b/spec/moneta/adapter_lmdb_with_db_spec.rb
index bfb815a..3c3e16e 100644
--- a/spec/moneta/adapter_lmdb_with_db_spec.rb
+++ b/spec/moneta/adapter_lmdb_with_db_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_lmdb_with_db" do
end
def new_store
- Moneta::Adapters::LMDB.new(:dir => File.join(make_tempdir, "adapter_lmdb"), :db => "adapter_lmdb_with_db")
+ Moneta::Adapters::LMDB.new(dir: File.join(make_tempdir, "adapter_lmdb"), db: "adapter_lmdb_with_db")
end
def load_value(value)
diff --git a/spec/moneta/adapter_localmemcache_spec.rb b/spec/moneta/adapter_localmemcache_spec.rb
index f9ccec1..50cf5a7 100644
--- a/spec/moneta/adapter_localmemcache_spec.rb
+++ b/spec/moneta/adapter_localmemcache_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_localmemcache" do
end
def new_store
- Moneta::Adapters::LocalMemCache.new(:file => File.join(make_tempdir, "adapter_localmemcache"))
+ Moneta::Adapters::LocalMemCache.new(file: File.join(make_tempdir, "adapter_localmemcache"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_lruhash_spec.rb b/spec/moneta/adapter_lruhash_spec.rb
index 5454a59..bf57b6f 100644
--- a/spec/moneta/adapter_lruhash_spec.rb
+++ b/spec/moneta/adapter_lruhash_spec.rb
@@ -28,7 +28,7 @@ describe_moneta "adapter_lruhash" do
it_should_behave_like 'store_pathkey_stringvalue'
it_should_behave_like 'store_large'
it 'deletes oldest' do
- store = Moneta::Adapters::LRUHash.new(:max_size => 10)
+ store = Moneta::Adapters::LRUHash.new(max_size: 10)
store[0] = 'y'
(1..1000).each do |i|
store[i] = 'x'
diff --git a/spec/moneta/adapter_memcached_dalli_spec.rb b/spec/moneta/adapter_memcached_dalli_spec.rb
index b72769f..3d9d033 100644
--- a/spec/moneta/adapter_memcached_dalli_spec.rb
+++ b/spec/moneta/adapter_memcached_dalli_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached_dalli" do
end
def new_store
- Moneta::Adapters::MemcachedDalli.new(:namespace => "adapter_memcached_dalli")
+ Moneta::Adapters::MemcachedDalli.new(namespace: "adapter_memcached_dalli")
end
def load_value(value)
diff --git a/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb b/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb
index 3e5b60c..ad0a78c 100644
--- a/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached_dalli_with_default_expires" do
end
def new_store
- Moneta::Adapters::MemcachedDalli.new(:expires => 1)
+ Moneta::Adapters::MemcachedDalli.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_memcached_native_spec.rb b/spec/moneta/adapter_memcached_native_spec.rb
index 3fc7381..0af0fae 100644
--- a/spec/moneta/adapter_memcached_native_spec.rb
+++ b/spec/moneta/adapter_memcached_native_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached_native" do
end
def new_store
- Moneta::Adapters::MemcachedNative.new(:namespace => "adapter_memcached_native")
+ Moneta::Adapters::MemcachedNative.new(namespace: "adapter_memcached_native")
end
def load_value(value)
diff --git a/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb b/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb
index ecaf597..9d792db 100644
--- a/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached_native_with_default_expires" do
end
def new_store
- Moneta::Adapters::MemcachedNative.new(:expires => 1)
+ Moneta::Adapters::MemcachedNative.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_memcached_spec.rb b/spec/moneta/adapter_memcached_spec.rb
index 844f502..343d509 100644
--- a/spec/moneta/adapter_memcached_spec.rb
+++ b/spec/moneta/adapter_memcached_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached" do
end
def new_store
- Moneta::Adapters::Memcached.new(:namespace => "adapter_memcached")
+ Moneta::Adapters::Memcached.new(namespace: "adapter_memcached")
end
def load_value(value)
diff --git a/spec/moneta/adapter_memcached_with_default_expires_spec.rb b/spec/moneta/adapter_memcached_with_default_expires_spec.rb
index 493e90c..032c259 100644
--- a/spec/moneta/adapter_memcached_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_memcached_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_memcached_with_default_expires" do
end
def new_store
- Moneta::Adapters::Memcached.new(:expires => 1)
+ Moneta::Adapters::Memcached.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_mongo_spec.rb b/spec/moneta/adapter_mongo_moped_spec.rb
similarity index 82%
copy from spec/moneta/adapter_mongo_spec.rb
copy to spec/moneta/adapter_mongo_moped_spec.rb
index d701a56..4784e63 100644
--- a/spec/moneta/adapter_mongo_spec.rb
+++ b/spec/moneta/adapter_mongo_moped_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "adapter_mongo" do
+describe_moneta "adapter_mongo_moped" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta::Adapters::Mongo.new(:db => "adapter_mongo")
+ Moneta::Adapters::MongoMoped.new(db: "adapter_mongo")
end
def load_value(value)
@@ -48,9 +48,9 @@ describe_moneta "adapter_mongo" do
it_should_behave_like 'store_pathkey_integervalue'
it_should_behave_like 'store_large'
it 'automatically deletes expired document' do
- store.store('key', 'val', :expires => 5)
- store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should_not be_nil
+ store.store('key', 'val', expires: 5)
+ store.instance_variable_get(:@collection).find('_id' => ::Moped::BSON::Binary.new(:generic, 'key')).one.should_not be_nil
sleep 70 # Mongo needs up to 60 seconds
- store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should be_nil
+ store.instance_variable_get(:@collection).find('_id' => ::Moped::BSON::Binary.new(:generic, 'key')).one.should be_nil
end
end
diff --git a/spec/moneta/adapter_mongo_with_default_expires_spec.rb b/spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb
similarity index 94%
copy from spec/moneta/adapter_mongo_with_default_expires_spec.rb
copy to spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb
index 538de30..a76a08a 100644
--- a/spec/moneta/adapter_mongo_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "adapter_mongo_with_default_expires" do
+describe_moneta "adapter_mongo_moped_with_default_expires" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta::Adapters::Mongo.new(:expires => 1)
+ Moneta::Adapters::MongoMoped.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_mongo_spec.rb b/spec/moneta/adapter_mongo_official_spec.rb
similarity index 93%
copy from spec/moneta/adapter_mongo_spec.rb
copy to spec/moneta/adapter_mongo_official_spec.rb
index d701a56..146c714 100644
--- a/spec/moneta/adapter_mongo_spec.rb
+++ b/spec/moneta/adapter_mongo_official_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "adapter_mongo" do
+describe_moneta "adapter_mongo_official" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta::Adapters::Mongo.new(:db => "adapter_mongo")
+ Moneta::Adapters::MongoOfficial.new(db: "adapter_mongo")
end
def load_value(value)
@@ -48,7 +48,7 @@ describe_moneta "adapter_mongo" do
it_should_behave_like 'store_pathkey_integervalue'
it_should_behave_like 'store_large'
it 'automatically deletes expired document' do
- store.store('key', 'val', :expires => 5)
+ store.store('key', 'val', expires: 5)
store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should_not be_nil
sleep 70 # Mongo needs up to 60 seconds
store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should be_nil
diff --git a/spec/moneta/adapter_mongo_with_default_expires_spec.rb b/spec/moneta/adapter_mongo_official_with_default_expires_spec.rb
similarity index 93%
copy from spec/moneta/adapter_mongo_with_default_expires_spec.rb
copy to spec/moneta/adapter_mongo_official_with_default_expires_spec.rb
index 538de30..0b0ee40 100644
--- a/spec/moneta/adapter_mongo_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_mongo_official_with_default_expires_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "adapter_mongo_with_default_expires" do
+describe_moneta "adapter_mongo_official_with_default_expires" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta::Adapters::Mongo.new(:expires => 1)
+ Moneta::Adapters::MongoOfficial.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_mongo_spec.rb b/spec/moneta/adapter_mongo_spec.rb
index d701a56..b74c46f 100644
--- a/spec/moneta/adapter_mongo_spec.rb
+++ b/spec/moneta/adapter_mongo_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_mongo" do
end
def new_store
- Moneta::Adapters::Mongo.new(:db => "adapter_mongo")
+ Moneta::Adapters::Mongo.new(db: "adapter_mongo")
end
def load_value(value)
@@ -47,10 +47,4 @@ describe_moneta "adapter_mongo" do
it_should_behave_like 'store_pathkey_hashvalue'
it_should_behave_like 'store_pathkey_integervalue'
it_should_behave_like 'store_large'
- it 'automatically deletes expired document' do
- store.store('key', 'val', :expires => 5)
- store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should_not be_nil
- sleep 70 # Mongo needs up to 60 seconds
- store.instance_variable_get(:@collection).find_one('_id' => ::BSON::Binary.new('key')).should be_nil
- end
end
diff --git a/spec/moneta/adapter_mongo_with_default_expires_spec.rb b/spec/moneta/adapter_mongo_with_default_expires_spec.rb
index 538de30..7079c95 100644
--- a/spec/moneta/adapter_mongo_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_mongo_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_mongo_with_default_expires" do
end
def new_store
- Moneta::Adapters::Mongo.new(:expires => 1)
+ Moneta::Adapters::Mongo.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_pstore_spec.rb b/spec/moneta/adapter_pstore_spec.rb
index 1c0e39c..4a9fc7c 100644
--- a/spec/moneta/adapter_pstore_spec.rb
+++ b/spec/moneta/adapter_pstore_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_pstore" do
end
def new_store
- Moneta::Adapters::PStore.new(:file => File.join(make_tempdir, "adapter_pstore"))
+ Moneta::Adapters::PStore.new(file: File.join(make_tempdir, "adapter_pstore"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_redis_with_default_expires_spec.rb b/spec/moneta/adapter_redis_with_default_expires_spec.rb
index 9346da5..9f7f8b4 100644
--- a/spec/moneta/adapter_redis_with_default_expires_spec.rb
+++ b/spec/moneta/adapter_redis_with_default_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_redis_with_default_expires" do
end
def new_store
- Moneta::Adapters::Redis.new(:expires => 1)
+ Moneta::Adapters::Redis.new(expires: 1)
end
def load_value(value)
diff --git a/spec/moneta/adapter_restclient_spec.rb b/spec/moneta/adapter_restclient_spec.rb
index d52f392..e4bd3a3 100644
--- a/spec/moneta/adapter_restclient_spec.rb
+++ b/spec/moneta/adapter_restclient_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "adapter_restclient" do
end
def new_store
- Moneta::Adapters::RestClient.new(:url => 'http://localhost:8808/moneta/')
+ Moneta::Adapters::RestClient.new(url: 'http://localhost:8808/moneta/')
end
def load_value(value)
diff --git a/spec/moneta/adapter_sdbm_spec.rb b/spec/moneta/adapter_sdbm_spec.rb
index 4e72692..0a29aff 100644
--- a/spec/moneta/adapter_sdbm_spec.rb
+++ b/spec/moneta/adapter_sdbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_sdbm" do
end
def new_store
- Moneta::Adapters::SDBM.new(:file => File.join(make_tempdir, "adapter_sdbm"))
+ Moneta::Adapters::SDBM.new(file: File.join(make_tempdir, "adapter_sdbm"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_sequel_spec.rb b/spec/moneta/adapter_sequel_spec.rb
index 0f129c4..d70d470 100644
--- a/spec/moneta/adapter_sequel_spec.rb
+++ b/spec/moneta/adapter_sequel_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_sequel" do
end
def new_store
- Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "adapter_sequel")
+ Moneta::Adapters::Sequel.new(db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "adapter_sequel")
end
def load_value(value)
diff --git a/spec/moneta/adapter_sqlite_spec.rb b/spec/moneta/adapter_sqlite_spec.rb
index 5f5c98c..dde47a6 100644
--- a/spec/moneta/adapter_sqlite_spec.rb
+++ b/spec/moneta/adapter_sqlite_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_sqlite" do
end
def new_store
- Moneta::Adapters::Sqlite.new(:file => File.join(make_tempdir, "adapter_sqlite"))
+ Moneta::Adapters::Sqlite.new(file: File.join(make_tempdir, "adapter_sqlite"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_tdb_spec.rb b/spec/moneta/adapter_tdb_spec.rb
index 659e940..33867c3 100644
--- a/spec/moneta/adapter_tdb_spec.rb
+++ b/spec/moneta/adapter_tdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_tdb" do
end
def new_store
- Moneta::Adapters::TDB.new(:file => File.join(make_tempdir, "adapter_tdb"))
+ Moneta::Adapters::TDB.new(file: File.join(make_tempdir, "adapter_tdb"))
end
def load_value(value)
diff --git a/spec/moneta/adapter_tokyocabinet_bdb_spec.rb b/spec/moneta/adapter_tokyocabinet_bdb_spec.rb
index b56cfe0..5052c09 100644
--- a/spec/moneta/adapter_tokyocabinet_bdb_spec.rb
+++ b/spec/moneta/adapter_tokyocabinet_bdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_tokyocabinet_bdb" do
end
def new_store
- Moneta::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_bdb"), :type => :bdb)
+ Moneta::Adapters::TokyoCabinet.new(file: File.join(make_tempdir, "adapter_tokyocabinet_bdb"), type: :bdb)
end
def load_value(value)
diff --git a/spec/moneta/adapter_tokyocabinet_hdb_spec.rb b/spec/moneta/adapter_tokyocabinet_hdb_spec.rb
index 31a9aa8..a5c333d 100644
--- a/spec/moneta/adapter_tokyocabinet_hdb_spec.rb
+++ b/spec/moneta/adapter_tokyocabinet_hdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_tokyocabinet_hdb" do
end
def new_store
- Moneta::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_hdb"), :type => :hdb)
+ Moneta::Adapters::TokyoCabinet.new(file: File.join(make_tempdir, "adapter_tokyocabinet_hdb"), type: :hdb)
end
def load_value(value)
diff --git a/spec/moneta/adapter_yaml_spec.rb b/spec/moneta/adapter_yaml_spec.rb
index f66a6aa..1feb58c 100644
--- a/spec/moneta/adapter_yaml_spec.rb
+++ b/spec/moneta/adapter_yaml_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "adapter_yaml" do
end
def new_store
- Moneta::Adapters::YAML.new(:file => File.join(make_tempdir, "adapter_yaml"))
+ Moneta::Adapters::YAML.new(file: File.join(make_tempdir, "adapter_yaml"))
end
def load_value(value)
diff --git a/spec/moneta/cache_file_memory_spec.rb b/spec/moneta/cache_file_memory_spec.rb
index 476878c..2b532ba 100644
--- a/spec/moneta/cache_file_memory_spec.rb
+++ b/spec/moneta/cache_file_memory_spec.rb
@@ -10,7 +10,7 @@ describe_moneta "cache_file_memory" do
def new_store
Moneta.build do
use(:Cache) do
- adapter { adapter :File, :dir => File.join(make_tempdir, "cache_file_memory") }
+ adapter { adapter :File, dir: File.join(make_tempdir, "cache_file_memory") }
cache { adapter :Memory }
end
end
diff --git a/spec/moneta/expires_file_spec.rb b/spec/moneta/expires_file_spec.rb
index 0b8552c..9557e56 100644
--- a/spec/moneta/expires_file_spec.rb
+++ b/spec/moneta/expires_file_spec.rb
@@ -10,8 +10,8 @@ describe_moneta "expires_file" do
def new_store
Moneta.build do
use :Expires
- use :Transformer, :key => [:marshal, :escape], :value => :marshal
- adapter :File, :dir => File.join(make_tempdir, "expires-file")
+ use :Transformer, key: [:marshal, :escape], value: :marshal
+ adapter :File, dir: File.join(make_tempdir, "expires-file")
end
end
@@ -65,7 +65,7 @@ describe_moneta "expires_file" do
it_should_behave_like 'store_large'
it_should_behave_like 'transform_value_expires'
it 'deletes expired value in underlying file storage' do
- store.store('foo', 'bar', :expires => 2)
+ store.store('foo', 'bar', expires: 2)
store['foo'].should == 'bar'
sleep 1
store['foo'].should == 'bar'
diff --git a/spec/moneta/expires_memory_with_default_expires_spec.rb b/spec/moneta/expires_memory_with_default_expires_spec.rb
index 7aa5a6e..ae3c9d2 100644
--- a/spec/moneta/expires_memory_with_default_expires_spec.rb
+++ b/spec/moneta/expires_memory_with_default_expires_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "expires_memory_with_default_expires" do
def new_store
Moneta.build do
- use :Expires, :expires => 1
+ use :Expires, expires: 1
adapter :Memory
end
end
diff --git a/spec/moneta/mutex_spec.rb b/spec/moneta/mutex_spec.rb
index 183baff..6730c18 100644
--- a/spec/moneta/mutex_spec.rb
+++ b/spec/moneta/mutex_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "mutex" do
end
def new_store
- Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'mutex.log')})
+ Moneta.new(:Memory, logger: {file: File.join(make_tempdir, 'mutex.log')})
end
def load_value(value)
diff --git a/spec/moneta/optionmerger_spec.rb b/spec/moneta/optionmerger_spec.rb
index 71f0c6a..4ace25d 100644
--- a/spec/moneta/optionmerger_spec.rb
+++ b/spec/moneta/optionmerger_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "optionmerger" do
end
def new_store
- Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'optionmerger.log')})
+ Moneta.new(:Memory, logger: {file: File.join(make_tempdir, 'optionmerger.log')})
end
def load_value(value)
@@ -18,13 +18,13 @@ describe_moneta "optionmerger" do
include_context 'setup_store'
it '#with should return OptionMerger' do
- options = {:optionname => :optionvalue}
+ options = {optionname: :optionvalue}
merger = store.with(options)
merger.should be_instance_of(Moneta::OptionMerger)
end
it 'saves default options' do
- options = {:optionname => :optionvalue}
+ options = {optionname: :optionvalue}
merger = store.with(options)
Moneta::OptionMerger::METHODS.each do |method|
merger.default_options[method].should equal(options)
@@ -34,42 +34,42 @@ describe_moneta "optionmerger" do
PREFIX = [['alpha', nil], ['beta', nil], ['alpha', 'beta']]
it 'merges options' do
- merger = store.with(:opt1 => :val1, :opt2 => :val2).with(:opt2 => :overwrite, :opt3 => :val3)
+ merger = store.with(opt1: :val1, opt2: :val2).with(opt2: :overwrite, opt3: :val3)
Moneta::OptionMerger::METHODS.each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3}
end
end
it 'merges options only for some methods' do
PREFIX.each do |(alpha,beta)|
- options = {:opt1 => :val1, :opt2 => :val2, :prefix => alpha}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :only => :clear)
+ options = {opt1: :val1, opt2: :val2, prefix: alpha}
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, only: :clear)
(Moneta::OptionMerger::METHODS - [:clear]).each do |method|
merger.default_options[method].should equal(options)
end
- merger.default_options[:clear].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "#{alpha}#{beta}"}
+ merger.default_options[:clear].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "#{alpha}#{beta}"}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :only => [:load, :store])
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, only: [:load, :store])
(Moneta::OptionMerger::METHODS - [:load, :store]).each do |method|
merger.default_options[method].should equal(options)
end
- merger.default_options[:load].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "#{alpha}#{beta}"}
- merger.default_options[:store].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "#{alpha}#{beta}"}
+ merger.default_options[:load].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "#{alpha}#{beta}"}
+ merger.default_options[:store].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "#{alpha}#{beta}"}
end
end
it 'merges options except for some methods' do
PREFIX.each do |(alpha,beta)|
- options = {:opt1 => :val1, :opt2 => :val2, :prefix => alpha}
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :except => :clear, :prefix => beta)
+ options = {opt1: :val1, opt2: :val2, prefix: alpha}
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, except: :clear, prefix: beta)
(Moneta::OptionMerger::METHODS - [:clear]).each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "#{alpha}#{beta}"}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "#{alpha}#{beta}"}
end
merger.default_options[:clear].should equal(options)
- merger = store.with(options).with(:opt2 => :overwrite, :opt3 => :val3, :prefix => beta, :except => [:load, :store])
+ merger = store.with(options).with(opt2: :overwrite, opt3: :val3, prefix: beta, except: [:load, :store])
(Moneta::OptionMerger::METHODS - [:load, :store]).each do |method|
- merger.default_options[method].should == {:opt1 => :val1, :opt2 => :overwrite, :opt3 => :val3, :prefix => "#{alpha}#{beta}"}
+ merger.default_options[method].should == {opt1: :val1, opt2: :overwrite, opt3: :val3, prefix: "#{alpha}#{beta}"}
end
merger.default_options[:load].should equal(options)
merger.default_options[:store].should equal(options)
@@ -77,29 +77,29 @@ describe_moneta "optionmerger" do
end
it 'has method #raw' do
- store.raw.default_options.should == {:store=>{:raw=>true},:create=>{:raw=>true},:load=>{:raw=>true},:delete=>{:raw=>true}}
+ store.raw.default_options.should == {store:{raw:true},create:{raw:true},load:{raw:true},delete:{raw:true}}
store.raw.should equal(store.raw.raw)
end
it 'has method #expires' do
- store.expires(10).default_options.should == {:store=>{:expires=>10},:create=>{:expires=>10},:increment=>{:expires=>10}}
+ store.expires(10).default_options.should == {store:{expires:10},create:{expires:10},increment:{expires:10}}
end
it 'has method #prefix' do
- store.prefix('a').default_options.should == {:store=>{:prefix=>'a'},:load=>{:prefix=>'a'},:create=>{:prefix=>'a'},
- :delete=>{:prefix=>'a'},:key? => {:prefix=>'a'},:increment=>{:prefix=>'a'}}
+ store.prefix('a').default_options.should == {store:{prefix:'a'},load:{prefix:'a'},create:{prefix:'a'},
+ delete:{prefix:'a'},key?: {prefix:'a'},increment:{prefix:'a'}}
- store.prefix('a').prefix('b').default_options.should == {:store=>{:prefix=>'ab'},:load=>{:prefix=>'ab'},:create=>{:prefix=>'ab'},
- :delete=>{:prefix=>'ab'},:key? => {:prefix=>'ab'},:increment=>{:prefix=>'ab'}}
+ store.prefix('a').prefix('b').default_options.should == {store:{prefix:'ab'},load:{prefix:'ab'},create:{prefix:'ab'},
+ delete:{prefix:'ab'},key?: {prefix:'ab'},increment:{prefix:'ab'}}
- store.raw.prefix('b').default_options.should == {:store=>{:raw=>true,:prefix=>'b'},:load=>{:raw=>true,:prefix=>'b'},:create=>{:raw=>true,:prefix=>'b'},:delete=>{:raw=>true,:prefix=>'b'},:key? => {:prefix=>'b'},:increment=>{:prefix=>'b'}}
+ store.raw.prefix('b').default_options.should == {store:{raw:true,prefix:'b'},load:{raw:true,prefix:'b'},create:{raw:true,prefix:'b'},delete:{raw:true,prefix:'b'},key?: {prefix:'b'},increment:{prefix:'b'}}
- store.prefix('a').raw.default_options.should == {:store=>{:raw=>true,:prefix=>'a'},:load=>{:raw=>true,:prefix=>'a'},:create=>{:raw=>true,:prefix=>'a'},:delete=>{:raw=>true,:prefix=>'a'},:key? => {:prefix=>'a'},:increment=>{:prefix=>'a'}}
+ store.prefix('a').raw.default_options.should == {store:{raw:true,prefix:'a'},load:{raw:true,prefix:'a'},create:{raw:true,prefix:'a'},delete:{raw:true,prefix:'a'},key?: {prefix:'a'},increment:{prefix:'a'}}
end
it 'supports adding proxis using #with' do
- compressed_store = store.with(:prefix => 'compressed') do
- use :Transformer, :value => :zlib
+ compressed_store = store.with(prefix: 'compressed') do
+ use :Transformer, value: :zlib
end
store['key'] = 'uncompressed value'
compressed_store['key'] = 'compressed value'
diff --git a/spec/moneta/pool_spec.rb b/spec/moneta/pool_spec.rb
index 1bce8e9..bee0e47 100644
--- a/spec/moneta/pool_spec.rb
+++ b/spec/moneta/pool_spec.rb
@@ -10,7 +10,7 @@ describe_moneta "pool" do
def new_store
Moneta.build do
use :Pool do
- adapter :File, :dir => File.join(make_tempdir, "pool")
+ adapter :File, dir: File.join(make_tempdir, "pool")
end
end
end
diff --git a/spec/moneta/semaphore_spec.rb b/spec/moneta/semaphore_spec.rb
index c6cb696..c2011dc 100644
--- a/spec/moneta/semaphore_spec.rb
+++ b/spec/moneta/semaphore_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "semaphore" do
end
def new_store
- Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'semaphore.log')})
+ Moneta.new(:Memory, logger: {file: File.join(make_tempdir, 'semaphore.log')})
end
def load_value(value)
diff --git a/spec/moneta/shared_tcp_spec.rb b/spec/moneta/shared_tcp_spec.rb
index cfbfeea..d7c0cdf 100644
--- a/spec/moneta/shared_tcp_spec.rb
+++ b/spec/moneta/shared_tcp_spec.rb
@@ -9,8 +9,8 @@ describe_moneta "shared_tcp" do
def new_store
Moneta.build do
- use(:Shared, :port => 9001) do
- adapter :PStore, :file => File.join(make_tempdir, 'shared_tcp')
+ use(:Shared, port: 9001) do
+ adapter :PStore, file: File.join(make_tempdir, 'shared_tcp')
end
end
end
diff --git a/spec/moneta/shared_unix_spec.rb b/spec/moneta/shared_unix_spec.rb
index f11593f..780a4cc 100644
--- a/spec/moneta/shared_unix_spec.rb
+++ b/spec/moneta/shared_unix_spec.rb
@@ -9,8 +9,8 @@ describe_moneta "shared_unix" do
def new_store
Moneta.build do
- use(:Shared, :socket => File.join(make_tempdir, 'shared_unix.socket')) do
- adapter :PStore, :file => File.join(make_tempdir, 'shared_unix')
+ use(:Shared, socket: File.join(make_tempdir, 'shared_unix.socket')) do
+ adapter :PStore, file: File.join(make_tempdir, 'shared_unix')
end
end
end
diff --git a/spec/moneta/stack_file_memory_spec.rb b/spec/moneta/stack_file_memory_spec.rb
index 66dbb5b..f07b1dc 100644
--- a/spec/moneta/stack_file_memory_spec.rb
+++ b/spec/moneta/stack_file_memory_spec.rb
@@ -12,7 +12,7 @@ describe_moneta "stack_file_memory" do
use(:Stack) do
add(Moneta.new(:Null))
add(Moneta::Adapters::Null.new)
- add { adapter :File, :dir => File.join(make_tempdir, "stack_file_memory") }
+ add { adapter :File, dir: File.join(make_tempdir, "stack_file_memory") }
add { adapter :Memory }
end
end
diff --git a/spec/moneta/stack_memory_file_spec.rb b/spec/moneta/stack_memory_file_spec.rb
index b231c47..c7ce15d 100644
--- a/spec/moneta/stack_memory_file_spec.rb
+++ b/spec/moneta/stack_memory_file_spec.rb
@@ -11,7 +11,7 @@ describe_moneta "stack_memory_file" do
Moneta.build do
use(:Stack) do
add { adapter :Memory }
- add { adapter :File, :dir => File.join(make_tempdir, "stack_memory_file") }
+ add { adapter :File, dir: File.join(make_tempdir, "stack_memory_file") }
end
end
end
diff --git a/spec/moneta/standard_activerecord_spec.rb b/spec/moneta/standard_activerecord_spec.rb
index 43a1c37..2f73687 100644
--- a/spec/moneta/standard_activerecord_spec.rb
+++ b/spec/moneta/standard_activerecord_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_activerecord" do
end
def new_store
- Moneta.new(:ActiveRecord, :table => 'standard_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :logger => {:file => File.join(make_tempdir, 'standard_activerecord.log')})
+ Moneta.new(:ActiveRecord, table: 'standard_activerecord', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' }, logger: {file: File.join(make_tempdir, 'standard_activerecord.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_activerecord_with_expires_spec.rb b/spec/moneta/standard_activerecord_with_expires_spec.rb
index e9061bd..3d71c0f 100644
--- a/spec/moneta/standard_activerecord_with_expires_spec.rb
+++ b/spec/moneta/standard_activerecord_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_activerecord_with_expires" do
end
def new_store
- Moneta.new(:ActiveRecord, :table => 'standard_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_activerecord_with_expires.log')})
+ Moneta.new(:ActiveRecord, table: 'standard_activerecord_with_expires', connection: { adapter: (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), database: 'moneta', username: 'root' }, expires: true, logger: {file: File.join(make_tempdir, 'standard_activerecord_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_cassandra_spec.rb b/spec/moneta/standard_cassandra_spec.rb
index eda6071..70c0068 100644
--- a/spec/moneta/standard_cassandra_spec.rb
+++ b/spec/moneta/standard_cassandra_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_cassandra" do
end
def new_store
- Moneta.new(:Cassandra, :keyspace => "simple_cassandra", :logger => {:file => File.join(make_tempdir, 'standard_cassandra.log')})
+ Moneta.new(:Cassandra, keyspace: "simple_cassandra", logger: {file: File.join(make_tempdir, 'standard_cassandra.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_client_tcp_spec.rb b/spec/moneta/standard_client_tcp_spec.rb
index 07077a3..5716602 100644
--- a/spec/moneta/standard_client_tcp_spec.rb
+++ b/spec/moneta/standard_client_tcp_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "standard_client_tcp" do
end
def new_store
- Moneta.new(:Client, :logger => {:file => File.join(make_tempdir, 'standard_client_tcp.log')})
+ Moneta.new(:Client, logger: {file: File.join(make_tempdir, 'standard_client_tcp.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_client_unix_spec.rb b/spec/moneta/standard_client_unix_spec.rb
index 987edfe..596bb7f 100644
--- a/spec/moneta/standard_client_unix_spec.rb
+++ b/spec/moneta/standard_client_unix_spec.rb
@@ -3,13 +3,13 @@
require 'helper'
describe_moneta "standard_client_unix" do
- start_server(Moneta::Adapters::Memory.new, :socket => File.join(make_tempdir, 'standard_client_unix'))
+ start_server(Moneta::Adapters::Memory.new, socket: File.join(make_tempdir, 'standard_client_unix'))
def features
[:create, :increment]
end
def new_store
- Moneta.new(:Client, :socket => File.join(make_tempdir, 'standard_client_unix'), :logger => {:file => File.join(make_tempdir, 'standard_client_unix.log')})
+ Moneta.new(:Client, socket: File.join(make_tempdir, 'standard_client_unix'), logger: {file: File.join(make_tempdir, 'standard_client_unix.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_couch_spec.rb b/spec/moneta/standard_couch_spec.rb
index 782e4c8..1ba9f98 100644
--- a/spec/moneta/standard_couch_spec.rb
+++ b/spec/moneta/standard_couch_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_couch" do
end
def new_store
- Moneta.new(:Couch, :db => 'standard_couch', :logger => {:file => File.join(make_tempdir, 'standard_couch.log')})
+ Moneta.new(:Couch, db: 'standard_couch', logger: {file: File.join(make_tempdir, 'standard_couch.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_couch_with_expires_spec.rb b/spec/moneta/standard_couch_with_expires_spec.rb
index 1e0df01..b8dbfd9 100644
--- a/spec/moneta/standard_couch_with_expires_spec.rb
+++ b/spec/moneta/standard_couch_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_couch_with_expires" do
end
def new_store
- Moneta.new(:Couch, :db => 'standard_couch_with_expires', :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_couch_with_expires.log')})
+ Moneta.new(:Couch, db: 'standard_couch_with_expires', expires: true, logger: {file: File.join(make_tempdir, 'standard_couch_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_datamapper_spec.rb b/spec/moneta/standard_datamapper_spec.rb
index 1df1c07..3d06cef 100644
--- a/spec/moneta/standard_datamapper_spec.rb
+++ b/spec/moneta/standard_datamapper_spec.rb
@@ -4,13 +4,13 @@ require 'helper'
describe_moneta "standard_datamapper" do
require 'dm-core'
- DataMapper.setup(:default, :adapter => :in_memory)
+ DataMapper.setup(:default, adapter: :in_memory)
def features
[:create]
end
def new_store
- Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper", :logger => {:file => File.join(make_tempdir, 'standard_datamapper.log')})
+ Moneta.new(:DataMapper, setup: "mysql://root:@localhost/moneta", table: "simple_datamapper", logger: {file: File.join(make_tempdir, 'standard_datamapper.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_datamapper_with_expires_spec.rb b/spec/moneta/standard_datamapper_with_expires_spec.rb
index 3aaca7c..987495d 100644
--- a/spec/moneta/standard_datamapper_with_expires_spec.rb
+++ b/spec/moneta/standard_datamapper_with_expires_spec.rb
@@ -4,13 +4,13 @@ require 'helper'
describe_moneta "standard_datamapper_with_expires" do
require 'dm-core'
- DataMapper.setup(:default, :adapter => :in_memory)
+ DataMapper.setup(:default, adapter: :in_memory)
def features
[:create, :expires]
end
def new_store
- Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_datamapper_with_expires.log')})
+ Moneta.new(:DataMapper, setup: "mysql://root:@localhost/moneta", table: "simple_datamapper_with_expires", expires: true, logger: {file: File.join(make_tempdir, 'standard_datamapper_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_datamapper_with_repository_spec.rb b/spec/moneta/standard_datamapper_with_repository_spec.rb
index 8b91013..d3197c7 100644
--- a/spec/moneta/standard_datamapper_with_repository_spec.rb
+++ b/spec/moneta/standard_datamapper_with_repository_spec.rb
@@ -4,13 +4,13 @@ require 'helper'
describe_moneta "standard_datamapper_with_repository" do
require 'dm-core'
- DataMapper.setup(:default, :adapter => :in_memory)
+ DataMapper.setup(:default, adapter: :in_memory)
def features
[:create]
end
def new_store
- Moneta.new(:DataMapper, :repository => :repo, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_repository", :logger => {:file => File.join(make_tempdir, 'standard_datamapper_with_repository.log')})
+ Moneta.new(:DataMapper, repository: :repo, setup: "mysql://root:@localhost/moneta", table: "simple_datamapper_with_repository", logger: {file: File.join(make_tempdir, 'standard_datamapper_with_repository.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_daybreak_spec.rb b/spec/moneta/standard_daybreak_spec.rb
index 0db8559..61e93e9 100644
--- a/spec/moneta/standard_daybreak_spec.rb
+++ b/spec/moneta/standard_daybreak_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_daybreak" do
end
def new_store
- Moneta.new(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak"), :logger => {:file => File.join(make_tempdir, 'standard_daybreak.log')})
+ Moneta.new(:Daybreak, file: File.join(make_tempdir, "simple_daybreak"), logger: {file: File.join(make_tempdir, 'standard_daybreak.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_daybreak_with_expires_spec.rb b/spec/moneta/standard_daybreak_with_expires_spec.rb
index 5cc3d70..f0e7b43 100644
--- a/spec/moneta/standard_daybreak_with_expires_spec.rb
+++ b/spec/moneta/standard_daybreak_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_daybreak_with_expires" do
end
def new_store
- Moneta.new(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_daybreak_with_expires.log')})
+ Moneta.new(:Daybreak, file: File.join(make_tempdir, "simple_daybreak_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_daybreak_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_dbm_spec.rb b/spec/moneta/standard_dbm_spec.rb
index 3194ea0..688af81 100644
--- a/spec/moneta/standard_dbm_spec.rb
+++ b/spec/moneta/standard_dbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_dbm" do
end
def new_store
- Moneta.new(:DBM, :file => File.join(make_tempdir, "simple_dbm"), :logger => {:file => File.join(make_tempdir, 'standard_dbm.log')})
+ Moneta.new(:DBM, file: File.join(make_tempdir, "simple_dbm"), logger: {file: File.join(make_tempdir, 'standard_dbm.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_dbm_with_expires_spec.rb b/spec/moneta/standard_dbm_with_expires_spec.rb
index 5edd593..a2b97e5 100644
--- a/spec/moneta/standard_dbm_with_expires_spec.rb
+++ b/spec/moneta/standard_dbm_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_dbm_with_expires" do
end
def new_store
- Moneta.new(:DBM, :file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_dbm_with_expires.log')})
+ Moneta.new(:DBM, file: File.join(make_tempdir, "simple_dbm_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_dbm_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_file_spec.rb b/spec/moneta/standard_file_spec.rb
index 1d67339..6dd737d 100644
--- a/spec/moneta/standard_file_spec.rb
+++ b/spec/moneta/standard_file_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_file" do
end
def new_store
- Moneta.new(:File, :dir => File.join(make_tempdir, "simple_file"), :logger => {:file => File.join(make_tempdir, 'standard_file.log')})
+ Moneta.new(:File, dir: File.join(make_tempdir, "simple_file"), logger: {file: File.join(make_tempdir, 'standard_file.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_file_with_expires_spec.rb b/spec/moneta/standard_file_with_expires_spec.rb
index 16400f3..b7b23f6 100644
--- a/spec/moneta/standard_file_with_expires_spec.rb
+++ b/spec/moneta/standard_file_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_file_with_expires" do
end
def new_store
- Moneta.new(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_file_with_expires.log')})
+ Moneta.new(:File, dir: File.join(make_tempdir, "simple_file_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_file_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_fog_spec.rb b/spec/moneta/standard_fog_spec.rb
index c114eb9..1a6a69a 100644
--- a/spec/moneta/standard_fog_spec.rb
+++ b/spec/moneta/standard_fog_spec.rb
@@ -10,10 +10,10 @@ describe_moneta "standard_fog" do
end
def new_store
- Moneta.new(:Fog, :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'standard_fog', :logger => {:file => File.join(make_tempdir, 'standard_fog.log')})
+ Moneta.new(:Fog, aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'standard_fog', logger: {file: File.join(make_tempdir, 'standard_fog.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_fog_with_expires_spec.rb b/spec/moneta/standard_fog_with_expires_spec.rb
index 8748468..8f0ef2f 100644
--- a/spec/moneta/standard_fog_with_expires_spec.rb
+++ b/spec/moneta/standard_fog_with_expires_spec.rb
@@ -10,11 +10,11 @@ describe_moneta "standard_fog_with_expires" do
end
def new_store
- Moneta.new(:Fog, :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'standard_fog_with_expires',
- :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_fog_with_expires.log')})
+ Moneta.new(:Fog, aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'standard_fog_with_expires',
+ expires: true, logger: {file: File.join(make_tempdir, 'standard_fog_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_gdbm_spec.rb b/spec/moneta/standard_gdbm_spec.rb
index f6edc95..c43fab1 100644
--- a/spec/moneta/standard_gdbm_spec.rb
+++ b/spec/moneta/standard_gdbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_gdbm" do
end
def new_store
- Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm"), :logger => {:file => File.join(make_tempdir, 'standard_gdbm.log')})
+ Moneta.new(:GDBM, file: File.join(make_tempdir, "simple_gdbm"), logger: {file: File.join(make_tempdir, 'standard_gdbm.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_gdbm_with_expires_spec.rb b/spec/moneta/standard_gdbm_with_expires_spec.rb
index 3c0ca38..9e2c45b 100644
--- a/spec/moneta/standard_gdbm_with_expires_spec.rb
+++ b/spec/moneta/standard_gdbm_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_gdbm_with_expires" do
end
def new_store
- Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_gdbm_with_expires.log')})
+ Moneta.new(:GDBM, file: File.join(make_tempdir, "simple_gdbm_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_gdbm_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_hashfile_spec.rb b/spec/moneta/standard_hashfile_spec.rb
index 7d463cf..f5ad2fc 100644
--- a/spec/moneta/standard_hashfile_spec.rb
+++ b/spec/moneta/standard_hashfile_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_hashfile" do
end
def new_store
- Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile"), :logger => {:file => File.join(make_tempdir, 'standard_hashfile.log')})
+ Moneta.new(:HashFile, dir: File.join(make_tempdir, "simple_hashfile"), logger: {file: File.join(make_tempdir, 'standard_hashfile.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_hashfile_with_expires_spec.rb b/spec/moneta/standard_hashfile_with_expires_spec.rb
index 624b45f..01fb439 100644
--- a/spec/moneta/standard_hashfile_with_expires_spec.rb
+++ b/spec/moneta/standard_hashfile_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_hashfile_with_expires" do
end
def new_store
- Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_hashfile_with_expires.log')})
+ Moneta.new(:HashFile, dir: File.join(make_tempdir, "simple_hashfile_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_hashfile_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_hbase_spec.rb b/spec/moneta/standard_hbase_spec.rb
index 9d55845..9266159 100644
--- a/spec/moneta/standard_hbase_spec.rb
+++ b/spec/moneta/standard_hbase_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_hbase" do
end
def new_store
- Moneta.new(:HBase, :table => "simple_hbase", :logger => {:file => File.join(make_tempdir, 'standard_hbase.log')})
+ Moneta.new(:HBase, table: "simple_hbase", logger: {file: File.join(make_tempdir, 'standard_hbase.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_hbase_with_expires_spec.rb b/spec/moneta/standard_hbase_with_expires_spec.rb
index 1c66aec..b5960ea 100644
--- a/spec/moneta/standard_hbase_with_expires_spec.rb
+++ b/spec/moneta/standard_hbase_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_hbase_with_expires" do
end
def new_store
- Moneta.new(:HBase, :table => "simple_hbase", :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_hbase_with_expires.log')})
+ Moneta.new(:HBase, table: "simple_hbase", expires: true, logger: {file: File.join(make_tempdir, 'standard_hbase_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_kyotocabinet_spec.rb b/spec/moneta/standard_kyotocabinet_spec.rb
index 4d89815..6eb6098 100644
--- a/spec/moneta/standard_kyotocabinet_spec.rb
+++ b/spec/moneta/standard_kyotocabinet_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_kyotocabinet" do
end
def new_store
- Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet.kch"), :logger => {:file => File.join(make_tempdir, 'standard_kyotocabinet.log')})
+ Moneta.new(:KyotoCabinet, file: File.join(make_tempdir, "simple_kyotocabinet.kch"), logger: {file: File.join(make_tempdir, 'standard_kyotocabinet.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_kyotocabinet_with_expires_spec.rb b/spec/moneta/standard_kyotocabinet_with_expires_spec.rb
index d57d05d..99108a7 100644
--- a/spec/moneta/standard_kyotocabinet_with_expires_spec.rb
+++ b/spec/moneta/standard_kyotocabinet_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_kyotocabinet_with_expires" do
end
def new_store
- Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_kyotocabinet_with_expires.log')})
+ Moneta.new(:KyotoCabinet, file: File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), expires: true, logger: {file: File.join(make_tempdir, 'standard_kyotocabinet_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_leveldb_spec.rb b/spec/moneta/standard_leveldb_spec.rb
index 744d402..09489b3 100644
--- a/spec/moneta/standard_leveldb_spec.rb
+++ b/spec/moneta/standard_leveldb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_leveldb" do
end
def new_store
- Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb"), :logger => {:file => File.join(make_tempdir, 'standard_leveldb.log')})
+ Moneta.new(:LevelDB, dir: File.join(make_tempdir, "simple_leveldb"), logger: {file: File.join(make_tempdir, 'standard_leveldb.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_leveldb_with_expires_spec.rb b/spec/moneta/standard_leveldb_with_expires_spec.rb
index 93812e8..eaa1d2a 100644
--- a/spec/moneta/standard_leveldb_with_expires_spec.rb
+++ b/spec/moneta/standard_leveldb_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_leveldb_with_expires" do
end
def new_store
- Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_leveldb_with_expires.log')})
+ Moneta.new(:LevelDB, dir: File.join(make_tempdir, "simple_leveldb_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_leveldb_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_lmdb_spec.rb b/spec/moneta/standard_lmdb_spec.rb
index bd36022..32ee786 100644
--- a/spec/moneta/standard_lmdb_spec.rb
+++ b/spec/moneta/standard_lmdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_lmdb" do
end
def new_store
- Moneta.new(:LMDB, :dir => File.join(make_tempdir, "simple_lmdb"), :logger => {:file => File.join(make_tempdir, 'standard_lmdb.log')})
+ Moneta.new(:LMDB, dir: File.join(make_tempdir, "simple_lmdb"), logger: {file: File.join(make_tempdir, 'standard_lmdb.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_lmdb_with_expires_spec.rb b/spec/moneta/standard_lmdb_with_expires_spec.rb
index dd0454d..da4251e 100644
--- a/spec/moneta/standard_lmdb_with_expires_spec.rb
+++ b/spec/moneta/standard_lmdb_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_lmdb_with_expires" do
end
def new_store
- Moneta.new(:LMDB, :dir => File.join(make_tempdir, "simple_lmdb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_lmdb_with_expires.log')})
+ Moneta.new(:LMDB, dir: File.join(make_tempdir, "simple_lmdb_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_lmdb_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_localmemcache_spec.rb b/spec/moneta/standard_localmemcache_spec.rb
index 888246a..2d1815f 100644
--- a/spec/moneta/standard_localmemcache_spec.rb
+++ b/spec/moneta/standard_localmemcache_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_localmemcache" do
end
def new_store
- Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache"), :logger => {:file => File.join(make_tempdir, 'standard_localmemcache.log')})
+ Moneta.new(:LocalMemCache, file: File.join(make_tempdir, "simple_localmemcache"), logger: {file: File.join(make_tempdir, 'standard_localmemcache.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_localmemcache_with_expires_spec.rb b/spec/moneta/standard_localmemcache_with_expires_spec.rb
index c431c3a..581b1ae 100644
--- a/spec/moneta/standard_localmemcache_with_expires_spec.rb
+++ b/spec/moneta/standard_localmemcache_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_localmemcache_with_expires" do
end
def new_store
- Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_localmemcache_with_expires.log')})
+ Moneta.new(:LocalMemCache, file: File.join(make_tempdir, "simple_localmemcache_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_localmemcache_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_lruhash_spec.rb b/spec/moneta/standard_lruhash_spec.rb
index c719f39..f4071ce 100644
--- a/spec/moneta/standard_lruhash_spec.rb
+++ b/spec/moneta/standard_lruhash_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_lruhash" do
end
def new_store
- Moneta.new(:LRUHash, :logger => {:file => File.join(make_tempdir, 'standard_lruhash.log')})
+ Moneta.new(:LRUHash, logger: {file: File.join(make_tempdir, 'standard_lruhash.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_lruhash_with_expires_spec.rb b/spec/moneta/standard_lruhash_with_expires_spec.rb
index 60cab04..a2282a3 100644
--- a/spec/moneta/standard_lruhash_with_expires_spec.rb
+++ b/spec/moneta/standard_lruhash_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_lruhash_with_expires" do
end
def new_store
- Moneta.new(:LRUHash, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_lruhash_with_expires.log')})
+ Moneta.new(:LRUHash, expires: true, logger: {file: File.join(make_tempdir, 'standard_lruhash_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memcached_dalli_spec.rb b/spec/moneta/standard_memcached_dalli_spec.rb
index b4e6135..739c8fc 100644
--- a/spec/moneta/standard_memcached_dalli_spec.rb
+++ b/spec/moneta/standard_memcached_dalli_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached_dalli" do
end
def new_store
- Moneta.new(:MemcachedDalli, :namespace => "simple_memcached_dalli", :logger => {:file => File.join(make_tempdir, 'standard_memcached_dalli.log')})
+ Moneta.new(:MemcachedDalli, namespace: "simple_memcached_dalli", logger: {file: File.join(make_tempdir, 'standard_memcached_dalli.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memcached_native_spec.rb b/spec/moneta/standard_memcached_native_spec.rb
index 760635e..06abd83 100644
--- a/spec/moneta/standard_memcached_native_spec.rb
+++ b/spec/moneta/standard_memcached_native_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached_native" do
end
def new_store
- Moneta.new(:MemcachedNative, :namespace => "simple_memcached_native", :logger => {:file => File.join(make_tempdir, 'standard_memcached_native.log')})
+ Moneta.new(:MemcachedNative, namespace: "simple_memcached_native", logger: {file: File.join(make_tempdir, 'standard_memcached_native.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memcached_spec.rb b/spec/moneta/standard_memcached_spec.rb
index 6d05914..561b615 100644
--- a/spec/moneta/standard_memcached_spec.rb
+++ b/spec/moneta/standard_memcached_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached" do
end
def new_store
- Moneta.new(:Memcached, :namespace => "simple_memcached", :logger => {:file => File.join(make_tempdir, 'standard_memcached.log')})
+ Moneta.new(:Memcached, namespace: "simple_memcached", logger: {file: File.join(make_tempdir, 'standard_memcached.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_spec.rb b/spec/moneta/standard_memory_spec.rb
index f6a999f..df8935f 100644
--- a/spec/moneta/standard_memory_spec.rb
+++ b/spec/moneta/standard_memory_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory" do
end
def new_store
- Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'standard_memory.log')})
+ Moneta.new(:Memory, logger: {file: File.join(make_tempdir, 'standard_memory.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_compress_spec.rb b/spec/moneta/standard_memory_with_compress_spec.rb
index cabd360..fe4a0cb 100644
--- a/spec/moneta/standard_memory_with_compress_spec.rb
+++ b/spec/moneta/standard_memory_with_compress_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_compress" do
end
def new_store
- Moneta.new(:Memory, :compress => true, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_compress.log')})
+ Moneta.new(:Memory, compress: true, logger: {file: File.join(make_tempdir, 'standard_memory_with_compress.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_expires_spec.rb b/spec/moneta/standard_memory_with_expires_spec.rb
index b47831e..1676c66 100644
--- a/spec/moneta/standard_memory_with_expires_spec.rb
+++ b/spec/moneta/standard_memory_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_expires" do
end
def new_store
- Moneta.new(:Memory, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_expires.log')})
+ Moneta.new(:Memory, expires: true, logger: {file: File.join(make_tempdir, 'standard_memory_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_json_key_serializer_spec.rb b/spec/moneta/standard_memory_with_json_key_serializer_spec.rb
index 3d368bd..acd57e0 100644
--- a/spec/moneta/standard_memory_with_json_key_serializer_spec.rb
+++ b/spec/moneta/standard_memory_with_json_key_serializer_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_key_serializer" do
end
def new_store
- Moneta.new(:Memory, :key_serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_key_serializer.log')})
+ Moneta.new(:Memory, key_serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_key_serializer.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_json_serializer_spec.rb b/spec/moneta/standard_memory_with_json_serializer_spec.rb
index 00b65bd..6d0ca03 100644
--- a/spec/moneta/standard_memory_with_json_serializer_spec.rb
+++ b/spec/moneta/standard_memory_with_json_serializer_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_serializer" do
end
def new_store
- Moneta.new(:Memory, :serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_serializer.log')})
+ Moneta.new(:Memory, serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_serializer.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_json_value_serializer_spec.rb b/spec/moneta/standard_memory_with_json_value_serializer_spec.rb
index cb5bc32..c7e1708 100644
--- a/spec/moneta/standard_memory_with_json_value_serializer_spec.rb
+++ b/spec/moneta/standard_memory_with_json_value_serializer_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_value_serializer" do
end
def new_store
- Moneta.new(:Memory, :value_serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_value_serializer.log')})
+ Moneta.new(:Memory, value_serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_value_serializer.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_prefix_spec.rb b/spec/moneta/standard_memory_with_prefix_spec.rb
index 39b76c5..29ec856 100644
--- a/spec/moneta/standard_memory_with_prefix_spec.rb
+++ b/spec/moneta/standard_memory_with_prefix_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_prefix" do
end
def new_store
- Moneta.new(:Memory, :prefix => "moneta", :logger => {:file => File.join(make_tempdir, 'standard_memory_with_prefix.log')})
+ Moneta.new(:Memory, prefix: "moneta", logger: {file: File.join(make_tempdir, 'standard_memory_with_prefix.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memory_with_snappy_compress_spec.rb b/spec/moneta/standard_memory_with_snappy_compress_spec.rb
index 24c6ffb..c483ded 100644
--- a/spec/moneta/standard_memory_with_snappy_compress_spec.rb
+++ b/spec/moneta/standard_memory_with_snappy_compress_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_snappy_compress" do
end
def new_store
- Moneta.new(:Memory, :compress => :snappy, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_snappy_compress.log')})
+ Moneta.new(:Memory, compress: :snappy, logger: {file: File.join(make_tempdir, 'standard_memory_with_snappy_compress.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_redis_spec.rb b/spec/moneta/standard_mongo_moped_spec.rb
similarity index 98%
copy from spec/moneta/standard_redis_spec.rb
copy to spec/moneta/standard_mongo_moped_spec.rb
index 9ada241..8ecdc04 100644
--- a/spec/moneta/standard_redis_spec.rb
+++ b/spec/moneta/standard_mongo_moped_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "standard_redis" do
+describe_moneta "standard_mongo_moped" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta.new(:Redis, :logger => {:file => File.join(make_tempdir, 'standard_redis.log')})
+ Moneta.new(:MongoMoped, db: 'standard_mongo_moped', logger: {file: File.join(make_tempdir, 'standard_mongo_moped.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_memcached_spec.rb b/spec/moneta/standard_mongo_official_spec.rb
similarity index 98%
copy from spec/moneta/standard_memcached_spec.rb
copy to spec/moneta/standard_mongo_official_spec.rb
index 6d05914..6d1483a 100644
--- a/spec/moneta/standard_memcached_spec.rb
+++ b/spec/moneta/standard_mongo_official_spec.rb
@@ -2,13 +2,13 @@
# Generated by generate-specs
require 'helper'
-describe_moneta "standard_memcached" do
+describe_moneta "standard_mongo_official" do
def features
[:create, :expires, :increment]
end
def new_store
- Moneta.new(:Memcached, :namespace => "simple_memcached", :logger => {:file => File.join(make_tempdir, 'standard_memcached.log')})
+ Moneta.new(:MongoOfficial, db: 'standard_mongo_official', logger: {file: File.join(make_tempdir, 'standard_mongo_official.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_mongo_spec.rb b/spec/moneta/standard_mongo_spec.rb
index cb7e970..e3cdfa4 100644
--- a/spec/moneta/standard_mongo_spec.rb
+++ b/spec/moneta/standard_mongo_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_mongo" do
end
def new_store
- Moneta.new(:Mongo, :db => 'standard_mongo', :logger => {:file => File.join(make_tempdir, 'standard_mongo.log')})
+ Moneta.new(:Mongo, db: 'standard_mongo', logger: {file: File.join(make_tempdir, 'standard_mongo.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_null_spec.rb b/spec/moneta/standard_null_spec.rb
index 7a130f2..eca59f3 100644
--- a/spec/moneta/standard_null_spec.rb
+++ b/spec/moneta/standard_null_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_null" do
end
def new_store
- Moneta.new(:Null, :logger => {:file => File.join(make_tempdir, 'standard_null.log')})
+ Moneta.new(:Null, logger: {file: File.join(make_tempdir, 'standard_null.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_pstore_spec.rb b/spec/moneta/standard_pstore_spec.rb
index c8b54fc..f179906 100644
--- a/spec/moneta/standard_pstore_spec.rb
+++ b/spec/moneta/standard_pstore_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_pstore" do
end
def new_store
- Moneta.new(:PStore, :file => File.join(make_tempdir, "simple_pstore"), :logger => {:file => File.join(make_tempdir, 'standard_pstore.log')})
+ Moneta.new(:PStore, file: File.join(make_tempdir, "simple_pstore"), logger: {file: File.join(make_tempdir, 'standard_pstore.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_pstore_with_expires_spec.rb b/spec/moneta/standard_pstore_with_expires_spec.rb
index a7e4e5f..cd4f4d4 100644
--- a/spec/moneta/standard_pstore_with_expires_spec.rb
+++ b/spec/moneta/standard_pstore_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_pstore_with_expires" do
end
def new_store
- Moneta.new(:PStore, :file => File.join(make_tempdir, "simple_pstore_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_pstore_with_expires.log')})
+ Moneta.new(:PStore, file: File.join(make_tempdir, "simple_pstore_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_pstore_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_redis_spec.rb b/spec/moneta/standard_redis_spec.rb
index 9ada241..1aa304c 100644
--- a/spec/moneta/standard_redis_spec.rb
+++ b/spec/moneta/standard_redis_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_redis" do
end
def new_store
- Moneta.new(:Redis, :logger => {:file => File.join(make_tempdir, 'standard_redis.log')})
+ Moneta.new(:Redis, logger: {file: File.join(make_tempdir, 'standard_redis.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_restclient_spec.rb b/spec/moneta/standard_restclient_spec.rb
index 5f17b54..a2593ec 100644
--- a/spec/moneta/standard_restclient_spec.rb
+++ b/spec/moneta/standard_restclient_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "standard_restclient" do
end
def new_store
- Moneta.new(:RestClient, :url => 'http://localhost:8808/moneta/', :logger => {:file => File.join(make_tempdir, 'standard_restclient.log')})
+ Moneta.new(:RestClient, url: 'http://localhost:8808/moneta/', logger: {file: File.join(make_tempdir, 'standard_restclient.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_riak_spec.rb b/spec/moneta/standard_riak_spec.rb
index 398b2c1..1ff7218 100644
--- a/spec/moneta/standard_riak_spec.rb
+++ b/spec/moneta/standard_riak_spec.rb
@@ -12,7 +12,7 @@ describe_moneta "standard_riak" do
end
def new_store
- Moneta.new(:Riak, :bucket => 'standard_riak', :logger => {:file => File.join(make_tempdir, 'standard_riak.log')})
+ Moneta.new(:Riak, bucket: 'standard_riak', logger: {file: File.join(make_tempdir, 'standard_riak.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_riak_with_expires_spec.rb b/spec/moneta/standard_riak_with_expires_spec.rb
index 898988b..65dddd4 100644
--- a/spec/moneta/standard_riak_with_expires_spec.rb
+++ b/spec/moneta/standard_riak_with_expires_spec.rb
@@ -12,7 +12,7 @@ describe_moneta "standard_riak_with_expires" do
end
def new_store
- Moneta.new(:Riak, :bucket => 'standard_riak_with_expires', :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_riak_with_expires.log')})
+ Moneta.new(:Riak, bucket: 'standard_riak_with_expires', expires: true, logger: {file: File.join(make_tempdir, 'standard_riak_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sdbm_spec.rb b/spec/moneta/standard_sdbm_spec.rb
index 24ca102..84b7cde 100644
--- a/spec/moneta/standard_sdbm_spec.rb
+++ b/spec/moneta/standard_sdbm_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sdbm" do
end
def new_store
- Moneta.new(:SDBM, :file => File.join(make_tempdir, "simple_sdbm"), :logger => {:file => File.join(make_tempdir, 'standard_sdbm.log')})
+ Moneta.new(:SDBM, file: File.join(make_tempdir, "simple_sdbm"), logger: {file: File.join(make_tempdir, 'standard_sdbm.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sdbm_with_expires_spec.rb b/spec/moneta/standard_sdbm_with_expires_spec.rb
index 0e28081..d1cad6e 100644
--- a/spec/moneta/standard_sdbm_with_expires_spec.rb
+++ b/spec/moneta/standard_sdbm_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sdbm_with_expires" do
end
def new_store
- Moneta.new(:SDBM, :file => File.join(make_tempdir, "simple_sdbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_sdbm_with_expires.log')})
+ Moneta.new(:SDBM, file: File.join(make_tempdir, "simple_sdbm_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_sdbm_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sequel_spec.rb b/spec/moneta/standard_sequel_spec.rb
index adaf6dc..b9a253e 100644
--- a/spec/moneta/standard_sequel_spec.rb
+++ b/spec/moneta/standard_sequel_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sequel" do
end
def new_store
- Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel", :logger => {:file => File.join(make_tempdir, 'standard_sequel.log')})
+ Moneta.new(:Sequel, db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "simple_sequel", logger: {file: File.join(make_tempdir, 'standard_sequel.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sequel_with_expires_spec.rb b/spec/moneta/standard_sequel_with_expires_spec.rb
index a090d55..ffd2ce7 100644
--- a/spec/moneta/standard_sequel_with_expires_spec.rb
+++ b/spec/moneta/standard_sequel_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sequel_with_expires" do
end
def new_store
- Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_sequel_with_expires.log')})
+ Moneta.new(:Sequel, db: (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), table: "simple_sequel_with_expires", expires: true, logger: {file: File.join(make_tempdir, 'standard_sequel_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sqlite_spec.rb b/spec/moneta/standard_sqlite_spec.rb
index 04d118a..7c8de61 100644
--- a/spec/moneta/standard_sqlite_spec.rb
+++ b/spec/moneta/standard_sqlite_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sqlite" do
end
def new_store
- Moneta.new(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite"), :logger => {:file => File.join(make_tempdir, 'standard_sqlite.log')})
+ Moneta.new(:Sqlite, file: File.join(make_tempdir, "simple_sqlite"), logger: {file: File.join(make_tempdir, 'standard_sqlite.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_sqlite_with_expires_spec.rb b/spec/moneta/standard_sqlite_with_expires_spec.rb
index 9eb1439..23b9aed 100644
--- a/spec/moneta/standard_sqlite_with_expires_spec.rb
+++ b/spec/moneta/standard_sqlite_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_sqlite_with_expires" do
end
def new_store
- Moneta.new(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_sqlite_with_expires.log')})
+ Moneta.new(:Sqlite, file: File.join(make_tempdir, "simple_sqlite_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_sqlite_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tdb_spec.rb b/spec/moneta/standard_tdb_spec.rb
index 335c35d..5450ab0 100644
--- a/spec/moneta/standard_tdb_spec.rb
+++ b/spec/moneta/standard_tdb_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tdb" do
end
def new_store
- Moneta.new(:TDB, :file => File.join(make_tempdir, "simple_tdb"), :logger => {:file => File.join(make_tempdir, 'standard_tdb.log')})
+ Moneta.new(:TDB, file: File.join(make_tempdir, "simple_tdb"), logger: {file: File.join(make_tempdir, 'standard_tdb.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tdb_with_expires_spec.rb b/spec/moneta/standard_tdb_with_expires_spec.rb
index 45300a4..2321c6b 100644
--- a/spec/moneta/standard_tdb_with_expires_spec.rb
+++ b/spec/moneta/standard_tdb_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tdb_with_expires" do
end
def new_store
- Moneta.new(:TDB, :file => File.join(make_tempdir, "simple_tdb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_tdb_with_expires.log')})
+ Moneta.new(:TDB, file: File.join(make_tempdir, "simple_tdb_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_tdb_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tokyocabinet_spec.rb b/spec/moneta/standard_tokyocabinet_spec.rb
index 1e93a18..4882e43 100644
--- a/spec/moneta/standard_tokyocabinet_spec.rb
+++ b/spec/moneta/standard_tokyocabinet_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tokyocabinet" do
end
def new_store
- Moneta.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet"), :logger => {:file => File.join(make_tempdir, 'standard_tokyocabinet.log')})
+ Moneta.new(:TokyoCabinet, file: File.join(make_tempdir, "simple_tokyocabinet"), logger: {file: File.join(make_tempdir, 'standard_tokyocabinet.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tokyocabinet_with_expires_spec.rb b/spec/moneta/standard_tokyocabinet_with_expires_spec.rb
index 192c406..866e32f 100644
--- a/spec/moneta/standard_tokyocabinet_with_expires_spec.rb
+++ b/spec/moneta/standard_tokyocabinet_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tokyocabinet_with_expires" do
end
def new_store
- Moneta.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_tokyocabinet_with_expires.log')})
+ Moneta.new(:TokyoCabinet, file: File.join(make_tempdir, "simple_tokyocabinet_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_tokyocabinet_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tokyotyrant_spec.rb b/spec/moneta/standard_tokyotyrant_spec.rb
index bae8938..90ed33e 100644
--- a/spec/moneta/standard_tokyotyrant_spec.rb
+++ b/spec/moneta/standard_tokyotyrant_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tokyotyrant" do
end
def new_store
- Moneta.new(:TokyoTyrant, :logger => {:file => File.join(make_tempdir, 'standard_tokyotyrant.log')})
+ Moneta.new(:TokyoTyrant, logger: {file: File.join(make_tempdir, 'standard_tokyotyrant.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_tokyotyrant_with_expires_spec.rb b/spec/moneta/standard_tokyotyrant_with_expires_spec.rb
index e653bc1..52d8084 100644
--- a/spec/moneta/standard_tokyotyrant_with_expires_spec.rb
+++ b/spec/moneta/standard_tokyotyrant_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_tokyotyrant_with_expires" do
end
def new_store
- Moneta.new(:TokyoTyrant, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_tokyotyrant_with_expires.log')})
+ Moneta.new(:TokyoTyrant, expires: true, logger: {file: File.join(make_tempdir, 'standard_tokyotyrant_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_yaml_spec.rb b/spec/moneta/standard_yaml_spec.rb
index 0d90162..53545cf 100644
--- a/spec/moneta/standard_yaml_spec.rb
+++ b/spec/moneta/standard_yaml_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_yaml" do
end
def new_store
- Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml"), :logger => {:file => File.join(make_tempdir, 'standard_yaml.log')})
+ Moneta.new(:YAML, file: File.join(make_tempdir, "simple_yaml"), logger: {file: File.join(make_tempdir, 'standard_yaml.log')})
end
def load_value(value)
diff --git a/spec/moneta/standard_yaml_with_expires_spec.rb b/spec/moneta/standard_yaml_with_expires_spec.rb
index d901da9..828c917 100644
--- a/spec/moneta/standard_yaml_with_expires_spec.rb
+++ b/spec/moneta/standard_yaml_with_expires_spec.rb
@@ -8,7 +8,7 @@ describe_moneta "standard_yaml_with_expires" do
end
def new_store
- Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_yaml_with_expires.log')})
+ Moneta.new(:YAML, file: File.join(make_tempdir, "simple_yaml_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_yaml_with_expires.log')})
end
def load_value(value)
diff --git a/spec/moneta/transformer_bencode_spec.rb b/spec/moneta/transformer_bencode_spec.rb
index 8a7da1c..ba20617 100644
--- a/spec/moneta/transformer_bencode_spec.rb
+++ b/spec/moneta/transformer_bencode_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_bencode" do
def new_store
Moneta.build do
- use :Transformer, :key => :bencode, :value => :bencode
+ use :Transformer, key: :bencode, value: :bencode
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_bert_spec.rb b/spec/moneta/transformer_bert_spec.rb
index abba0cb..761511e 100644
--- a/spec/moneta/transformer_bert_spec.rb
+++ b/spec/moneta/transformer_bert_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_bert" do
def new_store
Moneta.build do
- use :Transformer, :key => :bert, :value => :bert
+ use :Transformer, key: :bert, value: :bert
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_bson_spec.rb b/spec/moneta/transformer_bson_spec.rb
index 32c6da2..f509631 100644
--- a/spec/moneta/transformer_bson_spec.rb
+++ b/spec/moneta/transformer_bson_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_bson" do
def new_store
Moneta.build do
- use :Transformer, :key => :bson, :value => :bson
+ use :Transformer, key: :bson, value: :bson
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_bzip2_spec.rb b/spec/moneta/transformer_bzip2_spec.rb
index 5fdec1e..9754d4d 100644
--- a/spec/moneta/transformer_bzip2_spec.rb
+++ b/spec/moneta/transformer_bzip2_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_bzip2" do
def new_store
Moneta.build do
- use :Transformer, :value => :bzip2
+ use :Transformer, value: :bzip2
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_json_spec.rb b/spec/moneta/transformer_json_spec.rb
index b0c2dc0..c66ef83 100644
--- a/spec/moneta/transformer_json_spec.rb
+++ b/spec/moneta/transformer_json_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_json" do
def new_store
Moneta.build do
- use :Transformer, :key => :json, :value => :json
+ use :Transformer, key: :json, value: :json
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_key_inspect_spec.rb b/spec/moneta/transformer_key_inspect_spec.rb
index a8eb431..51f847d 100644
--- a/spec/moneta/transformer_key_inspect_spec.rb
+++ b/spec/moneta/transformer_key_inspect_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_key_inspect" do
def new_store
Moneta.build do
- use :Transformer, :key => :inspect
+ use :Transformer, key: :inspect
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_key_marshal_spec.rb b/spec/moneta/transformer_key_marshal_spec.rb
index ddd582d..ccdf0ba 100644
--- a/spec/moneta/transformer_key_marshal_spec.rb
+++ b/spec/moneta/transformer_key_marshal_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_key_marshal" do
def new_store
Moneta.build do
- use :Transformer, :key => :marshal
+ use :Transformer, key: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_key_to_s_spec.rb b/spec/moneta/transformer_key_to_s_spec.rb
index 11cbf30..8395109 100644
--- a/spec/moneta/transformer_key_to_s_spec.rb
+++ b/spec/moneta/transformer_key_to_s_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_key_to_s" do
def new_store
Moneta.build do
- use :Transformer, :key => :to_s
+ use :Transformer, key: :to_s
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_key_yaml_spec.rb b/spec/moneta/transformer_key_yaml_spec.rb
index 12dabb4..b6f1077 100644
--- a/spec/moneta/transformer_key_yaml_spec.rb
+++ b/spec/moneta/transformer_key_yaml_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_key_yaml" do
def new_store
Moneta.build do
- use :Transformer, :key => :yaml
+ use :Transformer, key: :yaml
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_lz4_spec.rb b/spec/moneta/transformer_lz4_spec.rb
index e3e1992..d92d42a 100644
--- a/spec/moneta/transformer_lz4_spec.rb
+++ b/spec/moneta/transformer_lz4_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_lz4" do
def new_store
Moneta.build do
- use :Transformer, :value => :lz4
+ use :Transformer, value: :lz4
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_lzma_spec.rb b/spec/moneta/transformer_lzma_spec.rb
index 49d247f..f22bab3 100644
--- a/spec/moneta/transformer_lzma_spec.rb
+++ b/spec/moneta/transformer_lzma_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_lzma" do
def new_store
Moneta.build do
- use :Transformer, :value => :lzma
+ use :Transformer, value: :lzma
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_lzo_spec.rb b/spec/moneta/transformer_lzo_spec.rb
index 2a346a8..5272e1a 100644
--- a/spec/moneta/transformer_lzo_spec.rb
+++ b/spec/moneta/transformer_lzo_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_lzo" do
def new_store
Moneta.build do
- use :Transformer, :value => :lzo
+ use :Transformer, value: :lzo
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_base64_spec.rb b/spec/moneta/transformer_marshal_base64_spec.rb
index 439b99a..dd3bfee 100644
--- a/spec/moneta/transformer_marshal_base64_spec.rb
+++ b/spec/moneta/transformer_marshal_base64_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_base64" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :base64], :value => [:marshal, :base64]
+ use :Transformer, key: [:marshal, :base64], value: [:marshal, :base64]
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_city128_spec.rb b/spec/moneta/transformer_marshal_city128_spec.rb
index 57a0309..25bf160 100644
--- a/spec/moneta/transformer_marshal_city128_spec.rb
+++ b/spec/moneta/transformer_marshal_city128_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_city128" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :city128], :value => :marshal
+ use :Transformer, key: [:marshal, :city128], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_city32_spec.rb b/spec/moneta/transformer_marshal_city32_spec.rb
index c23cd41..cfab917 100644
--- a/spec/moneta/transformer_marshal_city32_spec.rb
+++ b/spec/moneta/transformer_marshal_city32_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_city32" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :city32], :value => :marshal
+ use :Transformer, key: [:marshal, :city32], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_city64_spec.rb b/spec/moneta/transformer_marshal_city64_spec.rb
index 65ec671..85b2e2e 100644
--- a/spec/moneta/transformer_marshal_city64_spec.rb
+++ b/spec/moneta/transformer_marshal_city64_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_city64" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :city64], :value => :marshal
+ use :Transformer, key: [:marshal, :city64], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_escape_spec.rb b/spec/moneta/transformer_marshal_escape_spec.rb
index 07a7ccf..3ef924e 100644
--- a/spec/moneta/transformer_marshal_escape_spec.rb
+++ b/spec/moneta/transformer_marshal_escape_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_escape" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :escape], :value => :marshal
+ use :Transformer, key: [:marshal, :escape], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_hex_spec.rb b/spec/moneta/transformer_marshal_hex_spec.rb
index d71a064..e78a37e 100644
--- a/spec/moneta/transformer_marshal_hex_spec.rb
+++ b/spec/moneta/transformer_marshal_hex_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_hex" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :hex], :value => [:marshal, :hex]
+ use :Transformer, key: [:marshal, :hex], value: [:marshal, :hex]
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_hmac_spec.rb b/spec/moneta/transformer_marshal_hmac_spec.rb
index 33d4666..35c4143 100644
--- a/spec/moneta/transformer_marshal_hmac_spec.rb
+++ b/spec/moneta/transformer_marshal_hmac_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_hmac" do
def new_store
Moneta.build do
- use :Transformer, :key => :marshal, :value => [:marshal, :hmac], :secret => 'secret'
+ use :Transformer, key: :marshal, value: [:marshal, :hmac], secret: 'secret'
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_md5_spec.rb b/spec/moneta/transformer_marshal_md5_spec.rb
index ea2bad3..7f25fb0 100644
--- a/spec/moneta/transformer_marshal_md5_spec.rb
+++ b/spec/moneta/transformer_marshal_md5_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_md5" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :md5], :value => :marshal
+ use :Transformer, key: [:marshal, :md5], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_md5_spread_spec.rb b/spec/moneta/transformer_marshal_md5_spread_spec.rb
index e75b02f..bf0e905 100644
--- a/spec/moneta/transformer_marshal_md5_spread_spec.rb
+++ b/spec/moneta/transformer_marshal_md5_spread_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_md5_spread" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :md5, :spread], :value => :marshal
+ use :Transformer, key: [:marshal, :md5, :spread], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_prefix_spec.rb b/spec/moneta/transformer_marshal_prefix_spec.rb
index 9f2307a..94ddc6a 100644
--- a/spec/moneta/transformer_marshal_prefix_spec.rb
+++ b/spec/moneta/transformer_marshal_prefix_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_prefix" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :prefix], :value => :marshal, :prefix => 'moneta'
+ use :Transformer, key: [:marshal, :prefix], value: :marshal, prefix: 'moneta'
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_qp_spec.rb b/spec/moneta/transformer_marshal_qp_spec.rb
index 2b26537..af02c80 100644
--- a/spec/moneta/transformer_marshal_qp_spec.rb
+++ b/spec/moneta/transformer_marshal_qp_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_qp" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :qp], :value => [:marshal, :qp]
+ use :Transformer, key: [:marshal, :qp], value: [:marshal, :qp]
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_rmd160_spec.rb b/spec/moneta/transformer_marshal_rmd160_spec.rb
index e38bcb9..a6dfee5 100644
--- a/spec/moneta/transformer_marshal_rmd160_spec.rb
+++ b/spec/moneta/transformer_marshal_rmd160_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_rmd160" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :rmd160], :value => :marshal
+ use :Transformer, key: [:marshal, :rmd160], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_sha1_spec.rb b/spec/moneta/transformer_marshal_sha1_spec.rb
index 462ef69..0f70e32 100644
--- a/spec/moneta/transformer_marshal_sha1_spec.rb
+++ b/spec/moneta/transformer_marshal_sha1_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_sha1" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :sha1], :value => :marshal
+ use :Transformer, key: [:marshal, :sha1], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_sha256_spec.rb b/spec/moneta/transformer_marshal_sha256_spec.rb
index da55ca2..7a6b3ef 100644
--- a/spec/moneta/transformer_marshal_sha256_spec.rb
+++ b/spec/moneta/transformer_marshal_sha256_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_sha256" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :sha256], :value => :marshal
+ use :Transformer, key: [:marshal, :sha256], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_sha384_spec.rb b/spec/moneta/transformer_marshal_sha384_spec.rb
index caaaf9f..7df9cc4 100644
--- a/spec/moneta/transformer_marshal_sha384_spec.rb
+++ b/spec/moneta/transformer_marshal_sha384_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_sha384" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :sha384], :value => :marshal
+ use :Transformer, key: [:marshal, :sha384], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_sha512_spec.rb b/spec/moneta/transformer_marshal_sha512_spec.rb
index 1e2d2f8..f1e8d92 100644
--- a/spec/moneta/transformer_marshal_sha512_spec.rb
+++ b/spec/moneta/transformer_marshal_sha512_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_sha512" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :sha512], :value => :marshal
+ use :Transformer, key: [:marshal, :sha512], value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_spec.rb b/spec/moneta/transformer_marshal_spec.rb
index 7d837cb..3f2b1b8 100644
--- a/spec/moneta/transformer_marshal_spec.rb
+++ b/spec/moneta/transformer_marshal_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal" do
def new_store
Moneta.build do
- use :Transformer, :key => :marshal, :value => :marshal
+ use :Transformer, key: :marshal, value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_truncate_spec.rb b/spec/moneta/transformer_marshal_truncate_spec.rb
index e74a15c..dfb1020 100644
--- a/spec/moneta/transformer_marshal_truncate_spec.rb
+++ b/spec/moneta/transformer_marshal_truncate_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_truncate" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :truncate], :value => :marshal, :maxlen => 64
+ use :Transformer, key: [:marshal, :truncate], value: :marshal, maxlen: 64
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_marshal_uuencode_spec.rb b/spec/moneta/transformer_marshal_uuencode_spec.rb
index 044bd4d..c768768 100644
--- a/spec/moneta/transformer_marshal_uuencode_spec.rb
+++ b/spec/moneta/transformer_marshal_uuencode_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_marshal_uuencode" do
def new_store
Moneta.build do
- use :Transformer, :key => [:marshal, :uuencode], :value => [:marshal, :uuencode]
+ use :Transformer, key: [:marshal, :uuencode], value: [:marshal, :uuencode]
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_msgpack_spec.rb b/spec/moneta/transformer_msgpack_spec.rb
index 34d789a..30f8bb4 100644
--- a/spec/moneta/transformer_msgpack_spec.rb
+++ b/spec/moneta/transformer_msgpack_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_msgpack" do
def new_store
Moneta.build do
- use :Transformer, :key => :msgpack, :value => :msgpack
+ use :Transformer, key: :msgpack, value: :msgpack
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_ox_spec.rb b/spec/moneta/transformer_ox_spec.rb
index 18a6d75..e7c6892 100644
--- a/spec/moneta/transformer_ox_spec.rb
+++ b/spec/moneta/transformer_ox_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_ox" do
def new_store
Moneta.build do
- use :Transformer, :key => :ox, :value => :ox
+ use :Transformer, key: :ox, value: :ox
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_php_spec.rb b/spec/moneta/transformer_php_spec.rb
index ebc6cd1..848bbbb 100644
--- a/spec/moneta/transformer_php_spec.rb
+++ b/spec/moneta/transformer_php_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_php" do
def new_store
Moneta.build do
- use :Transformer, :key => :php, :value => :php
+ use :Transformer, key: :php, value: :php
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_quicklz_spec.rb b/spec/moneta/transformer_quicklz_spec.rb
index 4d75174..4e17937 100644
--- a/spec/moneta/transformer_quicklz_spec.rb
+++ b/spec/moneta/transformer_quicklz_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_quicklz" do
def new_store
Moneta.build do
- use :Transformer, :value => :quicklz
+ use :Transformer, value: :quicklz
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_snappy_spec.rb b/spec/moneta/transformer_snappy_spec.rb
index 71ec418..58b88ef 100644
--- a/spec/moneta/transformer_snappy_spec.rb
+++ b/spec/moneta/transformer_snappy_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_snappy" do
def new_store
Moneta.build do
- use :Transformer, :value => :snappy
+ use :Transformer, value: :snappy
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_tnet_spec.rb b/spec/moneta/transformer_tnet_spec.rb
index 1b07360..e3a2a17 100644
--- a/spec/moneta/transformer_tnet_spec.rb
+++ b/spec/moneta/transformer_tnet_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_tnet" do
def new_store
Moneta.build do
- use :Transformer, :key => :tnet, :value => :tnet
+ use :Transformer, key: :tnet, value: :tnet
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_value_marshal_spec.rb b/spec/moneta/transformer_value_marshal_spec.rb
index 3eaa3ae..2cdf95b 100644
--- a/spec/moneta/transformer_value_marshal_spec.rb
+++ b/spec/moneta/transformer_value_marshal_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_value_marshal" do
def new_store
Moneta.build do
- use :Transformer, :value => :marshal
+ use :Transformer, value: :marshal
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_value_yaml_spec.rb b/spec/moneta/transformer_value_yaml_spec.rb
index 3894823..a377f31 100644
--- a/spec/moneta/transformer_value_yaml_spec.rb
+++ b/spec/moneta/transformer_value_yaml_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_value_yaml" do
def new_store
Moneta.build do
- use :Transformer, :value => :yaml
+ use :Transformer, value: :yaml
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_yaml_spec.rb b/spec/moneta/transformer_yaml_spec.rb
index 9dd9d2a..9692bc6 100644
--- a/spec/moneta/transformer_yaml_spec.rb
+++ b/spec/moneta/transformer_yaml_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_yaml" do
def new_store
Moneta.build do
- use :Transformer, :key => :yaml, :value => :yaml
+ use :Transformer, key: :yaml, value: :yaml
adapter :Memory
end
end
diff --git a/spec/moneta/transformer_zlib_spec.rb b/spec/moneta/transformer_zlib_spec.rb
index f6107e4..49a3e7c 100644
--- a/spec/moneta/transformer_zlib_spec.rb
+++ b/spec/moneta/transformer_zlib_spec.rb
@@ -9,7 +9,7 @@ describe_moneta "transformer_zlib" do
def new_store
Moneta.build do
- use :Transformer, :value => :zlib
+ use :Transformer, value: :zlib
adapter :Memory
end
end
diff --git a/spec/moneta/weak_create_spec.rb b/spec/moneta/weak_create_spec.rb
index 3cd5842..1270cd5 100644
--- a/spec/moneta/weak_create_spec.rb
+++ b/spec/moneta/weak_create_spec.rb
@@ -13,10 +13,10 @@ describe_moneta "weak_create" do
Moneta.build do
use :WeakCreate
adapter :Fog,
- :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'weak_create'
+ aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'weak_create'
end
end
diff --git a/spec/moneta/weak_increment_spec.rb b/spec/moneta/weak_increment_spec.rb
index 10f509a..9848c48 100644
--- a/spec/moneta/weak_increment_spec.rb
+++ b/spec/moneta/weak_increment_spec.rb
@@ -13,10 +13,10 @@ describe_moneta "weak_increment" do
Moneta.build do
use :WeakIncrement
adapter :Fog,
- :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS',
- :dir => 'weak_increment'
+ aws_access_key_id: 'fake_access_key_id',
+ aws_secret_access_key: 'fake_secret_access_key',
+ provider: 'AWS',
+ dir: 'weak_increment'
end
end
diff --git a/spec/monetaspecs.rb b/spec/monetaspecs.rb
index 2406d20..f362c31 100644
--- a/spec/monetaspecs.rb
+++ b/spec/monetaspecs.rb
@@ -44,7 +44,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -95,7 +95,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -146,7 +146,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -197,7 +197,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -248,7 +248,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -299,7 +299,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -350,7 +350,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -401,7 +401,7 @@ shared_examples_for 'null_nilkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -936,7 +936,7 @@ shared_examples_for 'null_nilkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -987,7 +987,7 @@ shared_examples_for 'null_nilkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -1038,7 +1038,7 @@ shared_examples_for 'null_nilkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -1089,7 +1089,7 @@ shared_examples_for 'null_nilkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -1432,7 +1432,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -1483,7 +1483,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -1534,7 +1534,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -1585,7 +1585,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -1636,7 +1636,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -1687,7 +1687,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -1738,7 +1738,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -1789,7 +1789,7 @@ shared_examples_for 'null_nilkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -2412,7 +2412,7 @@ shared_examples_for 'null_nilkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -2463,7 +2463,7 @@ shared_examples_for 'null_nilkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -2514,7 +2514,7 @@ shared_examples_for 'null_nilkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -2565,7 +2565,7 @@ shared_examples_for 'null_nilkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -2908,7 +2908,7 @@ shared_examples_for 'null_nilkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -2959,7 +2959,7 @@ shared_examples_for 'null_nilkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -3010,7 +3010,7 @@ shared_examples_for 'null_nilkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -3061,7 +3061,7 @@ shared_examples_for 'null_nilkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -3460,7 +3460,7 @@ shared_examples_for 'null_nilkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -3511,7 +3511,7 @@ shared_examples_for 'null_nilkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -3562,7 +3562,7 @@ shared_examples_for 'null_nilkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -3613,7 +3613,7 @@ shared_examples_for 'null_nilkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -4012,7 +4012,7 @@ shared_examples_for 'null_nilkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -4063,7 +4063,7 @@ shared_examples_for 'null_nilkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -4114,7 +4114,7 @@ shared_examples_for 'null_nilkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -4165,7 +4165,7 @@ shared_examples_for 'null_nilkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -4564,7 +4564,7 @@ shared_examples_for 'null_nilkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -4615,7 +4615,7 @@ shared_examples_for 'null_nilkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -4666,7 +4666,7 @@ shared_examples_for 'null_nilkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(nil, options).should be_false
store.load(nil, options).should be_nil
@@ -4717,7 +4717,7 @@ shared_examples_for 'null_nilkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0, options).should be_false
store.load(0, options).should be_nil
@@ -5116,7 +5116,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -5167,7 +5167,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -5218,7 +5218,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -5269,7 +5269,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -5320,7 +5320,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -5371,7 +5371,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -5422,7 +5422,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -5473,7 +5473,7 @@ shared_examples_for 'null_integerkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6008,7 +6008,7 @@ shared_examples_for 'null_integerkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6059,7 +6059,7 @@ shared_examples_for 'null_integerkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6110,7 +6110,7 @@ shared_examples_for 'null_integerkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6161,7 +6161,7 @@ shared_examples_for 'null_integerkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6504,7 +6504,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6555,7 +6555,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6606,7 +6606,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6657,7 +6657,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6708,7 +6708,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6759,7 +6759,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -6810,7 +6810,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -6861,7 +6861,7 @@ shared_examples_for 'null_integerkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -7484,7 +7484,7 @@ shared_examples_for 'null_integerkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -7535,7 +7535,7 @@ shared_examples_for 'null_integerkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -7586,7 +7586,7 @@ shared_examples_for 'null_integerkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -7637,7 +7637,7 @@ shared_examples_for 'null_integerkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -7980,7 +7980,7 @@ shared_examples_for 'null_integerkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -8031,7 +8031,7 @@ shared_examples_for 'null_integerkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -8082,7 +8082,7 @@ shared_examples_for 'null_integerkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -8133,7 +8133,7 @@ shared_examples_for 'null_integerkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -8532,7 +8532,7 @@ shared_examples_for 'null_integerkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -8583,7 +8583,7 @@ shared_examples_for 'null_integerkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -8634,7 +8634,7 @@ shared_examples_for 'null_integerkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -8685,7 +8685,7 @@ shared_examples_for 'null_integerkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -9084,7 +9084,7 @@ shared_examples_for 'null_integerkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -9135,7 +9135,7 @@ shared_examples_for 'null_integerkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -9186,7 +9186,7 @@ shared_examples_for 'null_integerkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -9237,7 +9237,7 @@ shared_examples_for 'null_integerkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -9636,7 +9636,7 @@ shared_examples_for 'null_integerkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -9687,7 +9687,7 @@ shared_examples_for 'null_integerkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -9738,7 +9738,7 @@ shared_examples_for 'null_integerkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-10, options).should be_false
store.load(-10, options).should be_nil
@@ -9789,7 +9789,7 @@ shared_examples_for 'null_integerkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(42, options).should be_false
store.load(42, options).should be_nil
@@ -10188,7 +10188,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -10239,7 +10239,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -10290,7 +10290,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -10341,7 +10341,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -10392,7 +10392,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -10443,7 +10443,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -10494,7 +10494,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -10545,7 +10545,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -10596,7 +10596,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -10647,7 +10647,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -10698,7 +10698,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -10749,7 +10749,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -10800,7 +10800,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -10851,7 +10851,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -10902,7 +10902,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -10953,7 +10953,7 @@ shared_examples_for 'null_numberkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -11960,7 +11960,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -12011,7 +12011,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -12062,7 +12062,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -12113,7 +12113,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -12164,7 +12164,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -12215,7 +12215,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -12266,7 +12266,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -12317,7 +12317,7 @@ shared_examples_for 'null_numberkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -12940,7 +12940,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -12991,7 +12991,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -13042,7 +13042,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -13093,7 +13093,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -13144,7 +13144,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -13195,7 +13195,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -13246,7 +13246,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -13297,7 +13297,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -13348,7 +13348,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -13399,7 +13399,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -13450,7 +13450,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -13501,7 +13501,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -13552,7 +13552,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -13603,7 +13603,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -13654,7 +13654,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -13705,7 +13705,7 @@ shared_examples_for 'null_numberkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -14888,7 +14888,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -14939,7 +14939,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -14990,7 +14990,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -15041,7 +15041,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -15092,7 +15092,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -15143,7 +15143,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -15194,7 +15194,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -15245,7 +15245,7 @@ shared_examples_for 'null_numberkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -15868,7 +15868,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -15919,7 +15919,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -15970,7 +15970,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -16021,7 +16021,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -16072,7 +16072,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -16123,7 +16123,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -16174,7 +16174,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -16225,7 +16225,7 @@ shared_examples_for 'null_numberkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -16952,7 +16952,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -17003,7 +17003,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -17054,7 +17054,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -17105,7 +17105,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -17156,7 +17156,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -17207,7 +17207,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -17258,7 +17258,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -17309,7 +17309,7 @@ shared_examples_for 'null_numberkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -18036,7 +18036,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -18087,7 +18087,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -18138,7 +18138,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -18189,7 +18189,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -18240,7 +18240,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -18291,7 +18291,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -18342,7 +18342,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -18393,7 +18393,7 @@ shared_examples_for 'null_numberkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -19120,7 +19120,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -19171,7 +19171,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -19222,7 +19222,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(0.5, options).should be_false
store.load(0.5, options).should be_nil
@@ -19273,7 +19273,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(-0.3, options).should be_false
store.load(-0.3, options).should be_nil
@@ -19324,7 +19324,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -19375,7 +19375,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -19426,7 +19426,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(170141183460469231731687303715884105728, options).should be_false
store.load(170141183460469231731687303715884105728, options).should be_nil
@@ -19477,7 +19477,7 @@ shared_examples_for 'null_numberkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(99, options).should be_false
store.load(99, options).should be_nil
@@ -20204,7 +20204,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -20255,7 +20255,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -20306,7 +20306,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -20357,7 +20357,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -20408,7 +20408,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -20459,7 +20459,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -20510,7 +20510,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -20561,7 +20561,7 @@ shared_examples_for 'null_booleankey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21096,7 +21096,7 @@ shared_examples_for 'null_booleankey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21147,7 +21147,7 @@ shared_examples_for 'null_booleankey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21198,7 +21198,7 @@ shared_examples_for 'null_booleankey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21249,7 +21249,7 @@ shared_examples_for 'null_booleankey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21592,7 +21592,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21643,7 +21643,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21694,7 +21694,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21745,7 +21745,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21796,7 +21796,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21847,7 +21847,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -21898,7 +21898,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -21949,7 +21949,7 @@ shared_examples_for 'null_booleankey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -22572,7 +22572,7 @@ shared_examples_for 'null_booleankey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -22623,7 +22623,7 @@ shared_examples_for 'null_booleankey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -22674,7 +22674,7 @@ shared_examples_for 'null_booleankey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -22725,7 +22725,7 @@ shared_examples_for 'null_booleankey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -23068,7 +23068,7 @@ shared_examples_for 'null_booleankey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -23119,7 +23119,7 @@ shared_examples_for 'null_booleankey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -23170,7 +23170,7 @@ shared_examples_for 'null_booleankey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -23221,7 +23221,7 @@ shared_examples_for 'null_booleankey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -23620,7 +23620,7 @@ shared_examples_for 'null_booleankey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -23671,7 +23671,7 @@ shared_examples_for 'null_booleankey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -23722,7 +23722,7 @@ shared_examples_for 'null_booleankey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -23773,7 +23773,7 @@ shared_examples_for 'null_booleankey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -24172,7 +24172,7 @@ shared_examples_for 'null_booleankey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -24223,7 +24223,7 @@ shared_examples_for 'null_booleankey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -24274,7 +24274,7 @@ shared_examples_for 'null_booleankey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -24325,7 +24325,7 @@ shared_examples_for 'null_booleankey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -24724,7 +24724,7 @@ shared_examples_for 'null_booleankey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -24775,7 +24775,7 @@ shared_examples_for 'null_booleankey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -24826,7 +24826,7 @@ shared_examples_for 'null_booleankey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(true, options).should be_false
store.load(true, options).should be_nil
@@ -24877,7 +24877,7 @@ shared_examples_for 'null_booleankey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(false, options).should be_false
store.load(false, options).should be_nil
@@ -25276,7 +25276,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -25327,7 +25327,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -25378,7 +25378,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -25429,7 +25429,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -25480,7 +25480,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -25531,7 +25531,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -25582,7 +25582,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -25633,7 +25633,7 @@ shared_examples_for 'null_stringkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26168,7 +26168,7 @@ shared_examples_for 'null_stringkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -26219,7 +26219,7 @@ shared_examples_for 'null_stringkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26270,7 +26270,7 @@ shared_examples_for 'null_stringkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -26321,7 +26321,7 @@ shared_examples_for 'null_stringkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26664,7 +26664,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -26715,7 +26715,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26766,7 +26766,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -26817,7 +26817,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26868,7 +26868,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -26919,7 +26919,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -26970,7 +26970,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -27021,7 +27021,7 @@ shared_examples_for 'null_stringkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -27644,7 +27644,7 @@ shared_examples_for 'null_stringkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -27695,7 +27695,7 @@ shared_examples_for 'null_stringkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -27746,7 +27746,7 @@ shared_examples_for 'null_stringkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -27797,7 +27797,7 @@ shared_examples_for 'null_stringkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -28140,7 +28140,7 @@ shared_examples_for 'null_stringkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -28191,7 +28191,7 @@ shared_examples_for 'null_stringkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -28242,7 +28242,7 @@ shared_examples_for 'null_stringkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -28293,7 +28293,7 @@ shared_examples_for 'null_stringkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -28692,7 +28692,7 @@ shared_examples_for 'null_stringkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -28743,7 +28743,7 @@ shared_examples_for 'null_stringkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -28794,7 +28794,7 @@ shared_examples_for 'null_stringkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -28845,7 +28845,7 @@ shared_examples_for 'null_stringkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -29244,7 +29244,7 @@ shared_examples_for 'null_stringkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -29295,7 +29295,7 @@ shared_examples_for 'null_stringkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -29346,7 +29346,7 @@ shared_examples_for 'null_stringkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -29397,7 +29397,7 @@ shared_examples_for 'null_stringkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -29796,7 +29796,7 @@ shared_examples_for 'null_stringkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -29847,7 +29847,7 @@ shared_examples_for 'null_stringkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -29898,7 +29898,7 @@ shared_examples_for 'null_stringkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey1", options).should be_false
store.load("strkey1", options).should be_nil
@@ -29949,7 +29949,7 @@ shared_examples_for 'null_stringkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("strkey2", options).should be_false
store.load("strkey2", options).should be_nil
@@ -30348,7 +30348,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -30399,7 +30399,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -30450,7 +30450,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -30501,7 +30501,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -30552,7 +30552,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -30603,7 +30603,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -30654,7 +30654,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -30705,7 +30705,7 @@ shared_examples_for 'null_pathkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -31240,7 +31240,7 @@ shared_examples_for 'null_pathkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -31291,7 +31291,7 @@ shared_examples_for 'null_pathkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -31342,7 +31342,7 @@ shared_examples_for 'null_pathkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -31393,7 +31393,7 @@ shared_examples_for 'null_pathkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -31736,7 +31736,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -31787,7 +31787,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -31838,7 +31838,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -31889,7 +31889,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -31940,7 +31940,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -31991,7 +31991,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -32042,7 +32042,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -32093,7 +32093,7 @@ shared_examples_for 'null_pathkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -32716,7 +32716,7 @@ shared_examples_for 'null_pathkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -32767,7 +32767,7 @@ shared_examples_for 'null_pathkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -32818,7 +32818,7 @@ shared_examples_for 'null_pathkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -32869,7 +32869,7 @@ shared_examples_for 'null_pathkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -33212,7 +33212,7 @@ shared_examples_for 'null_pathkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -33263,7 +33263,7 @@ shared_examples_for 'null_pathkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -33314,7 +33314,7 @@ shared_examples_for 'null_pathkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -33365,7 +33365,7 @@ shared_examples_for 'null_pathkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -33764,7 +33764,7 @@ shared_examples_for 'null_pathkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -33815,7 +33815,7 @@ shared_examples_for 'null_pathkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -33866,7 +33866,7 @@ shared_examples_for 'null_pathkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -33917,7 +33917,7 @@ shared_examples_for 'null_pathkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -34316,7 +34316,7 @@ shared_examples_for 'null_pathkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -34367,7 +34367,7 @@ shared_examples_for 'null_pathkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -34418,7 +34418,7 @@ shared_examples_for 'null_pathkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -34469,7 +34469,7 @@ shared_examples_for 'null_pathkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -34868,7 +34868,7 @@ shared_examples_for 'null_pathkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -34919,7 +34919,7 @@ shared_examples_for 'null_pathkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -34970,7 +34970,7 @@ shared_examples_for 'null_pathkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("bar/foo/baz", options).should be_false
store.load("bar/foo/baz", options).should be_nil
@@ -35021,7 +35021,7 @@ shared_examples_for 'null_pathkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("foo/bar", options).should be_false
store.load("foo/bar", options).should be_nil
@@ -35420,7 +35420,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -35471,7 +35471,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -35522,7 +35522,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -35573,7 +35573,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -35624,7 +35624,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -35675,7 +35675,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -35726,7 +35726,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -35777,7 +35777,7 @@ shared_examples_for 'null_binarykey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -36312,7 +36312,7 @@ shared_examples_for 'null_binarykey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -36363,7 +36363,7 @@ shared_examples_for 'null_binarykey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -36414,7 +36414,7 @@ shared_examples_for 'null_binarykey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -36465,7 +36465,7 @@ shared_examples_for 'null_binarykey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -36808,7 +36808,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -36859,7 +36859,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -36910,7 +36910,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -36961,7 +36961,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -37012,7 +37012,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -37063,7 +37063,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -37114,7 +37114,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -37165,7 +37165,7 @@ shared_examples_for 'null_binarykey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -37788,7 +37788,7 @@ shared_examples_for 'null_binarykey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -37839,7 +37839,7 @@ shared_examples_for 'null_binarykey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -37890,7 +37890,7 @@ shared_examples_for 'null_binarykey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -37941,7 +37941,7 @@ shared_examples_for 'null_binarykey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -38284,7 +38284,7 @@ shared_examples_for 'null_binarykey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -38335,7 +38335,7 @@ shared_examples_for 'null_binarykey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -38386,7 +38386,7 @@ shared_examples_for 'null_binarykey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -38437,7 +38437,7 @@ shared_examples_for 'null_binarykey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -38836,7 +38836,7 @@ shared_examples_for 'null_binarykey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -38887,7 +38887,7 @@ shared_examples_for 'null_binarykey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -38938,7 +38938,7 @@ shared_examples_for 'null_binarykey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -38989,7 +38989,7 @@ shared_examples_for 'null_binarykey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -39388,7 +39388,7 @@ shared_examples_for 'null_binarykey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -39439,7 +39439,7 @@ shared_examples_for 'null_binarykey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -39490,7 +39490,7 @@ shared_examples_for 'null_binarykey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -39541,7 +39541,7 @@ shared_examples_for 'null_binarykey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -39940,7 +39940,7 @@ shared_examples_for 'null_binarykey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -39991,7 +39991,7 @@ shared_examples_for 'null_binarykey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -40042,7 +40042,7 @@ shared_examples_for 'null_binarykey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("über", options).should be_false
store.load("über", options).should be_nil
@@ -40093,7 +40093,7 @@ shared_examples_for 'null_binarykey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?("\xAA\xBB\xCC", options).should be_false
store.load("\xAA\xBB\xCC", options).should be_nil
@@ -40492,7 +40492,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -40543,7 +40543,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -40594,7 +40594,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -40645,7 +40645,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -40696,7 +40696,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -40747,7 +40747,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -40798,7 +40798,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -40849,7 +40849,7 @@ shared_examples_for 'null_objectkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -41384,7 +41384,7 @@ shared_examples_for 'null_objectkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -41435,7 +41435,7 @@ shared_examples_for 'null_objectkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -41486,7 +41486,7 @@ shared_examples_for 'null_objectkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -41537,7 +41537,7 @@ shared_examples_for 'null_objectkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -41880,7 +41880,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -41931,7 +41931,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -41982,7 +41982,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -42033,7 +42033,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -42084,7 +42084,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -42135,7 +42135,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -42186,7 +42186,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -42237,7 +42237,7 @@ shared_examples_for 'null_objectkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -42860,7 +42860,7 @@ shared_examples_for 'null_objectkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -42911,7 +42911,7 @@ shared_examples_for 'null_objectkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -42962,7 +42962,7 @@ shared_examples_for 'null_objectkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -43013,7 +43013,7 @@ shared_examples_for 'null_objectkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -43356,7 +43356,7 @@ shared_examples_for 'null_objectkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -43407,7 +43407,7 @@ shared_examples_for 'null_objectkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -43458,7 +43458,7 @@ shared_examples_for 'null_objectkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -43509,7 +43509,7 @@ shared_examples_for 'null_objectkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -43908,7 +43908,7 @@ shared_examples_for 'null_objectkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -43959,7 +43959,7 @@ shared_examples_for 'null_objectkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -44010,7 +44010,7 @@ shared_examples_for 'null_objectkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -44061,7 +44061,7 @@ shared_examples_for 'null_objectkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -44460,7 +44460,7 @@ shared_examples_for 'null_objectkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -44511,7 +44511,7 @@ shared_examples_for 'null_objectkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -44562,7 +44562,7 @@ shared_examples_for 'null_objectkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -44613,7 +44613,7 @@ shared_examples_for 'null_objectkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -45012,7 +45012,7 @@ shared_examples_for 'null_objectkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -45063,7 +45063,7 @@ shared_examples_for 'null_objectkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -45114,7 +45114,7 @@ shared_examples_for 'null_objectkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey1), options).should be_false
store.load(Value.new(:objkey1), options).should be_nil
@@ -45165,7 +45165,7 @@ shared_examples_for 'null_objectkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?(Value.new(:objkey2), options).should be_false
store.load(Value.new(:objkey2), options).should be_nil
@@ -45564,7 +45564,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -45615,7 +45615,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -45666,7 +45666,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -45717,7 +45717,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -45768,7 +45768,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -45819,7 +45819,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -45870,7 +45870,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -45921,7 +45921,7 @@ shared_examples_for 'null_hashkey_nilvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -46456,7 +46456,7 @@ shared_examples_for 'null_hashkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -46507,7 +46507,7 @@ shared_examples_for 'null_hashkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -46558,7 +46558,7 @@ shared_examples_for 'null_hashkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -46609,7 +46609,7 @@ shared_examples_for 'null_hashkey_integervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -46952,7 +46952,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -47003,7 +47003,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -47054,7 +47054,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -47105,7 +47105,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -47156,7 +47156,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -47207,7 +47207,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -47258,7 +47258,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -47309,7 +47309,7 @@ shared_examples_for 'null_hashkey_numbervalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -47932,7 +47932,7 @@ shared_examples_for 'null_hashkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -47983,7 +47983,7 @@ shared_examples_for 'null_hashkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -48034,7 +48034,7 @@ shared_examples_for 'null_hashkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -48085,7 +48085,7 @@ shared_examples_for 'null_hashkey_booleanvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -48428,7 +48428,7 @@ shared_examples_for 'null_hashkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -48479,7 +48479,7 @@ shared_examples_for 'null_hashkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -48530,7 +48530,7 @@ shared_examples_for 'null_hashkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -48581,7 +48581,7 @@ shared_examples_for 'null_hashkey_stringvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -48980,7 +48980,7 @@ shared_examples_for 'null_hashkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -49031,7 +49031,7 @@ shared_examples_for 'null_hashkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -49082,7 +49082,7 @@ shared_examples_for 'null_hashkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -49133,7 +49133,7 @@ shared_examples_for 'null_hashkey_binaryvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -49532,7 +49532,7 @@ shared_examples_for 'null_hashkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -49583,7 +49583,7 @@ shared_examples_for 'null_hashkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -49634,7 +49634,7 @@ shared_examples_for 'null_hashkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -49685,7 +49685,7 @@ shared_examples_for 'null_hashkey_hashvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -50084,7 +50084,7 @@ shared_examples_for 'null_hashkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -50135,7 +50135,7 @@ shared_examples_for 'null_hashkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -50186,7 +50186,7 @@ shared_examples_for 'null_hashkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey1"=>"hashkey2"}, options).should be_false
store.load({"hashkey1"=>"hashkey2"}, options).should be_nil
@@ -50237,7 +50237,7 @@ shared_examples_for 'null_hashkey_objectvalue' do
end
it 'accepts frozen options' do
- options = {:option1 => 1, :options2 => 2}
+ options = {option1: 1, options2: 2}
options.freeze
store.key?({"hashkey3"=>"hashkey4"}, options).should be_false
store.load({"hashkey3"=>"hashkey4"}, options).should be_nil
@@ -50635,8 +50635,8 @@ end
#################### expires ####################
shared_examples_for 'expires' do
- it 'supports expires on store and []', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+ it 'supports expires on store and []', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store['key1'].should == 'val1'
sleep 1
store['key1'].should == 'val1'
@@ -50645,14 +50645,14 @@ shared_examples_for 'expires' do
end
it 'supports strict expires on store and []' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store['key1'].should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store['key1'].should be_nil
end
- it 'supports expires on store and fetch', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+ it 'supports expires on store and fetch', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.fetch('key1').should == 'val1'
sleep 1
store.fetch('key1').should == 'val1'
@@ -50661,28 +50661,28 @@ shared_examples_for 'expires' do
end
it 'supports strict expires on store and fetch' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.fetch('key1').should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.fetch('key1').should be_nil
end
it 'supports 0 as no-expires on store and []' do
- store.store('key1', 'val1', :expires => 0)
+ store.store('key1', 'val1', expires: 0)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
it 'supports false as no-expires on store and []' do
- store.store('key1', 'val1', :expires => false)
+ store.store('key1', 'val1', expires: false)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
- it 'supports expires on store and load', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+ it 'supports expires on store and load', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.load('key1').should == 'val1'
sleep 1
store.load('key1').should == 'val1'
@@ -50691,14 +50691,14 @@ shared_examples_for 'expires' do
end
it 'supports strict expires on store and load' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.load('key1').should == 'val1'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.load('key1').should be_nil
end
- it 'supports expires on store and #key?', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+ it 'supports expires on store and #key?', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store.key?('key1').should be_true
sleep 1
store.key?('key1').should be_true
@@ -50707,17 +50707,17 @@ shared_examples_for 'expires' do
end
it 'supports strict expires on store and #key?' do
- store.store('key1', 'val1', :expires => 2)
+ store.store('key1', 'val1', expires: 2)
store.key?('key1').should be_true
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.key?('key1').should be_false
end
- it 'supports updating the expiration time in load', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+ it 'supports updating the expiration time in load', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
- store.load('key2', :expires => 5).should == 'val2'
+ store.load('key2', expires: 5).should == 'val2'
store['key2'].should == 'val2'
sleep 3
store['key2'].should == 'val2'
@@ -50726,24 +50726,24 @@ shared_examples_for 'expires' do
end
it 'supports 0 as no-expires in load' do
- store.store('key1', 'val1', :expires => 2)
- store.load('key1', :expires => 0).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.load('key1', expires: 0).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'supports false as no-expires in load' do
- store.store('key1', 'val1', :expires => 2)
- store.load('key1', :expires => false).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.load('key1', expires: false).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
- it 'supports updating the expiration time in #key?', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+ it 'supports updating the expiration time in #key?', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
- store.key?('key2', :expires => 5).should be_true
+ store.key?('key2', expires: 5).should be_true
store['key2'].should == 'val2'
sleep 3
store['key2'].should == 'val2'
@@ -50752,24 +50752,24 @@ shared_examples_for 'expires' do
end
it 'supports 0 as no-expires in #key?' do
- store.store('key1', 'val1', :expires => 2)
- store.key?('key1', :expires => 0).should be_true
+ store.store('key1', 'val1', expires: 2)
+ store.key?('key1', expires: 0).should be_true
sleep 3
store['key1'].should == 'val1'
end
it 'supports false as no-expires in #key?' do
- store.store('key1', 'val1', :expires => 2)
- store.key?('key1', :expires => false ).should be_true
+ store.store('key1', 'val1', expires: 2)
+ store.key?('key1', expires: false ).should be_true
sleep 3
store['key1'].should == 'val1'
end
- it 'supports updating the expiration time in fetch', :retry => 3 do
- store.store('key1', 'val1', :expires => 3)
+ it 'supports updating the expiration time in fetch', retry: 3 do
+ store.store('key1', 'val1', expires: 3)
store['key1'].should == 'val1'
sleep 1
- store.fetch('key1', nil, :expires => 5).should == 'val1'
+ store.fetch('key1', nil, expires: 5).should == 'val1'
store['key1'].should == 'val1'
sleep 3
store['key1'].should == 'val1'
@@ -50778,28 +50778,28 @@ shared_examples_for 'expires' do
end
it 'supports 0 as no-expires in fetch' do
- store.store('key1', 'val1', :expires => 2)
- store.fetch('key1', nil, :expires => 0).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.fetch('key1', nil, expires: 0).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'supports false as no-expires in fetch' do
- store.store('key1', 'val1', :expires => 2)
- store.fetch('key1', nil, :expires => false).should == 'val1'
+ store.store('key1', 'val1', expires: 2)
+ store.fetch('key1', nil, expires: false).should == 'val1'
sleep 3
store.load('key1').should == 'val1'
end
it 'strictly respects expires in delete' do
- store.store('key2', 'val2', :expires => 2)
+ store.store('key2', 'val2', expires: 2)
store['key2'].should == 'val2'
sleep 3 # Sleep 3 seconds because after 2 seconds the value can still exist!
store.delete('key2').should be_nil
end
- it 'respects expires in delete', :retry => 3 do
- store.store('key2', 'val2', :expires => 3)
+ it 'respects expires in delete', retry: 3 do
+ store.store('key2', 'val2', expires: 3)
store['key2'].should == 'val2'
sleep 1
store['key2'].should == 'val2'
@@ -50807,8 +50807,8 @@ shared_examples_for 'expires' do
store.delete('key2').should be_nil
end
- it 'supports the #expires syntactic sugar', :retry => 3 do
- store.store('persistent_key', 'persistent_value', :expires => 0)
+ it 'supports the #expires syntactic sugar', retry: 3 do
+ store.store('persistent_key', 'persistent_value', expires: 0)
store.expires(1).store('key2', 'val2')
store['key2'].should == 'val2'
sleep 2
@@ -50817,32 +50817,32 @@ shared_examples_for 'expires' do
end
it 'supports false as no-expires on store and []' do
- store.store('key1', 'val1', :expires => false)
+ store.store('key1', 'val1', expires: false)
store['key1'].should == 'val1'
sleep 2
store['key1'].should == 'val1'
end
- it 'does not update the expiration time in #key? when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+ it 'does not update the expiration time in #key? when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.key?('key1').should be_true
- store.key?('key1', :expires => nil).should be_true
+ store.key?('key1', expires: nil).should be_true
sleep 2
store.key?('key1').should be_false
end
- it 'does not update the expiration time in fetch when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+ it 'does not update the expiration time in fetch when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.fetch('key1').should == 'val1'
- store.fetch('key1', :expires => nil).should == 'val1'
+ store.fetch('key1', expires: nil).should == 'val1'
sleep 2
store.fetch('key1').should be_nil
end
- it 'does not update the expiration time in load when not asked to do so', :retry => 3 do
- store.store('key1', 'val1', :expires => 1)
+ it 'does not update the expiration time in load when not asked to do so', retry: 3 do
+ store.store('key1', 'val1', expires: 1)
store.load('key1').should == 'val1'
- store.load('key1', :expires => nil).should == 'val1'
+ store.load('key1', expires: nil).should == 'val1'
sleep 2
store.load('key1').should be_nil
end
@@ -50887,10 +50887,10 @@ shared_examples_for 'concurrent_increment' do
s = new_store
100.times do |i|
100.times do |j|
- s.increment("counter#{j}", 1, :expires => false)
+ s.increment("counter#{j}", 1, expires: false)
Thread.pass if rand(1000) >= 995
end
- s.store("#{name}#{i}", i.to_s, :expires => false)
+ s.store("#{name}#{i}", i.to_s, expires: false)
end
s.close
end
@@ -50921,7 +50921,7 @@ shared_examples_for 'concurrent_create' do
Thread.new do
s = new_store
1000.times do |i|
- s[i.to_s].should == name if s.create(i.to_s, name, :expires => false)
+ s[i.to_s].should == name if s.create(i.to_s, name, expires: false)
Thread.pass if rand(100) >= 99
end
s.close
@@ -50947,9 +50947,9 @@ shared_examples_for 'increment' do
store.key?('inckey').should be_true
store.raw['inckey'].should == '1'
store.raw.load('inckey').should == '1'
- store.load('inckey', :raw => true).should == '1'
+ store.load('inckey', raw: true).should == '1'
- store.delete('inckey', :raw => true).should == '1'
+ store.delete('inckey', raw: true).should == '1'
store.key?('inckey').should be_false
end
@@ -50957,14 +50957,14 @@ shared_examples_for 'increment' do
store.increment('inckey', 42).should == 42
store.key?('inckey').should be_true
store.raw['inckey'].should == '42'
- store.delete('inckey', :raw => true).should == '42'
+ store.delete('inckey', raw: true).should == '42'
end
it 'initializes in #increment with 0' do
store.increment('inckey', 0).should == 0
store.key?('inckey').should be_true
store.raw['inckey'].should == '0'
- store.delete('inckey', :raw => true).should == '0'
+ store.delete('inckey', raw: true).should == '0'
end
it 'initializes in #decrement with 0' do
@@ -51006,7 +51006,7 @@ shared_examples_for 'increment' do
end
it 'interprets raw value as integer' do
- store.store('inckey', '42', :raw => true)
+ store.store('inckey', '42', raw: true)
store.increment('inckey').should == 43
store.raw['inckey'].should == '43'
end
@@ -51083,15 +51083,15 @@ end
shared_examples_for 'create_expires' do
it 'creates the given key and expires it' do
- store.create('key','value', :expires => 1).should be_true
+ store.create('key','value', expires: 1).should be_true
store['key'].should == 'value'
sleep 2
store.key?('key').should be_false
end
it 'does not change expires if the key exists' do
- store.store('key', 'value', :expires => false).should == 'value'
- store.create('key','another value', :expires => 1).should be_false
+ store.store('key', 'value', expires: false).should == 'value'
+ store.create('key','another value', expires: 1).should be_false
store['key'].should == 'value'
sleep 2
store['key'].should == 'value'
@@ -51160,11 +51160,11 @@ end
shared_examples_for 'transform_value' do
it 'allows to bypass transformer with :raw' do
store['key'] = 'value'
- load_value(store.load('key', :raw => true)).should == 'value'
+ load_value(store.load('key', raw: true)).should == 'value'
- store.store('key', 'value', :raw => true)
- store.load('key', :raw => true).should == 'value'
- store.delete('key', :raw => true).should == 'value'
+ store.store('key', 'value', raw: true)
+ store.load('key', raw: true).should == 'value'
+ store.delete('key', raw: true).should == 'value'
end
it 'allows to bypass transformer with raw syntactic sugar' do
@@ -51181,12 +51181,12 @@ shared_examples_for 'transform_value' do
end
it 'returns unmarshalled value' do
- store.store('key', 'unmarshalled value', :raw => true)
- store.load('key', :raw => true).should == 'unmarshalled value'
+ store.store('key', 'unmarshalled value', raw: true)
+ store.load('key', raw: true).should == 'unmarshalled value'
end
it 'might raise exception on invalid value' do
- store.store('key', 'unmarshalled value', :raw => true)
+ store.store('key', 'unmarshalled value', raw: true)
begin
store['key'].should == load_value('unmarshalled value')
@@ -51207,30 +51207,30 @@ end
shared_examples_for 'transform_value_expires' do
it 'allows to bypass transformer with :raw' do
store['key'] = 'value'
- load_value(store.load('key', :raw => true)).should == 'value'
+ load_value(store.load('key', raw: true)).should == 'value'
store['key'] = [1,2,3]
- load_value(store.load('key', :raw => true)).should == [[1,2,3]]
+ load_value(store.load('key', raw: true)).should == [[1,2,3]]
store['key'] = nil
- load_value(store.load('key', :raw => true)).should == [nil]
+ load_value(store.load('key', raw: true)).should == [nil]
store['key'] = false
- load_value(store.load('key', :raw => true)).should be_false
+ load_value(store.load('key', raw: true)).should be_false
- store.store('key', 'value', :expires => 10)
- load_value(store.load('key', :raw => true)).first.should == 'value'
- load_value(store.load('key', :raw => true)).last.should respond_to(:to_int)
+ store.store('key', 'value', expires: 10)
+ load_value(store.load('key', raw: true)).first.should == 'value'
+ load_value(store.load('key', raw: true)).last.should respond_to(:to_int)
- store.store('key', 'value', :raw => true)
- store.load('key', :raw => true).should == 'value'
- store.delete('key', :raw => true).should == 'value'
+ store.store('key', 'value', raw: true)
+ store.load('key', raw: true).should == 'value'
+ store.delete('key', raw: true).should == 'value'
end
it 'returns unmarshalled value' do
- store.store('key', 'unmarshalled value', :raw => true)
- store.load('key', :raw => true).should == 'unmarshalled value'
+ store.store('key', 'unmarshalled value', raw: true)
+ store.load('key', raw: true).should == 'unmarshalled value'
end
it 'might raise exception on invalid value' do
- store.store('key', 'unmarshalled value', :raw => true)
+ store.store('key', 'unmarshalled value', raw: true)
begin
store['key'].should == load_value('unmarshalled value')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-moneta.git
More information about the Pkg-ruby-extras-commits
mailing list