bananajour 2.6.1 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +19 -58
- data/Readme.md +2 -23
- data/bin/bananajour +4 -2
- data/lib/bananajour/bonjour/browser.rb +1 -1
- data/lib/bananajour/commands.rb +7 -1
- data/lib/bananajour/repository.rb +1 -1
- data/lib/bananajour/version.rb +1 -1
- data/lib/bananajour.rb +3 -5
- data/sinatra/app.rb +4 -9
- metadata +122 -57
- data/lib/bananajour/gem_dependencies.rb +0 -35
data/Rakefile
CHANGED
@@ -1,64 +1,25 @@
|
|
1
|
-
|
1
|
+
lib = File.expand_path('../lib/', __FILE__)
|
2
|
+
$:.unshift lib unless $:.include?(lib)
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
gem = Gem::Specification.new do |gem|
|
7
|
-
gem.name = "bananajour"
|
8
|
-
gem.version = Bananajour::VERSION
|
9
|
-
gem.platform = Gem::Platform::RUBY
|
10
|
-
gem.extra_rdoc_files = ["Readme.md"]
|
11
|
-
gem.summary = "Local git repository hosting with a sexy web interface and bonjour discovery. It's like your own little adhoc, network-aware github!"
|
12
|
-
gem.description = gem.summary
|
13
|
-
gem.authors = ["Tim Lucas"]
|
14
|
-
gem.email = "t.lucas@toolmantim.com"
|
15
|
-
gem.homepage = "http://github.com/toolmantim/bananajour"
|
16
|
-
gem.require_path = "lib"
|
17
|
-
gem.files = %w(Readme.md Rakefile) + Dir.glob("{bin,lib,sinatra}/**/*")
|
18
|
-
gem.has_rdoc = false
|
19
|
-
gem.bindir = 'bin'
|
20
|
-
gem.executables = [ 'bananajour' ]
|
21
|
-
Bananajour::GemDependencies.all.each {|dep| gem.add_runtime_dependency( dep.name, dep.version ) }
|
4
|
+
desc "Boot up the web interface"
|
5
|
+
task :web do
|
6
|
+
exec "bundle exec ruby -I#{lib} sinatra/app.rb -p 4567 -s thin"
|
22
7
|
end
|
23
8
|
|
24
|
-
|
25
|
-
|
9
|
+
desc "Boot up the web interface with shotgun"
|
10
|
+
task :shotgun do
|
11
|
+
exec "bundle exec shotgun sinatra/app.rb -s thin"
|
26
12
|
end
|
27
|
-
|
28
|
-
namespace :gem do
|
29
|
-
|
30
|
-
desc "Rebuild and install bananajour as a gem"
|
31
|
-
task :install => :package do
|
32
|
-
require 'rubygems/installer'
|
33
|
-
Dir['*.gem'].each do |gem|
|
34
|
-
Gem::Installer.new(gem).install
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
desc "Create the gem"
|
39
|
-
task :package => [:clean, "spec:generate"] do
|
40
|
-
require 'rubygems/builder'
|
41
|
-
Gem::Builder.new( gem ).build
|
42
|
-
end
|
43
|
-
|
44
|
-
namespace :spec do
|
45
13
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
desc "Test spec in github cleanroom"
|
54
|
-
task :test => :generate do
|
55
|
-
require 'rubygems/specification'
|
56
|
-
data = File.read("#{gem.name}.gemspec")
|
57
|
-
spec = nil
|
58
|
-
Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
|
59
|
-
puts "#{spec} - Good to go!"
|
60
|
-
end
|
14
|
+
require "bananajour/version"
|
15
|
+
gem_file_name = "bananajour-#{Bananajour::VERSION}"
|
16
|
+
|
17
|
+
desc "Build the gem"
|
18
|
+
task :build do
|
19
|
+
system "gem build bananajour.gemspec"
|
20
|
+
end
|
61
21
|
|
62
|
-
|
63
|
-
|
64
|
-
|
22
|
+
desc "Release gem"
|
23
|
+
task :release => :build do
|
24
|
+
system "gem push #{gem_file_name}.gem"
|
25
|
+
end
|
data/Readme.md
CHANGED
@@ -53,13 +53,6 @@ Optional configuration: you can override the hostname by setting a global git co
|
|
53
53
|
|
54
54
|
If you set this setting, then bananajour will assume that you know precisely what you're doing, it will not append .local, it will not check this hostname is valid, or do anything to it. If you set this, then you're on your own.
|
55
55
|
|
56
|
-
Make sure you have these ports open on your firewall:
|
57
|
-
9417 - git - bigbananajour
|
58
|
-
9418 - git - bananajour
|
59
|
-
9331 - bananajour
|
60
|
-
9332 - bigbananajour
|
61
|
-
|
62
|
-
|
63
56
|
Linux support
|
64
57
|
-------------
|
65
58
|
|
@@ -85,11 +78,6 @@ And then restart the Avahi service:
|
|
85
78
|
|
86
79
|
Note: You might have to restart the avahi-daemon sometimes if you are having problems seeing other bananajours.
|
87
80
|
|
88
|
-
Using with Ginatra
|
89
|
-
------------------
|
90
|
-
|
91
|
-
Rumour has it [ginatra](http://github.com/lenary/ginatra) can be used to provide richer gitweb-like browsing of your bananajour repositories. Symlink ginatra's `repos` directory to `~/.bananajour/repositories` to serve up your bananajour repositories.
|
92
|
-
|
93
81
|
Official repository and support
|
94
82
|
-------------------------------
|
95
83
|
|
@@ -100,17 +88,8 @@ Feature and support discussions live at [groups.google.com/group/bananajour](htt
|
|
100
88
|
Developing
|
101
89
|
----------
|
102
90
|
|
103
|
-
|
104
|
-
|
105
|
-
ruby sinatra/app.rb -s thin
|
106
|
-
|
107
|
-
If you want code reloading use [shotgun](http://github.com/rtomayko/shotgun) instead:
|
108
|
-
|
109
|
-
shotgun sinatra/app.rb -s thin
|
110
|
-
|
111
|
-
If you then want to run your working copy as your public bananajour rebuild and install it as a gem:
|
112
|
-
|
113
|
-
sudo rake gem:install
|
91
|
+
bundle install
|
92
|
+
rake -T
|
114
93
|
|
115
94
|
Contributors
|
116
95
|
------------
|
data/bin/bananajour
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
lib = File.expand_path('../../lib/', __FILE__)
|
4
|
+
$:.unshift lib unless $:.include?(lib)
|
5
|
+
|
6
|
+
require 'bananajour'
|
5
7
|
|
6
8
|
Thread.abort_on_exception = true
|
7
9
|
|
data/lib/bananajour/commands.rb
CHANGED
@@ -15,7 +15,13 @@ module Bananajour::Commands
|
|
15
15
|
# Start sinatra app.
|
16
16
|
def serve_web!
|
17
17
|
puts "* Starting " + web_uri.foreground(:yellow)
|
18
|
-
fork
|
18
|
+
fork do
|
19
|
+
ENV["RACK_ENV"] = "production"
|
20
|
+
require "bananajour/../../sinatra/app"
|
21
|
+
Sinatra::Application.set :port, web_port
|
22
|
+
Sinatra::Application.set :server, "thin"
|
23
|
+
Sinatra::Application.run!
|
24
|
+
end
|
19
25
|
end
|
20
26
|
|
21
27
|
def serve_git!
|
data/lib/bananajour/version.rb
CHANGED
data/lib/bananajour.rb
CHANGED
@@ -6,11 +6,9 @@ require 'ostruct'
|
|
6
6
|
require 'socket'
|
7
7
|
require 'md5'
|
8
8
|
|
9
|
-
require '
|
10
|
-
|
11
|
-
|
12
|
-
Bananajour.require_gem 'dnssd'
|
13
|
-
Bananajour.require_gem 'fancypath'
|
9
|
+
require 'rainbow'
|
10
|
+
require 'dnssd'
|
11
|
+
require 'fancypath'
|
14
12
|
|
15
13
|
require 'bananajour/repository'
|
16
14
|
require 'bananajour/grit_extensions'
|
data/sinatra/app.rb
CHANGED
@@ -2,21 +2,16 @@ Thread.abort_on_exception = true
|
|
2
2
|
|
3
3
|
__DIR__ = File.dirname(__FILE__)
|
4
4
|
|
5
|
-
require "
|
5
|
+
require "bananajour"
|
6
6
|
|
7
|
-
Bananajour.gem 'sinatra'
|
8
7
|
require 'sinatra'
|
8
|
+
require 'haml'
|
9
|
+
require 'json'
|
9
10
|
|
10
|
-
Bananajour.require_gem 'haml'
|
11
|
-
Bananajour.require_gem 'json'
|
12
|
-
|
13
|
-
Bananajour.gem 'activesupport'
|
14
11
|
require 'active_support/core_ext/enumerable'
|
15
12
|
require 'active_support/core_ext/array'
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
set :server, 'thin' # Things go weird with anything else - let's lock it down to thin
|
14
|
+
set :server, 'thin'
|
20
15
|
set :haml, {:format => :html5, :attr_wrapper => '"'}
|
21
16
|
set :logging, false
|
22
17
|
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bananajour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 6
|
9
|
+
- 2
|
10
|
+
version: 2.6.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Tim Lucas
|
@@ -9,107 +15,161 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-08-06 00:00:00 +10:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
17
|
-
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
20
24
|
requirements:
|
21
25
|
- - "="
|
22
26
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
+
hash: 23
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
name: sinatra
|
34
|
+
requirement: *id001
|
35
|
+
prerelease: false
|
27
36
|
type: :runtime
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - "="
|
32
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 29
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 1
|
47
|
+
- 7
|
33
48
|
version: 1.1.7
|
34
|
-
|
35
|
-
|
36
|
-
|
49
|
+
name: json
|
50
|
+
requirement: *id002
|
51
|
+
prerelease: false
|
37
52
|
type: :runtime
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
40
56
|
requirements:
|
41
57
|
- - "="
|
42
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 17
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
- 5
|
63
|
+
- 13
|
43
64
|
version: 0.5.13
|
44
|
-
|
45
|
-
|
46
|
-
|
65
|
+
name: fancypath
|
66
|
+
requirement: *id003
|
67
|
+
prerelease: false
|
47
68
|
type: :runtime
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
50
72
|
requirements:
|
51
73
|
- - "="
|
52
74
|
- !ruby/object:Gem::Version
|
75
|
+
hash: 21
|
76
|
+
segments:
|
77
|
+
- 1
|
78
|
+
- 0
|
79
|
+
- 1
|
53
80
|
version: 1.0.1
|
54
|
-
|
55
|
-
|
56
|
-
|
81
|
+
name: rainbow
|
82
|
+
requirement: *id004
|
83
|
+
prerelease: false
|
57
84
|
type: :runtime
|
58
|
-
|
59
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
60
88
|
requirements:
|
61
89
|
- - "="
|
62
90
|
- !ruby/object:Gem::Version
|
91
|
+
hash: 17
|
92
|
+
segments:
|
93
|
+
- 1
|
94
|
+
- 1
|
95
|
+
- 1
|
63
96
|
version: 1.1.1
|
64
|
-
|
65
|
-
|
66
|
-
|
97
|
+
name: grit
|
98
|
+
requirement: *id005
|
99
|
+
prerelease: false
|
67
100
|
type: :runtime
|
68
|
-
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
70
104
|
requirements:
|
71
105
|
- - "="
|
72
106
|
- !ruby/object:Gem::Version
|
107
|
+
hash: 25
|
108
|
+
segments:
|
109
|
+
- 1
|
110
|
+
- 3
|
111
|
+
- 1
|
73
112
|
version: 1.3.1
|
74
|
-
|
75
|
-
|
76
|
-
|
113
|
+
name: dnssd
|
114
|
+
requirement: *id006
|
115
|
+
prerelease: false
|
77
116
|
type: :runtime
|
78
|
-
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
80
120
|
requirements:
|
81
121
|
- - "="
|
82
122
|
- !ruby/object:Gem::Version
|
123
|
+
hash: 29
|
124
|
+
segments:
|
125
|
+
- 2
|
126
|
+
- 0
|
127
|
+
- 9
|
83
128
|
version: 2.0.9
|
84
|
-
|
85
|
-
|
86
|
-
|
129
|
+
name: haml
|
130
|
+
requirement: *id007
|
131
|
+
prerelease: false
|
87
132
|
type: :runtime
|
88
|
-
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
90
136
|
requirements:
|
91
137
|
- - "="
|
92
138
|
- !ruby/object:Gem::Version
|
139
|
+
hash: 7
|
140
|
+
segments:
|
141
|
+
- 2
|
142
|
+
- 3
|
143
|
+
- 2
|
93
144
|
version: 2.3.2
|
94
|
-
|
95
|
-
|
96
|
-
|
145
|
+
name: activesupport
|
146
|
+
requirement: *id008
|
147
|
+
prerelease: false
|
97
148
|
type: :runtime
|
98
|
-
|
99
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
- !ruby/object:Gem::Dependency
|
150
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
100
152
|
requirements:
|
101
153
|
- - "="
|
102
154
|
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
155
|
+
hash: 17
|
156
|
+
segments:
|
157
|
+
- 1
|
158
|
+
- 2
|
159
|
+
- 7
|
160
|
+
version: 1.2.7
|
161
|
+
name: thin
|
162
|
+
requirement: *id009
|
163
|
+
prerelease: false
|
164
|
+
type: :runtime
|
105
165
|
description: Local git repository hosting with a sexy web interface and bonjour discovery. It's like your own little adhoc, network-aware github!
|
106
166
|
email: t.lucas@toolmantim.com
|
107
167
|
executables:
|
108
168
|
- bananajour
|
109
169
|
extensions: []
|
110
170
|
|
111
|
-
extra_rdoc_files:
|
112
|
-
|
171
|
+
extra_rdoc_files: []
|
172
|
+
|
113
173
|
files:
|
114
174
|
- Readme.md
|
115
175
|
- Rakefile
|
@@ -122,7 +182,6 @@ files:
|
|
122
182
|
- lib/bananajour/bonjour/repository_browser.rb
|
123
183
|
- lib/bananajour/bonjour.rb
|
124
184
|
- lib/bananajour/commands.rb
|
125
|
-
- lib/bananajour/gem_dependencies.rb
|
126
185
|
- lib/bananajour/grit_extensions.rb
|
127
186
|
- lib/bananajour/helpers.rb
|
128
187
|
- lib/bananajour/repository.rb
|
@@ -140,7 +199,7 @@ files:
|
|
140
199
|
- sinatra/views/home.haml
|
141
200
|
- sinatra/views/layout.haml
|
142
201
|
- sinatra/views/readme.haml
|
143
|
-
has_rdoc:
|
202
|
+
has_rdoc: true
|
144
203
|
homepage: http://github.com/toolmantim/bananajour
|
145
204
|
licenses: []
|
146
205
|
|
@@ -150,23 +209,29 @@ rdoc_options: []
|
|
150
209
|
require_paths:
|
151
210
|
- lib
|
152
211
|
required_ruby_version: !ruby/object:Gem::Requirement
|
212
|
+
none: false
|
153
213
|
requirements:
|
154
214
|
- - ">="
|
155
215
|
- !ruby/object:Gem::Version
|
216
|
+
hash: 3
|
217
|
+
segments:
|
218
|
+
- 0
|
156
219
|
version: "0"
|
157
|
-
version:
|
158
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
none: false
|
159
222
|
requirements:
|
160
223
|
- - ">="
|
161
224
|
- !ruby/object:Gem::Version
|
225
|
+
hash: 3
|
226
|
+
segments:
|
227
|
+
- 0
|
162
228
|
version: "0"
|
163
|
-
version:
|
164
229
|
requirements: []
|
165
230
|
|
166
231
|
rubyforge_project:
|
167
|
-
rubygems_version: 1.3.
|
232
|
+
rubygems_version: 1.3.7
|
168
233
|
signing_key:
|
169
234
|
specification_version: 3
|
170
|
-
summary: Local git repository hosting
|
235
|
+
summary: Local git repository hosting
|
171
236
|
test_files: []
|
172
237
|
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
module Bananajour
|
4
|
-
# DRYs version number dependencies and provides a simple way require them
|
5
|
-
module GemDependencies
|
6
|
-
DEPENDENCIES = [
|
7
|
-
%w( sinatra 0.9.4 ),
|
8
|
-
%w( json 1.1.7 ),
|
9
|
-
%w( fancypath 0.5.13 ),
|
10
|
-
%w( rainbow 1.0.1 ),
|
11
|
-
%w( grit 1.1.1 ),
|
12
|
-
%w( dnssd 1.3.1 ),
|
13
|
-
%w( haml 2.0.9 ),
|
14
|
-
%w( activesupport 2.3.2 ),
|
15
|
-
%w( thin 1.0.0 )
|
16
|
-
]
|
17
|
-
class Dependency < Struct.new(:name, :version)
|
18
|
-
def require_gem; gem name, version end
|
19
|
-
end
|
20
|
-
def self.all
|
21
|
-
DEPENDENCIES.map {|(name, version)| Dependency.new(name, version)}
|
22
|
-
end
|
23
|
-
def self.for_name(name)
|
24
|
-
all.find {|d| d.name == name }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.gem(name)
|
29
|
-
Bananajour::GemDependencies.for_name(name).require_gem
|
30
|
-
end
|
31
|
-
def self.require_gem(name, lib=nil)
|
32
|
-
self.gem(name)
|
33
|
-
Kernel.require(lib || name)
|
34
|
-
end
|
35
|
-
end
|