dolt 0.27.0 → 0.28.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,3 +4,5 @@ rvm:
4
4
  - rbx-19mode
5
5
  - 1.8.7
6
6
  - ree
7
+ before_install:
8
+ - sudo apt-get install -y libicu-dev
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dolt (0.27.0)
4
+ dolt (0.28.0)
5
5
  json (~> 1.5)
6
- libdolt (~> 0.26)
6
+ libdolt (~> 0.27)
7
7
  sinatra (~> 1.0)
8
8
  thin (~> 1.4)
9
9
  tiltout (~> 1.4)
@@ -27,7 +27,7 @@ GEM
27
27
  github-markup (0.7.5)
28
28
  htmlentities (4.3.1)
29
29
  json (1.8.0)
30
- libdolt (0.26.0)
30
+ libdolt (0.27.0)
31
31
  htmlentities (~> 4.3)
32
32
  json (~> 1.7)
33
33
  makeup (~> 0.4)
@@ -0,0 +1,194 @@
1
+ # Dolt
2
+
3
+ <a href="http://travis-ci.org/cjohansen/dolt" class="travis">
4
+ <img src="https://secure.travis-ci.org/cjohansen/dolt.png">
5
+ </a>
6
+
7
+ Dolt is a stand-alone Git repository browser. It can be used to explore
8
+ repositories in your browser of choice, and features syntax highlighting with
9
+ [http://pygments.org/](Pygments) and various markdown formats (see below). In
10
+ addition to offering tree and blob browsing, Dolt also supports rendering the
11
+ commit log and blame.
12
+
13
+ ## Installation
14
+
15
+ To install `dolt` you need Ruby, [http://www.rubygems.org/](RubyGems) and
16
+ Python development files. The Python development files are required to support
17
+ Pygments syntax highlighting.
18
+
19
+ ### Systems using apt (Debian/Ubuntu, others)
20
+
21
+ ```sh
22
+ # 1) Install Ruby and RubyGems
23
+ sudo apt-get install -y ruby rubygems
24
+
25
+ # 2) Install Python development files and unicode tools
26
+ sudo apt-get install -y python-dev libicu-dev
27
+
28
+ # 3) Install dolt. This may or may not require the use of sudo, depending on
29
+ # how you installed Ruby.
30
+ gem install dolt
31
+ ```
32
+
33
+ ### Systems using yum (Fedora/CentOS/RedHat, others)
34
+
35
+ ```sh
36
+ # 1) Install Ruby and RubyGems
37
+ sudo yum install -y ruby rubygems
38
+
39
+ # 2) Install Python development files and unicode tools
40
+ sudo yum install -y python-devel libicu-devel
41
+
42
+ # 3) Install dolt. This may or may not require the use of sudo, depending on
43
+ # how you installed Ruby.
44
+ gem install dolt
45
+ ```
46
+
47
+ ## The `dolt` Command Line Interface
48
+
49
+ Dolt installs a binary, aptly named `dolt` on your system. This binary has only
50
+ one required argument, the directory to serve repositories from. To try it out,
51
+ simply enter a git repository from your terminal and enter
52
+
53
+ ```sh
54
+ dolt .
55
+ ```
56
+
57
+ This will start a dolt instance serving your current repository on
58
+ [http://localhost:3000/](port 3000).
59
+
60
+ Dolt will serve either a single repository, like above, or a directory of git
61
+ repositories. Let's say you have a directory `/home/dolt/repositories`
62
+ containing a collection of bare Git repositories you push your work to over SSH.
63
+ To serve all of these over the web, simply:
64
+
65
+ ```sh
66
+ cd /home/dolt/repositories
67
+ dolt .
68
+ ```
69
+
70
+ And you'll be presented with a list of the repositories you can browse.
71
+
72
+ The `dolt` binary supports a number of options, which can be listed using the
73
+ `--help` switch. The following options are currently supported:
74
+
75
+ * `--socket` lets you specify a UNIX socket to listen to instead of a port.
76
+ Enter the path to a socket.
77
+ * `--port` lets you specify a different port than 3000. Also supported through
78
+ the environment variable `PORT`.
79
+ * `--bind` lets you bind to a different IP address than `0.0.0.0`. Also
80
+ supported through the environment variable `IP`.
81
+ * `--tabwidth` lets you specify how many spaces to use when rendering a tab in a
82
+ source file
83
+ * `--pidfile` lets you specify the path to a pid file. Entering this option will
84
+ daemonize the dolt process.
85
+ * `--logfile` lets you specify the path to a log file when running daemonized.
86
+
87
+ Please note that some of the options allowed can also be specified using
88
+ environment variables. If no option is given to the CLI, the environment
89
+ variable will be used if available, otherwise a default will be used.
90
+
91
+ To stop a running Dolt server, you'll need to do a little manual work:
92
+
93
+ ```sh
94
+ kill `cat /path/to/dolt.pid`
95
+ ```
96
+
97
+ A future version of Dolt/Gitorious will support stopping a running dolt server.
98
+
99
+ ## Deploying under "a real" web server
100
+
101
+ To make your repositories publicly available you could specify `port` as 80.
102
+ However, to do this you need to be root on the machine, and it won't work if
103
+ you're already running a web server on your computer.
104
+
105
+ A more practical solution is to have dolt listening on a socket (or port for
106
+ that matter), daemonize it, and use your web server as a proxy in front of dolt.
107
+
108
+ A minimal nginx configuration which lets you do this could look like this
109
+ (replace `server_name` with the host name you'll be using):
110
+
111
+ ```conf
112
+ upstream dolt {
113
+ server unix://tmp/dolt.sock fail_timeout=30s;
114
+ }
115
+
116
+ server {
117
+ server_name git.zmalltalker.com;
118
+ location / {
119
+ proxy_pass http://dolt;
120
+ proxy_redirect off;
121
+ }
122
+ }
123
+ ```
124
+
125
+ On Debian/Ubuntu, add this to `/etc/nginx/sites-available/dolt`, symlink this to
126
+ `/etc/nginx/sites-enabled/dolt` and reload nginx:
127
+
128
+ ```sh
129
+ service nginx reload
130
+ ```
131
+
132
+ On CentOS, add the same contents to `/etc/nginx/conf.d/dolt.conf` and reload
133
+ nginx:
134
+
135
+ ```sh
136
+ service nginx reload
137
+ ```
138
+
139
+ ## Rendering markup
140
+
141
+ Dolt uses [https://github.com/github/markup](GitHub Markup) to render
142
+ different markup formats. In order to have Dolt render these, you need to
143
+ install some different Ruby gems. These gems are not required to install Dolt,
144
+ so you'll have to install the ones you need separately.
145
+
146
+ ### Markdown
147
+
148
+ To render files with suffixes `.markdown`, `.mdown` and `md`, install the
149
+ `redcarpet` gem.
150
+
151
+ ```sh
152
+ gem install redcarpet
153
+ ```
154
+
155
+ ### Org-mode
156
+
157
+ To render [http://org-mode.org/](org-mode) files with a `.org` suffix, you'll
158
+ need the `org-ruby` gem installed on your system.
159
+
160
+ ```sh
161
+ gem install org-ruby
162
+ ```
163
+
164
+ ### Textile
165
+
166
+ Rendering `.textile` files requires the `RedCloth` gem installed on your system.
167
+
168
+ ```sh
169
+ gem install RedCloth
170
+ ```
171
+
172
+ ### Other formats
173
+
174
+ To render other markup formats, have a look at the
175
+ [https://github.com/github/markup](GitHub Markup) page.
176
+
177
+ ## Why dolt?
178
+
179
+ Dolt is an extraction of the new code browser in
180
+ [https://gitorious.org/gitorious/mainline](Gitorious). Setting up a full-blown
181
+ Git repository hosting site just to make it possible to show your source code to
182
+ the world feels like way too much work with the current situation. You could use
183
+ `git instaweb`, but that's ridiculously ugly and only allows serving up a single
184
+ repository.
185
+
186
+ Dolt uses [http://libgit2.github.com](libgit2) for most git operations, and
187
+ should perform a lot better than implementations primarily using the git command
188
+ line tools to integrate with Git.
189
+
190
+ ## License
191
+
192
+ Dolt is free software licensed under the
193
+ [http://www.gnu.org/licenses/agpl-3.0.html](GNU Affero General Public License
194
+ (AGPL)). Dolt is developed as part of the Gitorious project.
@@ -11,7 +11,7 @@ end
11
11
 
12
12
  Gem::Specification.new do |s|
13
13
  s.name = "dolt"
14
- s.version = "0.27.0"
14
+ s.version = "0.28.0"
15
15
  s.authors = ["Christian Johansen"]
16
16
  s.email = ["christian@gitorious.org"]
17
17
  s.homepage = "http://gitorious.org/gitorious/dolt"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.rubyforge_project = "dolt"
22
22
 
23
- s.add_dependency "libdolt", "~>0.26"
23
+ s.add_dependency "libdolt", "~>0.27"
24
24
  s.add_dependency "thin", "~>1.4"
25
25
  s.add_dependency "sinatra", "~>1.0"
26
26
  s.add_dependency "tiltout", "~>1.4"
@@ -18,175 +18,36 @@
18
18
  require "json"
19
19
  require "time"
20
20
  require "cgi"
21
+ require "libdolt/controller_actions"
21
22
 
22
23
  module Dolt
23
24
  module Sinatra
24
25
  class Actions
25
26
  def initialize(app, lookup, renderer)
26
27
  @app = app
27
- @lookup = lookup
28
- @renderer = renderer
28
+ @dolt = Dolt::ControllerActions.new(app, lookup, renderer)
29
29
  end
30
30
 
31
- def redirect(url, status = 302)
32
- app.response.status = status
33
- app.response["Location"] = url
34
- app.body("")
31
+ def respond_to?(method)
32
+ dolt.respond_to?(method)
35
33
  end
36
34
 
37
- def render_error(error, repo, ref, data = {})
38
- $stderr.puts(error.message)
39
- $stderr.puts(error.backtrace)
40
-
41
- if error.class.to_s == "Rugged::ReferenceError" && ref == "HEAD"
42
- return app.body(renderer.render("empty", {
43
- :repository => repo,
44
- :ref => ref
45
- }.merge(data)))
46
- end
47
- template = error.class.to_s == "Rugged::IndexerError" ? :"404" : :"500"
48
- add_headers(app.response)
49
- app.body(renderer.render(template, {
50
- :error => error,
51
- :repository_slug => repo,
52
- :ref => ref
53
- }.merge(data)))
54
- rescue Exception => err
55
- err_backtrace = err.backtrace.map { |s| "<li>#{s}</li>" }
56
- error_backtrace = error.backtrace.map { |s| "<li>#{s}</li>" }
57
-
58
- app.body(<<-HTML)
59
- <h1>Fatal Dolt Error</h1>
60
- <p>
61
- Dolt encountered an exception, and additionally
62
- triggered another exception trying to render the error.
63
- </p>
64
- <p>Tried to render the #{template} template with the following data:</p>
65
- <dl>
66
- <dt>Repository</dt>
67
- <dd>#{repo}</dd>
68
- <dt>Ref</dt>
69
- <dd>#{ref}</dd>
70
- </dl>
71
- <h2>Error: #{err.class} #{err.message}</h2>
72
- <ul>#{err_backtrace.join()}</ul>
73
- <h2>Original error: #{error.class} #{error.message}</h2>
74
- <ul>#{error_backtrace.join()}</ul>
75
- HTML
76
- end
77
-
78
- def raw(repo, ref, path, custom_data = {})
79
- if oid = lookup_ref_oid(repo, ref)
80
- redirect(app.raw_url(repo, oid, path), 307) and return
81
- end
82
-
83
- blob(repo, ref, path, custom_data, {
84
- :template => :raw,
85
- :content_type => "text/plain",
86
- :template_options => { :layout => nil }
87
- })
88
- end
89
-
90
- def blob(repo, ref, path, custom_data = {}, options = { :template => :blob })
91
- if oid = lookup_ref_oid(repo, ref)
92
- redirect(app.blob_url(repo, oid, path), 307) and return
93
- end
94
-
95
- data = (custom_data || {}).merge(lookup.blob(repo, u(ref), path))
96
- blob = data[:blob]
97
- return redirect(app.tree_url(repo, ref, path)) if blob.class.to_s !~ /\bBlob/
98
- add_headers(app.response, options.merge(:ref => ref))
99
- tpl_options = options[:template_options] || {}
100
- app.body(renderer.render(options[:template], data, tpl_options))
101
- end
102
-
103
- def tree(repo, ref, path, custom_data = {})
104
- if oid = lookup_ref_oid(repo, ref)
105
- redirect(app.tree_url(repo, oid, path), 307) and return
106
- end
107
-
108
- data = (custom_data || {}).merge(lookup.tree(repo, u(ref), path))
109
- tree = data[:tree]
110
- return redirect(app.blob_url(repo, ref, path)) if tree.class.to_s !~ /\bTree/
111
- add_headers(app.response, :ref => ref)
112
- app.body(renderer.render(:tree, data))
113
- end
114
-
115
- def tree_entry(repo, ref, path, custom_data = {})
116
- if oid = lookup_ref_oid(repo, ref)
117
- redirect(app.tree_entry_url(repo, oid, path), 307) and return
35
+ def method_missing(method, *args, &block)
36
+ if dolt.respond_to?(method)
37
+ return respond(dolt.send(method, *args, &block))
118
38
  end
119
-
120
- data = (custom_data || {}).merge(lookup.tree_entry(repo, u(ref), path))
121
- add_headers(app.response, :ref => ref)
122
- app.body(renderer.render(data.key?(:tree) ? :tree : :blob, data))
123
- end
124
-
125
- def blame(repo, ref, path, custom_data = {})
126
- if oid = lookup_ref_oid(repo, ref)
127
- redirect(app.blame_url(repo, oid, path), 307) and return
128
- end
129
-
130
- data = (custom_data || {}).merge(lookup.blame(repo, u(ref), path))
131
- add_headers(app.response, :ref => ref)
132
- app.body(renderer.render(:blame, data))
133
- end
134
-
135
- def history(repo, ref, path, count, custom_data = {})
136
- if oid = lookup_ref_oid(repo, ref)
137
- redirect(app.history_url(repo, oid, path), 307) and return
138
- end
139
-
140
- data = (custom_data || {}).merge(lookup.history(repo, u(ref), path, count))
141
- add_headers(app.response, :ref => ref)
142
- app.body(renderer.render(:commits, data))
143
- end
144
-
145
- def refs(repo, custom_data = {})
146
- data = (custom_data || {}).merge(lookup.refs(repo))
147
- add_headers(app.response, :content_type => "application/json")
148
- app.body(renderer.render(:refs, data, :layout => nil))
149
- end
150
-
151
- def tree_history(repo, ref, path, count = 1, custom_data = {})
152
- if oid = lookup_ref_oid(repo, ref)
153
- redirect(app.tree_history_url(repo, oid, path), 307) and return
154
- end
155
-
156
- data = (custom_data || {}).merge(lookup.tree_history(repo, u(ref), path, count))
157
- add_headers(app.response, :content_type => "application/json", :ref => ref)
158
- app.body(renderer.render(:tree_history, data, :layout => nil))
159
- end
160
-
161
- def resolve_repository(repo)
162
- @cache ||= {}
163
- @cache[repo] ||= lookup.resolve_repository(repo)
164
- end
165
-
166
- def lookup_ref_oid(repo, ref)
167
- return if !app.respond_to?(:redirect_refs?) || !app.redirect_refs? || ref.length == 40
168
- lookup.rev_parse_oid(repo, ref)
39
+ super
169
40
  end
170
41
 
171
42
  private
172
- attr_reader :app, :lookup, :renderer
173
-
174
- def u(str)
175
- # Temporarily swap the + out with a magic byte, so
176
- # filenames/branches with +'s won't get unescaped to a space
177
- CGI.unescape(str.gsub("+", "\001")).gsub("\001", '+')
178
- end
179
-
180
- def add_headers(response, headers = {})
181
- default_ct = "text/html; charset=utf-8"
182
- app.response["Content-Type"] = headers[:content_type] || default_ct
183
- app.response["X-UA-Compatible"] = "IE=edge"
43
+ attr_reader :app, :dolt
184
44
 
185
- if headers[:ref] && headers[:ref].length == 40
186
- app.response["Cache-Control"] = "max-age=315360000, public"
187
- year = 60*60*24*365
188
- app.response["Expires"] = (Time.now + year).httpdate
45
+ def respond(response)
46
+ app.response.status = response[0]
47
+ response[1].keys.each do |header|
48
+ app.response[header] = response[1][header]
189
49
  end
50
+ app.body(response[2].join("\n"))
190
51
  end
191
52
  end
192
53
  end
@@ -20,17 +20,6 @@ require "dolt/sinatra/actions"
20
20
 
21
21
  describe Dolt::Sinatra::Actions do
22
22
  describe "#blob" do
23
- it "delegates to lookup" do
24
- lookup = Test::Lookup.new(Stub::Blob.new)
25
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new)
26
-
27
- dolt.blob("gitorious", "master", "app/models/repository.rb")
28
-
29
- assert_equal "gitorious", lookup.repo
30
- assert_equal "master", lookup.ref
31
- assert_equal "app/models/repository.rb", lookup.path
32
- end
33
-
34
23
  it "renders the blob template as html" do
35
24
  app = Test::App.new
36
25
  dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
@@ -40,72 +29,9 @@ describe Dolt::Sinatra::Actions do
40
29
  assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
41
30
  assert_equal "blob:Blob", app.body
42
31
  end
43
-
44
- it "renders the blob template with custom data" do
45
- renderer = Test::Renderer.new("Blob")
46
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Blob.new), renderer)
47
-
48
- dolt.blob("gitorious", "master", "app/models/repository.rb", { :who => 42 })
49
-
50
- assert_equal 42, renderer.data[:who]
51
- end
52
-
53
- it "redirects tree views to tree action" do
54
- app = Test::App.new
55
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
56
-
57
- dolt.blob("gitorious", "master", "app/models")
58
-
59
- assert_equal 302, app.response.status
60
- assert_equal "/gitorious/tree/master:app/models", app.response["Location"]
61
- assert_equal "", app.body
62
- end
63
-
64
- it "unescapes ref" do
65
- lookup = Test::Lookup.new(Stub::Blob.new)
66
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Blob"))
67
-
68
- dolt.blob("gitorious", "issue-%23221", "app/my documents")
69
-
70
- assert_equal "issue-#221", lookup.ref
71
- end
72
-
73
- it "does not redirect ref to oid by default" do
74
- app = Test::App.new
75
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
76
-
77
- dolt.blob("gitorious", "master", "lib/gitorious.rb")
78
-
79
- location = app.response["Location"]
80
- refute_equal 302, app.response.status
81
- refute_equal 307, app.response.status
82
- end
83
-
84
- it "redirects ref to oid if configured so" do
85
- app = Test::RedirectingApp.new
86
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
87
-
88
- dolt.blob("gitorious", "master", "lib/gitorious.rb")
89
-
90
- location = app.response["Location"]
91
- assert_equal 307, app.response.status
92
- assert_equal "/gitorious/blob/#{'a' * 40}:lib/gitorious.rb", location
93
- assert_equal "", app.body
94
- end
95
32
  end
96
33
 
97
34
  describe "#tree" do
98
- it "delegates to actions" do
99
- lookup = Test::Lookup.new(Stub::Tree.new)
100
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new)
101
-
102
- dolt.tree("gitorious", "master", "app/models")
103
-
104
- assert_equal "gitorious", lookup.repo
105
- assert_equal "master", lookup.ref
106
- assert_equal "app/models", lookup.path
107
- end
108
-
109
35
  it "renders the tree template as html" do
110
36
  app = Test::App.new
111
37
  dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
@@ -115,74 +41,6 @@ describe Dolt::Sinatra::Actions do
115
41
  assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
116
42
  assert_equal "tree:Tree", app.body
117
43
  end
118
-
119
- it "renders template with custom data" do
120
- renderer = Test::Renderer.new("Tree")
121
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Tree.new), renderer)
122
-
123
- dolt.tree("gitorious", "master", "app/models", { :who => 42 })
124
-
125
- assert_equal 42, renderer.data[:who]
126
- end
127
-
128
- it "redirects blob views to blob action" do
129
- app = Test::App.new
130
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Tree"))
131
-
132
- dolt.tree("gitorious", "master", "app/models/repository.rb")
133
-
134
- location = app.response["Location"]
135
- assert_equal 302, app.response.status
136
- assert_equal "/gitorious/blob/master:app/models/repository.rb", location
137
- assert_equal "", app.body
138
- end
139
-
140
- it "sets X-UA-Compatible header" do
141
- app = Test::App.new
142
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
143
-
144
- dolt.tree("gitorious", "master", "app/models")
145
-
146
- assert_equal "IE=edge", app.response["X-UA-Compatible"]
147
- end
148
-
149
- it "does not set cache-control header for head ref" do
150
- app = Test::App.new
151
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
152
-
153
- dolt.tree("gitorious", "master", "app/models")
154
-
155
- assert !app.response.key?("Cache-Control")
156
- end
157
-
158
- it "sets cache headers for full oid ref" do
159
- app = Test::App.new
160
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
161
-
162
- dolt.tree("gitorious", "a" * 40, "app/models")
163
-
164
- assert_equal "max-age=315360000, public", app.response["Cache-Control"]
165
- refute_nil app.response["Expires"]
166
- end
167
-
168
- it "unescapes ref" do
169
- lookup = Test::Lookup.new(Stub::Tree.new)
170
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Tree"))
171
-
172
- dolt.tree("gitorious", "issue-%23221", "app")
173
-
174
- assert_equal "issue-#221", lookup.ref
175
- end
176
-
177
- it "redirects ref to oid if configured so" do
178
- app = Test::RedirectingApp.new
179
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
180
-
181
- dolt.tree("gitorious", "master", "lib")
182
-
183
- assert_equal 307, app.response.status
184
- assert_equal "/gitorious/tree/#{'a' * 40}:lib", app.response["Location"]
185
- end
186
44
  end
187
45
 
188
46
  describe "#tree_entry" do
@@ -195,58 +53,9 @@ describe Dolt::Sinatra::Actions do
195
53
  assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
196
54
  assert_equal "tree:Tree", app.body
197
55
  end
198
-
199
- it "renders template with custom data" do
200
- renderer = Test::Renderer.new("Tree")
201
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Tree.new), renderer)
202
-
203
- dolt.tree_entry("gitorious", "master", "app/models", { :who => 42 })
204
-
205
- assert_equal 42, renderer.data[:who]
206
- end
207
-
208
- it "renders trees with the tree template as html" do
209
- app = Test::App.new
210
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
211
-
212
- dolt.tree_entry("gitorious", "master", "app/models")
213
-
214
- assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
215
- assert_equal "blob:Blob", app.body
216
- end
217
-
218
- it "unescapes ref" do
219
- lookup = Test::Lookup.new(Stub::Tree.new)
220
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Tree"))
221
-
222
- dolt.tree_entry("gitorious", "issue-%23221", "app")
223
-
224
- assert_equal "issue-#221", lookup.ref
225
- end
226
-
227
- it "redirects ref to oid if configured so" do
228
- app = Test::RedirectingApp.new
229
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
230
-
231
- dolt.tree_entry("gitorious", "master", "lib")
232
-
233
- assert_equal 307, app.response.status
234
- assert_equal "/gitorious/source/#{'a' * 40}:lib", app.response["Location"]
235
- end
236
56
  end
237
57
 
238
58
  describe "#raw" do
239
- it "delegates to lookup" do
240
- lookup = Test::Lookup.new(Stub::Blob.new)
241
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new)
242
-
243
- dolt.raw("gitorious", "master", "app/models/repository.rb")
244
-
245
- assert_equal "gitorious", lookup.repo
246
- assert_equal "master", lookup.ref
247
- assert_equal "app/models/repository.rb", lookup.path
248
- end
249
-
250
59
  it "renders the raw template as text" do
