ginatra 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitattributes +2 -0
  2. data/.gitignore +13 -0
  3. data/.gitmodules +3 -0
  4. data/README.md +127 -0
  5. data/Rakefile +85 -0
  6. data/TODO.md +10 -0
  7. data/VERSION +1 -0
  8. data/bin/ginatra +60 -0
  9. data/bin/ginatra-daemon +81 -0
  10. data/bin/ginatra-directory +60 -0
  11. data/bin/ginatra-server +28 -0
  12. data/config.ru +7 -0
  13. data/features/pages.feature +33 -0
  14. data/features/step_definitions/page_steps.rb +36 -0
  15. data/features/support/env.rb +12 -0
  16. data/ginatra.gemspec +107 -0
  17. data/lib/ginatra/config.rb +55 -0
  18. data/lib/ginatra/helpers.rb +112 -0
  19. data/lib/ginatra/repo.rb +50 -0
  20. data/lib/ginatra/repo_list.rb +53 -0
  21. data/lib/ginatra.rb +185 -0
  22. data/lib/sinatra/partials.rb +17 -0
  23. data/public/favicon.ico +0 -0
  24. data/public/img/add.png +0 -0
  25. data/public/img/diff.png +0 -0
  26. data/public/img/doc.png +0 -0
  27. data/public/img/rm.png +0 -0
  28. data/public/img/tree.png +0 -0
  29. data/public/src/blank.gif +0 -0
  30. data/public/src/colour.css +85 -0
  31. data/public/src/commit.css +211 -0
  32. data/public/src/default.css +115 -0
  33. data/public/src/ginatra.js +9 -0
  34. data/public/src/highlight.pack.js +1 -0
  35. data/public/src/iepngfix.htc +103 -0
  36. data/public/src/index.css +92 -0
  37. data/public/src/jquery-1.3.2.min.js +19 -0
  38. data/public/src/lists.css +25 -0
  39. data/public/src/reset.css +49 -0
  40. data/public/src/table.css +33 -0
  41. data/public/src/type.css +30 -0
  42. data/rackup.ru +7 -0
  43. data/repos/README.md +8 -0
  44. data/spec/repo_list_spec.rb +22 -0
  45. data/spec/repo_spec.rb +58 -0
  46. data/spec/spec_helper.rb +30 -0
  47. data/views/_actor_box.erb +13 -0
  48. data/views/_commit_info_box.erb +27 -0
  49. data/views/_header.erb +6 -0
  50. data/views/_tree_part.erb +11 -0
  51. data/views/atom.builder +32 -0
  52. data/views/blob.erb +9 -0
  53. data/views/commit.erb +20 -0
  54. data/views/index.erb +12 -0
  55. data/views/layout.erb +35 -0
  56. data/views/log.erb +64 -0
  57. data/views/tree.erb +24 -0
  58. metadata +146 -0
