coin 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/coin.rb +20 -4
  3. data/lib/coin/version.rb +1 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3049331d83132dd30c432345bfad24c7ed334e7b
4
- data.tar.gz: d8d1dbbd1a521a5b9736a69dbcefaa6a27e4b748
3
+ metadata.gz: a0765ba16c3c083808447fe032c32edfe1ea922c
4
+ data.tar.gz: 3a8068429028a1eda339a6ae50a859a6457db310
5
5
  SHA512:
6
- metadata.gz: 7dedc8533c13d70088eb5ee020cc05af70b14877f380cca0f3ea8b513096518f5eaf9dc8db266045136efd0a75f31691fbd6053d1a0a56b5b5a51f064bbf565b
7
- data.tar.gz: e3766bffd185e612a815621ab257337806a16b8109b4e599d34ed62993afb4d6928f1c59c896359a9e4ea7f29a9942fb9808d870b0c00a241c8fded0647f6b52
6
+ metadata.gz: de5c12aa45d56ee41c2c41e5d888aa09da76dc8d137c277de6d9e2c9520830b1e343f571c5426f78235e0b71741730faad6d0f97c3a448ffe3c14cd46367712d
7
+ data.tar.gz: 3eb565ce340390add02b0e93076d35a0ebacef12b2d7119ade23ddaf33fa55ed1debf599339890e7777d83f7105c461a2869d2e1995d9ccee98ef4aa13a486ce
@@ -1,6 +1,5 @@
1
1
  require "drb/drb"
2
2
  require "rbconfig"
3
- require "forwardable"
4
3
 
5
4
  Dir[File.join(File.dirname(__FILE__), "coin", "*.rb")].each do |file|
6
5
  require file
@@ -8,9 +7,6 @@ end
8
7
 
9
8
  module Coin
10
9
  class << self
11
- extend Forwardable
12
- def_delegators :server, :write, :read_and_delete, :delete, :clear, :length
13
-
14
10
  def read(key, lifetime=300)
15
11
  value = server.read(key)
16
12
  if value.nil? && block_given?
@@ -20,6 +16,26 @@ module Coin
20
16
  value
21
17
  end
22
18
 
19
+ def read_and_delete(key)
20
+ server.read_and_delete key
21
+ end
22
+
23
+ def write(key, value, lifetime=300)
24
+ server.write key, value, lifetime
25
+ end
26
+
27
+ def delete(key)
28
+ server.delete key
29
+ end
30
+
31
+ def length
32
+ server.length
33
+ end
34
+
35
+ def clear
36
+ server.clear
37
+ end
38
+
23
39
  attr_writer :port
24
40
  def port
25
41
  @port ||= 8955
@@ -1,3 +1,3 @@
1
1
  module Coin
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.2.2
104
+ rubygems_version: 2.6.12
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: An absurdly simple in memory object caching system.
@@ -109,4 +109,3 @@ test_files:
109
109
  - test/coin_test.rb
110
110
  - test/test_helper.rb
111
111
  - test/vault_test.rb
112
- has_rdoc: