okuyama 0.0.1 → 0.1.0

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/spec/spec_helper.rb CHANGED
@@ -2,9 +2,11 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  require 'rspec'
4
4
  require 'okuyama'
5
+ require 'stringio'
5
6
 
6
7
  Okuyama.logger = Logger.new(STDERR)
7
- Okuyama.logger.level = Logger::ERROR
8
+ Okuyama.logger.level = Logger::DEBUG
9
+ # Okuyama.logger.level = Logger::ERROR
8
10
 
9
11
  # Requires supporting files with custom matchers and macros, etc,
10
12
  # in ./support/ and its subdirectories.
@@ -13,3 +15,6 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
13
15
  RSpec.configure do |config|
14
16
 
15
17
  end
18
+
19
+ module IOUtil
20
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okuyama
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kenji Hara
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-24 00:00:00 Z
18
+ date: 2012-03-25 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :development
@@ -114,8 +114,15 @@ files:
114
114
  - VERSION
115
115
  - lib/okuyama.rb
116
116
  - lib/okuyama/client.rb
117
- - lib/okuyama/protocol.rb
117
+ - lib/okuyama/fast_client.rb
118
+ - lib/okuyama/protocol/abstract_protocol.rb
119
+ - lib/okuyama/protocol/version1.rb
120
+ - okuyama.gemspec
121
+ - spec/okuyama/client/decr_value_spec.rb
122
+ - spec/okuyama/client/incr_value_spec.rb
123
+ - spec/okuyama/client/search_spec.rb
118
124
  - spec/okuyama/client_spec.rb
125
+ - spec/okuyama/protocol/version1_spec.rb
119
126
  - spec/okuyama_spec.rb
120
127
  - spec/spec_helper.rb
121
128
  homepage: http://github.com/haracane/okuyama
@@ -1,21 +0,0 @@
1
- module Okuyama
2
- module Protocol
3
- def self.set_value(key, tag_list, val, options=nil)
4
- key_base64 = Base64.encode64(key).chomp
5
- val_base64 = Base64.encode64(val).chomp
6
- tags = nil
7
- if tag_list then
8
- tags = tag_list.map{|t|Base64.encode64(t).chomp}.join(':')
9
- end
10
- tags ||= "(B)"
11
- dlock = 0
12
- return "1,#{key_base64},#{tags},#{dlock},#{val_base64}"
13
- end
14
-
15
- def self.get_value(key, options=nil)
16
- key_base64 = Base64.encode64(key).chomp
17
- return "2,#{key_base64}"
18
- end
19
-
20
- end
21
- end