alephant-broker 3.17.0 → 3.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79ffc0d688acfa52b4b51a2c2272292c2e9d56de
4
- data.tar.gz: 06cba46f0b07201a0d10cf496db2ba3f04d0b96e
3
+ metadata.gz: c7359058509b2fff49fd7a29c3425c713c6c0738
4
+ data.tar.gz: e42c65579c05d327a18a6d5a2991c53d2ed81dd7
5
5
  SHA512:
6
- metadata.gz: 9d43960d272a526f2fd73e7be91e828b38dfafecdafeac315610b901cd2b462d728091db477a7adbe08fad7587b8009f587389c8a75d67177fd5f6bad8e5568d
7
- data.tar.gz: 546a4468df7246a3121f3b3cdd01422c1a4fc6467a8ded2cf359bce99e2c2cd000e30fb65540ad78f8ab977bfbd2bb4a1cc6b469de319a44dedf911e78b61209
6
+ metadata.gz: 87fe78ddd8702e94d9b4a981a1770fb0a55c0e4a90ea6ed8c9f80e9927249b830c52ae94f0aa38655a2c5237cc94d7a0dc83e01c4b2714551e72f46ebc803c0a
7
+ data.tar.gz: be68d83eee04548185a8880b569ba4f010b2fca364d4751c0ba8c6922fe65f4ad493fe52abd3e827ff771f72c83c9dea37b6f327a4ab0d7110cd34bff1f96cb1
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - "2.3"
4
- - "jruby"
4
+ - "jruby-9.1.17.0"
5
5
  notifications:
6
6
  email:
7
7
  recipients:
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_runtime_dependency 'alephant-sequencer'
40
40
  spec.add_runtime_dependency "aws-sdk-sqs"
41
41
  spec.add_runtime_dependency "aws-sdk-s3"
42
- spec.add_runtime_dependency "dalli-elasticache"
42
+ spec.add_runtime_dependency "dalli"
43
43
  spec.add_runtime_dependency "faraday"
44
44
  spec.add_runtime_dependency "crimp"
45
45
  spec.add_runtime_dependency "listen", "~> 3.0.0"
@@ -1,4 +1,4 @@
1
- require 'dalli-elasticache'
1
+ require 'dalli'
2
2
  require 'alephant/logger'
3
3
 
4
4
  module Alephant
@@ -15,8 +15,7 @@ module Alephant
15
15
  logger.metric 'NoConfigEndpoint'
16
16
  @client = NullClient.new
17
17
  else
18
- @elasticache ||= ::Dalli::ElastiCache.new(config_endpoint, expires_in: ttl)
19
- @client ||= @elasticache.client
18
+ @client ||= Dalli::Client.new(config_endpoint, expires_in: ttl)
20
19
  end
21
20
  end
22
21
 
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Broker
3
- VERSION = "3.17.0".freeze
3
+ VERSION = "3.18.0".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Alephant::Broker::Cache::Client do
4
+ before do
5
+ allow(Alephant::Broker).to receive(:config).and_return(config)
6
+ end
7
+
8
+ context 'when creating a new cache client with no cache endpoint' do
9
+ let(:config) { {} }
10
+
11
+ it 'creates a cache client with a null client backend' do
12
+ expect(Alephant::Broker::Cache::NullClient).to receive(:new)
13
+ expect(Dalli::Client).not_to receive(:new)
14
+
15
+ expect(described_class.new).to be_a described_class
16
+ end
17
+ end
18
+
19
+ context 'when creating a new cache client with a cache endpoint' do
20
+ let(:config) { { elasticache_config_endpoint: 'abc123.elasticache.aws.com:11211' } }
21
+
22
+ it 'creates a cache client with a null client backend' do
23
+ expect(Alephant::Broker::Cache::NullClient).not_to receive(:new)
24
+ expect(Dalli::Client).to receive(:new)
25
+
26
+ expect(described_class.new).to be_a described_class
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant-broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.0
4
+ version: 3.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BBC News
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-16 00:00:00.000000000 Z
11
+ date: 2018-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -291,7 +291,7 @@ dependencies:
291
291
  - !ruby/object:Gem::Version
292
292
  version: '0'
293
293
  - !ruby/object:Gem::Dependency
294
- name: dalli-elasticache
294
+ name: dalli
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - ">="
@@ -397,6 +397,7 @@ files:
397
397
  - lib/alephant/broker/response/factory.rb
398
398
  - lib/alephant/broker/version.rb
399
399
  - spec/alephant/broker/cache/cached_object_spec.rb
400
+ - spec/alephant/broker/cache/client_spec.rb
400
401
  - spec/alephant/broker/component_meta_spec.rb
401
402
  - spec/alephant/broker/load_strategy/http_spec.rb
402
403
  - spec/alephant/broker/load_strategy/revalidate/fetcher_spec.rb
@@ -431,12 +432,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
432
  version: '0'
432
433
  requirements: []
433
434
  rubyforge_project:
434
- rubygems_version: 2.6.12
435
+ rubygems_version: 2.6.14
435
436
  signing_key:
436
437
  specification_version: 4
437
438
  summary: Brokers requests for alephant components
438
439
  test_files:
439
440
  - spec/alephant/broker/cache/cached_object_spec.rb
441
+ - spec/alephant/broker/cache/client_spec.rb
440
442
  - spec/alephant/broker/component_meta_spec.rb
441
443
  - spec/alephant/broker/load_strategy/http_spec.rb
442
444
  - spec/alephant/broker/load_strategy/revalidate/fetcher_spec.rb