251
60
  app = Test::App.new
252
61
  dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Text"))
@@ -256,60 +65,9 @@ describe Dolt::Sinatra::Actions do
256
65
  assert_equal "text/plain", app.response["Content-Type"]
257
66
  assert_equal "raw:Text", app.body
258
67
  end
259
-
260
- it "renders template with custom data" do
261
- renderer = Test::Renderer.new("Text")
262
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Blob.new), renderer)
263
-
264
- dolt.raw("gitorious", "master", "app/models/repository.rb", { :who => 42 })
265
-
266
- assert_equal 42, renderer.data[:who]
267
- end
268
-
269
- it "redirects tree views to tree action" do
270
- app = Test::App.new
271
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
272
-
273
- dolt.raw("gitorious", "master", "app/models")
274
-
275
- location = app.response["Location"]
276
- assert_equal 302, app.response.status
277
- assert_equal "/gitorious/tree/master:app/models", location
278
- assert_equal "", app.body
279
- end
280
-
281
- it "unescapes ref" do
282
- lookup = Test::Lookup.new(Stub::Blob.new)
283
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Blob"))
284
-
285
- dolt.raw("gitorious", "issue-%23221", "app/models/repository.rb")
286
-
287
- assert_equal "issue-#221", lookup.ref
288
- end
289
-
290
- it "redirects ref to oid if configured so" do
291
- app = Test::RedirectingApp.new
292
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
293
-
294
- dolt.raw("gitorious", "master", "lib/gitorious.rb")
295
-
296
- assert_equal 307, app.response.status
297
- assert_equal "/gitorious/raw/#{'a' * 40}:lib/gitorious.rb", app.response["Location"]
298
- end
299
68
  end
