moneta 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +176 -0
  3. data/.travis.yml +57 -23
  4. data/CHANGES +12 -0
  5. data/Gemfile +89 -64
  6. data/README.md +40 -14
  7. data/feature_matrix.yaml +1 -0
  8. data/lib/action_dispatch/middleware/session/moneta_store.rb +1 -0
  9. data/lib/active_support/cache/moneta_store.rb +5 -5
  10. data/lib/moneta.rb +9 -1
  11. data/lib/moneta/adapters/activerecord.rb +35 -19
  12. data/lib/moneta/adapters/activesupportcache.rb +3 -7
  13. data/lib/moneta/adapters/cassandra.rb +24 -16
  14. data/lib/moneta/adapters/client.rb +13 -9
  15. data/lib/moneta/adapters/couch.rb +220 -80
  16. data/lib/moneta/adapters/datamapper.rb +1 -0
  17. data/lib/moneta/adapters/file.rb +9 -6
  18. data/lib/moneta/adapters/hbase.rb +1 -1
  19. data/lib/moneta/adapters/kyotocabinet.rb +8 -7
  20. data/lib/moneta/adapters/leveldb.rb +1 -1
  21. data/lib/moneta/adapters/lmdb.rb +3 -4
  22. data/lib/moneta/adapters/lruhash.rb +29 -62
  23. data/lib/moneta/adapters/memcached.rb +1 -0
  24. data/lib/moneta/adapters/memcached/dalli.rb +1 -1
  25. data/lib/moneta/adapters/memcached/native.rb +10 -8
  26. data/lib/moneta/adapters/mongo.rb +1 -0
  27. data/lib/moneta/adapters/mongo/base.rb +3 -3
  28. data/lib/moneta/adapters/mongo/moped.rb +12 -13
  29. data/lib/moneta/adapters/mongo/official.rb +7 -8
  30. data/lib/moneta/adapters/null.rb +1 -2
  31. data/lib/moneta/adapters/pstore.rb +3 -2
  32. data/lib/moneta/adapters/redis.rb +3 -3
  33. data/lib/moneta/adapters/restclient.rb +12 -3
  34. data/lib/moneta/adapters/riak.rb +2 -2
  35. data/lib/moneta/adapters/sequel.rb +112 -119
  36. data/lib/moneta/adapters/sqlite.rb +3 -3
  37. data/lib/moneta/adapters/tokyotyrant.rb +1 -1
  38. data/lib/moneta/builder.rb +0 -1
  39. data/lib/moneta/enumerable.rb +38 -0
  40. data/lib/moneta/expires.rb +12 -12
  41. data/lib/moneta/fallback.rb +84 -0
  42. data/lib/moneta/lock.rb +1 -1
  43. data/lib/moneta/logger.rb +2 -2
  44. data/lib/moneta/mixins.rb +12 -10
  45. data/lib/moneta/optionmerger.rb +0 -1
  46. data/lib/moneta/pool.rb +301 -31
  47. data/lib/moneta/proxy.rb +2 -2
  48. data/lib/moneta/server.rb +9 -12
  49. data/lib/moneta/shared.rb +1 -1
  50. data/lib/moneta/stack.rb +6 -6
  51. data/lib/moneta/synchronize.rb +3 -3
  52. data/lib/moneta/transformer.rb +19 -17
  53. data/lib/moneta/transformer/config.rb +6 -5
  54. data/lib/moneta/transformer/helper.rb +3 -3
  55. data/lib/moneta/transformer/helper/bson.rb +18 -15
  56. data/lib/moneta/utils.rb +3 -9
  57. data/lib/moneta/version.rb +1 -1
  58. data/lib/moneta/weak_each_key.rb +2 -4
  59. data/lib/rack/cache/moneta.rb +16 -13
  60. data/lib/rack/moneta_rest.rb +2 -2
  61. data/lib/rack/session/moneta.rb +3 -4
  62. data/moneta.gemspec +8 -0
  63. data/script/benchmarks +55 -32
  64. data/script/reconfigure-couchdb +13 -0
  65. data/script/start-hbase +1 -0
  66. data/script/start-services +2 -10
  67. data/spec/active_support/cache_moneta_store_spec.rb +3 -1
  68. data/spec/features/concurrent_create.rb +31 -10
  69. data/spec/features/concurrent_increment.rb +27 -19
  70. data/spec/features/increment.rb +41 -41
  71. data/spec/helper.rb +2 -42
  72. data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_spec.rb +4 -1
  73. data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb +4 -1
  74. data/spec/moneta/adapters/activesupportcache/standard_activesupportcache_spec.rb +14 -0
  75. data/spec/moneta/adapters/couch/adapter_couch_spec.rb +199 -2
  76. data/spec/moneta/adapters/couch/standard_couch_spec.rb +8 -2
  77. data/spec/moneta/adapters/couch/standard_couch_with_expires_spec.rb +7 -1
  78. data/spec/moneta/adapters/faraday_helper.rb +9 -0
  79. data/spec/moneta/adapters/lruhash/adapter_lruhash_spec.rb +2 -2
  80. data/spec/moneta/adapters/memcached/adapter_memcached_spec.rb +1 -1
  81. data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_spec.rb +1 -1
  82. data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_with_default_expires_spec.rb +1 -1
  83. data/spec/moneta/adapters/memcached/dalli/standard_memcached_dalli_spec.rb +1 -1
  84. data/spec/moneta/adapters/memcached/native/adapter_memcached_native_spec.rb +1 -1
  85. data/spec/moneta/adapters/memcached/native/adapter_memcached_native_with_default_expires_spec.rb +1 -1
  86. data/spec/moneta/adapters/memcached/native/standard_memcached_native_spec.rb +1 -1
  87. data/spec/moneta/adapters/memcached/standard_memcached_spec.rb +1 -1
  88. data/spec/moneta/adapters/{memcached/helper.rb → memcached_helper.rb} +0 -0
  89. data/spec/moneta/adapters/null/null_adapter_spec.rb +1 -1
  90. data/spec/moneta/adapters/restclient/adapter_restclient_spec.rb +7 -5
  91. data/spec/moneta/adapters/restclient/helper.rb +12 -0
  92. data/spec/moneta/adapters/restclient/standard_restclient_spec.rb +9 -6
  93. data/spec/moneta/adapters/riak/standard_riak_with_expires_spec.rb +4 -0
  94. data/spec/moneta/adapters/tokyotyrant/adapter_tokyotyrant_spec.rb +6 -2
  95. data/spec/moneta/adapters/tokyotyrant/helper.rb +12 -0
  96. data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_spec.rb +5 -2
  97. data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_with_expires_spec.rb +5 -1
  98. data/spec/moneta/proxies/enumerable/enumerable_spec.rb +26 -0
  99. data/spec/moneta/proxies/fallback/fallback_spec.rb +42 -0
  100. data/spec/moneta/proxies/pool/pool_spec.rb +319 -6
  101. data/spec/restserver.rb +40 -0
  102. metadata +122 -7
  103. data/script/install-kyotocabinet +0 -17
