gibson 1.0.1 → 1.0.2

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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGM1OGIwOGQzM2Y5NzhlNWEzYjk5NTBlNGNkNjg5NzcyYWUwNWZkNw==
5
+ data.tar.gz: !binary |-
6
+ N2M4NzlhM2E0MDMzODcxZmUxZTUxYjI5MTBhZThiYjhjMzMxYzczMA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NDk3ZjhjMDRmNTI1M2EyOTAwOGZjMDRmMTZiMDQwMzEzNGQ3MTBkMjc1NTYz
10
+ OGEwNWU4NDcxZjYyYzVlYjBjN2QwNzU3MjZhYWIwMDA1OGQxMWQ4YTYwZmIz
11
+ NTRkZDgxMzNkZDg4YzdjZGRhMTM1NGQyYjU4MDRhMzU0ODU2OTM=
12
+ data.tar.gz: !binary |-
13
+ OWIzYzY1OGRkNDkyNDViMTY2MTg5NWMzNDNiNzE4NmFjMmIwNmY4YzAwMjRj
14
+ NWM2YTkzNTk1MzAxYWRhNzUxZWM1M2JkOWFlMDJlYzI4MDliMmEyN2Y2MGY3
15
+ OWI1YzBlN2FlNDQ4NTQxNmVhNWFiMmZjNGNjNDZlOWI2MWEyMjk=
data/lib/gibson/gibson.rb CHANGED
@@ -46,7 +46,7 @@ module Gibson
46
46
  # number
47
47
  elsif encoding == Protocol::ENCODINGS[:number]
48
48
  # 32 bit integer ?
49
- if size == 4:
49
+ if size == 4
50
50
  data.unpack( 'l<' )[0]
51
51
  else
52
52
  data.unpack( 'q<' )[0]
@@ -61,7 +61,7 @@ module Gibson
61
61
  count, data = data.unpack( 'L<a' + left.to_s )
62
62
  obj = {}
63
63
 
64
- count.times { |i|
64
+ count.times do |i|
65
65
  left -= 4
66
66
  klen, data = data.unpack( 'L<a' + left.to_s )
67
67
 
@@ -78,7 +78,7 @@ module Gibson
78
78
  value, data = data.unpack( 'a' + vsize.to_s + 'a' + left.to_s )
79
79
 
80
80
  obj[key] = decode Protocol::REPLIES[:val], enc, vsize, value
81
- }
81
+ end
82
82
 
83
83
  obj
84
84
  end
@@ -86,10 +86,13 @@ module Gibson
86
86
  def decode( code, encoding, size, data )
87
87
  if code == Protocol::REPLIES[:val]
88
88
  decode_val encoding, size, data
89
+
89
90
  elsif code == Protocol::REPLIES[:kval]
90
91
  decode_kval data, size
92
+
91
93
  elsif code == Protocol::REPLIES[:ok]
92
94
  true
95
+
93
96
  elsif Protocol.error? code
94
97
  raise Protocol::ERRORS[code]
95
98
 
@@ -25,6 +25,6 @@
25
25
  # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
  module Gibson
28
- VERSION = '1.0.1'
28
+ VERSION = '1.0.2'
29
29
  end
30
30
 
metadata CHANGED
@@ -1,32 +1,21 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gibson
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 1
9
- version: 1.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Simone Margaritelli
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2013-08-07 00:00:00 +02:00
18
- default_executable:
11
+ date: 2013-08-07 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: High performance Gibson client for Ruby
22
14
  email: evilsocket@gmail.com
23
15
  executables: []
24
-
25
16
  extensions: []
26
-
27
17
  extra_rdoc_files: []
28
-
29
- files:
18
+ files:
30
19
  - lib/gibson/connection.rb
31
20
  - lib/gibson/gibson.rb
32
21
  - lib/gibson/protocol.rb
@@ -37,35 +26,29 @@ files:
37
26
  - Rakefile
38
27
  - Gemfile
39
28
  - gibson.gemspec
40
- has_rdoc: true
41
29
  homepage: http://gibson-db.in/
42
- licenses:
30
+ licenses:
43
31
  - BSD
32
+ metadata: {}
44
33
  post_install_message:
45
- rdoc_options:
34
+ rdoc_options:
46
35
  - --charset=UTF-8
47
- require_paths:
36
+ require_paths:
48
37
  - lib
49
- required_ruby_version: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- segments:
54
- - 0
55
- version: "0"
56
- required_rubygems_version: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- segments:
61
- - 0
62
- version: "0"
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
63
48
  requirements: []
64
-
65
49
  rubyforge_project:
66
- rubygems_version: 1.3.6
50
+ rubygems_version: 2.0.6
67
51
  signing_key:
68
- specification_version: 3
52
+ specification_version: 4
69
53
  summary: High performance Gibson client for Ruby
70
54
  test_files: []
71
-