moneta 1.0.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +425 -0
- data/.gitignore +3 -0
- data/.rspec +4 -0
- data/.rubocop.yml +194 -0
- data/.yardopts +6 -1
- data/CHANGES +88 -0
- data/CONTRIBUTORS +10 -2
- data/Gemfile +198 -76
- data/LICENSE +1 -1
- data/README.md +181 -83
- data/SPEC.md +70 -0
- data/feature_matrix.yaml +227 -0
- data/lib/action_dispatch/middleware/session/moneta_store.rb +1 -0
- data/lib/active_support/cache/moneta_store.rb +102 -6
- data/lib/moneta/adapter.rb +52 -0
- data/lib/moneta/adapters/activerecord.rb +284 -99
- data/lib/moneta/adapters/activesupportcache.rb +120 -0
- data/lib/moneta/adapters/cassandra.rb +303 -51
- data/lib/moneta/adapters/client.rb +72 -23
- data/lib/moneta/adapters/couch.rb +353 -49
- data/lib/moneta/adapters/datamapper.rb +11 -5
- data/lib/moneta/adapters/daybreak.rb +31 -20
- data/lib/moneta/adapters/dbm.rb +10 -16
- data/lib/moneta/adapters/file.rb +34 -13
- data/lib/moneta/adapters/fog.rb +5 -6
- data/lib/moneta/adapters/gdbm.rb +10 -16
- data/lib/moneta/adapters/hbase.rb +11 -13
- data/lib/moneta/adapters/kyotocabinet.rb +78 -17
- data/lib/moneta/adapters/leveldb.rb +35 -15
- data/lib/moneta/adapters/lmdb.rb +47 -23
- data/lib/moneta/adapters/localmemcache.rb +7 -13
- data/lib/moneta/adapters/lruhash.rb +45 -48
- data/lib/moneta/adapters/memcached/dalli.rb +67 -30
- data/lib/moneta/adapters/memcached/native.rb +33 -30
- data/lib/moneta/adapters/memcached.rb +1 -0
- data/lib/moneta/adapters/memory.rb +7 -7
- data/lib/moneta/adapters/mongo.rb +265 -6
- data/lib/moneta/adapters/null.rb +1 -2
- data/lib/moneta/adapters/pstore.rb +68 -25
- data/lib/moneta/adapters/redis.rb +101 -32
- data/lib/moneta/adapters/restclient.rb +17 -16
- data/lib/moneta/adapters/riak.rb +10 -11
- data/lib/moneta/adapters/sdbm.rb +10 -16
- data/lib/moneta/adapters/sequel/mysql.rb +66 -0
- data/lib/moneta/adapters/sequel/postgres.rb +80 -0
- data/lib/moneta/adapters/sequel/postgres_hstore.rb +240 -0
- data/lib/moneta/adapters/sequel/sqlite.rb +57 -0
- data/lib/moneta/adapters/sequel.rb +253 -52
- data/lib/moneta/adapters/sqlite.rb +103 -23
- data/lib/moneta/adapters/tdb.rb +21 -12
- data/lib/moneta/adapters/tokyocabinet.rb +24 -16
- data/lib/moneta/adapters/tokyotyrant.rb +49 -28
- data/lib/moneta/adapters/yaml.rb +1 -5
- data/lib/moneta/builder.rb +2 -3
- data/lib/moneta/cache.rb +11 -1
- data/lib/moneta/config.rb +101 -0
- data/lib/moneta/create_support.rb +21 -0
- data/lib/moneta/dbm_adapter.rb +31 -0
- data/lib/moneta/defaults.rb +320 -0
- data/lib/moneta/each_key_support.rb +27 -0
- data/lib/moneta/enumerable.rb +38 -0
- data/lib/moneta/expires.rb +112 -11
- data/lib/moneta/expires_support.rb +59 -0
- data/lib/moneta/fallback.rb +84 -0
- data/lib/moneta/hash_adapter.rb +68 -0
- data/lib/moneta/increment_support.rb +16 -0
- data/lib/moneta/lock.rb +26 -2
- data/lib/moneta/logger.rb +2 -2
- data/lib/moneta/nil_values.rb +35 -0
- data/lib/moneta/option_support.rb +51 -0
- data/lib/moneta/optionmerger.rb +0 -1
- data/lib/moneta/pool.rb +339 -28
- data/lib/moneta/proxy.rb +75 -2
- data/lib/moneta/server.rb +230 -68
- data/lib/moneta/shared.rb +36 -14
- data/lib/moneta/stack.rb +7 -7
- data/lib/moneta/synchronize.rb +5 -11
- data/lib/moneta/transformer/config.rb +64 -42
- data/lib/moneta/transformer/helper/bson.rb +7 -14
- data/lib/moneta/transformer/helper.rb +5 -5
- data/lib/moneta/transformer.rb +217 -23
- data/lib/moneta/utils.rb +3 -9
- data/lib/moneta/version.rb +1 -1
- data/lib/moneta/weak_each_key.rb +72 -0
- data/lib/moneta/wrapper.rb +30 -0
- data/lib/moneta.rb +29 -10
- data/lib/rack/cache/moneta.rb +13 -11
- data/lib/rack/moneta_rest.rb +2 -2
- data/lib/rack/session/moneta.rb +3 -4
- data/moneta.gemspec +19 -4
- data/script/benchmarks +311 -100
- data/script/contributors +11 -6
- data/script/parallel-tests +58 -83
- data/script/start-couchdb +27 -0
- data/script/start-hbase +47 -0
- data/script/start-services +5 -6
- data/script/update-feature-matrix +148 -0
- data/spec/active_support/cache_moneta_store_spec.rb +129 -106
- data/spec/features/concurrent_create.rb +42 -0
- data/spec/features/concurrent_increment.rb +39 -0
- data/spec/features/create.rb +25 -0
- data/spec/features/create_expires.rb +19 -0
- data/spec/features/default_expires.rb +14 -0
- data/spec/features/each_key.rb +119 -0
- data/spec/features/expires.rb +296 -0
- data/spec/features/features.rb +16 -0
- data/spec/features/increment.rb +98 -0
- data/spec/features/marshallable_key.rb +43 -0
- data/spec/features/marshallable_value.rb +7 -0
- data/spec/features/multiprocess.rb +8 -0
- data/spec/features/not_create.rb +7 -0
- data/spec/features/not_each_key.rb +7 -0
- data/spec/features/not_increment.rb +13 -0
- data/spec/features/not_persist.rb +9 -0
- data/spec/features/null.rb +66 -0
- data/spec/features/persist.rb +14 -0
- data/spec/features/returndifferent.rb +9 -0
- data/spec/features/returnsame.rb +9 -0
- data/spec/features/store.rb +261 -0
- data/spec/features/store_large.rb +13 -0
- data/spec/features/transform_value.rb +44 -0
- data/spec/features/transform_value_expires.rb +41 -0
- data/spec/helper.rb +345 -78
- data/spec/moneta/adapters/activerecord/adapter_activerecord_existing_connection_spec.rb +61 -0
- data/spec/moneta/adapters/activerecord/adapter_activerecord_spec.rb +126 -0
- data/spec/moneta/adapters/activerecord/standard_activerecord_spec.rb +21 -0
- data/spec/moneta/adapters/activerecord/standard_activerecord_with_expires_spec.rb +27 -0
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_spec.rb +54 -0
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb +54 -0
- data/spec/moneta/adapters/activesupportcache/standard_activesupportcache_spec.rb +14 -0
- data/spec/moneta/adapters/cassandra/adapter_cassandra_spec.rb +17 -0
- data/spec/moneta/adapters/cassandra/adapter_cassandra_with_default_expires_spec.rb +18 -0
- data/spec/moneta/adapters/cassandra/helper.rb +18 -0
- data/spec/moneta/adapters/cassandra/standard_cassandra_spec.rb +18 -0
- data/spec/moneta/adapters/client/adapter_client_spec.rb +11 -0
- data/spec/moneta/adapters/client/client_helper.rb +25 -0
- data/spec/moneta/adapters/client/standard_client_tcp_spec.rb +23 -0
- data/spec/moneta/adapters/client/standard_client_unix_spec.rb +28 -0
- data/spec/moneta/adapters/cookie/adapter_cookie_spec.rb +7 -0
- data/spec/moneta/adapters/couch/adapter_couch_spec.rb +204 -0
- data/spec/moneta/adapters/couch/standard_couch_spec.rb +15 -0
- data/spec/moneta/adapters/couch/standard_couch_with_expires_spec.rb +19 -0
- data/spec/moneta/adapters/datamapper/adapter_datamapper_spec.rb +60 -0
- data/spec/moneta/adapters/datamapper/standard_datamapper_spec.rb +21 -0
- data/spec/moneta/adapters/datamapper/standard_datamapper_with_expires_spec.rb +26 -0
- data/spec/moneta/adapters/datamapper/standard_datamapper_with_repository_spec.rb +22 -0
- data/spec/moneta/adapters/daybreak/adapter_daybreak_spec.rb +7 -0
- data/spec/moneta/adapters/daybreak/standard_daybreak_spec.rb +7 -0
- data/spec/moneta/adapters/daybreak/standard_daybreak_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/dbm/adapter_dbm_spec.rb +7 -0
- data/spec/moneta/adapters/dbm/standard_dbm_spec.rb +7 -0
- data/spec/moneta/adapters/dbm/standard_dbm_with_expires_spec.rb +12 -0
- data/spec/moneta/adapters/faraday_helper.rb +10 -0
- data/spec/moneta/adapters/file/adapter_file_spec.rb +7 -0
- data/spec/moneta/adapters/file/standard_file_spec.rb +7 -0
- data/spec/moneta/adapters/file/standard_file_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/fog/adapter_fog_spec.rb +16 -0
- data/spec/moneta/adapters/fog/standard_fog_spec.rb +15 -0
- data/spec/moneta/adapters/fog/standard_fog_with_expires_spec.rb +20 -0
- data/spec/moneta/adapters/gdbm/adapter_gdbm_spec.rb +7 -0
- data/spec/moneta/adapters/gdbm/standard_gdbm_spec.rb +7 -0
- data/spec/moneta/adapters/gdbm/standard_gdbm_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/hashfile/standard_hashfile_spec.rb +7 -0
- data/spec/moneta/adapters/hashfile/standard_hashfile_with_expires_spec.rb +12 -0
- data/spec/moneta/adapters/hbase/adapter_hbase_spec.rb +7 -0
- data/spec/moneta/adapters/hbase/standard_hbase_spec.rb +4 -0
- data/spec/moneta/adapters/hbase/standard_hbase_with_expires_spec.rb +8 -0
- data/spec/moneta/adapters/kyotocabinet/adapter_kyotocabinet_spec.rb +7 -0
- data/spec/moneta/adapters/kyotocabinet/standard_kyotocabinet_spec.rb +7 -0
- data/spec/moneta/adapters/kyotocabinet/standard_kyotocabinet_with_expires_spec.rb +14 -0
- data/spec/moneta/adapters/leveldb/adapter_leveldb_spec.rb +7 -0
- data/spec/moneta/adapters/leveldb/standard_leveldb_spec.rb +7 -0
- data/spec/moneta/adapters/leveldb/standard_leveldb_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/lmdb/adapter_lmdb_spec.rb +7 -0
- data/spec/moneta/adapters/lmdb/adapter_lmdb_with_db_spec.rb +7 -0
- data/spec/moneta/adapters/lmdb/standard_lmdb_spec.rb +7 -0
- data/spec/moneta/adapters/lmdb/standard_lmdb_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/localmemcache/adapter_localmemcache_spec.rb +7 -0
- data/spec/moneta/adapters/localmemcache/standard_localmemcache_spec.rb +7 -0
- data/spec/moneta/adapters/localmemcache/standard_localmemcache_with_expires_spec.rb +11 -0
- data/spec/moneta/{adapter_lruhash_spec.rb → adapters/lruhash/adapter_lruhash_spec.rb} +15 -33
- data/spec/moneta/adapters/lruhash/standard_lruhash_spec.rb +4 -0
- data/spec/moneta/adapters/lruhash/standard_lruhash_with_expires_spec.rb +8 -0
- data/spec/moneta/adapters/memcached/adapter_memcached_spec.rb +13 -0
- data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_spec.rb +25 -0
- data/spec/moneta/adapters/memcached/dalli/standard_memcached_dalli_spec.rb +11 -0
- data/spec/moneta/adapters/memcached/native/adapter_memcached_native_spec.rb +25 -0
- data/spec/moneta/adapters/memcached/native/standard_memcached_native_spec.rb +11 -0
- data/spec/moneta/adapters/memcached/standard_memcached_spec.rb +17 -0
- data/spec/moneta/adapters/memcached_helper.rb +20 -0
- data/spec/moneta/adapters/memory/adapter_memory_spec.rb +7 -0
- data/spec/moneta/adapters/memory/standard_memory_spec.rb +4 -0
- data/spec/moneta/adapters/memory/standard_memory_with_compress_spec.rb +9 -0
- data/spec/moneta/adapters/memory/standard_memory_with_expires_spec.rb +8 -0
- data/spec/moneta/adapters/memory/standard_memory_with_json_key_serializer_spec.rb +4 -0
- data/spec/moneta/adapters/memory/standard_memory_with_json_serializer_spec.rb +9 -0
- data/spec/moneta/adapters/memory/standard_memory_with_json_value_serializer_spec.rb +9 -0
- data/spec/moneta/adapters/memory/standard_memory_with_prefix_spec.rb +41 -0
- data/spec/moneta/adapters/memory/standard_memory_with_snappy_compress_spec.rb +9 -0
- data/spec/moneta/adapters/mongo/adapter_mongo_spec.rb +41 -0
- data/spec/moneta/adapters/mongo/adapter_mongo_with_default_expires_spec.rb +14 -0
- data/spec/moneta/adapters/mongo/standard_mongo_spec.rb +7 -0
- data/spec/moneta/adapters/null/null_adapter_spec.rb +7 -0
- data/spec/moneta/adapters/null/standard_null_spec.rb +4 -0
- data/spec/moneta/adapters/pstore/adapter_pstore_spec.rb +7 -0
- data/spec/moneta/adapters/pstore/standard_pstore_spec.rb +9 -0
- data/spec/moneta/adapters/pstore/standard_pstore_with_expires_spec.rb +13 -0
- data/spec/moneta/adapters/redis/adapter_redis_spec.rb +20 -0
- data/spec/moneta/adapters/redis/standard_redis_spec.rb +14 -0
- data/spec/moneta/adapters/restclient/adapter_restclient_spec.rb +13 -0
- data/spec/moneta/adapters/restclient/helper.rb +12 -0
- data/spec/moneta/adapters/restclient/standard_restclient_spec.rb +13 -0
- data/spec/moneta/adapters/riak/adapter_riak_spec.rb +14 -0
- data/spec/moneta/adapters/riak/standard_riak_spec.rb +10 -0
- data/spec/moneta/adapters/riak/standard_riak_with_expires_spec.rb +14 -0
- data/spec/moneta/adapters/sdbm/adapter_sdbm_spec.rb +7 -0
- data/spec/moneta/adapters/sdbm/standard_sdbm_spec.rb +7 -0
- data/spec/moneta/adapters/sdbm/standard_sdbm_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/sequel/adapter_sequel_spec.rb +133 -0
- data/spec/moneta/adapters/sequel/helper.rb +80 -0
- data/spec/moneta/adapters/sequel/standard_sequel_spec.rb +8 -0
- data/spec/moneta/adapters/sequel/standard_sequel_with_expires_spec.rb +18 -0
- data/spec/moneta/adapters/sqlite/adapter_sqlite_spec.rb +7 -0
- data/spec/moneta/adapters/sqlite/standard_sqlite_spec.rb +7 -0
- data/spec/moneta/adapters/sqlite/standard_sqlite_with_expires_spec.rb +15 -0
- data/spec/moneta/adapters/tdb/adapter_tdb_spec.rb +7 -0
- data/spec/moneta/adapters/tdb/standard_tdb_spec.rb +7 -0
- data/spec/moneta/adapters/tdb/standard_tdb_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/tokyocabinet/adapter_tokyocabinet_bdb_spec.rb +7 -0
- data/spec/moneta/adapters/tokyocabinet/adapter_tokyocabinet_hdb_spec.rb +7 -0
- data/spec/moneta/adapters/tokyocabinet/standard_tokyocabinet_spec.rb +7 -0
- data/spec/moneta/adapters/tokyocabinet/standard_tokyocabinet_with_expires_spec.rb +11 -0
- data/spec/moneta/adapters/tokyotyrant/adapter_tokyotyrant_spec.rb +11 -0
- data/spec/moneta/adapters/tokyotyrant/helper.rb +12 -0
- data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_spec.rb +7 -0
- data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_with_expires_spec.rb +12 -0
- data/spec/moneta/adapters/yaml/adapter_yaml_spec.rb +7 -0
- data/spec/moneta/adapters/yaml/standard_yaml_spec.rb +9 -0
- data/spec/moneta/adapters/yaml/standard_yaml_with_expires_spec.rb +13 -0
- data/spec/moneta/builder_spec.rb +22 -1
- data/spec/moneta/config_spec.rb +219 -0
- data/spec/moneta/mutex_spec.rb +6 -23
- data/spec/moneta/proxies/cache/cache_file_memory_spec.rb +24 -0
- data/spec/moneta/proxies/cache/cache_memory_null_spec.rb +12 -0
- data/spec/moneta/proxies/enumerable/enumerable_spec.rb +26 -0
- data/spec/moneta/proxies/expires/expires_file_spec.rb +28 -0
- data/spec/moneta/proxies/expires/expires_memory_spec.rb +15 -0
- data/spec/moneta/proxies/expires/expires_memory_with_default_expires_spec.rb +16 -0
- data/spec/moneta/proxies/fallback/fallback_spec.rb +42 -0
- data/spec/moneta/proxies/lock/lock_spec.rb +10 -0
- data/spec/moneta/{optionmerger_spec.rb → proxies/optionmerger/optionmerger_spec.rb} +2 -18
- data/spec/moneta/proxies/pool/pool_spec.rb +353 -0
- data/spec/moneta/proxies/proxy/proxy_expires_memory_spec.rb +16 -0
- data/spec/moneta/proxies/shared/shared_tcp_spec.rb +59 -0
- data/spec/moneta/proxies/shared/shared_unix_spec.rb +58 -0
- data/spec/moneta/proxies/transformer/transformer_bencode_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_bert_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_bson_spec.rb +25 -0
- data/spec/moneta/proxies/transformer/transformer_bzip2_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_json_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_key_inspect_spec.rb +17 -0
- data/spec/moneta/proxies/transformer/transformer_key_marshal_spec.rb +17 -0
- data/spec/moneta/proxies/transformer/transformer_key_to_s_spec.rb +17 -0
- data/spec/moneta/proxies/transformer/transformer_key_yaml_spec.rb +17 -0
- data/spec/moneta/proxies/transformer/transformer_lz4_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_lzma_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_lzo_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_base64_spec.rb +20 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_city128_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_city32_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_city64_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_escape_spec.rb +21 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_hex_spec.rb +20 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_hmac_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_md5_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_md5_spread_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_prefix_base64_spec.rb +33 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_prefix_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_qp_spec.rb +20 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_rmd160_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_sha1_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_sha256_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_sha384_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_sha512_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_truncate_spec.rb +15 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_urlsafe_base64_spec.rb +20 -0
- data/spec/moneta/proxies/transformer/transformer_marshal_uuencode_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_msgpack_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_ox_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_php_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_quicklz_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_snappy_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_tnet_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_value_marshal_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_value_yaml_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_yaml_spec.rb +19 -0
- data/spec/moneta/proxies/transformer/transformer_zlib_spec.rb +19 -0
- data/spec/moneta/proxies/weak_create/weak_create_spec.rb +21 -0
- data/spec/moneta/proxies/weak_each_key/weak_each_key_spec.rb +22 -0
- data/spec/moneta/proxies/weak_increment/weak_increment_spec.rb +21 -0
- data/spec/moneta/semaphore_spec.rb +6 -23
- data/spec/moneta/stack_file_memory_spec.rb +5 -29
- data/spec/moneta/stack_memory_file_spec.rb +5 -31
- data/spec/rack/session_moneta_spec.rb +44 -25
- data/spec/restserver.rb +44 -0
- data/{spec → test}/action_dispatch/fixtures/session_autoload_test/foo.rb +0 -0
- data/{spec/action_dispatch/session_moneta_store_spec.rb → test/action_dispatch/session_moneta_store_test.rb} +13 -5
- metadata +545 -369
- data/.travis.yml +0 -55
- data/lib/moneta/adapters/mongo/base.rb +0 -78
- data/lib/moneta/adapters/mongo/moped.rb +0 -107
- data/lib/moneta/adapters/mongo/official.rb +0 -117
- data/lib/moneta/mixins.rb +0 -343
- data/script/generate-specs +0 -2696
- data/script/install-kyotocabinet +0 -17
- data/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb +0 -36
- data/spec/moneta/adapter_activerecord_spec.rb +0 -65
- data/spec/moneta/adapter_cassandra_spec.rb +0 -33
- data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +0 -34
- data/spec/moneta/adapter_client_spec.rb +0 -35
- data/spec/moneta/adapter_cookie_spec.rb +0 -30
- data/spec/moneta/adapter_couch_spec.rb +0 -36
- data/spec/moneta/adapter_datamapper_spec.rb +0 -64
- data/spec/moneta/adapter_daybreak_spec.rb +0 -31
- data/spec/moneta/adapter_dbm_spec.rb +0 -31
- data/spec/moneta/adapter_file_spec.rb +0 -34
- data/spec/moneta/adapter_fog_spec.rb +0 -37
- data/spec/moneta/adapter_gdbm_spec.rb +0 -31
- data/spec/moneta/adapter_hbase_spec.rb +0 -33
- data/spec/moneta/adapter_kyotocabinet_spec.rb +0 -31
- data/spec/moneta/adapter_leveldb_spec.rb +0 -31
- data/spec/moneta/adapter_lmdb_spec.rb +0 -32
- data/spec/moneta/adapter_lmdb_with_db_spec.rb +0 -32
- data/spec/moneta/adapter_localmemcache_spec.rb +0 -32
- data/spec/moneta/adapter_memcached_dalli_spec.rb +0 -36
- data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +0 -37
- data/spec/moneta/adapter_memcached_native_spec.rb +0 -36
- data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +0 -37
- data/spec/moneta/adapter_memcached_spec.rb +0 -36
- data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +0 -37
- data/spec/moneta/adapter_memory_spec.rb +0 -184
- data/spec/moneta/adapter_mongo_moped_spec.rb +0 -64
- data/spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb +0 -53
- data/spec/moneta/adapter_mongo_official_spec.rb +0 -64
- data/spec/moneta/adapter_mongo_official_with_default_expires_spec.rb +0 -53
- data/spec/moneta/adapter_mongo_spec.rb +0 -51
- data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +0 -53
- data/spec/moneta/adapter_pstore_spec.rb +0 -250
- data/spec/moneta/adapter_redis_spec.rb +0 -36
- data/spec/moneta/adapter_redis_with_default_expires_spec.rb +0 -37
- data/spec/moneta/adapter_restclient_spec.rb +0 -33
- data/spec/moneta/adapter_riak_spec.rb +0 -36
- data/spec/moneta/adapter_sdbm_spec.rb +0 -30
- data/spec/moneta/adapter_sequel_spec.rb +0 -34
- data/spec/moneta/adapter_sqlite_spec.rb +0 -32
- data/spec/moneta/adapter_tdb_spec.rb +0 -31
- data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +0 -31
- data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +0 -31
- data/spec/moneta/adapter_tokyotyrant_spec.rb +0 -34
- data/spec/moneta/adapter_yaml_spec.rb +0 -57
- data/spec/moneta/cache_file_memory_spec.rb +0 -50
- data/spec/moneta/cache_memory_null_spec.rb +0 -35
- data/spec/moneta/expires_file_spec.rb +0 -78
- data/spec/moneta/expires_memory_spec.rb +0 -189
- data/spec/moneta/expires_memory_with_default_expires_spec.rb +0 -190
- data/spec/moneta/lock_spec.rb +0 -187
- data/spec/moneta/null_adapter_spec.rb +0 -86
- data/spec/moneta/pool_spec.rb +0 -38
- data/spec/moneta/proxy_expires_memory_spec.rb +0 -191
- data/spec/moneta/proxy_redis_spec.rb +0 -40
- data/spec/moneta/shared_tcp_spec.rb +0 -46
- data/spec/moneta/shared_unix_spec.rb +0 -46
- data/spec/moneta/standard_activerecord_spec.rb +0 -253
- data/spec/moneta/standard_activerecord_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_cassandra_spec.rb +0 -252
- data/spec/moneta/standard_client_tcp_spec.rb +0 -269
- data/spec/moneta/standard_client_unix_spec.rb +0 -254
- data/spec/moneta/standard_couch_spec.rb +0 -252
- data/spec/moneta/standard_couch_with_expires_spec.rb +0 -254
- data/spec/moneta/standard_datamapper_spec.rb +0 -254
- data/spec/moneta/standard_datamapper_with_expires_spec.rb +0 -256
- data/spec/moneta/standard_datamapper_with_repository_spec.rb +0 -254
- data/spec/moneta/standard_daybreak_spec.rb +0 -250
- data/spec/moneta/standard_daybreak_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_dbm_spec.rb +0 -250
- data/spec/moneta/standard_dbm_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_file_spec.rb +0 -253
- data/spec/moneta/standard_file_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_fog_spec.rb +0 -256
- data/spec/moneta/standard_fog_with_expires_spec.rb +0 -258
- data/spec/moneta/standard_gdbm_spec.rb +0 -250
- data/spec/moneta/standard_gdbm_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_hashfile_spec.rb +0 -253
- data/spec/moneta/standard_hashfile_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_hbase_spec.rb +0 -252
- data/spec/moneta/standard_hbase_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_kyotocabinet_spec.rb +0 -250
- data/spec/moneta/standard_kyotocabinet_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_leveldb_spec.rb +0 -250
- data/spec/moneta/standard_leveldb_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_lmdb_spec.rb +0 -251
- data/spec/moneta/standard_lmdb_with_expires_spec.rb +0 -253
- data/spec/moneta/standard_localmemcache_spec.rb +0 -251
- data/spec/moneta/standard_localmemcache_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_lruhash_spec.rb +0 -187
- data/spec/moneta/standard_lruhash_with_expires_spec.rb +0 -189
- data/spec/moneta/standard_memcached_dalli_spec.rb +0 -255
- data/spec/moneta/standard_memcached_native_spec.rb +0 -255
- data/spec/moneta/standard_memcached_spec.rb +0 -255
- data/spec/moneta/standard_memory_spec.rb +0 -187
- data/spec/moneta/standard_memory_with_compress_spec.rb +0 -187
- data/spec/moneta/standard_memory_with_expires_spec.rb +0 -189
- data/spec/moneta/standard_memory_with_json_key_serializer_spec.rb +0 -86
- data/spec/moneta/standard_memory_with_json_serializer_spec.rb +0 -49
- data/spec/moneta/standard_memory_with_json_value_serializer_spec.rb +0 -90
- data/spec/moneta/standard_memory_with_prefix_spec.rb +0 -187
- data/spec/moneta/standard_memory_with_snappy_compress_spec.rb +0 -187
- data/spec/moneta/standard_mongo_moped_spec.rb +0 -255
- data/spec/moneta/standard_mongo_official_spec.rb +0 -255
- data/spec/moneta/standard_mongo_spec.rb +0 -255
- data/spec/moneta/standard_null_spec.rb +0 -120
- data/spec/moneta/standard_pstore_spec.rb +0 -253
- data/spec/moneta/standard_pstore_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_redis_spec.rb +0 -255
- data/spec/moneta/standard_restclient_spec.rb +0 -252
- data/spec/moneta/standard_riak_spec.rb +0 -255
- data/spec/moneta/standard_riak_with_expires_spec.rb +0 -256
- data/spec/moneta/standard_sdbm_spec.rb +0 -249
- data/spec/moneta/standard_sdbm_with_expires_spec.rb +0 -251
- data/spec/moneta/standard_sequel_spec.rb +0 -253
- data/spec/moneta/standard_sequel_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_sqlite_spec.rb +0 -251
- data/spec/moneta/standard_sqlite_with_expires_spec.rb +0 -253
- data/spec/moneta/standard_tdb_spec.rb +0 -250
- data/spec/moneta/standard_tdb_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_tokyocabinet_spec.rb +0 -250
- data/spec/moneta/standard_tokyocabinet_with_expires_spec.rb +0 -252
- data/spec/moneta/standard_tokyotyrant_spec.rb +0 -253
- data/spec/moneta/standard_tokyotyrant_with_expires_spec.rb +0 -255
- data/spec/moneta/standard_yaml_spec.rb +0 -250
- data/spec/moneta/standard_yaml_with_expires_spec.rb +0 -252
- data/spec/moneta/transformer_bencode_spec.rb +0 -55
- data/spec/moneta/transformer_bert_spec.rb +0 -55
- data/spec/moneta/transformer_bson_spec.rb +0 -60
- data/spec/moneta/transformer_bzip2_spec.rb +0 -55
- data/spec/moneta/transformer_json_spec.rb +0 -55
- data/spec/moneta/transformer_key_inspect_spec.rb +0 -91
- data/spec/moneta/transformer_key_marshal_spec.rb +0 -191
- data/spec/moneta/transformer_key_to_s_spec.rb +0 -91
- data/spec/moneta/transformer_key_yaml_spec.rb +0 -191
- data/spec/moneta/transformer_lz4_spec.rb +0 -55
- data/spec/moneta/transformer_lzma_spec.rb +0 -55
- data/spec/moneta/transformer_lzo_spec.rb +0 -55
- data/spec/moneta/transformer_marshal_base64_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_city128_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_city32_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_city64_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_escape_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_hex_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_hmac_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_md5_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_md5_spread_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_prefix_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_qp_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_rmd160_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_sha1_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_sha256_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_sha384_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_sha512_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_spec.rb +0 -191
- data/spec/moneta/transformer_marshal_truncate_spec.rb +0 -194
- data/spec/moneta/transformer_marshal_uuencode_spec.rb +0 -194
- data/spec/moneta/transformer_msgpack_spec.rb +0 -55
- data/spec/moneta/transformer_ox_spec.rb +0 -191
- data/spec/moneta/transformer_php_spec.rb +0 -55
- data/spec/moneta/transformer_quicklz_spec.rb +0 -55
- data/spec/moneta/transformer_snappy_spec.rb +0 -55
- data/spec/moneta/transformer_tnet_spec.rb +0 -55
- data/spec/moneta/transformer_value_marshal_spec.rb +0 -191
- data/spec/moneta/transformer_value_yaml_spec.rb +0 -191
- data/spec/moneta/transformer_yaml_spec.rb +0 -191
- data/spec/moneta/transformer_zlib_spec.rb +0 -55
- data/spec/moneta/weak_create_spec.rb +0 -41
- data/spec/moneta/weak_increment_spec.rb +0 -41
- data/spec/monetaspecs.rb +0 -51267
- data/spec/quality_spec.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 057afad07820c6a0099c1c8f0d08e8a8db0d8f163ae699a6c492b5114e7690da
|
4
|
+
data.tar.gz: 277352fb763982da85855f170234cf6a2660afeb3b90f6bf34df6dccda586291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0266a4e3016c53408a92a5929152f088ff26c0981561e279e0812726a085e65a6ea90305d362ca04383ee0225915bd470f687c97d9eeafeff960ca21de716616
|
7
|
+
data.tar.gz: 95f6df87a40afeeff7d0c490c88f9c9950a12949358df57da9014cff3ffba1e7893ca43cdfb1d90c20750050d6bc0617e76655a025bff58caa1c89567256a894
|
@@ -0,0 +1,425 @@
|
|
1
|
+
name: Ruby CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ main ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
adapters:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.0', '2.7', '2.6', '2.5', '2.4', jruby]
|
19
|
+
adapter:
|
20
|
+
- Client
|
21
|
+
- Cookie
|
22
|
+
- Daybreak
|
23
|
+
#- dbm
|
24
|
+
- File
|
25
|
+
- Fog
|
26
|
+
- GDBM
|
27
|
+
- HashFile
|
28
|
+
#- HBase
|
29
|
+
- KyotoCabinet
|
30
|
+
- LevelDB
|
31
|
+
- LMDB
|
32
|
+
- LocalMemCache
|
33
|
+
- LRUHash
|
34
|
+
- Memory
|
35
|
+
- 'Null'
|
36
|
+
- PStore
|
37
|
+
- RestClient
|
38
|
+
#- riak
|
39
|
+
- SDBM
|
40
|
+
- TDB
|
41
|
+
- TokyoCabinet
|
42
|
+
- TokyoTyrant
|
43
|
+
- YAML
|
44
|
+
|
45
|
+
env:
|
46
|
+
BUNDLE_WITH: ${{ matrix.adapter }} snappy
|
47
|
+
|
48
|
+
steps:
|
49
|
+
- uses: actions/checkout@v2
|
50
|
+
|
51
|
+
- name: Apt update
|
52
|
+
run: sudo apt-get update
|
53
|
+
|
54
|
+
- name: Apt install dependencies
|
55
|
+
run: sudo apt-get install -y libkyotocabinet-dev libleveldb-dev libtdb-dev libtokyocabinet-dev tokyotyrant libgdbm-dev
|
56
|
+
|
57
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
58
|
+
uses: ruby/setup-ruby@v1
|
59
|
+
with:
|
60
|
+
ruby-version: ${{ matrix.ruby-version }}
|
61
|
+
bundler: latest
|
62
|
+
bundler-cache: true
|
63
|
+
|
64
|
+
- name: Rspec
|
65
|
+
run: bundle exec rspec -t ~unstable -t adapter:${{ matrix.adapter }} -- spec/moneta
|
66
|
+
|
67
|
+
couch:
|
68
|
+
name: "Couch adapter"
|
69
|
+
runs-on: ubuntu-latest
|
70
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
71
|
+
|
72
|
+
services:
|
73
|
+
couch:
|
74
|
+
image: couchdb
|
75
|
+
env:
|
76
|
+
COUCHDB_USER: admin
|
77
|
+
COUCHDB_PASSWORD: password
|
78
|
+
options: >-
|
79
|
+
--health-cmd "curl -s http://127.0.0.1:5984/"
|
80
|
+
--health-interval 10s
|
81
|
+
--health-timeout 5s
|
82
|
+
--health-retries 5
|
83
|
+
ports:
|
84
|
+
- 5984:5984
|
85
|
+
|
86
|
+
strategy:
|
87
|
+
matrix:
|
88
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
89
|
+
|
90
|
+
env:
|
91
|
+
BUNDLE_WITH: RestClient
|
92
|
+
|
93
|
+
steps:
|
94
|
+
- uses: actions/checkout@v2
|
95
|
+
|
96
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
97
|
+
uses: ruby/setup-ruby@v1
|
98
|
+
with:
|
99
|
+
ruby-version: ${{ matrix.ruby-version }}
|
100
|
+
bundler: latest
|
101
|
+
bundler-cache: true
|
102
|
+
|
103
|
+
- name: Rspec
|
104
|
+
run: bundle exec rspec -t adapter:Couch -- spec/moneta
|
105
|
+
|
106
|
+
cassandra:
|
107
|
+
name: "Cassandra adapter"
|
108
|
+
runs-on: ubuntu-latest
|
109
|
+
|
110
|
+
services:
|
111
|
+
cassandra:
|
112
|
+
image: cassandra
|
113
|
+
options: >-
|
114
|
+
--health-cmd "cqlsh -e \"SELECT cql_version FROM system.local\""
|
115
|
+
--health-interval 10s
|
116
|
+
--health-timeout 10s
|
117
|
+
--health-retries 10
|
118
|
+
ports:
|
119
|
+
- 9042:9042
|
120
|
+
|
121
|
+
strategy:
|
122
|
+
matrix:
|
123
|
+
ruby-version: ['2.7', '2.4', jruby]
|
124
|
+
|
125
|
+
env:
|
126
|
+
BUNDLE_WITH: Cassandra
|
127
|
+
|
128
|
+
steps:
|
129
|
+
- uses: actions/checkout@v2
|
130
|
+
|
131
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
132
|
+
uses: ruby/setup-ruby@v1
|
133
|
+
with:
|
134
|
+
ruby-version: ${{ matrix.ruby-version }}
|
135
|
+
bundler: latest
|
136
|
+
bundler-cache: true
|
137
|
+
|
138
|
+
- name: Rspec
|
139
|
+
run: bundle exec rspec -t adapter:Cassandra -- spec/moneta
|
140
|
+
|
141
|
+
mysql-adapters:
|
142
|
+
name: "MySQL adapters"
|
143
|
+
runs-on: ubuntu-latest
|
144
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
145
|
+
|
146
|
+
services:
|
147
|
+
mysql:
|
148
|
+
image: mysql
|
149
|
+
env:
|
150
|
+
MYSQL_ROOT_PASSWORD: moneta
|
151
|
+
options: >-
|
152
|
+
--health-cmd "mysqladmin ping -h 127.0.0.1 --silent"
|
153
|
+
--health-interval 10s
|
154
|
+
--health-timeout 5s
|
155
|
+
--health-retries 5
|
156
|
+
ports:
|
157
|
+
- 3306:3306
|
158
|
+
|
159
|
+
strategy:
|
160
|
+
matrix:
|
161
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
162
|
+
|
163
|
+
env:
|
164
|
+
BUNDLE_WITH: ActiveRecord Sequel DataMapper mysql
|
165
|
+
MYSQL_HOST: 127.0.0.1
|
166
|
+
MONETA_MYSQL_PASSWORD: moneta
|
167
|
+
|
168
|
+
steps:
|
169
|
+
- uses: actions/checkout@v2
|
170
|
+
|
171
|
+
- name: Apt update
|
172
|
+
run: sudo apt-get update
|
173
|
+
|
174
|
+
- name: Apt install mysql packages
|
175
|
+
run: sudo apt-get install -y libmysqlclient-dev
|
176
|
+
|
177
|
+
- name: Create Database moneta
|
178
|
+
run: mysqladmin -h 127.0.0.1 -u root create moneta
|
179
|
+
env:
|
180
|
+
MYSQL_PWD: moneta
|
181
|
+
|
182
|
+
- name: Create Database moneta2
|
183
|
+
run: mysqladmin -h 127.0.0.1 -u root create moneta2
|
184
|
+
env:
|
185
|
+
MYSQL_PWD: moneta
|
186
|
+
|
187
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
188
|
+
uses: ruby/setup-ruby@v1
|
189
|
+
with:
|
190
|
+
ruby-version: ${{ matrix.ruby-version }}
|
191
|
+
bundler: latest
|
192
|
+
bundler-cache: true
|
193
|
+
|
194
|
+
- name: Rspec
|
195
|
+
run: bundle exec rspec -t mysql -- spec/moneta
|
196
|
+
|
197
|
+
postgres-adapters:
|
198
|
+
name: "Postgres adapters"
|
199
|
+
runs-on: ubuntu-latest
|
200
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
201
|
+
|
202
|
+
services:
|
203
|
+
postgres:
|
204
|
+
image: postgres:13.6
|
205
|
+
env:
|
206
|
+
POSTGRES_PASSWORD: moneta
|
207
|
+
options: >-
|
208
|
+
--health-cmd pg_isready
|
209
|
+
--health-interval 10s
|
210
|
+
--health-timeout 5s
|
211
|
+
--health-retries 5
|
212
|
+
ports:
|
213
|
+
- 5432:5432
|
214
|
+
|
215
|
+
strategy:
|
216
|
+
matrix:
|
217
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
218
|
+
|
219
|
+
env:
|
220
|
+
BUNDLE_WITH: ActiveRecord Sequel DataMapper postgresql
|
221
|
+
PGHOST: localhost
|
222
|
+
PGUSER: postgres
|
223
|
+
PGPASSWORD: moneta
|
224
|
+
|
225
|
+
steps:
|
226
|
+
- uses: actions/checkout@v2
|
227
|
+
|
228
|
+
- name: Create Database moneta1
|
229
|
+
run: createdb moneta1
|
230
|
+
|
231
|
+
- name: Create Database moneta2
|
232
|
+
run: createdb moneta2
|
233
|
+
|
234
|
+
- name: Add hstore support to moneta1
|
235
|
+
run: psql -c 'create extension hstore;' moneta1
|
236
|
+
|
237
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
238
|
+
uses: ruby/setup-ruby@v1
|
239
|
+
with:
|
240
|
+
ruby-version: ${{ matrix.ruby-version }}
|
241
|
+
bundler: latest
|
242
|
+
bundler-cache: true
|
243
|
+
|
244
|
+
- name: Rspec
|
245
|
+
run: bundle exec rspec -t postgres -- spec/moneta
|
246
|
+
|
247
|
+
sqlite-adapters:
|
248
|
+
name: "SQLite adapters"
|
249
|
+
runs-on: ubuntu-latest
|
250
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
251
|
+
|
252
|
+
strategy:
|
253
|
+
matrix:
|
254
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
255
|
+
|
256
|
+
env:
|
257
|
+
BUNDLE_WITH: ActiveRecord Sequel DataMapper sqlite
|
258
|
+
|
259
|
+
steps:
|
260
|
+
- uses: actions/checkout@v2
|
261
|
+
|
262
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
263
|
+
uses: ruby/setup-ruby@v1
|
264
|
+
with:
|
265
|
+
ruby-version: ${{ matrix.ruby-version }}
|
266
|
+
bundler: latest
|
267
|
+
bundler-cache: true
|
268
|
+
|
269
|
+
- name: Rspec
|
270
|
+
run: bundle exec rspec -t sqlite -- spec/moneta
|
271
|
+
|
272
|
+
redis:
|
273
|
+
name: "Redis adapters"
|
274
|
+
runs-on: ubuntu-latest
|
275
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
276
|
+
|
277
|
+
services:
|
278
|
+
redis:
|
279
|
+
image: redis
|
280
|
+
options: >-
|
281
|
+
--health-cmd "redis-cli ping"
|
282
|
+
--health-interval 10s
|
283
|
+
--health-timeout 5s
|
284
|
+
--health-retries 5
|
285
|
+
ports:
|
286
|
+
- 6379:6379
|
287
|
+
|
288
|
+
strategy:
|
289
|
+
matrix:
|
290
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
291
|
+
|
292
|
+
env:
|
293
|
+
BUNDLE_WITH: Redis
|
294
|
+
|
295
|
+
steps:
|
296
|
+
- uses: actions/checkout@v2
|
297
|
+
|
298
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
299
|
+
uses: ruby/setup-ruby@v1
|
300
|
+
with:
|
301
|
+
ruby-version: ${{ matrix.ruby-version }}
|
302
|
+
bundler: latest
|
303
|
+
bundler-cache: true
|
304
|
+
|
305
|
+
- name: Rspec
|
306
|
+
run: bundle exec rspec -t adapter:Redis -t redis -- spec/moneta
|
307
|
+
|
308
|
+
memcached:
|
309
|
+
name: "Memcached adapters"
|
310
|
+
runs-on: ubuntu-latest
|
311
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
312
|
+
|
313
|
+
strategy:
|
314
|
+
matrix:
|
315
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
316
|
+
|
317
|
+
env:
|
318
|
+
BUNDLE_WITH: Memcached
|
319
|
+
|
320
|
+
steps:
|
321
|
+
- uses: actions/checkout@v2
|
322
|
+
|
323
|
+
- name: Apt update
|
324
|
+
run: sudo apt-get update
|
325
|
+
|
326
|
+
- name: Apt install memcached
|
327
|
+
run: sudo apt-get install -y memcached libsasl2-dev
|
328
|
+
|
329
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
330
|
+
uses: ruby/setup-ruby@v1
|
331
|
+
with:
|
332
|
+
ruby-version: ${{ matrix.ruby-version }}
|
333
|
+
bundler: latest
|
334
|
+
bundler-cache: true
|
335
|
+
|
336
|
+
- name: Rspec
|
337
|
+
run: bundle exec rspec -t ~unstable -t adapter:Memcached -t memcached -- spec/moneta
|
338
|
+
|
339
|
+
mongo:
|
340
|
+
name: "Mongo adapter"
|
341
|
+
runs-on: ubuntu-latest
|
342
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
343
|
+
|
344
|
+
services:
|
345
|
+
mongo:
|
346
|
+
image: mongo
|
347
|
+
options: >-
|
348
|
+
--health-cmd "mongo --eval db"
|
349
|
+
--health-interval 10s
|
350
|
+
--health-timeout 5s
|
351
|
+
--health-retries 5
|
352
|
+
ports:
|
353
|
+
- 27017:27017
|
354
|
+
|
355
|
+
strategy:
|
356
|
+
matrix:
|
357
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
358
|
+
|
359
|
+
env:
|
360
|
+
BUNDLE_WITH: Mongo
|
361
|
+
|
362
|
+
steps:
|
363
|
+
- uses: actions/checkout@v2
|
364
|
+
|
365
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
366
|
+
uses: ruby/setup-ruby@v1
|
367
|
+
with:
|
368
|
+
ruby-version: ${{ matrix.ruby-version }}
|
369
|
+
bundler: latest
|
370
|
+
bundler-cache: true
|
371
|
+
|
372
|
+
- name: Rspec
|
373
|
+
run: bundle exec rspec -t adapter:Mongo -- spec/moneta
|
374
|
+
|
375
|
+
residual-specs:
|
376
|
+
name: "Proxies and other specs"
|
377
|
+
runs-on: ubuntu-latest
|
378
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
379
|
+
|
380
|
+
strategy:
|
381
|
+
matrix:
|
382
|
+
ruby-version: ['3.0', '2.7', '2.4', jruby]
|
383
|
+
|
384
|
+
env:
|
385
|
+
BUNDLE_WITH: transformers GDBM Fog
|
386
|
+
|
387
|
+
steps:
|
388
|
+
- uses: actions/checkout@v2
|
389
|
+
|
390
|
+
- name: Apt update
|
391
|
+
run: sudo apt-get update
|
392
|
+
|
393
|
+
- name: Apt install dependencies
|
394
|
+
run: sudo apt-get install -y libgdbm-dev liblzo2-dev
|
395
|
+
|
396
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
397
|
+
uses: ruby/setup-ruby@v1
|
398
|
+
with:
|
399
|
+
ruby-version: ${{ matrix.ruby-version }}
|
400
|
+
bundler: latest
|
401
|
+
bundler-cache: true
|
402
|
+
|
403
|
+
- name: Rspec
|
404
|
+
run: bundle exec rspec -t ~unstable --exclude-pattern "./spec/{moneta/adapters/**/*,active_support/**/*}"
|
405
|
+
|
406
|
+
- name: Minitest
|
407
|
+
run: bundle exec ruby test/action_dispatch/session_moneta_store_test.rb
|
408
|
+
|
409
|
+
rubocop:
|
410
|
+
name: "Rubocop"
|
411
|
+
runs-on: ubuntu-latest
|
412
|
+
continue-on-error: ${{ matrix.ruby-version == '3.0' }}
|
413
|
+
|
414
|
+
steps:
|
415
|
+
- uses: actions/checkout@v2
|
416
|
+
|
417
|
+
- name: Set up Ruby
|
418
|
+
uses: ruby/setup-ruby@v1
|
419
|
+
with:
|
420
|
+
ruby-version: '3.0'
|
421
|
+
bundler: latest
|
422
|
+
bundler-cache: true
|
423
|
+
|
424
|
+
- name: Rubocop
|
425
|
+
run: bundle exec rubocop lib
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.3.0
|
3
|
+
UseCache: true
|
4
|
+
Exclude:
|
5
|
+
- hbase/**/*
|
6
|
+
- script/**/*
|
7
|
+
- vendor/**/*
|
8
|
+
|
9
|
+
Layout/ArrayAlignment:
|
10
|
+
Exclude:
|
11
|
+
- lib/moneta/transformer/config.rb
|
12
|
+
|
13
|
+
Layout/DotPosition:
|
14
|
+
EnforcedStyle: leading
|
15
|
+
|
16
|
+
Layout/EmptyLineAfterGuardClause:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Layout/ExtraSpacing:
|
20
|
+
Exclude:
|
21
|
+
- lib/moneta.rb
|
22
|
+
- lib/moneta/transformer/config.rb
|
23
|
+
|
24
|
+
Layout/HashAlignment:
|
25
|
+
Exclude:
|
26
|
+
- lib/moneta/transformer/config.rb
|
27
|
+
|
28
|
+
Layout/LineLength:
|
29
|
+
Max: 160
|
30
|
+
|
31
|
+
Layout/MultilineMethodCallIndentation:
|
32
|
+
EnforcedStyle: indented
|
33
|
+
|
34
|
+
Layout/MultilineOperationIndentation:
|
35
|
+
EnforcedStyle: indented
|
36
|
+
|
37
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
38
|
+
Exclude:
|
39
|
+
- lib/moneta/transformer/config.rb
|
40
|
+
|
41
|
+
Lint/AssignmentInCondition:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Lint/RaiseException:
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Lint/ShadowedException:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Lint/ShadowingOuterLocalVariable:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Lint/StructNewOverride:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Lint/UnusedMethodArgument:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Lint/Void:
|
60
|
+
Exclude:
|
61
|
+
- spec/**/*
|
62
|
+
|
63
|
+
Metrics/AbcSize:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Metrics/BlockNesting:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Metrics/ClassLength:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Metrics/CyclomaticComplexity:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Metrics/BlockLength:
|
76
|
+
Exclude:
|
77
|
+
- spec/**/*
|
78
|
+
|
79
|
+
Metrics/MethodLength:
|
80
|
+
Enabled: false
|
81
|
+
|
82
|
+
Metrics/ModuleLength:
|
83
|
+
Enabled: false
|
84
|
+
|
85
|
+
Metrics/ParameterLists:
|
86
|
+
Enabled: false
|
87
|
+
|
88
|
+
Metrics/PerceivedComplexity:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
Naming/ConstantName:
|
92
|
+
Exclude:
|
93
|
+
- lib/rack/cache/moneta.rb
|
94
|
+
|
95
|
+
Naming/RescuedExceptionsVariableName:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Naming/MemoizedInstanceVariableName:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
Security/MarshalLoad:
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
Style/AndOr:
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
Style/CaseEquality:
|
108
|
+
Enabled: false
|
109
|
+
|
110
|
+
Style/CharacterLiteral:
|
111
|
+
Enabled: false
|
112
|
+
|
113
|
+
Style/DoubleNegation:
|
114
|
+
Enabled: false
|
115
|
+
|
116
|
+
Style/GlobalVars:
|
117
|
+
Exclude:
|
118
|
+
- spec/moneta/adapters/cassandra/helper.rb
|
119
|
+
|
120
|
+
Style/FrozenStringLiteralComment:
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
Style/FormatString:
|
124
|
+
Enabled: false
|
125
|
+
|
126
|
+
Style/GuardClause:
|
127
|
+
Enabled: false
|
128
|
+
|
129
|
+
Style/HashEachMethods:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Style/HashTransformKeys:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Style/HashTransformValues:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Style/IfUnlessModifier:
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
Style/Lambda:
|
142
|
+
EnforcedStyle: lambda
|
143
|
+
|
144
|
+
Style/ModuleFunction:
|
145
|
+
Enabled: false
|
146
|
+
|
147
|
+
Style/MultilineIfModifier:
|
148
|
+
Enabled: false
|
149
|
+
|
150
|
+
Style/MutableConstant:
|
151
|
+
Exclude:
|
152
|
+
- lib/rack/cache/moneta.rb
|
153
|
+
|
154
|
+
Style/NilComparison:
|
155
|
+
EnforcedStyle: comparison
|
156
|
+
|
157
|
+
Style/NumericLiterals:
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Style/NumericPredicate:
|
161
|
+
EnforcedStyle: comparison
|
162
|
+
|
163
|
+
Style/NonNilCheck:
|
164
|
+
Enabled: false
|
165
|
+
|
166
|
+
Style/ParallelAssignment:
|
167
|
+
Enabled: false
|
168
|
+
|
169
|
+
Style/PercentLiteralDelimiters:
|
170
|
+
Enabled: false
|
171
|
+
|
172
|
+
Style/PreferredHashMethods:
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
Style/RescueStandardError:
|
176
|
+
EnforcedStyle: implicit
|
177
|
+
|
178
|
+
Style/RescueModifier:
|
179
|
+
Enabled: false
|
180
|
+
|
181
|
+
Style/SafeNavigation:
|
182
|
+
Enabled: false
|
183
|
+
|
184
|
+
Style/StringLiterals:
|
185
|
+
Enabled: false
|
186
|
+
|
187
|
+
Style/SymbolArray:
|
188
|
+
Enabled: false
|
189
|
+
|
190
|
+
Style/SymbolProc:
|
191
|
+
Enabled: false
|
192
|
+
|
193
|
+
Style/YodaCondition:
|
194
|
+
Enabled: false
|