codenjoy-ruby-client 0.0.1
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 +7 -0
- data/lib/codenjoy_ruby_client.rb +13 -0
- metadata +58 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 24bac0bb1ec6320c3ed2ee1011eae637e4f5a159
|
|
4
|
+
data.tar.gz: aeb8cb27fd3212255fb6f741271be8dd7fbecc1e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: fe1e745996457f90e2fddbd072e2df9c891ffb33ef25ac4ac6088e7b598495ca38a7f49b2df5fc1667772beff7e52e4b2a7e9eb531acd10ff96f1df05645e088
|
|
7
|
+
data.tar.gz: 7ed9d55ef9f89456a0ee65f1fd0d54e62946dfe59c7af599cdd773f63372b2756d091d4a50133b1f037ff70abb3db91302dee2fdf3ddf0b346e544e05ede4e57
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'rack'
|
|
2
|
+
|
|
3
|
+
class CodenjoyRubyClient
|
|
4
|
+
def self.run(host='0.0.0.0', port=8888, &answer)
|
|
5
|
+
codenjoy_server = lambda do |env|
|
|
6
|
+
decoded_query = URI.decode_www_form env['QUERY_STRING']
|
|
7
|
+
query = Hash[decoded_query]
|
|
8
|
+
|
|
9
|
+
[200, {"Content-Type" => "text/plain"}, [answer.call(query)]]
|
|
10
|
+
end
|
|
11
|
+
Rack::Handler::WEBrick.run codenjoy_server, Host: host, Port: port
|
|
12
|
+
end
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: codenjoy-ruby-client
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Yury Kaliada
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rack
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - '>='
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - '>='
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
description: Simple ruby codenjoy client.
|
|
28
|
+
email: fut.wrk@gmail.com
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- lib/codenjoy_ruby_client.rb
|
|
34
|
+
homepage: https://github.com/FUT/codenjoy_ruby_client
|
|
35
|
+
licenses:
|
|
36
|
+
- MIT
|
|
37
|
+
metadata: {}
|
|
38
|
+
post_install_message:
|
|
39
|
+
rdoc_options: []
|
|
40
|
+
require_paths:
|
|
41
|
+
- lib
|
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - '>='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
|
+
requirements:
|
|
49
|
+
- - '>='
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '0'
|
|
52
|
+
requirements: []
|
|
53
|
+
rubyforge_project:
|
|
54
|
+
rubygems_version: 2.0.6
|
|
55
|
+
signing_key:
|
|
56
|
+
specification_version: 4
|
|
57
|
+
summary: Simple ruby codenjoy client.
|
|
58
|
+
test_files: []
|