data/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ *.doc diff=doc
2
+ *.png diff=exif
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ repos/*/
2
+ public/*.esproj
3
+ tmp/*
4
+ .DS_Store
5
+ *.log
6
+ webrat*
7
+ spec/*.html
8
+ public/*/
9
+ public/*.html
10
+ _site/
11
+ _layouts/
12
+ **/*.swp
13
+ *.swp
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "vendor/vegas"]
2
+ path = vendor/vegas
3
+ url = git://github.com/quirkey/vegas.git
data/README.md ADDED
@@ -0,0 +1,127 @@
1
+ Ginatra
2
+ =======
3
+
4
+ This project is to make a clone of gitweb in Ruby and Sinatra. It serves git
5
+ repositories out of a set of specified directories using an array of glob-based
6
+ paths. I have plans to make it function just as gitweb does, including leeching
7
+ config files and suchlike.
8
+
9
+ Updating to Multiple directory repositories:
10
+ ============================================
11
+
12
+ - Remove any bare cloned repositories from `./repos/`
13
+ - Execute the following: `rake setup:repo` which creates a non-bare test repo in
14
+ `./repos/`
15
+
16
+ Simple eh?
17
+
18
+ Installation
19
+ ------------
20
+
21
+ You should be using Git 1.6.3 or later just to be sure that it all works:
22
+
23
+ $ git --version
24
+ git version 1.6.3
25
+
26
+ You'll need a few gems just to serve git repositories, for page caching, syntax highlighting & a sinatra daemon runner:
27
+
28
+ $ (sudo) gem install grit kematzy-sinatra-cache coderay vegas
29
+
30
+ To run the test suite, you also need:
31
+
32
+ $ (sudo) gem install rspec webrat rack-test cucumber
33
+
34
+ To do both these steps more quickly, run the following rake tasks:
35
+
36
+ $ rake setup:gems
37
+ $ rake setup:test
38
+
39
+ Then clone this repository:
40
+
41
+ $ git clone git://github.com/lenary/ginatra.git
42
+
43
+ You'll also need to (`--bare`) clone `atmos/hancock-client` into the repos
44
+ directory and call it test: (don't ask, it was just a repo i chose at random)
45
+
46
+ $ cd repos && git clone --bare git://github.com/atmos/hancock-client.git test.git
47
+
48
+ This can be done much quicker by doing the following rake task
49
+
50
+ $ rake setup:repo
51
+
52
+ Usage
53
+ -----
54
+
55
+ If you're just using it in development, use the following to run Ginatra:
56
+
57
+ $ ruby ginatra.rb
58
+
59
+ Ginatra also runs on thin. **BEWARE:** There are issues running Ginatra on
60
+ Passenger. We discourage Ginatra's use on Passenger until we can make it stable.
61
+
62
+ I have made a rake task so that you can easily add repositories to Ginatra. Use
63
+ the following to add repositories to Ginatra, without fear of getting it wrong:
64
+
65
+ $ rake add repo='git://github.com/lenary/ginatra.git'
66
+ $ rake add repo='git://github.com/mojombo/grit.git' name='fun'
67
+
68
+ Authors & Thanks
69
+ ----------------
70
+
71
+ **Authors:**
72
+
73
+ - Samuel Elliott (lenary)
74
+ - Ryan Bigg (radar)
75
+
76
+ **Thanks**
77
+
78
+ - tekkub - For help with Grit
79
+ - schacon - For help with Grit
80
+ - cirwin - For moral support and design help
81
+ - irc://irc.freenode.net/git - for any other problems I had
82
+ - Picol Project (http://picol.org) - for the icons
83
+ - sr - For help with a large sinatra error
84
+ - raggi - For a refactor and several feature suggestions
85
+
86
+ Screenshots
87
+ -----------
88
+
89
+ **Index**
90
+
91
+ ![Ginatra Index](http://lenary-uploads.appspot.com/img/i?id=ag5sZW5hcnktdXBsb2Fkc3IMCxIFSW1hZ2UYox8M&w=500&h=500 "Ginatra Index")
92
+
93
+ **Log**
94
+
95
+ ![Ginatra Log](http://lenary-uploads.appspot.com/img/i?id=ag5sZW5hcnktdXBsb2Fkc3IMCxIFSW1hZ2UYvRcM&w=500&h=500 "Ginatra Log")
96
+
97
+ **Commit**
98
+
99
+ ![Ginatra Commit](http://lenary-uploads.appspot.com/img/i?id=ag5sZW5hcnktdXBsb2Fkc3IMCxIFSW1hZ2UYvBcM&w=500&h=500 "Ginatra Commit")
100
+
101
+ **Tree**
102
+
103
+ ![Ginatra Tree](http://lenary-uploads.appspot.com/img/i?id=ag5sZW5hcnktdXBsb2Fkc3IMCxIFSW1hZ2UYpB8M&w=500&h=500 "Ginatra Tree")
104
+
105
+ Licence
106
+ -------
107
+
108
+ The MIT License
109
+
110
+ Copyright (c) 2009 Samuel Elliott
111
+
112
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
113
+ this software and associated documentation files (the "Software"), to deal in
114
+ the Software without restriction, including without limitation the rights to
115
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
116
+ the Software, and to permit persons to whom the Software is furnished to do so,
117
+ subject to the following conditions:
118
+
119
+ The above copyright notice and this permission notice shall be included in all
120
+ copies or substantial portions of the Software.
121
+
122
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
123
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
124
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
125
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
126
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
127
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,85 @@
1
+ require 'rubygems'
2
+ require 'cucumber/rake/task'
3
+ require 'spec/rake/spectask'
4
+
5
+ current_path = File.expand_path(File.dirname(__FILE__))
6
+ require "#{current_path}/lib/ginatra"
7
+
8
+ task :default => ['rake:spec', 'rake:features']
9
+
10
+ desc "Runs the Cucumber Feature Suite"
11
+ Cucumber::Rake::Task.new(:features) do |t|
12
+ t.cucumber_opts = "--format pretty"
13
+ end
14
+
15
+ namespace :features do
16
+
17
+ desc "Runs the `@current` feature(s) or scenario(s)"
18
+ Cucumber::Rake::Task.new(:current) do |c|
19
+ c.cucumber_opts = "--format pretty -t current"
20
+ end
21
+
22
+ end
23
+
24
+ desc "Runs the RSpec Test Suite"
25
+ Spec::Rake::SpecTask.new(:spec) do |r|
26
+ r.spec_files = FileList['spec/*_spec.rb']
27
+ r.spec_opts = ['--color']
28
+ end
29
+
30
+ namespace :spec do
31
+
32
+ desc "RSpec Test Suite with pretty output"
33
+ Spec::Rake::SpecTask.new(:long) do |r|
34
+ r.spec_files = FileList['spec/*_spec.rb']
35
+ r.spec_opts = ['--color', '--format specdoc']
36
+ end
37
+
38
+ desc "RSpec Test Suite with html output"
39
+ Spec::Rake::SpecTask.new(:html) do |r|
40
+ r.spec_files = FileList['spec/*_spec.rb']
41
+ r.spec_opts = ['--color', '--format html:spec/html_spec.html']
42
+ end
43
+
44
+ end
45
+
46
+ namespace :setup do
47
+
48
+ desc "Clones the Test Repository"
49
+ task :repo do |t|
50
+ FileUtils.cd(File.join(current_path, "repos")) do
51
+ puts `git clone git://github.com/atmos/hancock-client.git test`
52
+ end
53
+ end
54
+
55
+ desc "Installs the Required Gems"
56
+ task :gems do |t|
57
+ gems = %w(grit kematzy-sinatra-cache vegas)
58
+ puts %x(gem install #{gems.join(" ")})
59
+ end
60
+
61
+ desc "Installs the Test Gems"
62
+ task :test do |t|
63
+ gems = %w(rspec webrat rack-test cucumber)
64
+ puts %x(gem install #{gems.join(" ")})
65
+ end
66
+
67
+ end
68
+
69
+ begin
70
+ require 'jeweler'
71
+ Jeweler::Tasks.new do |gemspec|
72
+ gemspec.name = "ginatra"
73
+ gemspec.summary = "A Gitweb Clone in Sinatra and Grit"
74
+ gemspec.description = "Host your own git repository browser through the power of Sinatra and Grit"
75
+ gemspec.email = "sam@lenary.co.uk"
76
+ gemspec.homepage = "http://lenary.github.com/ginatra"
77
+ gemspec.authors = ["Sam Elliott", "Ryan Bigg"]
78
+ gemspec.add_dependency('sinatra', '>=0.9.4')
79
+ gemspec.add_dependency('grit', '>=1.1.1')
80
+ gemspec.add_dependency('coderay', '>=0.8.0')
81
+ end
82
+ rescue LoadError
83
+ puts "Jeweler not available. Install it with: sudo gem install jeweler"
84
+ end
85
+
data/TODO.md ADDED
@@ -0,0 +1,10 @@
1
+ TODO
2
+ ====
3
+
4
+ Suggestions
5
+ -----------
6
+
7
+ - Multiple directory or glob-based repo paths [raggi]
8
+ - Rake tasks for demo [raggi]
9
+ - Rake tasks for adding repos [lenary]
10
+ - A New Name [qrush]
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.0.1
data/bin/ginatra ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ current_path = File.expand_path(File.dirname(__FILE__))
4
+
5
+ require "#{current_path}/../lib/ginatra"
6
+
7
+ module Ginatra::Executable
8
+ HELP = <<HELP
9
+ Usage: ginatra [ version | server <options> <command> |
10
+ daemon <command> | directory <command> <args> ]
11
+
12
+ Ginatra Commands:
13
+ version - Pretty Self explanatory. Print version number and exit
14
+
15
+ Ginatra Server Commands:
16
+ start - Start the Ginatra HTTP Server.
17
+ stop - Stop the Ginatra Server.
18
+ status - How's your Ginatra Server holding up?
19
+
20
+ Ginatra Daemon Commands:
21
+ start - Starts the Git Daemon servimg Ginatra's Repositories
22
+ stop - Stops the Git Daemon
23
+ restart - Restarts the Git Daemon
24
+ status - Is the Git Daemon on or off?
25
+
26
+
27
+ Ginatra Directory Commands:
28
+ add - Adds the <globs> to the array of dirs that Ginatra
29
+ looks in for repositories.
30
+ remove - Removes the <globs> from the aforementioned array.
31
+ list - Lists the globs Ginatra looks in for repositories
32
+
33
+ HELP
34
+
35
+ @current_path = File.expand_path(File.dirname(__FILE__))
36
+
37
+ def self.daemon(*args)
38
+ system("#{@current_path}/ginatra-daemon #{args.join(" ")}")
39
+ end
40
+
41
+ def self.directory(*args)
42
+ system("#{@current_path}/ginatra-directory #{args.join(" ")}")
43
+ end
44
+
45
+ def self.server(*args)
46
+ system("#{@current_path}/ginatra-server #{args.join(" ")}")
47
+ end
48
+
49
+ def self.version(*args)
50
+ puts Ginatra::VERSION
51
+ end
52
+ end
53
+
54
+ command, *args = ARGV[0], ARGV[1..-1]
55
+ if command !~ /^(version|daemon|directory|server)$/
56
+ puts Ginatra::Executable::HELP
57
+ exit
58
+ end
59
+ Ginatra::Executable.send(command, *args)
60
+
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ current_path = File.expand_path(File.dirname(__FILE__))
4
+
5
+ require "#{current_path}/../lib/ginatra"
6
+ require "logger"
7
+
8
+ def logger
9
+ return @logger if @logger
10
+ @logger = Logger.new(STDOUT)
11
+ @logger.level = Logger::INFO
12
+ @logger.formatter = Proc.new {|s, t, n, msg| "[#{t}] #{msg}\n"}
13
+ @logger
14
+ end
15
+
16
+ module Ginatra::Daemon
17
+
18
+ SYMLINK_DIR = File.expand_path('~/.ginatra/symlinks')
19
+ PID_FILE = File.expand_path('~/.ginatra/daemon.pid')
20
+ HELP = <<HELP
21
+ Usage: ginatra-daemon [ start | stop | restart | status ]
22
+
23
+ Commands:
24
+ start - Starts the Git Daemon servimg Ginatra's Repositories
25
+ stop - Stops the Git Daemon
26
+ restart - Restarts the Git Daemon
27
+ status - Is the Git Daemon on or off?
28
+
29
+ HELP
30
+
31
+ def self.start
32
+ # Create Symlinks
33
+ FileUtils.mkdir_p(SYMLINK_DIR)
34
+ logger.info "Creating Symlinks"
35
+ dirs = Ginatra::Config.git_dirs.map{|path| Dir.glob(path)}.flatten
36
+ FileUtils.ln_sf(dirs, SYMLINK_DIR)
37
+ # Start Process
38
+ if File.exists?(PID_FILE)
39
+ logger.warn "Ginatra Daemon running at pid:#{File.new(PID_FILE).read}"
40
+ else
41
+ logger.info "Starting ginatra-daemon"
42
+ Kernel.fork do
43
+ system "git daemon --reuseaddr --base-path=#{SYMLINK_DIR} --pid-file=#{PID_FILE} #{SYMLINK_DIR}/*"
44
+ end
45
+ end
46
+ end
47
+
48
+ def self.stop
49
+ # Stop Process
50
+ pid = File.new(PID_FILE).read.to_i
51
+ logger.warn "Sending INT to #{pid}"
52
+ FileUtils.rm(PID_FILE)
53
+ Process.kill(:INT, pid)
54
+ # Remove Symlinks
55
+ links = Dir.glob("#{SYMLINK_DIR}/*")
56
+ logger.warn "Removing Symlinks"
57
+ FileUtils.rm(links)
58
+ end
59
+
60
+ def self.restart
61
+ self.stop
62
+ self.start
63
+ end
64
+
65
+ def self.status
66
+ if File.exists?(PID_FILE)
67
+ logger.info "Ginatra Daemon running at pid:#{File.new(PID_FILE).read}"
68
+ else
69
+ logger.info "Ginatra Daemon not running"
70
+ end
71
+ end
72
+
73
+ end
74
+
75
+ command = ARGV[0]
76
+ if command !~ /^(stop|status|start|restart)$/
77
+ puts Ginatra::Daemon::HELP
78
+ exit
79
+ end
80
+ Ginatra::Daemon.send(command)
81
+
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ current_path = File.expand_path(File.dirname(__FILE__))
4
+
5
+ require "#{current_path}/../lib/ginatra"
6
+ require "logger"
7
+
8
+ def logger
9
+ return @logger if @logger
10
+ @logger = Logger.new(STDOUT)
11
+ @logger.level = Logger::INFO
12
+ @logger.formatter = Proc.new {|s, t, n, msg| "[#{t}] #{msg}\n"}
13
+ @logger
14
+ end
15
+
16
+ module Ginatra::Directory
17
+
18
+ HELP = <<HELP
19
+ Usage: ginatra-directory [ list | add <globs> | remove <globs> ]
20
+
21
+ Commands:
22
+ add - Adds the <globs> to the array of dirs that Ginatra
23
+ looks in for repositories.
24
+ remove - Removes the <globs> from the aforementioned array.
25
+ list - Lists the globs Ginatra looks in for repositories
26
+
27
+ HELP
28
+
29
+ def self.add(globs)
30
+ Ginatra::Config.load!
31
+ Ginatra::Config[:git_dirs] << globs
32
+ Ginatra::Config[:git_dirs].flatten
33
+ logger.info "Added #{globs.join(" ")} to your config"
34
+ Ginatra::Config.dump!
35
+ end
36
+
37
+ def self.remove(globs)
38
+ Ginatra::Config.load!
39
+ globs.each do |glob|
40
+ Ginatra::Config[:git_dirs].delete(glob)
41
+ end
42
+ logger.info "Removed #{globs.join(" ")} from your config"
43
+ Ginatra::Config.dump!
44
+ end
45
+
46
+ def self.list(*args)
47
+ Ginatra::Config.load!
48
+ puts "Directories Ginatra will look for repos in:"
49
+ puts Ginatra::Config[:git_dirs].map{|r| " - #{r}"}.join("\n")
50
+ puts ""
51
+ end
52
+ end
53
+
54
+ command, *args = ARGV[0], ARGV[1..-1]
55
+ if command !~ /^(add|remove|list)$/
56
+ puts Ginatra::Directory::HELP
57
+ exit
58
+ end
59
+ Ginatra::Directory.send(command, *args)
60
+
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ current_path = File.expand_path(File.dirname(__FILE__))
4
+
5
+ require "#{current_path}/../lib/ginatra"
6
+ require "#{current_path}/../vendor/vegas/lib/vegas"
7
+ Vegas::Runner.new(Ginatra::App, 'ginatra-server', :port => Ginatra::Config.port) do |runner, opts, app|
8
+
9
+ opts.banner = "Usage: ginatra-server [[options] start | stop | status]"
10
+
11
+ opts.separator " start - Start the Ginatra HTTP Server"
12
+ opts.separator " stop - Stop the Ginatra Server"
13
+ opts.separator " status - How's your Ginatra Server holding up?"
14
+
15
+ if ARGV[-1] == "start"
16
+ elsif ARGV[-1] == "stop"
17
+ runner.kill!
18
+ exit
19
+ elsif ARGV[-1] == "status"
20
+ runner.status
21
+ exit!
22
+ elsif ARGV.length == 0 || ARGV[-1] !~ /^(start|stop|status)$/
23
+ runner.options[:start] = false
24
+ at_exit { puts opts }
25
+ end
26
+
27
+ end
28
+
data/config.ru ADDED
@@ -0,0 +1,7 @@
1
+ current_path = File.expand_path(File.dirname(__FILE__))
2
+
3
+ require "#{current_path}/lib/ginatra"
4
+
5
+ map '/' do
6
+ run Ginatra::App
7
+ end
@@ -0,0 +1,33 @@
1
+ Feature: Page
2
+ In order to use multiple repositories
3
+ As a browser
4
+ I want to see the home page
5
+
6
+ Scenario:
7
+ When I open '/'
8
+ Then I should see "Ginatra"
9
+ And I should see "View My Git Repositories"
10
+ And I should see "test"
11
+ And I should see "description file for this repository and set the description for it."
12
+ Scenario:
13
+ When I open '/test'
14
+ Then I should see "Ginatra"
15
+ And I should see "test"
16
+ And I should see "description file for this repository and set the description for it."
17
+ And I should see "Commits"
18
+ And I should see "(author)"
19
+ Scenario:
20
+ When I open '/test/commit/eefb4c3'
21
+ Then I should see "Ginatra"
22
+ And I should see "test"
23
+ And I should see "description file for this repository and set the description for it."
24
+ And I should see "Commit: eefb4c3"
25
+ And I should see "doh, thanks lenary for reminding me of the files i'd forgotten"
26
+ Scenario:
27
+ When I open '/test/tree/24f701fd'
28
+ Then I should see "Ginatra"
29
+ And I should see "test"
30
+ And I should see "description file for this repository and set the description for it."
31
+ And I should see "Tree: 24f701fd"
32
+ And I should see "README.md"
33
+ And I should see ".gitignore"
@@ -0,0 +1,36 @@
1
+ Given /^I am on '([^\']*)'$/ do |path|
2
+ get path
3
+ end
4
+
5
+ When /^I open '([^\']*)'$/ do |path|
6
+ get path
7
+ end
8
+
9
+ When /^I press "([^\"]*)"$/ do |button|
10
+ click_button(button)
11
+ end
12
+
13
+ When /^I follow "([^\"]*)"$/ do |link|
14
+ click_link(link)
15
+ end
16
+
17
+ When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
18
+ fill_in(field, :with => value)
19
+ end
20
+
21
+ Then /^I should see "([^\"]*)"$/ do |text|
22
+ last_response.should contain(text)
23
+ end
24
+
25
+ Then /^I should not see "([^\"]*)"$/ do |text|
26
+ last_response.should_not contain(text)
27
+ end
28
+
29
+ Then /^I should be on (.+)$/ do |page_name|
30
+ URI.parse(current_url).path.should == path_to(page_name)
31
+ end
32
+
33
+ Then /^Save and View$/ do
34
+ save_and_open_page
35
+ end
36
+
@@ -0,0 +1,12 @@
1
+ current_path = File.expand_path(File.dirname(__FILE__))
2
+ require "#{current_path}/../../spec/spec_helper"
3
+
4
+ World do
5
+ def app
6
+ Ginatra::App
7
+ end
8
+ include Rack::Test::Methods
9
+ include Webrat::Methods
10
+ include Webrat::Matchers
11
+ end
12
+
data/ginatra.gemspec ADDED
@@ -0,0 +1,107 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{ginatra}
8
+ s.version = "2.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Sam Elliott", "Ryan Bigg"]
12
+ s.date = %q{2009-08-25}
13
+ s.description = %q{Host your own git repository browser through the power of Sinatra and Grit}
14
+ s.email = %q{sam@lenary.co.uk}
15
+ s.executables = ["ginatra", "ginatra-daemon", "ginatra-directory", "ginatra-server"]
16
+ s.extra_rdoc_files = [
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".gitattributes",
21
+ ".gitignore",
22
+ ".gitmodules",
23
+ "README.md",
24
+ "Rakefile",
25
+ "TODO.md",
26
+ "VERSION",
27
+ "bin/ginatra",
28
+ "bin/ginatra-daemon",
29
+ "bin/ginatra-directory",
30
+ "bin/ginatra-server",
31
+ "config.ru",
32
+ "features/pages.feature",
33
+ "features/step_definitions/page_steps.rb",
34
+ "features/support/env.rb",
35
+ "ginatra.gemspec",
36
+ "lib/ginatra.rb",
37
+ "lib/ginatra/config.rb",
38
+ "lib/ginatra/helpers.rb",
39
+ "lib/ginatra/repo.rb",
40
+ "lib/ginatra/repo_list.rb",
41
+ "lib/sinatra/partials.rb",
42
+ "public/favicon.ico",
43
+ "public/img/add.png",
44
+ "public/img/diff.png",
45
+ "public/img/doc.png",
46
+ "public/img/rm.png",
47
+ "public/img/tree.png",
48
+ "public/src/blank.gif",
49
+ "public/src/colour.css",
50
+ "public/src/commit.css",
51
+ "public/src/default.css",
52
+ "public/src/ginatra.js",
53
+ "public/src/highlight.pack.js",
54
+ "public/src/iepngfix.htc",
55
+ "public/src/index.css",
56
+ "public/src/jquery-1.3.2.min.js",
57
+ "public/src/lists.css",
58
+ "public/src/reset.css",
59
+ "public/src/table.css",
60
+ "public/src/type.css",
61
+ "rackup.ru",
62
+ "repos/README.md",
63
+ "spec/repo_list_spec.rb",
64
+ "spec/repo_spec.rb",
65
+ "spec/spec_helper.rb",
66
+ "views/_actor_box.erb",
67
+ "views/_commit_info_box.erb",
68
+ "views/_header.erb",
69
+ "views/_tree_part.erb",
70
+ "views/atom.builder",
71
+ "views/blob.erb",
72
+ "views/commit.erb",
73
+ "views/index.erb",
74
+ "views/layout.erb",
75
+ "views/log.erb",
76
+ "views/tree.erb"
77
+ ]
78
+ s.homepage = %q{http://lenary.github.com/ginatra}
79
+ s.rdoc_options = ["--charset=UTF-8"]
80
+ s.require_paths = ["lib"]
81
+ s.rubygems_version = %q{1.3.4}
82
+ s.summary = %q{A Gitweb Clone in Sinatra and Grit}
83
+ s.test_files = [
84
+ "spec/repo_list_spec.rb",
85
+ "spec/repo_spec.rb",
86
+ "spec/spec_helper.rb"
87
+ ]
88
+
89
+ if s.respond_to? :specification_version then
90
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
91
+ s.specification_version = 3
92
+
93
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
94
+ s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
95
+ s.add_runtime_dependency(%q<grit>, [">= 1.1.1"])
96
+ s.add_runtime_dependency(%q<coderay>, [">= 0.8.0"])
97
+ else
98
+ s.add_dependency(%q<sinatra>, [">= 0.9.4"])
99
+ s.add_dependency(%q<grit>, [">= 1.1.1"])
100
+ s.add_dependency(%q<coderay>, [">= 0.8.0"])
101
+ end
102
+ else
103
+ s.add_dependency(%q<sinatra>, [">= 0.9.4"])
104
+ s.add_dependency(%q<grit>, [">= 1.1.1"])
105
+ s.add_dependency(%q<coderay>, [">= 0.8.0"])
106
+ end
107
+ end