swift_db 0.1.4 → 0.1.5

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/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
- swift_db.gemspec
14
+ spec/binary_tree.rb
15
+ spec/spec_helper.rb
data/Rakefile CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('swift_db', '0.1.4') do |p|
5
+ Echoe.new('swift_db', '0.1.5') do |p|
6
6
  p.description = "Stores data in a B+tree structure"
7
7
  p.url = "https://github.com/ask4prasath/swift_db"
8
8
  p.author = "Prasath V Ram"
@@ -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"
@@ -0,0 +1,10 @@
1
+ require File.join(File.dirname(__FILE__), 'spec_helper.rb')
2
+
3
+ describe DB::Core do
4
+
5
+ it "should throw error when order is less than 3" do
6
+ lambda { DB::Core::Table.new(2)}.should raise_error
7
+ end
8
+
9
+
10
+ end
@@ -0,0 +1,4 @@
1
+ $:.unshift(File.join(File.dirname(__FILE__),'..','lib'))
2
+
3
+ require "spec"
4
+ require 'swift_db.rb'
@@ -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.4"
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{2010-12-09}
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.extra_rdoc_files = ["README.rdoc", "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"]
13
- s.files = ["Manifest", "README.rdoc", "Rakefile", "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", "swift_db.gemspec"]
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.3.7}
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: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
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: 2010-12-09 00:00:00 +05:30
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.3.7
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