swift_db 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +3 -1
- data/Rakefile +1 -1
- data/bin/swift +37 -0
- data/spec/binary_tree.rb +10 -0
- data/spec/spec_helper.rb +4 -0
- data/swift_db.gemspec +7 -6
- metadata +13 -9
data/Manifest
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Manifest
|
2
2
|
README.rdoc
|
3
3
|
Rakefile
|
4
|
+
bin/swift
|
4
5
|
lib/a.rb
|
5
6
|
lib/common/comparison.rb
|
6
7
|
lib/db.rb
|
@@ -10,4 +11,5 @@ lib/root/leaf.rb
|
|
10
11
|
lib/root/table.rb
|
11
12
|
lib/root/tree.rb
|
12
13
|
lib/swift_db.rb
|
13
|
-
|
14
|
+
spec/binary_tree.rb
|
15
|
+
spec/spec_helper.rb
|
data/Rakefile
CHANGED
data/bin/swift
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
$:.unshift(File.join(File.dirname(__FILE__),'..','lib'))
|
2
|
+
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'socket'
|
6
|
+
require 'thread'
|
7
|
+
require "swift_db.rb"
|
8
|
+
include Db::Core
|
9
|
+
|
10
|
+
case ARGV[0]
|
11
|
+
|
12
|
+
when "start"
|
13
|
+
command = "start"
|
14
|
+
port = 9000
|
15
|
+
port = ARGV[2] if ARGV[1] == "-p"
|
16
|
+
server = TCPServer.new("0.0.0.0", port)
|
17
|
+
table = Table.new(10)
|
18
|
+
puts "server started on port #{port}"
|
19
|
+
|
20
|
+
when "--help"
|
21
|
+
command = "help"
|
22
|
+
puts "TODO for command help"
|
23
|
+
|
24
|
+
else
|
25
|
+
command = "help"
|
26
|
+
puts "TODO for command help"
|
27
|
+
end
|
28
|
+
|
29
|
+
loop do
|
30
|
+
connection = server.accept
|
31
|
+
url = connection.gets.split(" ")
|
32
|
+
p params
|
33
|
+
puts "recevied a request"
|
34
|
+
# table.insert(rand(34), )
|
35
|
+
connection.puts params.to_json
|
36
|
+
connection.close
|
37
|
+
end unless command == "help"
|
data/spec/binary_tree.rb
ADDED
data/spec/spec_helper.rb
ADDED
data/swift_db.gemspec
CHANGED
@@ -2,24 +2,25 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{swift_db}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Prasath V Ram"]
|
9
|
-
s.date = %q{
|
9
|
+
s.date = %q{2011-01-03}
|
10
|
+
s.default_executable = %q{swift}
|
10
11
|
s.description = %q{Stores data in a B+tree structure}
|
11
12
|
s.email = %q{ask4prasath@gmail.com}
|
12
|
-
s.
|
13
|
-
s.
|
13
|
+
s.executables = ["swift"]
|
14
|
+
s.extra_rdoc_files = ["README.rdoc", "bin/swift", "lib/a.rb", "lib/common/comparison.rb", "lib/db.rb", "lib/root/binary.rb", "lib/root/internal_node.rb", "lib/root/leaf.rb", "lib/root/table.rb", "lib/root/tree.rb", "lib/swift_db.rb"]
|
15
|
+
s.files = ["Manifest", "README.rdoc", "Rakefile", "bin/swift", "lib/a.rb", "lib/common/comparison.rb", "lib/db.rb", "lib/root/binary.rb", "lib/root/internal_node.rb", "lib/root/leaf.rb", "lib/root/table.rb", "lib/root/tree.rb", "lib/swift_db.rb", "spec/binary_tree.rb", "spec/spec_helper.rb", "swift_db.gemspec"]
|
14
16
|
s.homepage = %q{https://github.com/ask4prasath/swift_db}
|
15
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Swift_db", "--main", "README.rdoc"]
|
16
18
|
s.require_paths = ["lib"]
|
17
19
|
s.rubyforge_project = %q{swift_db}
|
18
|
-
s.rubygems_version = %q{1.
|
20
|
+
s.rubygems_version = %q{1.4.1}
|
19
21
|
s.summary = %q{Stores data in a B+tree structure}
|
20
22
|
|
21
23
|
if s.respond_to? :specification_version then
|
22
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
24
|
s.specification_version = 3
|
24
25
|
|
25
26
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swift_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Prasath V Ram
|
@@ -15,18 +15,19 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-01-03 00:00:00 +05:30
|
19
|
+
default_executable: swift
|
20
20
|
dependencies: []
|
21
21
|
|
22
22
|
description: Stores data in a B+tree structure
|
23
23
|
email: ask4prasath@gmail.com
|
24
|
-
executables:
|
25
|
-
|
24
|
+
executables:
|
25
|
+
- swift
|
26
26
|
extensions: []
|
27
27
|
|
28
28
|
extra_rdoc_files:
|
29
29
|
- README.rdoc
|
30
|
+
- bin/swift
|
30
31
|
- lib/a.rb
|
31
32
|
- lib/common/comparison.rb
|
32
33
|
- lib/db.rb
|
@@ -40,6 +41,7 @@ files:
|
|
40
41
|
- Manifest
|
41
42
|
- README.rdoc
|
42
43
|
- Rakefile
|
44
|
+
- bin/swift
|
43
45
|
- lib/a.rb
|
44
46
|
- lib/common/comparison.rb
|
45
47
|
- lib/db.rb
|
@@ -49,6 +51,8 @@ files:
|
|
49
51
|
- lib/root/table.rb
|
50
52
|
- lib/root/tree.rb
|
51
53
|
- lib/swift_db.rb
|
54
|
+
- spec/binary_tree.rb
|
55
|
+
- spec/spec_helper.rb
|
52
56
|
- swift_db.gemspec
|
53
57
|
has_rdoc: true
|
54
58
|
homepage: https://github.com/ask4prasath/swift_db
|
@@ -86,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
90
|
requirements: []
|
87
91
|
|
88
92
|
rubyforge_project: swift_db
|
89
|
-
rubygems_version: 1.
|
93
|
+
rubygems_version: 1.4.1
|
90
94
|
signing_key:
|
91
95
|
specification_version: 3
|
92
96
|
summary: Stores data in a B+tree structure
|