@@ -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['MONETA_MYSQL_DATABSASE1'] || 'moneta' }
266
- let(:mysql_database2) { ENV['MONETA_MYSQL_DATABSASE2'] || 'moneta2' }
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
- start_memcached 11215
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
@@ -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
- start_memcached 11223
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
- describe 'adapter_couch', isolate: true, adapter: :Couch do
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
- describe "standard_couch", isolate: true, adapter: :Couch do
2
- moneta_store :Couch, db: 'standard_couch'
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
- moneta_store :Couch, db: 'standard_couch_with_expires', expires: true
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)
@@ -0,0 +1,9 @@
1
+ RSpec.shared_context :faraday_adapter do
2
+ before :context do
3
+ require 'faraday/adapter/manticore' if defined?(JRUBY_VERSION)
4
+ end
5
+
6
+ let(:faraday_adapter) do
7
+ defined?(JRUBY_VERSION) ? :manticore : :net_http
8
+ end
9
+ end
@@ -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(:@entry).size.should == [10, i+1].min
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(:@entry)[i-j].should_not be_nil
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
@@ -1,4 +1,4 @@
1
- require_relative './helper.rb'
1
+ require_relative '../memcached_helper.rb'
2
2
 
3
3
  describe 'adapter_memcached', adapter: :Memcached do
4
4
  include_context :start_memcached, 11216
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
1
+ require_relative '../../memcached_helper.rb'
2
2
 
3
3
  describe 'adapter_memcached_dalli', retry: 3, adapter: :Memcached do
4
4
  # See https://github.com/memcached/memcached/issues/307
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
1
+ require_relative '../../memcached_helper.rb'
2
2
 
3
3
  describe 'adapter_memcached_dalli_with_default_expires', isolate: true, retry: 3, adapter: :Memcached do
4
4
  # See https://github.com/memcached/memcached/issues/307
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
1
+ require_relative '../../memcached_helper.rb'
2
2
 
3
3
  describe 'standard_memcached_dalli', retry: 3, adapter: :Memcached do
4
4
  let(:t_res) { 1 }
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
1
+ require_relative '../../memcached_helper.rb'
2
2
 
3
3
  describe 'adapter_memcached_native', isolate: true, unstable: defined?(JRUBY_VERSION), retry: 3, adapter: :Memcached do
4
4
  # See https://github.com/memcached/memcached/issues/307
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
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
@@ -1,4 +1,4 @@
1
- require_relative '../helper.rb'
1
+ require_relative '../../memcached_helper.rb'
2
2
 
3
3
  describe 'standard_memcached_native', unstable: defined?(JRUBY_VERSION), retry: 3, adapter: :Memcached do
4
4
  let(:t_res) { 1 }
@@ -1,4 +1,4 @@
1
- require_relative './helper.rb'
1
+ require_relative '../memcached_helper.rb'
2
2
 
3
3
  describe 'standard_memcached', adapter: :Memcached do
4
4
  include_context :start_memcached, 11220
@@ -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
- describe 'adapter_restclient', isolate: true, adapter: :RestClient do
2
- before :all do
3
- start_restserver
4
- end
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:8808/moneta/')
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