moneta 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +176 -0
- data/.travis.yml +57 -23
- data/CHANGES +12 -0
- data/Gemfile +89 -64
- data/README.md +40 -14
- data/feature_matrix.yaml +1 -0
- data/lib/action_dispatch/middleware/session/moneta_store.rb +1 -0
- data/lib/active_support/cache/moneta_store.rb +5 -5
- data/lib/moneta.rb +9 -1
- data/lib/moneta/adapters/activerecord.rb +35 -19
- data/lib/moneta/adapters/activesupportcache.rb +3 -7
- data/lib/moneta/adapters/cassandra.rb +24 -16
- data/lib/moneta/adapters/client.rb +13 -9
- data/lib/moneta/adapters/couch.rb +220 -80
- data/lib/moneta/adapters/datamapper.rb +1 -0
- data/lib/moneta/adapters/file.rb +9 -6
- data/lib/moneta/adapters/hbase.rb +1 -1
- data/lib/moneta/adapters/kyotocabinet.rb +8 -7
- data/lib/moneta/adapters/leveldb.rb +1 -1
- data/lib/moneta/adapters/lmdb.rb +3 -4
- data/lib/moneta/adapters/lruhash.rb +29 -62
- data/lib/moneta/adapters/memcached.rb +1 -0
- data/lib/moneta/adapters/memcached/dalli.rb +1 -1
- data/lib/moneta/adapters/memcached/native.rb +10 -8
- data/lib/moneta/adapters/mongo.rb +1 -0
- data/lib/moneta/adapters/mongo/base.rb +3 -3
- data/lib/moneta/adapters/mongo/moped.rb +12 -13
- data/lib/moneta/adapters/mongo/official.rb +7 -8
- data/lib/moneta/adapters/null.rb +1 -2
- data/lib/moneta/adapters/pstore.rb +3 -2
- data/lib/moneta/adapters/redis.rb +3 -3
- data/lib/moneta/adapters/restclient.rb +12 -3
- data/lib/moneta/adapters/riak.rb +2 -2
- data/lib/moneta/adapters/sequel.rb +112 -119
- data/lib/moneta/adapters/sqlite.rb +3 -3
- data/lib/moneta/adapters/tokyotyrant.rb +1 -1
- data/lib/moneta/builder.rb +0 -1
- data/lib/moneta/enumerable.rb +38 -0
- data/lib/moneta/expires.rb +12 -12
- data/lib/moneta/fallback.rb +84 -0
- data/lib/moneta/lock.rb +1 -1
- data/lib/moneta/logger.rb +2 -2
- data/lib/moneta/mixins.rb +12 -10
- data/lib/moneta/optionmerger.rb +0 -1
- data/lib/moneta/pool.rb +301 -31
- data/lib/moneta/proxy.rb +2 -2
- data/lib/moneta/server.rb +9 -12
- data/lib/moneta/shared.rb +1 -1
- data/lib/moneta/stack.rb +6 -6
- data/lib/moneta/synchronize.rb +3 -3
- data/lib/moneta/transformer.rb +19 -17
- data/lib/moneta/transformer/config.rb +6 -5
- data/lib/moneta/transformer/helper.rb +3 -3
- data/lib/moneta/transformer/helper/bson.rb +18 -15
- data/lib/moneta/utils.rb +3 -9
- data/lib/moneta/version.rb +1 -1
- data/lib/moneta/weak_each_key.rb +2 -4
- data/lib/rack/cache/moneta.rb +16 -13
- data/lib/rack/moneta_rest.rb +2 -2
- data/lib/rack/session/moneta.rb +3 -4
- data/moneta.gemspec +8 -0
- data/script/benchmarks +55 -32
- data/script/reconfigure-couchdb +13 -0
- data/script/start-hbase +1 -0
- data/script/start-services +2 -10
- data/spec/active_support/cache_moneta_store_spec.rb +3 -1
- data/spec/features/concurrent_create.rb +31 -10
- data/spec/features/concurrent_increment.rb +27 -19
- data/spec/features/increment.rb +41 -41
- data/spec/helper.rb +2 -42
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_spec.rb +4 -1
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb +4 -1
- data/spec/moneta/adapters/activesupportcache/standard_activesupportcache_spec.rb +14 -0
- data/spec/moneta/adapters/couch/adapter_couch_spec.rb +199 -2
- data/spec/moneta/adapters/couch/standard_couch_spec.rb +8 -2
- data/spec/moneta/adapters/couch/standard_couch_with_expires_spec.rb +7 -1
- data/spec/moneta/adapters/faraday_helper.rb +9 -0
- data/spec/moneta/adapters/lruhash/adapter_lruhash_spec.rb +2 -2
- data/spec/moneta/adapters/memcached/adapter_memcached_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_with_default_expires_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/dalli/standard_memcached_dalli_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/native/adapter_memcached_native_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/native/adapter_memcached_native_with_default_expires_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/native/standard_memcached_native_spec.rb +1 -1
- data/spec/moneta/adapters/memcached/standard_memcached_spec.rb +1 -1
- data/spec/moneta/adapters/{memcached/helper.rb → memcached_helper.rb} +0 -0
- data/spec/moneta/adapters/null/null_adapter_spec.rb +1 -1
- data/spec/moneta/adapters/restclient/adapter_restclient_spec.rb +7 -5
- data/spec/moneta/adapters/restclient/helper.rb +12 -0
- data/spec/moneta/adapters/restclient/standard_restclient_spec.rb +9 -6
- data/spec/moneta/adapters/riak/standard_riak_with_expires_spec.rb +4 -0
- data/spec/moneta/adapters/tokyotyrant/adapter_tokyotyrant_spec.rb +6 -2
- data/spec/moneta/adapters/tokyotyrant/helper.rb +12 -0
- data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_spec.rb +5 -2
- data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_with_expires_spec.rb +5 -1
- data/spec/moneta/proxies/enumerable/enumerable_spec.rb +26 -0
- data/spec/moneta/proxies/fallback/fallback_spec.rb +42 -0
- data/spec/moneta/proxies/pool/pool_spec.rb +319 -6
- data/spec/restserver.rb +40 -0
- metadata +122 -7
- data/script/install-kyotocabinet +0 -17
data/spec/helper.rb
CHANGED
@@ -262,8 +262,8 @@ module MonetaHelpers
|
|
262
262
|
# want to run the tests but don't want to grant root access to moneta
|
263
263
|
let(:mysql_username) { ENV['MONETA_MYSQL_USERNAME'] || 'root' }
|
264
264
|
let(:mysql_password) { ENV['MONETA_MYSQL_PASSWORD'] }
|
265
|
-
let(:mysql_database1) { ENV['
|
266
|
-
let(:mysql_database2) { ENV['
|
265
|
+
let(:mysql_database1) { ENV['MONETA_MYSQL_DATABASE1'] || 'moneta' }
|
266
|
+
let(:mysql_database2) { ENV['MONETA_MYSQL_DATABASE2'] || 'moneta2' }
|
267
267
|
|
268
268
|
let(:postgres_username) { ENV['MONETA_POSTGRES_USERNAME'] || 'postgres' }
|
269
269
|
let(:postgres_database1) { ENV['MONETA_POSTGRES_DATABSASE1'] || 'moneta1' }
|
@@ -300,19 +300,6 @@ module MonetaHelpers
|
|
300
300
|
def use_timecop
|
301
301
|
before{ @timecop = true }
|
302
302
|
end
|
303
|
-
|
304
|
-
def start_memcached(port)
|
305
|
-
before :context do
|
306
|
-
@memcached = spawn("memcached -p #{port}")
|
307
|
-
sleep 0.5
|
308
|
-
end
|
309
|
-
|
310
|
-
after :context do
|
311
|
-
Process.kill("TERM", @memcached)
|
312
|
-
Process.wait(@memcached)
|
313
|
-
@memcached = nil
|
314
|
-
end
|
315
|
-
end
|
316
303
|
end
|
317
304
|
|
318
305
|
module InstanceMethods
|
@@ -336,33 +323,6 @@ module MonetaHelpers
|
|
336
323
|
end
|
337
324
|
end
|
338
325
|
|
339
|
-
def start_restserver
|
340
|
-
require 'rack'
|
341
|
-
require 'webrick'
|
342
|
-
require 'rack/moneta_rest'
|
343
|
-
|
344
|
-
# Keep webrick quiet
|
345
|
-
::WEBrick::HTTPServer.class_eval do
|
346
|
-
def access_log(config, req, res); end
|
347
|
-
end
|
348
|
-
::WEBrick::BasicLog.class_eval do
|
349
|
-
def log(level, data); end
|
350
|
-
end
|
351
|
-
|
352
|
-
Thread.start do
|
353
|
-
Rack::Server.start(:app => Rack::Builder.app do
|
354
|
-
use Rack::Lint
|
355
|
-
map '/moneta' do
|
356
|
-
run Rack::MonetaRest.new(:store => :Memory)
|
357
|
-
end
|
358
|
-
end,
|
359
|
-
:environment => :none,
|
360
|
-
:server => :webrick,
|
361
|
-
:Port => 8808)
|
362
|
-
end
|
363
|
-
sleep 1
|
364
|
-
end
|
365
|
-
|
366
326
|
def start_server(*args)
|
367
327
|
server = Moneta::Server.new(*args)
|
368
328
|
Thread.new { server.run }
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative '../memcached_helper.rb'
|
2
|
+
|
1
3
|
describe 'adapter_activesupportcache', adapter: :ActiveSupportCache do
|
2
4
|
before :all do
|
3
5
|
require 'active_support'
|
@@ -25,7 +27,8 @@ describe 'adapter_activesupportcache', adapter: :ActiveSupportCache do
|
|
25
27
|
let(:t_res) { 1 }
|
26
28
|
let(:min_ttl) { 2 }
|
27
29
|
use_timecop
|
28
|
-
|
30
|
+
|
31
|
+
include_context :start_memcached, 11215
|
29
32
|
|
30
33
|
let(:backend) { ActiveSupport::Cache::MemCacheStore.new('127.0.0.1:11215') }
|
31
34
|
include_examples :adapter_activesupportcache
|
data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative '../memcached_helper'
|
2
|
+
|
1
3
|
describe 'adapter_activesupportcache_with_default_expires', adapter: :ActiveSupportCache do
|
2
4
|
before :all do
|
3
5
|
require 'active_support'
|
@@ -25,7 +27,8 @@ describe 'adapter_activesupportcache_with_default_expires', adapter: :ActiveSupp
|
|
25
27
|
let(:t_res) { 1 }
|
26
28
|
let(:min_ttl) { 2 }
|
27
29
|
use_timecop
|
28
|
-
|
30
|
+
|
31
|
+
include_context :start_memcached, 11223
|
29
32
|
|
30
33
|
let(:backend) { ActiveSupport::Cache::MemCacheStore.new('127.0.0.1:11223') }
|
31
34
|
include_examples :adapter_activesupportcache_with_default_expires
|
@@ -0,0 +1,14 @@
|
|
1
|
+
describe 'standard_activesupportcache' do
|
2
|
+
before :context do
|
3
|
+
require 'active_support'
|
4
|
+
end
|
5
|
+
|
6
|
+
let(:t_res) { 0.1 }
|
7
|
+
let(:min_ttl) { 0.1 }
|
8
|
+
|
9
|
+
moneta_store :ActiveSupportCache do
|
10
|
+
{ backend: ActiveSupport::Cache::MemoryStore.new }
|
11
|
+
end
|
12
|
+
|
13
|
+
moneta_specs STANDARD_SPECS.without_create.without_persist.with_native_expires
|
14
|
+
end
|
@@ -1,7 +1,204 @@
|
|
1
|
-
|
1
|
+
require_relative '../faraday_helper.rb'
|
2
|
+
|
3
|
+
describe 'adapter_couch', adapter: :Couch do
|
4
|
+
include_context :faraday_adapter
|
5
|
+
|
2
6
|
moneta_build do
|
3
|
-
Moneta::Adapters::Couch.new(db: 'adapter_couch')
|
7
|
+
Moneta::Adapters::Couch.new(db: 'adapter_couch', adapter: faraday_adapter)
|
4
8
|
end
|
5
9
|
|
6
10
|
moneta_specs ADAPTER_SPECS.without_increment.simplevalues_only.without_path.with_each_key
|
11
|
+
|
12
|
+
shared_examples :batch do
|
13
|
+
shared_examples :no_batch do
|
14
|
+
it "does not add 'batch=ok' to the query'" do
|
15
|
+
expect(store).not_to receive(:request).with(any_args, hash_including(query: hash_including(batch: 'ok')))
|
16
|
+
expect(store).to receive(:request)
|
17
|
+
store.public_send(m, *args, options)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'without a :batch option' do
|
22
|
+
let(:options) { {} }
|
23
|
+
include_examples(:no_batch)
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'with batch: false' do
|
27
|
+
let(:options) { { batch: false } }
|
28
|
+
include_examples(:no_batch)
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'with batch: true' do
|
32
|
+
let(:options) { { batch: true } }
|
33
|
+
|
34
|
+
it "adds 'batch=ok' to the query'" do
|
35
|
+
expect(store).to receive(:request).with(instance_of(Symbol), instance_of(String), any_args,
|
36
|
+
hash_including(expect: 202, query: hash_including(batch: 'ok')))
|
37
|
+
store.public_send(m, *args, options)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
shared_examples :full_commit do
|
43
|
+
context 'without a :full_commit option' do
|
44
|
+
let(:options) { {} }
|
45
|
+
|
46
|
+
it "does not add a 'X-Couch-Full-Commit' header'" do
|
47
|
+
expect(store).not_to receive(:request)
|
48
|
+
.with(any_args, hash_including(headers: hash_including('X-Couch-Full-Commit' => instance_of(String))))
|
49
|
+
expect(store).to receive(:request).ordered
|
50
|
+
store.public_send(m, *args, options)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
context 'with full_commit: true' do
|
55
|
+
let(:options) { { full_commit: true } }
|
56
|
+
|
57
|
+
it "adds 'X-Couch-Full-Commit: true' to the headers'" do
|
58
|
+
expect(store).to receive(:request)
|
59
|
+
.with(instance_of(Symbol), instance_of(String), any_args,
|
60
|
+
hash_including(headers: hash_including('X-Couch-Full-Commit' => 'true')))
|
61
|
+
.ordered
|
62
|
+
store.public_send(m, *args, options)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context 'with full_commit: false' do
|
67
|
+
let(:options) { { full_commit: false } }
|
68
|
+
|
69
|
+
it "adds 'X-Couch-Full-Commit: false' to the headers'" do
|
70
|
+
expect(store).to receive(:request)
|
71
|
+
.with(instance_of(Symbol), instance_of(String), any_args,
|
72
|
+
hash_including(headers: hash_including('X-Couch-Full-Commit' => 'false')))
|
73
|
+
.ordered
|
74
|
+
store.public_send(m, *args, options)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe '#store' do
|
80
|
+
let(:m) { :store }
|
81
|
+
let(:args) { ['a', 'b'] }
|
82
|
+
|
83
|
+
include_examples :batch
|
84
|
+
include_examples :full_commit
|
85
|
+
end
|
86
|
+
|
87
|
+
describe '#delete' do
|
88
|
+
let(:m) { :delete }
|
89
|
+
let(:args) { ['a'] }
|
90
|
+
|
91
|
+
before do
|
92
|
+
expect(store).to receive(:request).with(:get, 'a', any_args).ordered do
|
93
|
+
Faraday::Response.new(
|
94
|
+
Faraday::Env.from(status: 200,
|
95
|
+
body: '{"type":"Hash","test":1}',
|
96
|
+
response_headers: { 'ETag' => '"testrev"' }))
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
include_examples :batch
|
101
|
+
include_examples :full_commit
|
102
|
+
end
|
103
|
+
|
104
|
+
describe '#merge!' do
|
105
|
+
let(:m) { :merge! }
|
106
|
+
let(:args) { [{'a' => '1'}] }
|
107
|
+
|
108
|
+
before do
|
109
|
+
expect(store).to receive(:request).with(:post, '_all_docs', any_args).ordered do
|
110
|
+
{ 'rows' => [] }
|
111
|
+
end
|
112
|
+
|
113
|
+
allow(store).to receive(:request).with(:post, '_bulk_docs', any_args) do
|
114
|
+
[
|
115
|
+
{
|
116
|
+
"ok" => true,
|
117
|
+
"id" => 'a',
|
118
|
+
"rev" => 'testrev'
|
119
|
+
}
|
120
|
+
]
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
include_examples :full_commit
|
125
|
+
end
|
126
|
+
|
127
|
+
describe '#clear' do
|
128
|
+
context 'changing full commit behaviour' do
|
129
|
+
let(:m) { :clear }
|
130
|
+
let(:args) { [] }
|
131
|
+
|
132
|
+
# This will make the clear method proceed to deletion
|
133
|
+
before do
|
134
|
+
responses = [
|
135
|
+
{
|
136
|
+
'rows' => [
|
137
|
+
{
|
138
|
+
'id' => 'test',
|
139
|
+
'value' => {
|
140
|
+
'rev' => 'testrev'
|
141
|
+
}
|
142
|
+
}
|
143
|
+
]
|
144
|
+
},
|
145
|
+
{ 'rows' => [] }
|
146
|
+
]
|
147
|
+
|
148
|
+
expect(store).to receive(:request).at_least(:once).with(:get, '_all_docs', any_args).ordered do
|
149
|
+
responses.shift
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
include_examples :full_commit
|
154
|
+
end
|
155
|
+
|
156
|
+
shared_examples :no_compact do
|
157
|
+
it 'does not post to the _compact endpoint' do
|
158
|
+
expect(store).not_to receive(:post).with('_compact', any_args)
|
159
|
+
store.clear(options)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
context 'without a :compact option' do
|
164
|
+
let(:options) { {} }
|
165
|
+
include_examples :no_compact
|
166
|
+
end
|
167
|
+
|
168
|
+
context 'with compact: true' do
|
169
|
+
it 'posts to the _compact endpoint' do
|
170
|
+
expect(store).to receive(:post).with('_compact', any_args)
|
171
|
+
store.clear(compact: true)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
context 'with compact: false' do
|
176
|
+
let(:options) { { compact: false } }
|
177
|
+
include_examples :no_compact
|
178
|
+
end
|
179
|
+
|
180
|
+
context 'with await_compact: true' do
|
181
|
+
it "waits for compaction to complete" do
|
182
|
+
# This simulates an empty DB, so no deletes
|
183
|
+
expect(store).to receive(:get).with('_all_docs', any_args).ordered { { 'rows' => [] } }
|
184
|
+
|
185
|
+
# Next, compact is called.
|
186
|
+
expect(store).to receive(:post).with('_compact', any_args).ordered
|
187
|
+
|
188
|
+
# We expect the method to call get the DB info as many times as the true value is returned.
|
189
|
+
expect(store).to receive(:get).twice.with('', any_args).ordered { { 'compact_running' => true } }
|
190
|
+
expect(store).to receive(:get).once.with('', any_args).ordered { { 'compact_running' => false } }
|
191
|
+
store.clear(compact: true, await_compact: true)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
context 'with await_compact: false' do
|
196
|
+
it "does not wait for compaction to complete" do
|
197
|
+
expect(store).to receive(:get).with('_all_docs', any_args).ordered { { 'rows' => [] } }
|
198
|
+
expect(store).to receive(:post).with('_compact', any_args).ordered
|
199
|
+
expect(store).not_to receive(:get).with('', any_args).ordered
|
200
|
+
store.clear(compact: true, await_compact: false)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
7
204
|
end
|
@@ -1,5 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require_relative '../faraday_helper.rb'
|
2
|
+
|
3
|
+
describe "standard_couch", adapter: :Couch do
|
4
|
+
include_context :faraday_adapter
|
5
|
+
|
6
|
+
moneta_store :Couch do
|
7
|
+
{ db: 'standard_couch', adapter: faraday_adapter }
|
8
|
+
end
|
3
9
|
|
4
10
|
moneta_loader do |value|
|
5
11
|
::Marshal.load(value.unpack('m').first)
|
@@ -1,9 +1,15 @@
|
|
1
|
+
require_relative '../faraday_helper.rb'
|
2
|
+
|
1
3
|
describe "standard_couch_with_expires", adapter: :Couch do
|
2
4
|
let(:t_res) { 0.125 }
|
3
5
|
let(:min_ttl) { t_res }
|
4
6
|
use_timecop
|
5
7
|
|
6
|
-
|
8
|
+
include_context :faraday_adapter
|
9
|
+
|
10
|
+
moneta_store :Couch do
|
11
|
+
{ db: 'standard_couch_with_expires', adapter: faraday_adapter, expires: true }
|
12
|
+
end
|
7
13
|
|
8
14
|
moneta_loader do |value|
|
9
15
|
::Marshal.load(value.unpack('m').first)
|
@@ -11,9 +11,9 @@ describe 'adapter_lruhash', adapter: :LRUHash do
|
|
11
11
|
(1..1000).each do |i|
|
12
12
|
store[i] = 'x'
|
13
13
|
store[0].should == 'y'
|
14
|
-
store.instance_variable_get(:@
|
14
|
+
store.instance_variable_get(:@backend).size.should == [10, i+1].min
|
15
15
|
(0...[9, i-1].min).each do |j|
|
16
|
-
store.instance_variable_get(:@
|
16
|
+
store.instance_variable_get(:@backend)[i-j].should_not be_nil
|
17
17
|
end
|
18
18
|
store.key?(i-9).should be false if i > 9
|
19
19
|
end
|
data/spec/moneta/adapters/memcached/native/adapter_memcached_native_with_default_expires_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../../memcached_helper.rb'
|
2
2
|
|
3
3
|
describe 'adapter_memcached_native_with_default_expires', isolate: true, unstable: defined?(JRUBY_VERSION), retry: 3, adapter: :Memcached do
|
4
4
|
# See https://github.com/memcached/memcached/issues/307
|
File without changes
|
@@ -3,5 +3,5 @@ describe "null_adapter", adapter: :Null do
|
|
3
3
|
Moneta::Adapters::Null.new
|
4
4
|
end
|
5
5
|
|
6
|
-
moneta_specs MonetaSpecs.new(specs: [:null, :not_increment, :not_create, :not_persist])
|
6
|
+
moneta_specs MonetaSpecs.new(specs: [:null, :not_increment, :not_create, :not_persist, :not_each_key])
|
7
7
|
end
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require_relative '../faraday_helper.rb'
|
2
|
+
require_relative './helper.rb'
|
3
|
+
|
4
|
+
describe 'adapter_restclient', adapter: :RestClient do
|
5
|
+
include_context :faraday_adapter
|
6
|
+
include_context :start_restserver, 11933
|
5
7
|
|
6
8
|
moneta_build do
|
7
|
-
Moneta::Adapters::RestClient.new(url: 'http://localhost:
|
9
|
+
Moneta::Adapters::RestClient.new(url: 'http://localhost:11933/moneta', adapter: faraday_adapter)
|
8
10
|
end
|
9
11
|
|
10
12
|
moneta_specs ADAPTER_SPECS.without_increment.without_create
|