gqtp 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.
- data/.yardopts +5 -0
- data/doc/text/news.md +7 -1
- data/lib/gqtp/version.rb +1 -1
- metadata +4 -7
- data/Gemfile +0 -21
- data/README.md +0 -76
- data/Rakefile +0 -44
- data/gqtp.gemspec +0 -52
data/.yardopts
ADDED
data/doc/text/news.md
CHANGED
data/lib/gqtp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gqtp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -121,10 +121,7 @@ executables:
|
|
121
121
|
extensions: []
|
122
122
|
extra_rdoc_files: []
|
123
123
|
files:
|
124
|
-
-
|
125
|
-
- Rakefile
|
126
|
-
- Gemfile
|
127
|
-
- gqtp.gemspec
|
124
|
+
- .yardopts
|
128
125
|
- lib/gqtp/parser.rb
|
129
126
|
- lib/gqtp/server.rb
|
130
127
|
- lib/gqtp/connection/thread.rb
|
@@ -158,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
155
|
version: '0'
|
159
156
|
segments:
|
160
157
|
- 0
|
161
|
-
hash: -
|
158
|
+
hash: -3095080216868951147
|
162
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
160
|
none: false
|
164
161
|
requirements:
|
@@ -167,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
164
|
version: '0'
|
168
165
|
segments:
|
169
166
|
- 0
|
170
|
-
hash: -
|
167
|
+
hash: -3095080216868951147
|
171
168
|
requirements: []
|
172
169
|
rubyforge_project:
|
173
170
|
rubygems_version: 1.8.23
|
data/Gemfile
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
|
19
|
-
source :rubygems
|
20
|
-
|
21
|
-
gemspec
|
data/README.md
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
# README
|
2
|
-
|
3
|
-
## Name
|
4
|
-
|
5
|
-
gqtp
|
6
|
-
|
7
|
-
## Description
|
8
|
-
|
9
|
-
Gqtp gem is a
|
10
|
-
[GQTP (Groonga Query Transfer Protocol)](http://groonga.org/docs/spec/gqtp.html)
|
11
|
-
Ruby implementation.
|
12
|
-
|
13
|
-
Gqtp gem provides both GQTP client, GQTP server and GQTP proxy
|
14
|
-
implementations. They provide asynchronous API. You can use gqtp gem
|
15
|
-
for high concurrency use.
|
16
|
-
|
17
|
-
## Install
|
18
|
-
|
19
|
-
% gem install gqtp
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
### Client
|
24
|
-
|
25
|
-
client = GQTP::Client.new(:address => "192.168.0.1", :port => 10041)
|
26
|
-
request = client.send("status") do |header, body|
|
27
|
-
p body # => "{\"alloc_count\":163,...}"
|
28
|
-
end
|
29
|
-
request.wait
|
30
|
-
|
31
|
-
### Server
|
32
|
-
|
33
|
-
server = GQTP::Server.new(:address => "192.168.0.1", :port => 10041)
|
34
|
-
server.on_request do |request, client|
|
35
|
-
body = "{\"alloc_count\":163,...}"
|
36
|
-
header = GQTP::Header.new
|
37
|
-
header.query_type = GQTP::Header::ContentType::JSON
|
38
|
-
header.flags = GQTP::Header::Flag::TAIL
|
39
|
-
header.size = body.bytesize
|
40
|
-
client.write(header.pack, body) do
|
41
|
-
client.close
|
42
|
-
end
|
43
|
-
end
|
44
|
-
server.run.wait
|
45
|
-
|
46
|
-
### Proxy
|
47
|
-
|
48
|
-
proxy = GQTP::Proxy.new(:listen_address => "127.0.0.1",
|
49
|
-
:listen_port => 10041,
|
50
|
-
:upstream_address => "192.168.0.1",
|
51
|
-
:upstream_port => 10041)
|
52
|
-
proxy.run.wait
|
53
|
-
|
54
|
-
## Dependencies
|
55
|
-
|
56
|
-
* Ruby 1.9.3
|
57
|
-
|
58
|
-
## Mailing list
|
59
|
-
|
60
|
-
* English: [groonga-talk@lists.sourceforge.net](https://lists.sourceforge.net/lists/listinfo/groonga-talk)
|
61
|
-
* Japanese: [groonga-dev@lists.sourceforge.jp](http://lists.sourceforge.jp/mailman/listinfo/groonga-dev)
|
62
|
-
|
63
|
-
## Thanks
|
64
|
-
|
65
|
-
* ...
|
66
|
-
|
67
|
-
## Authors
|
68
|
-
|
69
|
-
* Kouhei Sutou \<kou@clear-code.com\>
|
70
|
-
|
71
|
-
## License
|
72
|
-
|
73
|
-
LGPLv2.1 or later. See doc/text/lgpl-2.1.txt for details.
|
74
|
-
|
75
|
-
(Kouhei Sutou has a right to change the license including contributed
|
76
|
-
patches.)
|
data/Rakefile
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
|
19
|
-
task :default => :test
|
20
|
-
|
21
|
-
require "rubygems"
|
22
|
-
require "bundler/gem_helper"
|
23
|
-
require "packnga"
|
24
|
-
|
25
|
-
base_dir = File.join(File.dirname(__FILE__))
|
26
|
-
|
27
|
-
helper = Bundler::GemHelper.new(base_dir)
|
28
|
-
def helper.version_tag
|
29
|
-
version
|
30
|
-
end
|
31
|
-
|
32
|
-
helper.install
|
33
|
-
spec = helper.gemspec
|
34
|
-
|
35
|
-
Packnga::DocumentTask.new(spec) do
|
36
|
-
end
|
37
|
-
|
38
|
-
Packnga::ReleaseTask.new(spec) do
|
39
|
-
end
|
40
|
-
|
41
|
-
desc "Run tests"
|
42
|
-
task :test do
|
43
|
-
ruby("test/run-test.rb")
|
44
|
-
end
|
data/gqtp.gemspec
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License as published by the Free Software Foundation; either
|
8
|
-
# version 2.1 of the License, or (at your option) any later version.
|
9
|
-
#
|
10
|
-
# This library is distributed in the hope that it will be useful,
|
11
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
# Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public
|
16
|
-
# License along with this library; if not, write to the Free Software
|
17
|
-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
-
|
19
|
-
clean_white_space = lambda do |entry|
|
20
|
-
entry.gsub(/(\A\n+|\n+\z)/, '') + "\n"
|
21
|
-
end
|
22
|
-
|
23
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
|
24
|
-
require "gqtp/version"
|
25
|
-
|
26
|
-
Gem::Specification.new do |spec|
|
27
|
-
spec.name = "gqtp"
|
28
|
-
spec.version = GQTP::VERSION
|
29
|
-
spec.homepage = "https://github.com/ranguba/gqtp"
|
30
|
-
spec.authors = ["Kouhei Sutou"]
|
31
|
-
spec.email = ["kou@clear-code.com"]
|
32
|
-
readme = File.read("README.md")
|
33
|
-
readme.force_encoding("UTF-8") if readme.respond_to?(:force_encoding)
|
34
|
-
entries = readme.split(/^\#\#\s(.*)$/)
|
35
|
-
description = clean_white_space.call(entries[entries.index("Description") + 1])
|
36
|
-
spec.summary, spec.description, = description.split(/\n\n+/, 3)
|
37
|
-
spec.license = "LGPLv2.1 or later"
|
38
|
-
spec.files = ["README.md", "Rakefile", "Gemfile", "#{spec.name}.gemspec"]
|
39
|
-
spec.files += Dir.glob("lib/**/*.rb")
|
40
|
-
spec.files += Dir.glob("doc/text/*")
|
41
|
-
spec.test_files += Dir.glob("test/**/*")
|
42
|
-
Dir.chdir("bin") do
|
43
|
-
spec.executables = Dir.glob("*")
|
44
|
-
end
|
45
|
-
|
46
|
-
spec.add_development_dependency("bundler")
|
47
|
-
spec.add_development_dependency("rake")
|
48
|
-
spec.add_development_dependency("test-unit")
|
49
|
-
spec.add_development_dependency("test-unit-notify")
|
50
|
-
spec.add_development_dependency("packnga")
|
51
|
-
spec.add_development_dependency("redcarpet")
|
52
|
-
end
|