mize 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -2
- data/VERSION +1 -1
- data/lib/mize/default_cache.rb +17 -8
- data/lib/mize/version.rb +1 -1
- data/mize.gemspec +4 -4
- data/spec/mize/memoize_method_spec.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ad9af62cd3ec5921f05fde3b1c5b2fb7c76771d153c6f1be5cb21887dc210ab2
|
4
|
+
data.tar.gz: 416174f2ae19c5ae1cee717e266d0426002f4d1af3b18fb3da4567d84181e201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0346bdc4f13aaed91820ed21e0772a28125c27986812e1c873a17a1dd7b784af71432c2e9a7caeefcb7ce5a31c550a5bbc09dc0deca4ca9e76b30d237209cf2c
|
7
|
+
data.tar.gz: 313e41f46e249ea27c833889e76bfbfa81016cc09875d57012488a95626ece460ba20adcef969f8984ee249daae2adf1f43c0c46cf185dce6aeaa5ccfde02d65
|
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/lib/mize/default_cache.rb
CHANGED
@@ -1,32 +1,41 @@
|
|
1
1
|
require 'monitor'
|
2
2
|
|
3
|
-
class Mize::DefaultCache
|
3
|
+
class Mize::DefaultCache
|
4
4
|
include MonitorMixin
|
5
5
|
|
6
|
-
|
6
|
+
def initialize
|
7
|
+
@data = {}
|
8
|
+
end
|
7
9
|
|
8
10
|
def clear(options = nil)
|
9
|
-
|
11
|
+
@data.clear
|
12
|
+
self
|
10
13
|
end
|
11
14
|
|
12
15
|
def exist?(name, options = nil)
|
13
|
-
key?(name)
|
16
|
+
@data.key?(name)
|
14
17
|
end
|
15
18
|
|
16
19
|
def read(name, options = nil)
|
17
|
-
fetch(name, nil)
|
20
|
+
@data.fetch(name, nil)
|
18
21
|
end
|
19
22
|
|
20
23
|
def write(name, value, options = nil)
|
21
|
-
store(name, value)
|
24
|
+
@data.store(name, value)
|
22
25
|
end
|
23
26
|
|
24
27
|
def delete(name, options = nil)
|
25
|
-
|
28
|
+
@data.delete(name)
|
26
29
|
end
|
27
30
|
|
28
31
|
def each_name(&block)
|
29
|
-
each_key(&block)
|
32
|
+
@data.each_key(&block)
|
33
|
+
self
|
34
|
+
end
|
35
|
+
|
36
|
+
def initialize_dup(other)
|
37
|
+
super
|
38
|
+
other.instance_variable_set :@data, @data.dup
|
30
39
|
end
|
31
40
|
|
32
41
|
alias prototype dup
|
data/lib/mize/version.rb
CHANGED
data/mize.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: mize 0.3.
|
2
|
+
# stub: mize 0.3.5 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "mize".freeze
|
6
|
-
s.version = "0.3.
|
6
|
+
s.version = "0.3.5"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2018-02-09"
|
12
12
|
s.description = "Library that provides memoziation for methods and functions for Ruby.".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
14
|
s.extra_rdoc_files = ["README.md".freeze, "lib/mize.rb".freeze, "lib/mize/cache_methods.rb".freeze, "lib/mize/cache_protocol.rb".freeze, "lib/mize/configure.rb".freeze, "lib/mize/default_cache.rb".freeze, "lib/mize/global_clear.rb".freeze, "lib/mize/memoize.rb".freeze, "lib/mize/railtie.rb".freeze, "lib/mize/reload.rb".freeze, "lib/mize/version.rb".freeze]
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.licenses = ["MIT".freeze]
|
18
18
|
s.rdoc_options = ["--title".freeze, "Mize - Library that provides memoziation for methods and functions".freeze, "--main".freeze, "README.md".freeze]
|
19
19
|
s.required_ruby_version = Gem::Requirement.new(">= 2".freeze)
|
20
|
-
s.rubygems_version = "2.
|
20
|
+
s.rubygems_version = "2.7.3".freeze
|
21
21
|
s.summary = "Library that provides memoziation for methods and functions".freeze
|
22
22
|
s.test_files = ["spec/mize/global_clear_spec.rb".freeze, "spec/mize/memoize_method_spec.rb".freeze, "spec/mize/memoize_reload_spec.rb".freeze, "spec/mize/version_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
23
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.7.3
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Library that provides memoziation for methods and functions
|