hiredis 0.4.4 → 0.4.5
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.
- data/COPYING +24 -6
- data/lib/hiredis/ruby/reader.rb +18 -2
- data/lib/hiredis/version.rb +1 -1
- metadata +5 -5
data/COPYING
CHANGED
@@ -1,10 +1,28 @@
|
|
1
|
-
Copyright (c) 2010, Pieter Noordhuis
|
1
|
+
Copyright (c) 2010-2012, Pieter Noordhuis
|
2
|
+
|
2
3
|
All rights reserved.
|
3
4
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright notice, this
|
9
|
+
list of conditions and the following disclaimer.
|
10
|
+
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
13
|
+
and/or other materials provided with the distribution.
|
5
14
|
|
6
|
-
|
7
|
-
|
8
|
-
|
15
|
+
* Neither the name of Redis nor the names of its contributors may be used to
|
16
|
+
endorse or promote products derived from this software without specific prior
|
17
|
+
written permission.
|
9
18
|
|
10
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
23
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
24
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
25
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
26
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
28
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/lib/hiredis/ruby/reader.rb
CHANGED
@@ -150,7 +150,7 @@ module Hiredis
|
|
150
150
|
return false if @length < stop
|
151
151
|
|
152
152
|
@pos = stop
|
153
|
-
@buffer[start, bytes]
|
153
|
+
force_encoding @buffer[start, bytes]
|
154
154
|
end
|
155
155
|
|
156
156
|
def read_line
|
@@ -159,7 +159,23 @@ module Hiredis
|
|
159
159
|
return false unless stop
|
160
160
|
|
161
161
|
@pos = stop + 2 # include CRLF
|
162
|
-
@buffer[start, stop - start]
|
162
|
+
force_encoding @buffer[start, stop - start]
|
163
|
+
end
|
164
|
+
|
165
|
+
private
|
166
|
+
|
167
|
+
if "".respond_to?(:force_encoding)
|
168
|
+
|
169
|
+
def force_encoding(str)
|
170
|
+
str.force_encoding(Encoding.default_external)
|
171
|
+
end
|
172
|
+
|
173
|
+
else
|
174
|
+
|
175
|
+
def force_encoding(str)
|
176
|
+
str
|
177
|
+
end
|
178
|
+
|
163
179
|
end
|
164
180
|
end
|
165
181
|
end
|
data/lib/hiredis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiredis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70232656303880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.7.1
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70232656303880
|
25
25
|
description: Ruby extension that wraps Hiredis (blocking connection and reply parsing)
|
26
26
|
email:
|
27
27
|
- pcnoordhuis@gmail.com
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 1.8.
|
83
|
+
rubygems_version: 1.8.11
|
84
84
|
signing_key:
|
85
85
|
specification_version: 3
|
86
86
|
summary: Ruby extension that wraps Hiredis (blocking connection and reply parsing)
|