leela_client 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -2,10 +2,12 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  leela_client (0.0.1)
5
+ bzip2-ruby
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
8
9
  specs:
10
+ bzip2-ruby (0.2.7)
9
11
  diff-lcs (1.1.3)
10
12
  rspec (2.8.0)
11
13
  rspec-core (~> 2.8.0)
data/leela_client.gemspec CHANGED
@@ -14,5 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "leela_client"
15
15
  gem.version = LeelaClient::VERSION
16
16
 
17
+ gem.add_dependency "bzip2-ruby"
17
18
  gem.add_development_dependency "rspec"
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module LeelaClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/leela_client.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "leela_client/version"
2
2
  require "socket"
3
+ require "bzip2"
3
4
 
4
5
  module LeelaClient
5
6
  class Client
@@ -20,7 +21,7 @@ module LeelaClient
20
21
  sock.connect(@server, @port)
21
22
 
22
23
  message = "#{Socket.gethostname}|#{@service}||" + @data.join("||")
23
- sock.send(message, 0)
24
+ sock.send(Bzip2.compress(message, 9), 0)
24
25
  end
25
26
  end
26
27
  end
@@ -24,6 +24,6 @@ describe LeelaClient do
24
24
  leela.add("param", 50)
25
25
  leela.publish
26
26
 
27
- sock.recvfrom(100)[0].should eql("machine|service||param|50")
27
+ sock.recvfrom(100)[0].should eql(Bzip2.compress("machine|service||param|50",9))
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leela_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,9 +12,20 @@ bindir: bin
12
12
  cert_chain: []
13
13
  date: 2012-03-28 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bzip2-ruby
17
+ requirement: &12335200 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *12335200
15
26
  - !ruby/object:Gem::Dependency
16
27
  name: rspec
17
- requirement: &14789040 !ruby/object:Gem::Requirement
28
+ requirement: &12334600 !ruby/object:Gem::Requirement
18
29
  none: false
19
30
  requirements:
20
31
  - - ! '>='
@@ -22,7 +33,7 @@ dependencies:
22
33
  version: '0'
23
34
  type: :development
24
35
  prerelease: false
25
- version_requirements: *14789040
36
+ version_requirements: *12334600
26
37
  description: A client for leela chart server
27
38
  email:
28
39
  - pothix@pothix.com