moped 2.0.5 → 2.0.6

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
  SHA1:
3
- metadata.gz: 7dba3a2f186d5c84ba26637291643efa327c261b
4
- data.tar.gz: 54733a6e86b6552dc7e3bf7ea2225d4326833404
3
+ metadata.gz: c45c765e5368decfb1b558ccd8574a658697ecf2
4
+ data.tar.gz: 5d4344b505bc2e1a2c9d418c5b84d321ab426d00
5
5
  SHA512:
6
- metadata.gz: 65a84b04bf7da4ca7866ca74653e3024b786333cd41a2f313d5c8a5493d7e2d49b238089e7627e771c04b828e496bbff202d1729cfcc0e109e552c3ec34079f2
7
- data.tar.gz: e41dfe9ef081ba6bca54b9cf9c154d9f57788a84066644388f6ba28a8c51c883fa2da0e9a7a0dad03c57708e34f747887e9bb4b99563bf331a6fa448afe92ffe
6
+ metadata.gz: 1a7780f10e4036d42b942bfa5dc9f4073b6d55b2984fa342e451a82887f7c2012e3fc40f6a900a617ca77b55f00e9854df2b02e23220e1b3ba0cba6e13deb590
7
+ data.tar.gz: 1da0fac786faea2334f9bb5d1937e37440e5b8bd257025fc194764a383edc959ef3ee198e4ac2539c355289d67c736a5f60d610331200fbcd8b27153a698a578
@@ -1,5 +1,9 @@
1
1
  # Overview
2
2
 
3
+ ## 2.0.6
4
+
5
+ * Relaxing BSON dependency to allow for 3.1.0 upgrade.
6
+
3
7
  ## 2.0.5
4
8
 
5
9
  ### Resolved Issues
@@ -3,7 +3,6 @@ require "moped/connection/manager"
3
3
  require "moped/connection/sockets"
4
4
 
5
5
  module Moped
6
-
7
6
  # This class contains behaviour of database socket connections.
8
7
  #
9
8
  # @since 2.0.0
@@ -15,6 +14,8 @@ module Moped
15
14
  # @since 2.0.0
16
15
  TIMEOUT = 5
17
16
 
17
+ REPLY_DECODE_STR = 'l<5q<l<2'
18
+
18
19
  # @!attribute host
19
20
  # @return [ String ] The ip address of the host.
20
21
  # @!attribute options
@@ -114,15 +115,15 @@ module Moped
114
115
  with_connection do |socket|
115
116
  reply = Protocol::Reply.allocate
116
117
  data = read_data(socket, 36)
117
- response = data.unpack('l<5q<l<2')
118
+ response = data.unpack(REPLY_DECODE_STR)
118
119
  reply.length,
119
- reply.request_id,
120
- reply.response_to,
121
- reply.op_code,
122
- reply.flags,
123
- reply.cursor_id,
124
- reply.offset,
125
- reply.count = response
120
+ reply.request_id,
121
+ reply.response_to,
122
+ reply.op_code,
123
+ reply.flags,
124
+ reply.cursor_id,
125
+ reply.offset,
126
+ reply.count = response
126
127
 
127
128
  if reply.count == 0
128
129
  reply.documents = []
@@ -1,6 +1,5 @@
1
1
  module Moped
2
2
  module Protocol
3
-
4
3
  # The base class for building all messages needed to implement the Mongo
5
4
  # Wire Protocol. It provides a minimal DSL for defining typed fields for
6
5
  # serialization and deserialization over the wire.
@@ -34,6 +33,9 @@ module Moped
34
33
  # int32 :op_code
35
34
  #
36
35
  module Message
36
+ INT32_DECODE_STR = 'l<'
37
+ INT64_DECODE_ARRAY_STR = 'q<*'
38
+ INT64_DECODE_STR = 'q<'
37
39
 
38
40
  # Default implementation for a message is to do nothing when receiving
39
41
  # replies.
@@ -214,11 +216,11 @@ module Moped
214
216
  end
215
217
 
216
218
  def serialize_#{name}(buffer)
217
- buffer << [#{name}_as_int].pack('l<')
219
+ buffer << [#{name}_as_int].pack(INT32_DECODE_STR)
218
220
  end
219
221
 
220
222
  def deserialize_#{name}(buffer)
221
- bits, = buffer.read(4).unpack('l<')
223
+ bits, = buffer.read(4).unpack(INT32_DECODE_STR)
222
224
 
223
225
  self.#{name} = bits
224
226
  end
@@ -244,11 +246,11 @@ module Moped
244
246
  end
245
247
 
246
248
  def serialize_#{name}(buffer)
247
- buffer << [#{name}].pack('l<')
249
+ buffer << [#{name}].pack(INT32_DECODE_STR)
248
250
  end
249
251
 
250
252
  def deserialize_#{name}(buffer)
251
- self.#{name}, = buffer.read(4).unpack('l<')
253
+ self.#{name}, = buffer.read(4).unpack(INT32_DECODE_STR)
252
254
  end
253
255
  RUBY
254
256
 
@@ -280,7 +282,7 @@ module Moped
280
282
  end
281
283
 
282
284
  def serialize_#{name}(buffer)
283
- buffer << #{name}.pack('q<*')
285
+ buffer << #{name}.pack(INT64_DECODE_ARRAY_STR)
284
286
  end
285
287
 
286
288
  def deserialize_#{name}(buffer)
@@ -294,11 +296,11 @@ module Moped
294
296
  end
295
297
 
296
298
  def serialize_#{name}(buffer)
297
- buffer << [#{name}].pack('q<')
299
+ buffer << [#{name}].pack(INT64_DECODE_STR)
298
300
  end
299
301
 
300
302
  def deserialize_#{name}(buffer)
301
- self.#{name}, = buffer.read(8).unpack('q<')
303
+ self.#{name}, = buffer.read(8).unpack(INT64_DECODE_STR)
302
304
  end
303
305
  RUBY
304
306
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Moped
3
- VERSION = "2.0.5"
3
+ VERSION = "2.0.6"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-04 00:00:00.000000000 Z
12
+ date: 2015-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bson
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.4
20
+ version: '3.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 3.0.4
27
+ version: '3.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: connection_pool
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.2.2
143
+ rubygems_version: 2.4.6
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: A MongoDB driver for Ruby.