flipper-dalli 0.10.2 → 0.11.0.beta1

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: ef5a0f642bcfcb0213304e46a573ed943a54fec6
4
- data.tar.gz: a80ffc852ed4bb0ed5b239ba34292b03aa1b74b0
3
+ metadata.gz: f19713f07ccef5f6d64cf3ec88c42b38b69790b1
4
+ data.tar.gz: a40bcaf649b7c66789194e41f6e5780f05391ae5
5
5
  SHA512:
6
- metadata.gz: 108cc70cbffdd6790ee1a599e1e34b0533ff47e24146eb8e12bd1f6d87174276be2aceca00b8ddd2fd4c374923a3901353f466419a2190cb1f140b799fa9f6bd
7
- data.tar.gz: 1cf97e8949eeca88b5608aeddffa4e315992e86b8ae48270ce26ea963c562b04b7449415e640b495fb70021a9d455214c67a80e3e89f77513ce5dc5f4f89a87d
6
+ metadata.gz: f4705e496decb6676f8fd54806ed616f2b26b78e09f15790572943fdd48005bd11222cf07b5636b593416bef4eecab936cdbd9b3949ce00947ae41e5a2dd8998
7
+ data.tar.gz: ef8fae20852b3e92974cbaea0b2e85d1fdaf7931fe739c49fd54cbc0e52f44175b5893375caf831fd0b724d526a91241e32023789478cf89d64685ed825f535d
@@ -1,22 +1,22 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require File.expand_path('../lib/flipper/version', __FILE__)
3
3
 
4
- flipper_dalli_files = lambda { |file|
4
+ flipper_dalli_files = lambda do |file|
5
5
  file =~ /dalli/
6
- }
6
+ end
7
7
 
8
8
  Gem::Specification.new do |gem|
9
- gem.authors = ["John Nunemaker"]
10
- gem.email = ["nunemaker@gmail.com"]
11
- gem.summary = "Dalli adapter for Flipper"
12
- gem.description = "Dalli adapter for Flipper"
13
- gem.license = "MIT"
14
- gem.homepage = "https://github.com/jnunemaker/flipper"
9
+ gem.authors = ['John Nunemaker']
10
+ gem.email = ['nunemaker@gmail.com']
11
+ gem.summary = 'Dalli adapter for Flipper'
12
+ gem.description = 'Dalli adapter for Flipper'
13
+ gem.license = 'MIT'
14
+ gem.homepage = 'https://github.com/jnunemaker/flipper'
15
15
 
16
- gem.files = `git ls-files`.split("\n").select(&flipper_dalli_files) + ["lib/flipper/version.rb"]
16
+ gem.files = `git ls-files`.split("\n").select(&flipper_dalli_files) + ['lib/flipper/version.rb']
17
17
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").select(&flipper_dalli_files)
18
- gem.name = "flipper-dalli"
19
- gem.require_paths = ["lib"]
18
+ gem.name = 'flipper-dalli'
19
+ gem.require_paths = ['lib']
20
20
  gem.version = Flipper::VERSION
21
21
 
22
22
  gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
@@ -7,7 +7,7 @@ module Flipper
7
7
  class Dalli
8
8
  include ::Flipper::Adapter
9
9
 
10
- Version = "v1".freeze
10
+ Version = 'v1'.freeze
11
11
  Namespace = "flipper/#{Version}".freeze
12
12
  FeaturesKey = "#{Namespace}/features".freeze
13
13
 
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = "0.10.2".freeze
2
+ VERSION = '0.11.0.beta1'.freeze
3
3
  end
@@ -5,11 +5,11 @@ require 'flipper/spec/shared_adapter_specs'
5
5
 
6
6
  RSpec.describe Flipper::Adapters::Dalli do
7
7
  let(:memory_adapter) { Flipper::Adapters::Memory.new }
8
- let(:cache) { Dalli::Client.new(ENV["BOXEN_MEMCACHED_URL"] || '127.0.0.1:11211') }
9
- let(:adapter) { Flipper::Adapters::Dalli.new(memory_adapter, cache) }
8
+ let(:cache) { Dalli::Client.new(ENV['BOXEN_MEMCACHED_URL'] || '127.0.0.1:11211') }
9
+ let(:adapter) { described_class.new(memory_adapter, cache) }
10
10
  let(:flipper) { Flipper.new(adapter) }
11
11
 
12
- subject { described_class.new(adapter, cache) }
12
+ subject { adapter }
13
13
 
14
14
  before do
15
15
  cache.flush
@@ -17,8 +17,8 @@ RSpec.describe Flipper::Adapters::Dalli do
17
17
 
18
18
  it_should_behave_like 'a flipper adapter'
19
19
 
20
- describe "#remove" do
21
- it "expires feature" do
20
+ describe '#remove' do
21
+ it 'expires feature' do
22
22
  feature = flipper[:stats]
23
23
  adapter.get(feature)
24
24
  adapter.remove(feature)
@@ -26,8 +26,8 @@ RSpec.describe Flipper::Adapters::Dalli do
26
26
  end
27
27
  end
28
28
 
29
- describe "#get_multi" do
30
- it "warms uncached features" do
29
+ describe '#get_multi' do
30
+ it 'warms uncached features' do
31
31
  stats = flipper[:stats]
32
32
  search = flipper[:search]
33
33
  other = flipper[:other]
@@ -40,13 +40,13 @@ RSpec.describe Flipper::Adapters::Dalli do
40
40
 
41
41
  adapter.get_multi([stats, search, other])
42
42
 
43
- expect(cache.get(described_class.key_for(search))[:boolean]).to eq("true")
43
+ expect(cache.get(described_class.key_for(search))[:boolean]).to eq('true')
44
44
  expect(cache.get(described_class.key_for(other))[:boolean]).to be(nil)
45
45
  end
46
46
  end
47
47
 
48
- describe "#name" do
49
- it "is dalli" do
48
+ describe '#name' do
49
+ it 'is dalli' do
50
50
  expect(subject.name).to be(:dalli)
51
51
  end
52
52
  end
@@ -6,7 +6,8 @@ class DalliTest < MiniTest::Test
6
6
  prepend Flipper::Test::SharedAdapterTests
7
7
 
8
8
  def setup
9
- @cache = Dalli::Client.new('localhost:11211')
9
+ url = ENV.fetch('BOXEN_MEMCACHED_URL', 'localhost:11211')
10
+ @cache = Dalli::Client.new(url)
10
11
  @cache.flush
11
12
  memory_adapter = Flipper::Adapters::Memory.new
12
13
  @adapter = Flipper::Adapters::Dalli.new(memory_adapter, @cache)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2017-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flipper
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.2
19
+ version: 0.11.0.beta1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.2
26
+ version: 0.11.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dalli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,12 +72,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ">="
75
+ - - ">"
76
76
  - !ruby/object:Gem::Version
77
- version: '0'
77
+ version: 1.3.1
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.4.5.1
80
+ rubygems_version: 2.5.2
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Dalli adapter for Flipper