cachew 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,2 @@
1
+ language: ruby
2
+ rvm: [ 1.9.3, 2.0.0, 2.1.0, rbx ]
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Cachew
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/cachew.png)](http://badge.fury.io/rb/cachew)
4
+ [![Build Status](https://travis-ci.org/ixti/cachew.png?branch=master)](https://travis-ci.org/ixti/cachew)
5
+ [![Coverage Status](https://coveralls.io/repos/ixti/cachew/badge.png?branch=master)](https://coveralls.io/r/ixti/cachew?branch=master)
6
+ [![Code Climate](https://codeclimate.com/github/ixti/cachew.png)](https://codeclimate.com/github/ixti/cachew)
7
+
3
8
  Simple (and unified) cache interface.
4
9
 
5
10
  ## Installation
@@ -7,6 +7,7 @@ class Cachew
7
7
  def self.build_adapter_for(store)
8
8
  case store
9
9
  when BaseAdapter then store
10
+ when Cachew then store.adapter
10
11
  when Hash then HashAdapter.new(store)
11
12
  else NullAdapter.new
12
13
  end
@@ -1,3 +1,3 @@
1
1
  class Cachew
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -16,6 +16,13 @@ describe Cachew::Adapters do
16
16
  end
17
17
  end
18
18
 
19
+ context "with instance of Cachew" do
20
+ it "returns original #adapter" do
21
+ original = Cachew.new :foo => :bar
22
+ expect(Cachew.new(original).adapter).to be original.adapter
23
+ end
24
+ end
25
+
19
26
  it "returns NullAdapter if can't find better candidate" do
20
27
  expect(described_class.build_adapter_for "test")
21
28
  .to be_a Cachew::Adapters::NullAdapter
metadata CHANGED
@@ -1,38 +1,42 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cachew
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Aleksey V Zapparov
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2014-02-02 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+ date: 2014-02-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
19
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: "1.5"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.5'
22
22
  type: :development
23
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.5'
24
30
  description: Unified cache interface.
25
- email:
31
+ email:
26
32
  - ixti@member.fsf.org
27
33
  executables: []
28
-
29
34
  extensions: []
30
-
31
35
  extra_rdoc_files: []
32
-
33
- files:
36
+ files:
34
37
  - .gitignore
35
38
  - .rubocop.yml
39
+ - .travis.yml
36
40
  - Gemfile
37
41
  - Guardfile
38
42
  - LICENSE.txt
@@ -51,35 +55,39 @@ files:
51
55
  - spec/lib/cachew_spec.rb
52
56
  - spec/spec_helper.rb
53
57
  homepage: https://github.com/ixti/cachew
54
- licenses:
58
+ licenses:
55
59
  - MIT
56
- metadata: {}
57
-
58
60
  post_install_message:
59
61
  rdoc_options: []
60
-
61
- require_paths:
62
+ require_paths:
62
63
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
64
- requirements:
65
- - &id002
66
- - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
69
- required_rubygems_version: !ruby/object:Gem::Requirement
70
- requirements:
71
- - *id002
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ segments:
71
+ - 0
72
+ hash: 797334216198397338
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ segments:
80
+ - 0
81
+ hash: 797334216198397338
72
82
  requirements: []
73
-
74
83
  rubyforge_project:
75
- rubygems_version: 2.1.10
84
+ rubygems_version: 1.8.23
76
85
  signing_key:
77
- specification_version: 4
78
- summary: cachew-0.1.0
79
- test_files:
86
+ specification_version: 3
87
+ summary: cachew-0.1.1
88
+ test_files:
80
89
  - spec/lib/cachew/adapters/hash_adapter_spec.rb
81
90
  - spec/lib/cachew/adapters/null_adapter_spec.rb
82
91
  - spec/lib/cachew/adapters_spec.rb
83
92
  - spec/lib/cachew_spec.rb
84
93
  - spec/spec_helper.rb
85
- has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: bee898b623cf6399bb9a8b2d281400561ef965ba
4
- data.tar.gz: 2630810c58528c2e8c0f430740cf1bc16cd76bc3
5
- SHA512:
6
- metadata.gz: 372ff7e2c634a068d861d33b22b45b57afd0f3ffa14f35c9e9867d33f904049214ce058e3c745f7dd8585a62d4712b5f0ffb0e5f564f554bdfbb2ee2272363ab
7
- data.tar.gz: b64586d8a75d0e07b784cf5870c3d5421a055b0ad567150d6449905b98610a49cbb41ae33c082a86e1f80906d8b0fe4256838ae66433bbf947a2348568b24413