tecnh-gollum 1.0.2.auth → 1.0.2.auth2
Sign up to get free protection for your applications and to get access to all the features.
- data/gollum.gemspec +3 -3
- data/lib/gollum/frontend/authorization.rb +2 -2
- data/lib/gollum/frontend/config.ru +0 -1
- metadata +6 -4
data/gollum.gemspec
CHANGED
@@ -4,16 +4,16 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'tecnh-gollum'
|
7
|
-
s.version = '1.0.2.
|
7
|
+
s.version = '1.0.2.auth2'
|
8
8
|
s.date = '2010-08-30'
|
9
9
|
s.rubyforge_project = 'gollum'
|
10
10
|
|
11
11
|
s.summary = "A simple, Git-powered wiki."
|
12
12
|
s.description = "A simple, Git-powered wiki with a sweet API and local frontend."
|
13
13
|
|
14
|
-
s.authors = ["Tom Preston-Werner", "Rick Olson"]
|
14
|
+
s.authors = ["Tom Preston-Werner", "Rick Olson", "Jon Frisby", "Mat Ellis"]
|
15
15
|
s.email = 'tom@github.com'
|
16
|
-
s.homepage = 'http://github.com/
|
16
|
+
s.homepage = 'http://github.com/tecnh/gollum'
|
17
17
|
|
18
18
|
s.require_paths = %w[lib]
|
19
19
|
|
@@ -27,7 +27,7 @@ module Sinatra
|
|
27
27
|
request.env['REMOTE_USER'].delete if !request.env['REMOTE_USER'].nil?
|
28
28
|
|
29
29
|
# Assume this is a github repo, auth won't be enforced in app.rb if not github
|
30
|
-
repo = `cd #{
|
30
|
+
repo = `cd #{settings.gollum_path}; git config --get remote.origin.url`.strip.split(":")
|
31
31
|
return true if repo.empty? # Shouldn't have been called, just here to prevent 500s
|
32
32
|
repo_loc = repo.last.split("/")
|
33
33
|
uri = URI.parse("http://github.com/api/v2/json/repos/show/#{repo_loc[0]}/#{repo_loc[1].split(".").first}/collaborators")
|
@@ -64,7 +64,7 @@ module Sinatra
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def require_authorization
|
67
|
-
repo = `cd #{
|
67
|
+
repo = `cd #{settings.gollum_path}; git config --get remote.origin.url`.strip.split(":")
|
68
68
|
return if repo.nil? || repo[0] != "git@github.com"
|
69
69
|
return if authorized?
|
70
70
|
unauthorized! unless auth.provided?
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tecnh-gollum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 998386551
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 2
|
10
|
-
-
|
11
|
-
version: 1.0.2.
|
10
|
+
- auth2
|
11
|
+
version: 1.0.2.auth2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Tom Preston-Werner
|
15
15
|
- Rick Olson
|
16
|
+
- Jon Frisby
|
17
|
+
- Mat Ellis
|
16
18
|
autorequire:
|
17
19
|
bindir: bin
|
18
20
|
cert_chain: []
|
@@ -693,7 +695,7 @@ files:
|
|
693
695
|
- test/test_page.rb
|
694
696
|
- test/test_wiki.rb
|
695
697
|
has_rdoc: true
|
696
|
-
homepage: http://github.com/
|
698
|
+
homepage: http://github.com/tecnh/gollum
|
697
699
|
licenses: []
|
698
700
|
|
699
701
|
post_install_message:
|