git-db 0.1.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.
@@ -0,0 +1,45 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "GitDB" do
4
+
5
+ describe "git utility" do
6
+ it "can convert shas to/from hex/binary representation" do
7
+ @hex = "6161616161616161616161616161616161616161"
8
+ @sha = "aaaaaaaaaaaaaaaaaaaa"
9
+
10
+ GitDB.hex_to_sha1(@hex.dup).should == @sha.dup
11
+ GitDB.sha1_to_hex(@sha.dup).should == @hex.dup
12
+ end
13
+
14
+ it "has a null sha" do
15
+ GitDB.null_sha1.should == "0000000000000000000000000000000000000000"
16
+ end
17
+ end
18
+
19
+ describe "logging" do
20
+ it "has a logger that can respond to puts" do
21
+ GitDB.logger.should respond_to(:puts)
22
+ end
23
+
24
+ it "logs messages sent to log" do
25
+ @logger = mock(Logger)
26
+ @message = "Log This"
27
+
28
+ GitDB.should_receive(:logger).and_return(@logger)
29
+ @logger.should_receive(:puts).with(@message)
30
+
31
+ GitDB.log(@message)
32
+ end
33
+ end
34
+
35
+ describe "database" do
36
+ it "returns a database for a repository" do
37
+ @repository = "Test Repository"
38
+
39
+ GitDB::Database.should_receive(:database).with(@repository)
40
+
41
+ GitDB.database(@repository)
42
+ end
43
+ end
44
+
45
+ end
data/spec/rcov.opts ADDED
@@ -0,0 +1,2 @@
1
+ --exclude "spec/*,gems/*"
2
+ --rails
data/spec/spec.opts ADDED
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
@@ -0,0 +1,11 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'rubygems'
5
+ require 'git-db'
6
+ require 'spec'
7
+ require 'spec/autorun'
8
+
9
+ Spec::Runner.configure do |config|
10
+
11
+ end
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: git-db
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - David Dollar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-09-14 00:00:00 -04:00
13
+ default_executable: git-db
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: couchrest
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: Database-based git server
36
+ email: <ddollar@gmail.com>
37
+ executables:
38
+ - git-db
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - LICENSE
43
+ - README.rdoc
44
+ files:
45
+ - .document
46
+ - .gitignore
47
+ - LICENSE
48
+ - README.rdoc
49
+ - Rakefile
50
+ - VERSION
51
+ - bin/git-db
52
+ - features/git-db.feature
53
+ - features/step_definitions/git-db_steps.rb
54
+ - features/support/env.rb
55
+ - git-db.gemspec
56
+ - lib/git-db.rb
57
+ - lib/git-db/commands.rb
58
+ - lib/git-db/commands/receive-pack.rb
59
+ - lib/git-db/commands/upload-pack.rb
60
+ - lib/git-db/database.rb
61
+ - lib/git-db/objects.rb
62
+ - lib/git-db/objects/base.rb
63
+ - lib/git-db/objects/blob.rb
64
+ - lib/git-db/objects/commit.rb
65
+ - lib/git-db/objects/entry.rb
66
+ - lib/git-db/objects/tag.rb
67
+ - lib/git-db/objects/tree.rb
68
+ - lib/git-db/pack.rb
69
+ - lib/git-db/protocol.rb
70
+ - lib/git-db/utility.rb
71
+ - lib/git-db/utility/counting_io.rb
72
+ - spec/git-db/commands_spec.rb
73
+ - spec/git-db/objects/base_spec.rb
74
+ - spec/git-db/objects/entry_spec.rb
75
+ - spec/git-db/objects/tag_spec.rb
76
+ - spec/git-db/objects/tree_spec.rb
77
+ - spec/git-db/utility/counting_io_spec.rb
78
+ - spec/git-db_spec.rb
79
+ - spec/rcov.opts
80
+ - spec/spec.opts
81
+ - spec/spec_helper.rb
82
+ has_rdoc: true
83
+ homepage: http://github.com/ddollar/git-db
84
+ licenses: []
85
+
86
+ post_install_message:
87
+ rdoc_options:
88
+ - --charset=UTF-8
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: "0"
96
+ version:
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: "0"
102
+ version:
103
+ requirements: []
104
+
105
+ rubyforge_project:
106
+ rubygems_version: 1.3.5
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: Database-based git server
110
+ test_files:
111
+ - spec/git-db/commands_spec.rb
112
+ - spec/git-db/objects/base_spec.rb
113
+ - spec/git-db/objects/entry_spec.rb
114
+ - spec/git-db/objects/tag_spec.rb
115
+ - spec/git-db/objects/tree_spec.rb
116
+ - spec/git-db/utility/counting_io_spec.rb
117
+ - spec/git-db_spec.rb
118
+ - spec/spec_helper.rb