300
69
 
301
70
  describe "#blame" do
302
- it "delegates to lookup" do
303
- lookup = Test::Lookup.new(Stub::Blob.new)
304
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new)
305
-
306
- dolt.blame("gitorious", "master", "app/models/repository.rb")
307
-
308
- assert_equal "gitorious", lookup.repo
309
- assert_equal "master", lookup.ref
310
- assert_equal "app/models/repository.rb", lookup.path
311
- end
312
-
313
71
  it "renders the blame template as html" do
314
72
  app = Test::App.new
315
73
  dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Text"))
@@ -319,47 +77,9 @@ describe Dolt::Sinatra::Actions do
319
77
  assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
320
78
  assert_equal "blame:Text", app.body
321
79
  end
322
-
323
- it "renders template with custom data" do
324
- renderer = Test::Renderer.new("Text")
325
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Blob.new), renderer)
326
-
327
- dolt.blame("gitorious", "master", "app/models/repository.rb", { :who => 42 })
328
-
329
- assert_equal 42, renderer.data[:who]
330
- end
331
-
332
- it "unescapes ref" do
333
- lookup = Test::Lookup.new(Stub::Blob.new)
334
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Blob"))
335
-
336
- dolt.blame("gitorious", "issue-%23221", "app/models/repository.rb")
337
-
338
- assert_equal "issue-#221", lookup.ref
339
- end
340
-
341
- it "redirects ref to oid if configured so" do
342
- app = Test::RedirectingApp.new
343
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
344
-
345
- dolt.blame("gitorious", "master", "lib/gitorious.rb")
346
-
347
- assert_equal 307, app.response.status
348
- assert_equal "/gitorious/blame/#{'a' * 40}:lib/gitorious.rb", app.response["Location"]
349
- end
350
80
  end
