queris 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile.lock +16 -15
- data/LICENCE +24 -0
- data/lib/queris/model.rb +1 -1
- data/lib/queris/version.rb +1 -1
- data/lib/queris.rb +5 -35
- data/pkg/queris-0.9.1.gem +0 -0
- data/queris.gemspec +2 -2
- data/test/current.rb +0 -1
- data/test/ohm.rb +0 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f5da0cc8fb1c8a2d380aa926caf9e86bff01ed65786aedabb331ea286ef9c89
|
4
|
+
data.tar.gz: 725f18fa4e2c3cfc2dc3ad11774065a116cf3010df5e5bffe1cb03157d969031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 544f6cc07f2c6fe591bede9f4e1560dd61db43299fa778f43256fae655da1e18dd4cdc00edab2f2d3b5eb2046de6ef5137430f4c262231f284faee9ce2cb5909
|
7
|
+
data.tar.gz: a663746ce10d4b1cae3e244dd5e1c7f26ae06ced8fece4f84d5b8abc3d858b6ca53dfe692cbc0e8519bf02e9b078e22639b6e7f28a7803d5ec32f51c730e4883
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
queris (0.
|
5
|
-
|
6
|
-
|
7
|
-
redis (~> 3.2.1)
|
4
|
+
queris (0.9.1)
|
5
|
+
hiredis-client
|
6
|
+
redis (~> 5.2.0)
|
8
7
|
|
9
8
|
GEM
|
10
9
|
remote: http://rubygems.org/
|
11
10
|
specs:
|
12
|
-
coderay (1.1.
|
13
|
-
|
14
|
-
hiredis (0.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
coderay (1.1.3)
|
12
|
+
connection_pool (2.4.1)
|
13
|
+
hiredis-client (0.22.2)
|
14
|
+
redis-client (= 0.22.2)
|
15
|
+
method_source (1.1.0)
|
16
|
+
pry (0.14.2)
|
17
|
+
coderay (~> 1.1)
|
18
|
+
method_source (~> 1.0)
|
20
19
|
pry-debundle (0.8)
|
21
20
|
pry
|
22
|
-
redis (
|
23
|
-
|
21
|
+
redis (5.2.0)
|
22
|
+
redis-client (>= 0.22.0)
|
23
|
+
redis-client (0.22.2)
|
24
|
+
connection_pool
|
24
25
|
|
25
26
|
PLATFORMS
|
26
27
|
ruby
|
@@ -31,4 +32,4 @@ DEPENDENCIES
|
|
31
32
|
queris!
|
32
33
|
|
33
34
|
BUNDLED WITH
|
34
|
-
|
35
|
+
2.4.10
|
data/LICENCE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
This work is distributed under the MIT Licence.
|
2
|
+
|
3
|
+
Written by Leo Ponomarev (slact) 20011-2016.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
6
|
+
obtaining a copy of this software and associated documentation
|
7
|
+
files (the "Software"), to deal in the Software without
|
8
|
+
restriction, including without limitation the rights to use,
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the
|
11
|
+
Software is furnished to do so, subject to the following
|
12
|
+
conditions:
|
13
|
+
|
14
|
+
The above authorship notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/queris/model.rb
CHANGED
data/lib/queris/version.rb
CHANGED
data/lib/queris.rb
CHANGED
@@ -88,52 +88,22 @@ module Queris
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def track_stats?
|
91
|
-
|
91
|
+
false
|
92
92
|
end
|
93
93
|
def track_stats!
|
94
|
-
|
94
|
+
raise Error, "Not supported right now"
|
95
95
|
end
|
96
96
|
def stats
|
97
|
-
return false
|
98
|
-
puts RedisStats.summary
|
99
|
-
return RedisStats
|
97
|
+
return false
|
100
98
|
end
|
101
99
|
attr_accessor :log_stats_per_request
|
102
100
|
def log_stats_per_request?
|
103
|
-
|
101
|
+
false
|
104
102
|
end
|
105
103
|
def log_stats_per_request!
|
106
|
-
|
107
|
-
@log_stats_per_request = true
|
104
|
+
raise Error, "Not supported right now"
|
108
105
|
end
|
109
106
|
|
110
|
-
#bolt on our custom logger
|
111
|
-
class << redis.client
|
112
|
-
protected
|
113
|
-
alias :_default_logging :logging
|
114
|
-
if Object.const_defined?('ActiveSupport') && ActiveSupport.const_defined?("Notifications")
|
115
|
-
#the following is one ugly monkey(patch).
|
116
|
-
# we assume that, since we're in Railsworld, the Redis logger
|
117
|
-
# is up for grabs. It would be cleaner to wrap the redis client in a class,
|
118
|
-
# but I'm coding dirty for brevity.
|
119
|
-
# THIS MUST BE ADDRESSED IN THE FUTURE
|
120
|
-
def logging(commands)
|
121
|
-
ActiveSupport::Notifications.instrument("command.queris") do
|
122
|
-
start = Time.now.to_f
|
123
|
-
ret = _default_logging(commands) { yield }
|
124
|
-
Queris::RedisStats.record(self, Time.now.to_f - start) if Queris.track_stats?
|
125
|
-
ret
|
126
|
-
end
|
127
|
-
end
|
128
|
-
else
|
129
|
-
def logging(commands)
|
130
|
-
start = Time.now.to_f
|
131
|
-
ret = _default_logging(commands) { yield }
|
132
|
-
Queris::RedisStats.record(self, Time.now.to_f - start) if Queris.track_stats?
|
133
|
-
ret
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
107
|
redis
|
138
108
|
end
|
139
109
|
|
Binary file
|
data/queris.gemspec
CHANGED
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
dependencies = [
|
16
16
|
# Examples:
|
17
|
-
[:runtime, "redis", "~>
|
18
|
-
[:runtime, "hiredis"],
|
17
|
+
[:runtime, "redis", "~> 5.2.0", :require => ["redis", "hiredis-client"]],
|
18
|
+
[:runtime, "hiredis-client"],
|
19
19
|
[:development, "pry"],
|
20
20
|
[:development, "pry-debundle"]
|
21
21
|
]
|
data/test/current.rb
CHANGED
data/test/ohm.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leo P.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -16,16 +16,16 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: hiredis
|
28
|
+
name: hiredis-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- Gemfile
|
77
77
|
- Gemfile.lock
|
78
|
+
- LICENCE
|
78
79
|
- README.md
|
79
80
|
- Rakefile
|
80
81
|
- data/redis_scripts/add_low_ttl.lua
|
@@ -127,6 +128,7 @@ files:
|
|
127
128
|
- lib/rails/log_subscriber.rb
|
128
129
|
- lib/rails/request_timing.rb
|
129
130
|
- lib/tasks/queris.rake
|
131
|
+
- pkg/queris-0.9.1.gem
|
130
132
|
- queris.gemspec
|
131
133
|
- test.rb
|
132
134
|
- test/current.rb
|
@@ -135,7 +137,7 @@ files:
|
|
135
137
|
homepage: ''
|
136
138
|
licenses: []
|
137
139
|
metadata: {}
|
138
|
-
post_install_message:
|
140
|
+
post_install_message:
|
139
141
|
rdoc_options: []
|
140
142
|
require_paths:
|
141
143
|
- lib
|
@@ -150,9 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
152
|
- !ruby/object:Gem::Version
|
151
153
|
version: '0'
|
152
154
|
requirements: []
|
153
|
-
|
154
|
-
|
155
|
-
signing_key:
|
155
|
+
rubygems_version: 3.4.10
|
156
|
+
signing_key:
|
156
157
|
specification_version: 3
|
157
158
|
summary: Redis-backed object indexing and querying module
|
158
159
|
test_files:
|