ghoul 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ghoul/app.rb +4 -4
- data/lib/ghoul/lib/helpers.rb +1 -1
- data/lib/ghoul/public/css/coderay.css +42 -46
- data/lib/version.rb +1 -1
- data/spec/ghoul_helpers_spec.rb +1 -1
- metadata +17 -18
- data/sample +0 -0
data/lib/ghoul/app.rb
CHANGED
@@ -8,7 +8,7 @@ module Ghoul
|
|
8
8
|
set :public_folder, File.join(File.dirname(__FILE__), 'public')
|
9
9
|
set :views, File.join(File.dirname(__FILE__), 'views')
|
10
10
|
|
11
|
-
|
11
|
+
disable :logging, :dump_errors, :raise_errors, :show_exceptions
|
12
12
|
|
13
13
|
before '/*' do
|
14
14
|
if !repos_path_exists? && params[:splat][0] != "css/app.css"
|
@@ -65,7 +65,7 @@ module Ghoul
|
|
65
65
|
@offset = @page*10-10
|
66
66
|
@repository = params[:repository]
|
67
67
|
@commits = repository(@repository).commits('master', 10, @offset)
|
68
|
-
@max_commits = repository(@repository).commits('master',
|
68
|
+
@max_commits = repository(@repository).commits('master', 200, @offset).count
|
69
69
|
@commit = commit_from_repository @repository, "trunk"
|
70
70
|
@newest_commit = commit_from_repository(@repository, "trunk")
|
71
71
|
@hide_breadcrumbs = true
|
@@ -102,7 +102,7 @@ module Ghoul
|
|
102
102
|
else
|
103
103
|
@blob = resource
|
104
104
|
language = CodeRay::FileType[@blob.name]
|
105
|
-
@syntaxer = CodeRay.scan(@blob.data, language).div(:line_numbers => :table)
|
105
|
+
@syntaxer = CodeRay.scan(@blob.data, language).div(:line_numbers => :table, :css => :class)
|
106
106
|
erb :blob
|
107
107
|
end
|
108
108
|
end
|
@@ -112,7 +112,7 @@ module Ghoul
|
|
112
112
|
end
|
113
113
|
|
114
114
|
error do
|
115
|
-
|
115
|
+
erb :'error'
|
116
116
|
end
|
117
117
|
|
118
118
|
error NoCommits do
|
data/lib/ghoul/lib/helpers.rb
CHANGED
@@ -20,7 +20,7 @@ module Ghoul
|
|
20
20
|
path = []
|
21
21
|
crumbs.each do |crumb|
|
22
22
|
path << crumb
|
23
|
-
html << "#{link_to( crumb, tree_for_commit_path(repository, commit,
|
23
|
+
html << "#{link_to( crumb, tree_for_commit_path(repository, commit, path.join('/'), nil ) )}"
|
24
24
|
end
|
25
25
|
return html.join("/")
|
26
26
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.CodeRay {
|
2
|
-
background-color:
|
2
|
+
background-color: #141414;
|
3
3
|
border: 1px solid silver;
|
4
|
-
color:
|
4
|
+
color: #ccc;
|
5
5
|
}
|
6
6
|
.CodeRay pre {
|
7
7
|
margin: 0px;
|
@@ -36,87 +36,83 @@ table.CodeRay td { padding: 2px 4px; vertical-align: top; }
|
|
36
36
|
.CodeRay .debug { color: white !important; background: blue !important; }
|
37
37
|
|
38
38
|
.CodeRay .annotation { color:#007 }
|
39
|
-
.CodeRay .attribute-name { color:#
|
39
|
+
.CodeRay .attribute-name { color:#9b703f }
|
40
40
|
.CodeRay .attribute-value { color:#700 }
|
41
41
|
.CodeRay .binary { color:#509 }
|
42
42
|
.CodeRay .char .content { color:#D20 }
|
43
43
|
.CodeRay .char .delimiter { color:#710 }
|
44
44
|
.CodeRay .char { color:#D20 }
|
45
|
-
.CodeRay .class { color:#
|
46
|
-
.CodeRay .class-variable { color:#
|
47
|
-
.CodeRay .color { color:#
|
48
|
-
.CodeRay .comment { color:#
|
45
|
+
.CodeRay .class { color:#9b703f }
|
46
|
+
.CodeRay .class-variable { color:#9b703f }
|
47
|
+
.CodeRay .color { color:#cf6a4c }
|
48
|
+
.CodeRay .comment { color:#5f5a60; font-style:italic; }
|
49
49
|
.CodeRay .comment .char { color:#444 }
|
50
50
|
.CodeRay .comment .delimiter { color:#444 }
|
51
51
|
.CodeRay .complex { color:#A08 }
|
52
|
-
.CodeRay .constant { color:#
|
52
|
+
.CodeRay .constant { color:#cf6a4c; }
|
53
53
|
.CodeRay .decorator { color:#B0B }
|
54
54
|
.CodeRay .definition { color:#099; font-weight:bold }
|
55
|
-
.CodeRay .delimiter {
|
55
|
+
.CodeRay .delimiter { }
|
56
56
|
.CodeRay .directive { color:#088; font-weight:bold }
|
57
57
|
.CodeRay .doc { color:#970 }
|
58
58
|
.CodeRay .doc-string { color:#D42; font-weight:bold }
|
59
|
-
.CodeRay .doctype { color:#
|
59
|
+
.CodeRay .doctype { color:#9b703f }
|
60
60
|
.CodeRay .entity { color:#800; font-weight:bold }
|
61
|
-
.CodeRay .error {
|
61
|
+
.CodeRay .error { }
|
62
62
|
.CodeRay .escape { color:#666 }
|
63
|
-
.CodeRay .exception { color:#
|
64
|
-
.CodeRay .float { color:#
|
65
|
-
.CodeRay .function { color:#
|
63
|
+
.CodeRay .exception { color:#cf6a4c; font-weight:bold }
|
64
|
+
.CodeRay .float { color:#cf6a4c }
|
65
|
+
.CodeRay .function { color:#9b703f }
|
66
66
|
.CodeRay .global-variable { color:#d70 }
|
67
67
|
.CodeRay .hex { color:#02b }
|
68
68
|
.CodeRay .imaginary { color:#f00 }
|
69
|
-
.CodeRay .include { color:#B44; font-
|
69
|
+
.CodeRay .include { color:#B44; font-style:italic; }
|
70
70
|
.CodeRay .inline { background-color: hsla(0,0%,0%,0.07); color: black }
|
71
|
-
.CodeRay .inline-delimiter { font-
|
72
|
-
.CodeRay .instance-variable { color:#
|
73
|
-
.CodeRay .integer { color:#
|
74
|
-
.CodeRay .key .char { color
|
75
|
-
.CodeRay .key .delimiter { color: #
|
76
|
-
.CodeRay .key { color: #
|
77
|
-
.CodeRay .keyword { color:#
|
71
|
+
.CodeRay .inline-delimiter { font-style:italic; color: #666666 }
|
72
|
+
.CodeRay .instance-variable { color:#7587A6 }
|
73
|
+
.CodeRay .integer { color:#cf6a4c }
|
74
|
+
.CodeRay .key .char { color:#f9ee98 }
|
75
|
+
.CodeRay .key .delimiter { color: #f9ee98 }
|
76
|
+
.CodeRay .key { color: #f9ee98 }
|
77
|
+
.CodeRay .keyword { color:#cea869; }
|
78
78
|
.CodeRay .label { color:#970; font-weight:bold }
|
79
79
|
.CodeRay .local-variable { color:#963 }
|
80
80
|
.CodeRay .namespace { color:#707; font-weight:bold }
|
81
81
|
.CodeRay .octal { color:#40E }
|
82
82
|
.CodeRay .operator { }
|
83
|
-
.CodeRay .predefined { color:#
|
84
|
-
.CodeRay .predefined-constant { color:#
|
83
|
+
.CodeRay .predefined { color:#7587a6; }
|
84
|
+
.CodeRay .predefined-constant { color:#7587a6 }
|
85
85
|
.CodeRay .predefined-type { color:#0a5; font-weight:bold }
|
86
86
|
.CodeRay .preprocessor { color:#579 }
|
87
|
-
.CodeRay .pseudo-class { color:#
|
88
|
-
.CodeRay .regexp
|
89
|
-
.CodeRay .regexp .
|
90
|
-
.CodeRay .regexp .modifier { color:#C2C }
|
91
|
-
.CodeRay .regexp { background-color:hsla(300,100%,50%,0.06); }
|
87
|
+
.CodeRay .pseudo-class { color:#9b703f; font-style:italic; }
|
88
|
+
.CodeRay .regexp { color:#cea869 }
|
89
|
+
.CodeRay .regexp .char { color:#cea869 }
|
92
90
|
.CodeRay .reserved { color:#080; font-weight:bold }
|
93
|
-
.CodeRay .shell
|
94
|
-
.CodeRay .
|
95
|
-
.CodeRay .
|
96
|
-
.CodeRay .string .
|
97
|
-
.CodeRay .string .
|
98
|
-
.CodeRay .string
|
99
|
-
.CodeRay .string .modifier { color: #E40 }
|
100
|
-
.CodeRay .string { background-color:hsla(0,100%,50%,0.05); }
|
91
|
+
.CodeRay .shell { color:#8F9D6A }
|
92
|
+
.CodeRay .string .char { color: #8f9d6a }
|
93
|
+
.CodeRay .string .content { color: #8f9d6a }
|
94
|
+
.CodeRay .string .delimiter { color: #8f9d6a }
|
95
|
+
.CodeRay .string .modifier { color: #8f9d6a }
|
96
|
+
.CodeRay .string { }
|
101
97
|
.CodeRay .symbol .content { color:#A60 }
|
102
98
|
.CodeRay .symbol .delimiter { color:#630 }
|
103
99
|
.CodeRay .symbol { color:#A60 }
|
104
|
-
.CodeRay .tag { color:#
|
105
|
-
.CodeRay .type { color:#
|
106
|
-
.CodeRay .value { color: #
|
107
|
-
.CodeRay .variable { color:#
|
100
|
+
.CodeRay .tag { color:#9b703f; }
|
101
|
+
.CodeRay .type { color:#9B703F }
|
102
|
+
.CodeRay .value { color: #cf6a4c; }
|
103
|
+
.CodeRay .variable { color:#7587a6 }
|
108
104
|
|
109
105
|
.CodeRay .insert { background: hsla(120,100%,50%,0.12) }
|
110
106
|
.CodeRay .delete { background: hsla(0,100%,50%,0.12) }
|
111
|
-
.CodeRay .change { color: #bbf; background: #
|
112
|
-
.CodeRay .head { color: #f8f; background: #
|
107
|
+
.CodeRay .change { color: #bbf; background: #555; }
|
108
|
+
.CodeRay .head { color: #f8f; background: #333 }
|
113
109
|
.CodeRay .head .filename { color: white; }
|
114
110
|
|
115
111
|
.CodeRay .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; }
|
116
|
-
.CodeRay .insert .eyecatcher { background-color:
|
112
|
+
.CodeRay .insert .eyecatcher { background-color: #253b22; border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
|
117
113
|
|
118
|
-
.CodeRay .insert .insert { color: #
|
119
|
-
.CodeRay .delete .delete { color: #
|
114
|
+
.CodeRay .insert .insert { color: #999; background:transparent; font-weight:bold }
|
115
|
+
.CodeRay .delete .delete { color: #999; background:transparent; font-weight:bold }
|
120
116
|
.CodeRay .change .change { color: #88f }
|
121
117
|
.CodeRay .head .head { color: #f4f }
|
122
118
|
|
data/lib/version.rb
CHANGED
data/spec/ghoul_helpers_spec.rb
CHANGED
@@ -36,7 +36,7 @@ describe Ghoul::Helpers do
|
|
36
36
|
|
37
37
|
describe "breadcrumbs from splat" do
|
38
38
|
it "should return the correct breadcrumbs" do
|
39
|
-
breadcrumbs_from_splat("repository_name", "commitxyz", "george/drummond").should == "<a href=\"/repository/repository_name/commitxyz/tree/george
|
39
|
+
breadcrumbs_from_splat("repository_name", "commitxyz", "george/drummond").should == "<a href=\"/repository/repository_name/commitxyz/tree/george/\">george</a>/<a href=\"/repository/repository_name/commitxyz/tree/george/drummond/\">drummond</a>"
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghoul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-29 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement: &
|
16
|
+
requirement: &70121004006740 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70121004006740
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sinatra
|
27
|
-
requirement: &
|
27
|
+
requirement: &70121004006200 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - =
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.3.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70121004006200
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sass
|
38
|
-
requirement: &
|
38
|
+
requirement: &70121004005680 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70121004005680
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: grit
|
49
|
-
requirement: &
|
49
|
+
requirement: &70121004004880 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70121004004880
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: georgedrummond_sinatra_helpers
|
60
|
-
requirement: &
|
60
|
+
requirement: &70121004004080 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70121004004080
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ghoul_grack
|
71
|
-
requirement: &
|
71
|
+
requirement: &70121004003180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - =
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.0.1
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70121004003180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: coderay
|
82
|
-
requirement: &
|
82
|
+
requirement: &70121004002660 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70121004002660
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: redcarpet
|
93
|
-
requirement: &
|
93
|
+
requirement: &70121004002040 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70121004002040
|
102
102
|
description: Ghoul is a simple yet good looking interface for your git repositories
|
103
103
|
written in sinatra. It is currently only for demonstration purposes and use on your
|
104
104
|
secure local machine as it does not enforce any authentication as of yet.
|
@@ -154,7 +154,6 @@ files:
|
|
154
154
|
- lib/ghoul/views/tree.erb
|
155
155
|
- lib/server.rb
|
156
156
|
- lib/version.rb
|
157
|
-
- sample
|
158
157
|
- spec/ghoul_helpers_spec.rb
|
159
158
|
- spec/spec_helper.rb
|
160
159
|
- spec/url_helper_spec.rb
|
data/sample
DELETED
File without changes
|