351
81
 
352
82
  describe "#history" do
353
- it "delegates to lookup" do
354
- lookup = Test::Lookup.new(Stub::Blob.new)
355
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new)
356
- dolt.history("gitorious", "master", "app/models/repository.rb", 10)
357
-
358
- assert_equal "gitorious", lookup.repo
359
- assert_equal "master", lookup.ref
360
- assert_equal "app/models/repository.rb", lookup.path
361
- end
362
-
363
83
  it "renders the commits template as html" do
364
84
  app = Test::App.new
365
85
  dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Text"))
@@ -369,34 +89,6 @@ describe Dolt::Sinatra::Actions do
369
89
  assert_equal "text/html; charset=utf-8", app.response["Content-Type"]
370
90
  assert_equal "commits:Text", app.body
371
91
  end
372
-
373
- it "renders template with custom data" do
374
- renderer = Test::Renderer.new("Text")
375
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Blob.new), renderer)
376
-
377
- dolt.history("gitorious", "master", "app/models/repository.rb", 10, { :who => 42 })
378
-
379
- assert_equal 42, renderer.data[:who]
380
- end
381
-
382
- it "unescapes ref" do
383
- lookup = Test::Lookup.new(Stub::Blob.new)
384
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Blob"))
385
-
386
- dolt.history("gitorious", "issue-%23221", "lib/gitorious.rb", 10)
387
-
388
- assert_equal "issue-#221", lookup.ref
389
- end
390
-
391
- it "redirects ref to oid if configured so" do
392
- app = Test::RedirectingApp.new
393
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Blob.new), Test::Renderer.new("Blob"))
394
-
395
- dolt.history("gitorious", "master", "lib/gitorious.rb", 10)
396
-
397
- assert_equal 307, app.response.status
398
- assert_equal "/gitorious/history/#{'a' * 40}:lib/gitorious.rb", app.response["Location"]
399
- end
400
92
  end
