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 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
- #disable :logging, :dump_errors, :raise_errors, :show_exceptions
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', false, 0).count
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
- #erb :'error'
115
+ erb :'error'
116
116
  end
117
117
 
118
118
  error NoCommits do
@@ -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, splat, path.join('/')) )}"
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: hsl(0,0%,95%);
2
+ background-color: #141414;
3
3
  border: 1px solid silver;
4
- color: black;
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:#b48 }
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:#B06; font-weight:bold }
46
- .CodeRay .class-variable { color:#369 }
47
- .CodeRay .color { color:#0A0 }
48
- .CodeRay .comment { color:#777 }
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:#036; font-weight:bold }
52
+ .CodeRay .constant { color:#cf6a4c; }
53
53
  .CodeRay .decorator { color:#B0B }
54
54
  .CodeRay .definition { color:#099; font-weight:bold }
55
- .CodeRay .delimiter { color:black }
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:#34b }
59
+ .CodeRay .doctype { color:#9b703f }
60
60
  .CodeRay .entity { color:#800; font-weight:bold }
61
- .CodeRay .error { color:#F00; background-color:#FAA }
61
+ .CodeRay .error { }
62
62
  .CodeRay .escape { color:#666 }
63
- .CodeRay .exception { color:#C00; font-weight:bold }
64
- .CodeRay .float { color:#60E }
65
- .CodeRay .function { color:#06B; font-weight:bold }
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-weight:bold }
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-weight: bold; color: #666 }
72
- .CodeRay .instance-variable { color:#33B }
73
- .CodeRay .integer { color:#00D }
74
- .CodeRay .key .char { color: #60f }
75
- .CodeRay .key .delimiter { color: #404 }
76
- .CodeRay .key { color: #606 }
77
- .CodeRay .keyword { color:#080; font-weight:bold }
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:#369; font-weight:bold }
84
- .CodeRay .predefined-constant { color:#069 }
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:#00C; font-weight:bold }
88
- .CodeRay .regexp .content { color:#808 }
89
- .CodeRay .regexp .delimiter { color:#404 }
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 .content { color:#2B2 }
94
- .CodeRay .shell .delimiter { color:#161 }
95
- .CodeRay .shell { background-color:hsla(120,100%,50%,0.06); }
96
- .CodeRay .string .char { color: #b0b }
97
- .CodeRay .string .content { color: #D20 }
98
- .CodeRay .string .delimiter { color: #710 }
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:#070 }
105
- .CodeRay .type { color:#339; font-weight:bold }
106
- .CodeRay .value { color: #088; }
107
- .CodeRay .variable { color:#037 }
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: #007; }
112
- .CodeRay .head { color: #f8f; background: #505 }
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: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
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: #0c0; background:transparent; font-weight:bold }
119
- .CodeRay .delete .delete { color: #c00; background:transparent; font-weight:bold }
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
@@ -1,3 +1,3 @@
1
1
  module Ghoul
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -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/drummond/george\">george</a>/<a href=\"/repository/repository_name/commitxyz/tree/george/drummond/george/drummond\">drummond</a>"
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
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: &70095112075640 !ruby/object:Gem::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: *70095112075640
24
+ version_requirements: *70121004006740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sinatra
27
- requirement: &70095112073780 !ruby/object:Gem::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: *70095112073780
35
+ version_requirements: *70121004006200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sass
38
- requirement: &70095112071340 !ruby/object:Gem::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: *70095112071340
46
+ version_requirements: *70121004005680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: grit
49
- requirement: &70095112069860 !ruby/object:Gem::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: *70095112069860
57
+ version_requirements: *70121004004880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: georgedrummond_sinatra_helpers
60
- requirement: &70095112068800 !ruby/object:Gem::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: *70095112068800
68
+ version_requirements: *70121004004080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ghoul_grack
71
- requirement: &70095112067580 !ruby/object:Gem::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: *70095112067580
79
+ version_requirements: *70121004003180
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: coderay
82
- requirement: &70095112066520 !ruby/object:Gem::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: *70095112066520
90
+ version_requirements: *70121004002660
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: redcarpet
93
- requirement: &70095112065640 !ruby/object:Gem::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: *70095112065640
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