roma-client 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{CHANGELOG → CHANGELOG.md} +8 -5
- data/Gemfile.lock +23 -15
- data/README.md +62 -0
- data/Rakefile +3 -3
- data/doc/CHANGELOG_md.html +119 -0
- data/doc/README_md.html +161 -0
- data/doc/Roma/Client/ClientPool.html +716 -0
- data/doc/Roma/Client/ClientRoutingTable.html +495 -0
- data/doc/Roma/Client/ConPool.html +484 -0
- data/doc/Roma/Client/Plugin/Alist.html +1276 -0
- data/doc/Roma/Client/Plugin/Map.html +531 -0
- data/doc/Roma/Client/Plugin/MapCount.html +401 -0
- data/doc/Roma/Client/Plugin.html +95 -0
- data/doc/Roma/Client/Proxy/ClientHandler.html +273 -0
- data/doc/Roma/Client/Proxy/Conpool.html +394 -0
- data/doc/Roma/Client/Proxy/Daemon.html +305 -0
- data/doc/Roma/Client/Proxy/RomaHandler.html +217 -0
- data/doc/Roma/Client/Proxy.html +95 -0
- data/doc/Roma/Client/RomaClient.html +1339 -0
- data/doc/Roma/Client/Sender.html +482 -0
- data/doc/Roma/Client/Stats.html +162 -0
- data/doc/Roma/Client/VERSION.html +141 -0
- data/doc/Roma/Client.html +95 -0
- data/doc/Roma/Logging/RLogger/ExtLogDev.html +159 -0
- data/doc/Roma/Logging/RLogger/ExtShiftAge.html +95 -0
- data/doc/Roma/Logging/RLogger/ExtTrace.html +109 -0
- data/doc/Roma/Logging/RLogger/Severity.html +139 -0
- data/doc/Roma/Logging/RLogger.html +786 -0
- data/doc/Roma/Logging.html +95 -0
- data/doc/Roma/Routing/RoutingData/RandomNodeListMaker.html +311 -0
- data/doc/Roma/Routing/RoutingData.html +912 -0
- data/doc/Roma/Routing.html +95 -0
- data/doc/Roma.html +95 -0
- data/doc/created.rid +20 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +210 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +4 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +972 -0
- data/lib/roma/client/rclient.rb +2 -1
- data/lib/roma/client/sender.rb +2 -2
- data/lib/roma/client/version.rb +1 -1
- data/lib/roma/client.rb +0 -21
- metadata +84 -10
- data/README +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3882ceb6dec6a018d78a0f23d25b6fc5c2f2596a
|
4
|
+
data.tar.gz: 3cd22d1e1be6fd376547c32c4505152cb7dfe48b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1502d199fbaa1018cb3dd083c4b7ae0f3b6800ce81fc7a51f59d0ad3b897fbcbeb6d6af5ebd101888c33b05ae73ed9ef1b0d7136632bcafc6590088c87d32ce6
|
7
|
+
data.tar.gz: 446d8fd9ea5021e539da7743b579ca6083bc7597688b61e208e8b9775daf4ecdd45abbebaae15189ccf7e19f585c9f737bed47bf10fd767dad3df42dd6e93c04
|
data/{CHANGELOG → CHANGELOG.md}
RENAMED
@@ -1,19 +1,22 @@
|
|
1
|
-
|
1
|
+
# 0.4.4 (Aug 23 2016)
|
2
|
+
|
3
|
+
* Started use Travis CI [#8](https://github.com/roma/roma-ruby-client/pull/8)
|
4
|
+
* Replace the deprecated method `Object.timeout` with `Timeout.timeout` [#9](https://github.com/roma/roma-ruby-client/pull/9)
|
5
|
+
|
6
|
+
# 0.4.3 (Aug 19 2015)
|
2
7
|
|
3
8
|
* Change interface of Stat object and refactoring [Hiroki Matsue] 7438faf
|
4
9
|
* Add tests for argumetns of stats [Hiroki Matsue] 9939760
|
5
10
|
* Refactor codes [Hiroki Matsue] 3d37030
|
6
11
|
* Support stat command [Hiroki Matsue] 1d75694
|
7
12
|
|
8
|
-
|
13
|
+
# 0.4.2 (Mar 31 2015)
|
9
14
|
|
10
15
|
* Add gemspec and convert "should" to "expect" on rspec tests. [Hiroki Matsue] 4c7c465
|
11
16
|
* modify to reproduce environment with Gemfile [tarr1124] 2205ed7
|
12
17
|
|
13
|
-
|
18
|
+
# 0.4.1 (Feb 20 2012)
|
14
19
|
|
15
20
|
* add client plugin files. [junji torii] caa2201
|
16
|
-
|
17
21
|
* 0.4.0
|
18
|
-
|
19
22
|
* support ClientPool
|
data/Gemfile.lock
CHANGED
@@ -1,29 +1,34 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
roma-client (0.4.
|
4
|
+
roma-client (0.4.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
diff-lcs (1.2.5)
|
10
|
-
eventmachine (1.0.
|
11
|
-
jaro_winkler (1.3.
|
12
|
-
json (1.8.
|
13
|
-
rake (
|
14
|
-
rdoc (4.
|
10
|
+
eventmachine (1.0.9.1)
|
11
|
+
jaro_winkler (1.3.7)
|
12
|
+
json (1.8.3)
|
13
|
+
rake (11.2.2)
|
14
|
+
rdoc (4.2.2)
|
15
15
|
json (~> 1.4)
|
16
|
-
roma (1.
|
16
|
+
roma (1.3.0)
|
17
17
|
eventmachine (~> 1.0.0)
|
18
18
|
jaro_winkler (~> 1.3.5)
|
19
|
-
rspec (
|
20
|
-
rspec-core (~>
|
21
|
-
rspec-expectations (~>
|
22
|
-
rspec-mocks (~>
|
23
|
-
rspec-core (
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
rspec (3.5.0)
|
20
|
+
rspec-core (~> 3.5.0)
|
21
|
+
rspec-expectations (~> 3.5.0)
|
22
|
+
rspec-mocks (~> 3.5.0)
|
23
|
+
rspec-core (3.5.2)
|
24
|
+
rspec-support (~> 3.5.0)
|
25
|
+
rspec-expectations (3.5.0)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.5.0)
|
28
|
+
rspec-mocks (3.5.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.5.0)
|
31
|
+
rspec-support (3.5.0)
|
27
32
|
|
28
33
|
PLATFORMS
|
29
34
|
ruby
|
@@ -34,3 +39,6 @@ DEPENDENCIES
|
|
34
39
|
roma
|
35
40
|
roma-client!
|
36
41
|
rspec
|
42
|
+
|
43
|
+
BUNDLED WITH
|
44
|
+
1.12.5
|
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# ROMA Client for Ruby
|
2
|
+
|
3
|
+
ROMA is one of the data storing systems for distributed key-value stores in Ruby.
|
4
|
+
The gem `roma-client` is Ruby client to talk with ROMA severs.
|
5
|
+
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'roma-client'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install roma-client
|
22
|
+
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'roma/client'
|
28
|
+
|
29
|
+
nodes = ['host1:11211', 'host2:11211']
|
30
|
+
client = Roma::Client::RomaClient.new(nodes)
|
31
|
+
|
32
|
+
key = 'key'
|
33
|
+
res = client.set(key, 'valie')
|
34
|
+
puts "put:#{res}"
|
35
|
+
|
36
|
+
puts "get:#{client.get key}"
|
37
|
+
|
38
|
+
res = client.delete key
|
39
|
+
puts "del:#{res}"
|
40
|
+
puts "get:#{client.get key}"
|
41
|
+
```
|
42
|
+
|
43
|
+
## Development
|
44
|
+
|
45
|
+
1. Fork it
|
46
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
47
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
48
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
49
|
+
5. Create new Pull Request
|
50
|
+
|
51
|
+
|
52
|
+
## Contributing
|
53
|
+
|
54
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/roma/roma-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
55
|
+
|
56
|
+
|
57
|
+
## License
|
58
|
+
|
59
|
+
GPL v3
|
60
|
+
|
61
|
+
---
|
62
|
+
Copyright (C) 2009 Rakuten, Inc.
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
RDOC_OPTIONS = [
|
10
10
|
'--line-numbers',
|
11
11
|
'--inline-source',
|
12
|
-
"--main", "README",
|
12
|
+
"--main", "README.md",
|
13
13
|
"-c UTF-8",
|
14
14
|
]
|
15
15
|
|
@@ -32,6 +32,6 @@ Rake::RDocTask.new("doc") do |rdoc|
|
|
32
32
|
rdoc.title = "ROMA documents"
|
33
33
|
rdoc.options.concat RDOC_OPTIONS
|
34
34
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
35
|
-
rdoc.rdoc_files.include("README")
|
36
|
-
rdoc.rdoc_files.include("CHANGELOG")
|
35
|
+
rdoc.rdoc_files.include("README.md")
|
36
|
+
rdoc.rdoc_files.include("CHANGELOG.md")
|
37
37
|
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset=" UTF-8">
|
6
|
+
|
7
|
+
<title>CHANGELOG - ROMA documents</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
<div class="nav-section">
|
55
|
+
<h3>Table of Contents</h3>
|
56
|
+
|
57
|
+
<ul class="link-list" role="directory">
|
58
|
+
<li><a href="#label-0.4.3+-28Aug+19+2015-29">0.4.3 (Aug 19 2015)</a>
|
59
|
+
<li><a href="#label-0.4.2+-28Mar+31+2015-29">0.4.2 (Mar 31 2015)</a>
|
60
|
+
<li><a href="#label-0.4.1+-28Feb+20+2012-29">0.4.1 (Feb 20 2012)</a>
|
61
|
+
</ul>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
|
65
|
+
<div id="project-metadata">
|
66
|
+
<div id="fileindex-section" class="nav-section">
|
67
|
+
<h3>Pages</h3>
|
68
|
+
|
69
|
+
<ul class="link-list">
|
70
|
+
|
71
|
+
<li><a href="./CHANGELOG_md.html">CHANGELOG</a>
|
72
|
+
|
73
|
+
<li><a href="./README_md.html">README</a>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
</nav>
|
80
|
+
|
81
|
+
<main role="main" aria-label="Page CHANGELOG.md">
|
82
|
+
|
83
|
+
<h1 id="label-0.4.3+-28Aug+19+2015-29">0.4.3 (Aug 19 2015)<span><a href="#label-0.4.3+-28Aug+19+2015-29">¶</a> <a href="#top">↑</a></span></h1>
|
84
|
+
<ul><li>
|
85
|
+
<p>Change interface of Stat object and refactoring [Hiroki Matsue] 7438faf</p>
|
86
|
+
</li><li>
|
87
|
+
<p>Add tests for argumetns of stats [Hiroki Matsue] 9939760</p>
|
88
|
+
</li><li>
|
89
|
+
<p>Refactor codes [Hiroki Matsue] 3d37030</p>
|
90
|
+
</li><li>
|
91
|
+
<p>Support stat command [Hiroki Matsue] 1d75694</p>
|
92
|
+
</li></ul>
|
93
|
+
|
94
|
+
<h1 id="label-0.4.2+-28Mar+31+2015-29">0.4.2 (Mar 31 2015)<span><a href="#label-0.4.2+-28Mar+31+2015-29">¶</a> <a href="#top">↑</a></span></h1>
|
95
|
+
<ul><li>
|
96
|
+
<p>Add gemspec and convert “should” to “expect” on rspec tests. [Hiroki
|
97
|
+
Matsue] 4c7c465</p>
|
98
|
+
</li><li>
|
99
|
+
<p>modify to reproduce environment with Gemfile [tarr1124] 2205ed7</p>
|
100
|
+
</li></ul>
|
101
|
+
|
102
|
+
<h1 id="label-0.4.1+-28Feb+20+2012-29">0.4.1 (Feb 20 2012)<span><a href="#label-0.4.1+-28Feb+20+2012-29">¶</a> <a href="#top">↑</a></span></h1>
|
103
|
+
<ul><li>
|
104
|
+
<p>add client plugin files. [junji torii] caa2201</p>
|
105
|
+
</li><li>
|
106
|
+
<p>0.4.0</p>
|
107
|
+
</li><li>
|
108
|
+
<p>support ClientPool</p>
|
109
|
+
</li></ul>
|
110
|
+
</main>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<footer id="validator-badges" role="contentinfo">
|
115
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
116
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
|
117
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
118
|
+
</footer>
|
119
|
+
|
data/doc/README_md.html
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset=" UTF-8">
|
6
|
+
|
7
|
+
<title>README - ROMA documents</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
<div class="nav-section">
|
55
|
+
<h3>Table of Contents</h3>
|
56
|
+
|
57
|
+
<ul class="link-list" role="directory">
|
58
|
+
<li><a href="#label-ROMA+Client+for+Ruby">ROMA Client for Ruby</a>
|
59
|
+
<li><a href="#label-Install">Install</a>
|
60
|
+
<li><a href="#label-Usage">Usage</a>
|
61
|
+
<li><a href="#label-Development">Development</a>
|
62
|
+
<li><a href="#label-Contributing">Contributing</a>
|
63
|
+
<li><a href="#label-License">License</a>
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
<div id="project-metadata">
|
69
|
+
<div id="fileindex-section" class="nav-section">
|
70
|
+
<h3>Pages</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
<li><a href="./CHANGELOG_md.html">CHANGELOG</a>
|
75
|
+
|
76
|
+
<li><a href="./README_md.html">README</a>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
</div>
|
82
|
+
</nav>
|
83
|
+
|
84
|
+
<main role="main" aria-label="Page README.md">
|
85
|
+
|
86
|
+
<h1 id="label-ROMA+Client+for+Ruby">ROMA Client for Ruby<span><a href="#label-ROMA+Client+for+Ruby">¶</a> <a href="#top">↑</a></span></h1>
|
87
|
+
|
88
|
+
<p>ROMA is one of the data storing systems for distributed key-value stores in
|
89
|
+
Ruby. The gem <code>roma-client</code> is Ruby client to talk with ROMA
|
90
|
+
severs.</p>
|
91
|
+
|
92
|
+
<h2 id="label-Install">Install<span><a href="#label-Install">¶</a> <a href="#top">↑</a></span></h2>
|
93
|
+
|
94
|
+
<p>Add this line to your application's Gemfile:</p>
|
95
|
+
|
96
|
+
<pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">'roma-client'</span>
|
97
|
+
</pre>
|
98
|
+
|
99
|
+
<p>And then execute:</p>
|
100
|
+
|
101
|
+
<pre>$ bundle</pre>
|
102
|
+
|
103
|
+
<p>Or install it yourself as:</p>
|
104
|
+
|
105
|
+
<pre>$ gem install roma-client</pre>
|
106
|
+
|
107
|
+
<h2 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#top">↑</a></span></h2>
|
108
|
+
|
109
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'roma/client'</span>
|
110
|
+
|
111
|
+
<span class="ruby-identifier">nodes</span> = [<span class="ruby-string">'host1:11211'</span>, <span class="ruby-string">'host2:11211'</span>]
|
112
|
+
<span class="ruby-identifier">client</span> = <span class="ruby-constant">Roma</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span><span class="ruby-operator">::</span><span class="ruby-constant">RomaClient</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">nodes</span>)
|
113
|
+
|
114
|
+
<span class="ruby-identifier">key</span> = <span class="ruby-string">'key'</span>
|
115
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">set</span>(<span class="ruby-identifier">key</span>, <span class="ruby-string">'valie'</span>)
|
116
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"put:#{res}"</span>
|
117
|
+
|
118
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"get:#{client.get key}"</span>
|
119
|
+
|
120
|
+
<span class="ruby-identifier">res</span> = <span class="ruby-identifier">client</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">key</span>
|
121
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"del:#{res}"</span>
|
122
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"get:#{client.get key}"</span>
|
123
|
+
</pre>
|
124
|
+
|
125
|
+
<h2 id="label-Development">Development<span><a href="#label-Development">¶</a> <a href="#top">↑</a></span></h2>
|
126
|
+
<ol><li>
|
127
|
+
<p>Fork it</p>
|
128
|
+
</li><li>
|
129
|
+
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
130
|
+
</li><li>
|
131
|
+
<p>Commit your changes (<code>git commit -am 'Add some
|
132
|
+
feature'</code>)</p>
|
133
|
+
</li><li>
|
134
|
+
<p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
|
135
|
+
</li><li>
|
136
|
+
<p>Create new Pull Request</p>
|
137
|
+
</li></ol>
|
138
|
+
|
139
|
+
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#top">↑</a></span></h2>
|
140
|
+
|
141
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a
|
142
|
+
href="https://github.com/roma/roma-ruby-client">github.com/roma/roma-ruby-client</a>.
|
143
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
144
|
+
and contributors are expected to adhere to the <a
|
145
|
+
href="contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
146
|
+
|
147
|
+
<h2 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h2>
|
148
|
+
|
149
|
+
<p>GPL v3</p>
|
150
|
+
|
151
|
+
<p>— Copyright (C) 2009 Rakuten, Inc.</p>
|
152
|
+
</main>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<footer id="validator-badges" role="contentinfo">
|
157
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
158
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
|
159
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
160
|
+
</footer>
|
161
|
+
|