401
93
 
402
94
  describe "#refs" do
@@ -409,15 +101,6 @@ describe Dolt::Sinatra::Actions do
409
101
  assert_equal "application/json", app.response["Content-Type"]
410
102
  assert_equal "refs:JSON", app.body
411
103
  end
412
-
413
- it "renders template with custom data" do
414
- renderer = Test::Renderer.new("Text")
415
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Blob.new), renderer)
416
-
417
- dolt.refs("gitorious", { :who => 42 })
418
-
419
- assert_equal 42, renderer.data[:who]
420
- end
421
104
  end
422
105
 
423
106
  describe "#tree_history" do
@@ -430,33 +113,5 @@ describe Dolt::Sinatra::Actions do
430
113
  assert_equal "application/json", app.response["Content-Type"]
431
114
  assert_equal "tree_history:JSON", app.body
432
115
  end
433
-
434
- it "renders template with custom data" do
435
- renderer = Test::Renderer.new("Text")
436
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, Test::Lookup.new(Stub::Tree.new), renderer)
437
-
438
- dolt.tree_history("gitorious", "master", "app/models", 1, { :who => 42 })
439
-
440
- assert_equal 42, renderer.data[:who]
441
- end
442
-
443
- it "unescapes ref" do
444
- lookup = Test::Lookup.new(Stub::Tree.new)
445
- dolt = Dolt::Sinatra::Actions.new(Test::App.new, lookup, Test::Renderer.new("Tree"))
446
-
447
- dolt.tree_history("gitorious", "issue-%23221", "app/models")
448
-
449
- assert_equal "issue-#221", lookup.ref
450
- end
451
-
452
- it "redirects ref to oid if configured so" do
453
- app = Test::RedirectingApp.new
454
- dolt = Dolt::Sinatra::Actions.new(app, Test::Lookup.new(Stub::Tree.new), Test::Renderer.new("Tree"))
455
-
456
- dolt.tree_history("gitorious", "master", "lib", 10)
457
-
458
- assert_equal 307, app.response.status
459
- assert_equal "/gitorious/tree_history/#{'a' * 40}:lib", app.response["Location"]
460
- end
461
116
  end
