grack 0.1.0.pre1 → 0.1.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +4 -0
- data/README.md +3 -2
- data/lib/grack/git_adapter.rb +8 -4
- data/tests/test_helper.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871dc948470e8c1dfc7615bfe4579915c4596204
|
4
|
+
data.tar.gz: 8adad4b912101741254af438d7e626e1f78780e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eda2933722fe14e321b970d622fd2caea9f7d3ceab6f68c07244ee203adaea0f9f06806e613322bd5174cc3e659a1ef827387c1c64f55d359fc9c4f49df86c5
|
7
|
+
data.tar.gz: 067b85e420b42ba33164c67fcef5687bac03a07aaa53a1ae90893da10dfea7a5952ad7d8944d156b6785d0a0b8b1c7b21f4c0cdf0974272d45a9bd0454544b44
|
data/NEWS.md
CHANGED
@@ -5,6 +5,10 @@ detailed information is available in the rest of the documentation.
|
|
5
5
|
|
6
6
|
**NOTE:** Date stamps in the following entries are in YYYY/MM/DD format.
|
7
7
|
|
8
|
+
## v0.1.0.pre2
|
9
|
+
|
10
|
+
* Minor change required for new version [rjgit adapter](https://github.com/grackorg/rjgit_grack) to work
|
11
|
+
|
8
12
|
## v0.1.0.pre1
|
9
13
|
|
10
14
|
* Moved projects to [grackorg/grack](https://github.com/grackorg/grack)
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/grack.svg)](http://badge.fury.io/rb/grack)
|
2
2
|
[![Build Status](https://travis-ci.org/grackorg/grack.svg?branch=master)](https://travis-ci.org/grackorg/grack)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/grackorg/grack/badge.svg?branch=master&service=github)](https://coveralls.io/github/grackorg/grack?branch=master)
|
3
4
|
[![Dependency Status](https://gemnasium.com/grackorg/grack.svg)](https://gemnasium.com/grackorg/grack)
|
4
5
|
|
5
6
|
# Grack - Ruby/Rack Git Smart HTTP Server Handler
|
@@ -74,7 +75,7 @@ Grack::App.new(:git_adapter_factory => ->{ MyAdapter.new })
|
|
74
75
|
```
|
75
76
|
|
76
77
|
Alternative adapters available:
|
77
|
-
* [rjgit_grack](http://github.com/
|
78
|
+
* [rjgit_grack](http://github.com/grackorg/rjgit_grack) lets Grack use the
|
78
79
|
[RJGit](http://github.com/repotag/rjgit) gem to implement Smart HTTP in pure
|
79
80
|
Jruby. (Currently requires use of backward compatibility support via
|
80
81
|
Grack::CompatibleGitAdapter)
|
@@ -121,7 +122,7 @@ config = {
|
|
121
122
|
:root => '/path/to/bare/repositories',
|
122
123
|
:allow_push => true,
|
123
124
|
:allow_pull => true,
|
124
|
-
:git_adapter_factory => ->{ GitAdapter.new }
|
125
|
+
:git_adapter_factory => ->{ Grack::GitAdapter.new }
|
125
126
|
}
|
126
127
|
|
127
128
|
run Grack::App.new(config)
|
data/lib/grack/git_adapter.rb
CHANGED
@@ -50,10 +50,7 @@ module Grack
|
|
50
50
|
def handle_pack(pack_type, io_in, io_out, opts = {})
|
51
51
|
args = %w{--stateless-rpc}
|
52
52
|
if opts.fetch(:advertise_refs, false)
|
53
|
-
|
54
|
-
io_out.write('%04x' % (str.size + 4))
|
55
|
-
io_out.write(str)
|
56
|
-
io_out.write('0000')
|
53
|
+
io_out.write(advertisement_prefix(pack_type))
|
57
54
|
args << '--advertise-refs'
|
58
55
|
end
|
59
56
|
args << repository_path.to_s
|
@@ -102,6 +99,13 @@ module Grack
|
|
102
99
|
# The path to use for running the git utility.
|
103
100
|
attr_reader :git_path
|
104
101
|
|
102
|
+
##
|
103
|
+
# The string to prepand before ref advertisements
|
104
|
+
def advertisement_prefix(pack_type)
|
105
|
+
str = "# service=#{pack_type}\n"
|
106
|
+
'%04x' % (str.size + 4) << "#{str}0000"
|
107
|
+
end
|
108
|
+
|
105
109
|
##
|
106
110
|
# @param [String] key a key to look up in the Git repository configuration.
|
107
111
|
#
|
data/tests/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chacon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-09-
|
13
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|