alephant-cache 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/cache.rb +17 -2
- data/lib/alephant/cache/version.rb +1 -1
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dec60d46f678395cb52956abaf62294435079c2
|
4
|
+
data.tar.gz: 3c9b5ad3906dd60555f39888bfaaa60b6995ce92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d15ace253264d60bedf8c8e8af5151115097331207e071af2a632503d183cbce56efc173fad9fcc4a771fd74a71c030b4297817271a2fd39915b542824cfcce
|
7
|
+
data.tar.gz: ba34976f0f26b0a274b358f2abd63670f3b5577f2a8b2f6b093045852ba183ac26d748babaf25e2f6eb90bfca2a719c9227b4c2947870183f867a279488923b5
|
data/lib/alephant/cache.rb
CHANGED
@@ -29,12 +29,18 @@ module Alephant
|
|
29
29
|
}
|
30
30
|
)
|
31
31
|
|
32
|
-
logger.metric(
|
32
|
+
logger.metric(
|
33
|
+
"CachePuts",
|
34
|
+
metric_opts[:dimensions].merge(:function => "put")
|
35
|
+
)
|
33
36
|
logger.info("Cache.put: #{path}/#{id}")
|
34
37
|
end
|
35
38
|
|
36
39
|
def get(id)
|
37
|
-
logger.metric(
|
40
|
+
logger.metric(
|
41
|
+
"CacheGets",
|
42
|
+
metric_opts[:dimensions].merge(:function => "get")
|
43
|
+
)
|
38
44
|
logger.info("Cache.get: #{path}/#{id}")
|
39
45
|
object = bucket.objects["#{path}/#{id}"]
|
40
46
|
|
@@ -44,6 +50,15 @@ module Alephant
|
|
44
50
|
:meta => object.metadata.to_h
|
45
51
|
}
|
46
52
|
end
|
53
|
+
|
54
|
+
def metric_opts
|
55
|
+
{
|
56
|
+
:dimensions => {
|
57
|
+
:module => "Alephant",
|
58
|
+
:class => "Cache"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
end
|
47
62
|
end
|
48
63
|
end
|
49
64
|
|
metadata
CHANGED
@@ -1,169 +1,169 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Kenny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
14
20
|
requirement: !ruby/object:Gem::Requirement
|
15
21
|
requirements:
|
16
22
|
- - '>='
|
17
23
|
- !ruby/object:Gem::Version
|
18
24
|
version: '0'
|
19
|
-
name: rspec
|
20
25
|
prerelease: false
|
21
26
|
type: :development
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec-nc
|
22
29
|
version_requirements: !ruby/object:Gem::Requirement
|
23
30
|
requirements:
|
24
31
|
- - '>='
|
25
32
|
- !ruby/object:Gem::Version
|
26
33
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|
30
36
|
- - '>='
|
31
37
|
- !ruby/object:Gem::Version
|
32
38
|
version: '0'
|
33
|
-
name: rspec-nc
|
34
39
|
prerelease: false
|
35
40
|
type: :development
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard
|
36
43
|
version_requirements: !ruby/object:Gem::Requirement
|
37
44
|
requirements:
|
38
45
|
- - '>='
|
39
46
|
- !ruby/object:Gem::Version
|
40
47
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
48
|
requirement: !ruby/object:Gem::Requirement
|
43
49
|
requirements:
|
44
50
|
- - '>='
|
45
51
|
- !ruby/object:Gem::Version
|
46
52
|
version: '0'
|
47
|
-
name: guard
|
48
53
|
prerelease: false
|
49
54
|
type: :development
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rspec
|
50
57
|
version_requirements: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
59
|
- - '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
62
|
requirement: !ruby/object:Gem::Requirement
|
57
63
|
requirements:
|
58
64
|
- - '>='
|
59
65
|
- !ruby/object:Gem::Version
|
60
66
|
version: '0'
|
61
|
-
name: guard-rspec
|
62
67
|
prerelease: false
|
63
68
|
type: :development
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
64
71
|
version_requirements: !ruby/object:Gem::Requirement
|
65
72
|
requirements:
|
66
73
|
- - '>='
|
67
74
|
- !ruby/object:Gem::Version
|
68
75
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
76
|
requirement: !ruby/object:Gem::Requirement
|
71
77
|
requirements:
|
72
78
|
- - '>='
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '0'
|
75
|
-
name: pry
|
76
81
|
prerelease: false
|
77
82
|
type: :development
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-remote
|
78
85
|
version_requirements: !ruby/object:Gem::Requirement
|
79
86
|
requirements:
|
80
87
|
- - '>='
|
81
88
|
- !ruby/object:Gem::Version
|
82
89
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
90
|
requirement: !ruby/object:Gem::Requirement
|
85
91
|
requirements:
|
86
92
|
- - '>='
|
87
93
|
- !ruby/object:Gem::Version
|
88
94
|
version: '0'
|
89
|
-
name: pry-remote
|
90
95
|
prerelease: false
|
91
96
|
type: :development
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry-nav
|
92
99
|
version_requirements: !ruby/object:Gem::Requirement
|
93
100
|
requirements:
|
94
101
|
- - '>='
|
95
102
|
- !ruby/object:Gem::Version
|
96
103
|
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
104
|
requirement: !ruby/object:Gem::Requirement
|
99
105
|
requirements:
|
100
106
|
- - '>='
|
101
107
|
- !ruby/object:Gem::Version
|
102
108
|
version: '0'
|
103
|
-
name: pry-nav
|
104
109
|
prerelease: false
|
105
110
|
type: :development
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: bundler
|
106
113
|
version_requirements: !ruby/object:Gem::Requirement
|
107
114
|
requirements:
|
108
|
-
- -
|
115
|
+
- - ~>
|
109
116
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
111
|
-
- !ruby/object:Gem::Dependency
|
117
|
+
version: '1.5'
|
112
118
|
requirement: !ruby/object:Gem::Requirement
|
113
119
|
requirements:
|
114
120
|
- - ~>
|
115
121
|
- !ruby/object:Gem::Version
|
116
122
|
version: '1.5'
|
117
|
-
name: bundler
|
118
123
|
prerelease: false
|
119
124
|
type: :development
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
120
127
|
version_requirements: !ruby/object:Gem::Requirement
|
121
128
|
requirements:
|
122
|
-
- -
|
129
|
+
- - '>='
|
123
130
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
125
|
-
- !ruby/object:Gem::Dependency
|
131
|
+
version: '0'
|
126
132
|
requirement: !ruby/object:Gem::Requirement
|
127
133
|
requirements:
|
128
134
|
- - '>='
|
129
135
|
- !ruby/object:Gem::Version
|
130
136
|
version: '0'
|
131
|
-
name: rake
|
132
137
|
prerelease: false
|
133
138
|
type: :development
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: aws-sdk
|
134
141
|
version_requirements: !ruby/object:Gem::Requirement
|
135
142
|
requirements:
|
136
|
-
- -
|
143
|
+
- - ~>
|
137
144
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
145
|
+
version: '1.0'
|
140
146
|
requirement: !ruby/object:Gem::Requirement
|
141
147
|
requirements:
|
142
148
|
- - ~>
|
143
149
|
- !ruby/object:Gem::Version
|
144
150
|
version: '1.0'
|
145
|
-
name: aws-sdk
|
146
151
|
prerelease: false
|
147
152
|
type: :runtime
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: alephant-logger
|
148
155
|
version_requirements: !ruby/object:Gem::Requirement
|
149
156
|
requirements:
|
150
|
-
- -
|
157
|
+
- - '>='
|
151
158
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
153
|
-
- !ruby/object:Gem::Dependency
|
159
|
+
version: '0'
|
154
160
|
requirement: !ruby/object:Gem::Requirement
|
155
161
|
requirements:
|
156
162
|
- - '>='
|
157
163
|
- !ruby/object:Gem::Version
|
158
164
|
version: '0'
|
159
|
-
name: alephant-logger
|
160
165
|
prerelease: false
|
161
166
|
type: :runtime
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - '>='
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
167
|
description:
|
168
168
|
email:
|
169
169
|
- kenoir@gmail.com
|