462
117
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Christian Johansen
@@ -13,20 +14,23 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: libdolt
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
19
- version: '0.26'
21
+ version: '0.27'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
26
- version: '0.26'
29
+ version: '0.27'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: thin
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: sinatra
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: tiltout
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: json
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: trollop
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: minitest
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: rake
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rack-test
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ~>
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ~>
137
156
  - !ruby/object:Gem::Version
@@ -150,7 +169,7 @@ files:
150
169
  - ./Gemfile
151
170
  - ./Gemfile.lock
152
171
  - ./Rakefile
153
- - ./Readme.org
172
+ - ./Readme.md
154
173
  - ./bin/dolt
155
174
  - ./dolt.gemspec
156
175
  - ./lib/dolt/sinatra/actions.rb
@@ -234,25 +253,27 @@ files:
234
253
  - bin/dolt
235
254
  homepage: http://gitorious.org/gitorious/dolt
236
255
  licenses: []
237
- metadata: {}
238
256
  post_install_message:
239
257
  rdoc_options: []
240
258
  require_paths:
241
259
  - lib
242
260
  required_ruby_version: !ruby/object:Gem::Requirement
261
+ none: false
243
262
  requirements:
244
- - - '>='
263
+ - - ! '>='
245
264
  - !ruby/object:Gem::Version
