cacheable 1.0.4 → 2.0.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc26289c032b688f215069cb986bc985a279f17e0714bfbb090f572ae3f8e260
|
4
|
+
data.tar.gz: 4d53f73bd106b0ce936beb00afc814b67031d33c50839c996e349e065879904e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edaf2e450ffa47cb098555d981ef08cd34decd635e08b982c4a8239f899fcf378a027ec4af4579ba6aba0b191df6c67bfc1294c5a1abb1c17f782f4896e5d7f6
|
7
|
+
data.tar.gz: e9f4745f0301b7d49c7d6170295923c4225dac1e58ec3466bf50d4e4a1ac493e96aa775126cd337df3b9418be7bff2a071876f6410fab8f72fdc2865a4ed9d68
|
@@ -14,7 +14,7 @@ module Cacheable
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def class_name_for(string)
|
17
|
-
string.split('_').map { |name_part| "#{name_part[0].upcase}#{name_part[1
|
17
|
+
string.split('_').map { |name_part| "#{name_part[0].upcase}#{name_part[1..].downcase}" }.join
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'English'
|
4
|
-
|
5
3
|
module Cacheable
|
6
4
|
module MethodGenerator
|
7
5
|
def cacheable(*original_method_names, **opts)
|
@@ -66,7 +64,7 @@ module Cacheable
|
|
66
64
|
|
67
65
|
def create_method_names(original_method_name)
|
68
66
|
method_name_without_punctuation = original_method_name.to_s.sub(/([?!=])$/, '')
|
69
|
-
punctuation =
|
67
|
+
punctuation = Regexp.last_match(-1)
|
70
68
|
|
71
69
|
{
|
72
70
|
with_cache_method_name: "#{method_name_without_punctuation}_with_cache#{punctuation}",
|
data/lib/cacheable/version.rb
CHANGED
@@ -2,15 +2,13 @@
|
|
2
2
|
|
3
3
|
module Cacheable
|
4
4
|
module VERSION
|
5
|
-
MAJOR =
|
5
|
+
MAJOR = 2
|
6
6
|
MINOR = 0
|
7
|
-
TINY =
|
7
|
+
TINY = 0
|
8
8
|
PRE = nil
|
9
9
|
|
10
|
-
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.').freeze
|
11
|
-
|
12
10
|
def self.to_s
|
13
|
-
|
11
|
+
[MAJOR, MINOR, TINY, PRE].compact.join('.').freeze
|
14
12
|
end
|
15
13
|
end
|
16
14
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cacheable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jess Hottenstein
|
8
8
|
- Ryan Laughlin
|
9
9
|
- Aaron Rosenberg
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: Add caching simply without modifying your existing code. Includes configurable
|
16
16
|
options for simple cache invalidation. See README on github for more information.
|
@@ -30,8 +30,9 @@ files:
|
|
30
30
|
homepage: https://github.com/splitwise/cacheable
|
31
31
|
licenses:
|
32
32
|
- MIT
|
33
|
-
metadata:
|
34
|
-
|
33
|
+
metadata:
|
34
|
+
rubygems_mfa_required: 'true'
|
35
|
+
post_install_message:
|
35
36
|
rdoc_options: []
|
36
37
|
require_paths:
|
37
38
|
- lib
|
@@ -39,16 +40,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
39
40
|
requirements:
|
40
41
|
- - ">="
|
41
42
|
- !ruby/object:Gem::Version
|
42
|
-
version: 2.
|
43
|
+
version: 2.6.0
|
43
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
46
|
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
48
|
version: '0'
|
48
49
|
requirements: []
|
49
|
-
|
50
|
-
|
51
|
-
signing_key:
|
50
|
+
rubygems_version: 3.3.3
|
51
|
+
signing_key:
|
52
52
|
specification_version: 4
|
53
53
|
summary: Add caching to any Ruby method in a aspect orientated programming approach.
|
54
54
|
test_files: []
|