246
265
  version: '0'
247
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
+ none: false
248
268
  requirements:
249
- - - '>='
269
+ - - ! '>='
250
270
  - !ruby/object:Gem::Version
251
271
  version: '0'
252
272
  requirements: []
253
273
  rubyforge_project: dolt
254
- rubygems_version: 2.0.3
274
+ rubygems_version: 1.8.25
255
275
  signing_key:
256
- specification_version: 4
276
+ specification_version: 3
257
277
  summary: Dolt serves git trees and syntax highlighted blobs
258
278
  test_files: []
279
+ has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 1414f588cba634d0a92547366a8e87ca66583cc3
4
- data.tar.gz: 84a32ef1845e4d7795c5f706fef6deb5f6606d65
5
- SHA512:
6
- metadata.gz: a929c197c1ec49786da76fd7854e1c752cb39b6e192835f5ab9edd9a7c786879d8fb3d0e947df2a46feae49aa6674cfb50fe5f38c5013615c23a7090e42020b8
7
- data.tar.gz: c8312562974affc44b68a8f1495611b93847b9b7707ded37049695d2229be4ebe363ff785d8c5fdf91a04719527c24ee1c648f89e146911fca1dbfec7474bb6d
data/Readme.org DELETED
@@ -1,166 +0,0 @@
1
- * Dolt
2
- Dolt is a stand-alone Git repository browser. It can be used to
3
- explore repositories in your browser of choice, and features syntax
4
- highlighting with [[http://pygments.org/][Pygments]] and various markdown formats (see
5
- below). In addition to offering tree and blob browsing, Dolt also
6
- supports rendering the commit log and blame.
7
-
8
- ** Installation
9
- To install =dolt= you need Ruby, [[http://www.rubygems.org/][RubyGems]] Python development files. The
10
- Python development files are required to support Pygments syntax
11
- highlighting. Once that's installed, simply enter:
12
-
13
- #+BEGIN_SRC shell-script
14
- gem install dolt
15
- #+END_SRC
16
-
17
- and you'll be ready to serve your repositories on the web.
18
-
19
- ** The =dolt= Command Line Interface
20
- Dolt installs a binary, aptly named =dolt= on your system. This
21
- binary has only one required argument, the directory to serve
22
- repositories from. To try it out, simply enter a git repository
23
- from your terminal and enter
24
-
25
- #+BEGIN_SRC shell-script
26
- dolt .
27
- #+END_SRC
28
-
29
- This will start a dolt instance serving your current repository on
30
- port [[http://localhost:3000/][3000]].
31
-
32
- Dolt will serve either a single repository, like above, or a
33
- directory of git repositories. Let's say you have a directory
34
- =/home/dolt/repositories= containing a collection of bare Git
35
- repositories you push your work to over SSH. To serve all of these
36
- over the web, simply:
37
-
38
- #+BEGIN_SRC shell-script
39
- cd /home/dolt/repositories
40
- dolt .
41
- #+END_SRC
42
-
43
- And you'll be presented with a list of the repositories you can
44
- browse.
45
-
46
- The =dolt= binary supports a number of options, which can be
47
- listed using the =--help= switch. The following options are
48
- currently supported:
49
-
50
- - =--socket= lets you specify a UNIX socket to listen to instead
51
- of a port. Enter the path to a socket.
52
- - =--port= lets you specify a different port than 3000. Also
53
- supported through the environment variable =PORT=.
54
- - =--bind= lets you bind to a different IP address than
55
- =0.0.0.0=. Also supported through the environment variable =IP=.
56
- - =--tabwidth= lets you specify how many spaces to use when
57
- rendering a tab in a source file
58
- - =--pidfile= lets you specify the path to a pid file. Entering
59
- this option will daemonize the dolt process.
60
- - =--logfile= lets you specify the path to a log file when running daemonized.
61
-
62
- Please note that some of the options allowed can also be specified
63
- using environment variables. If no option is given to the CLI, the
64
- environment variable will be used if available, otherwise a
65
- default will be used.
66
-
67
- To stop a running Dolt server, you'll need to do a little manual
68
- work:
69
-
70
- #+BEGIN_SRC shell-script
71
- kill `cat /path/to/dolt.pid`
72
- #+END_SRC
73
-
74
- A future version of Gitorious will support stopping a running dolt server.
75
-
76
- ** Deploying under "a real" web server
77
- To make your repositories publicly available you could specify
78
- =port= as 80. However, to do this you need to be root on the
79
- machine, and it won't work if you're already running a web server
80
- on your computer.
81
-
82
- A more practical solution is to have dolt listening on a socket
83
- (or port for that matter), daemonize it, and use your web server
84
- as a proxy in front of dolt.
85
-
86
- A minimal nginx configuration which lets you do this could look
87
- like this (replace =server_name= with the host name you'll be using):
88
-
89
- #+BEGIN_SRC conf
90
- upstream dolt {
91
- server unix://tmp/dolt.sock fail_timeout=30s;
92
- }
93
- server {
94
- server_name git.zmalltalker.com;
95
- location / {
96
- proxy_pass http://dolt;
97
- proxy_redirect off;
98
- }
99
- }
100
- #+END_SRC
101
-
102
- On Debian/Ubuntu, add this to =/etc/nginx/sites-available/dolt=,
103
- symlink this to =/etc/nginx/sites-enabled/dolt= and reload nginx:
104
-
105
- #+BEGIN_SRC shell-script
106
- service nginx reload
107
- #+END_SRC
108
-
109
- On CentOS, add the same contents to =/etc/nginx/conf.d/dolt.conf=
110
- and reload nginx:
111
-
112
- #+BEGIN_SRC shell-script
113
- service nginx reload
114
- #+END_SRC
115
-
116
-
117
- ** Rendering markup
118
- Dolt uses [[https://github.com/github/markup][GitHub Markup]] to render different markup formats. In
119
- order to have Dolt render these, you need to install some
120
- different Ruby gems. These gems are not required to install Dolt,
121
- so you'll have to install the ones you need separately.
122
-
123
- ** Markdown
124
- To render files with suffixes =.markdown=, =.mdown= and =md=,
125
- install the =redcarpet= gem.
126
-
127
- #+BEGIN_SRC shell-script
128
- gem install redcarpet
129
- #+END_SRC
130
-
131
- ** Org-mode
132
- To render [[http://org-mode.org/][org-mode]] files (like this one) with a =.org= suffix,
133
- you'll need the =org-ruby= gem installed on your system.
134
-
135
- #+BEGIN_SRC shell-script
136
- gem install org-ruby
137
- #+END_SRC
138
-
139
- ** Textile
140
- Rendering =.textile= files requires the =RedCloth= gem installed
141
- on your system.
142
-
143
- #+BEGIN_SRC shell-script
144
- gem install RedCloth
145
- #+END_SRC
146
-
147
- ** Other formats
148
- To render other markup formats, have a look at the [[https://github.com/github/markup][GitHub Markup]]
149
- page.
150
-
151
- ** Why dolt?
152
- Dolt is an extraction of the new code browser in
153
- [[https://gitorious.org/gitorious/mainline][Gitorious]]. Setting up a full-blown Git repository hosting site
154
- just to make it possible to show your source code to the world
155
- feels like way too much work with the current situation. You could
156
- use =git instaweb=, but that's ridiculously ugly and only allows
157
- serving up a single repository.
158
-
159
- Dolt uses [[http://libgit2.github.com][libgit2]] for all git operations, and should perform a lot
160
- better than implementations using the git command line tools to
161
- integrate with Git.
162
-
163
- ** License
164
- Dolt is free software licensed under the [[http://www.gnu.org/licenses/agpl-3.0.html][GNU Affero General Public
165
- License (AGPL)]]. Dolt is developed as part of the Gitorious
166
- project.