##// END OF EJS Templates
Merged r9389 from trunk....
Jean-Philippe Lang -
r9268:baa4ebd05f39
parent child
Show More
@@ -1,87 +1,87
1 1 source :rubygems
2 2
3 3 gem "rails", "2.3.14"
4 4 gem "i18n", "~> 0.4.2"
5 gem "coderay", "~> 1.0.0"
5 gem "coderay", "~> 1.0.6"
6 6 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
7 7 gem "tzinfo", "~> 0.3.31"
8 8
9 9 # Optional gem for LDAP authentication
10 10 group :ldap do
11 11 gem "net-ldap", "~> 0.3.1"
12 12 end
13 13
14 14 # Optional gem for OpenID authentication
15 15 group :openid do
16 16 gem "ruby-openid", "~> 2.1.4", :require => "openid"
17 17 end
18 18
19 19 # Optional gem for exporting the gantt to a PNG file, not supported with jruby
20 20 platforms :mri, :mingw do
21 21 group :rmagick do
22 22 # RMagick 2 supports ruby 1.9
23 23 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
24 24 # different requirements for the same gem on different platforms
25 25 gem "rmagick", ">= 2.0.0"
26 26 end
27 27 end
28 28
29 29 # Database gems
30 30 platforms :mri, :mingw do
31 31 group :postgresql do
32 32 gem "pg", ">= 0.11.0"
33 33 end
34 34
35 35 group :sqlite do
36 36 gem "sqlite3"
37 37 end
38 38 end
39 39
40 40 platforms :mri_18, :mingw_18 do
41 41 group :mysql do
42 42 gem "mysql"
43 43 end
44 44 end
45 45
46 46 platforms :mri_19, :mingw_19 do
47 47 group :mysql do
48 48 gem "mysql2", "~> 0.2.7"
49 49 end
50 50 end
51 51
52 52 platforms :jruby do
53 53 gem "jruby-openssl"
54 54
55 55 group :mysql do
56 56 gem "activerecord-jdbcmysql-adapter"
57 57 end
58 58
59 59 group :postgresql do
60 60 gem "activerecord-jdbcpostgresql-adapter"
61 61 end
62 62
63 63 group :sqlite do
64 64 gem "activerecord-jdbcsqlite3-adapter"
65 65 end
66 66 end
67 67
68 68 group :development do
69 69 gem "rdoc", ">= 2.4.2"
70 70 end
71 71
72 72 group :test do
73 73 gem "shoulda", "~> 2.10.3"
74 74 gem "edavis10-object_daddy", :require => "object_daddy"
75 75 gem "mocha"
76 76 end
77 77
78 78 if File.exists?('Gemfile.local')
79 79 puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
80 80 instance_eval File.read('Gemfile.local')
81 81 end
82 82
83 83 # Load plugins' Gemfiles
84 84 Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file|
85 85 puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
86 86 instance_eval File.read(file)
87 87 end
@@ -1,56 +1,56
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 module Redmine
19 19 module SyntaxHighlighting
20 20
21 21 class << self
22 22 attr_reader :highlighter
23 23 delegate :highlight_by_filename, :highlight_by_language, :to => :highlighter
24 24
25 25 def highlighter=(name)
26 26 if name.is_a?(Module)
27 27 @highlighter = name
28 28 else
29 29 @highlighter = const_get(name)
30 30 end
31 31 end
32 32 end
33 33
34 34 module CodeRay
35 35 require 'coderay'
36 36 require 'coderay/helpers/file_type'
37 37
38 38 class << self
39 39 # Highlights +text+ as the content of +filename+
40 40 # Should not return line numbers nor outer pre tag
41 41 def highlight_by_filename(text, filename)
42 42 language = ::CodeRay::FileType[filename]
43 language ? ::CodeRay.scan(text, language).html : ERB::Util.h(text)
43 language ? ::CodeRay.scan(text, language).html(:break_lines => true) : ERB::Util.h(text)
44 44 end
45 45
46 46 # Highlights +text+ using +language+ syntax
47 47 # Should not return outer pre tag
48 48 def highlight_by_language(text, language)
49 49 ::CodeRay.scan(text, language).html(:line_numbers => :inline, :line_number_anchors => false, :wrap => :span)
50 50 end
51 51 end
52 52 end
53 53 end
54 54
55 55 SyntaxHighlighting.highlighter = 'CodeRay'
56 56 end
@@ -1,201 +1,198
1 1
2 2 table.revision-info td {
3 3 margin: 0px;
4 4 padding: 0px;
5 5 }
6 6
7 7 div.revision-graph { position: absolute; }
8 8
9 9 div.changeset-changes ul { margin: 0; padding: 0; }
10 10 div.changeset-changes ul > ul { margin-left: 18px; padding: 0; }
11 11
12 12 li.change {
13 13 list-style-type:none;
14 14 background-image: url(../images/bullet_black.png);
15 15 background-position: 1px 1px;
16 16 background-repeat: no-repeat;
17 17 padding-top: 1px;
18 18 padding-bottom: 1px;
19 19 padding-left: 20px;
20 20 margin: 0;
21 21 }
22 22 li.change.folder { background-image: url(../images/folder_open.png); }
23 23 li.change.folder.change-A { background-image: url(../images/folder_open_add.png); }
24 24 li.change.folder.change-M { background-image: url(../images/folder_open_orange.png); }
25 25 li.change.change-A { background-image: url(../images/bullet_add.png); }
26 26 li.change.change-M { background-image: url(../images/bullet_orange.png); }
27 27 li.change.change-C { background-image: url(../images/bullet_blue.png); }
28 28 li.change.change-R { background-image: url(../images/bullet_purple.png); }
29 29 li.change.change-D { background-image: url(../images/bullet_delete.png); }
30 30
31 31 li.change .copied-from { font-style: italic; color: #999; font-size: 0.9em; }
32 32 li.change .copied-from:before { content: " - "}
33 33
34 34 #changes-legend { float: right; font-size: 0.8em; margin: 0; }
35 35 #changes-legend li { float: left; background-position: 5px 0; }
36 36
37 37 table.filecontent { border: 1px solid #ccc; border-collapse: collapse; width:98%; background-color: #fafafa; }
38 38 table.filecontent th { border: 1px solid #ccc; background-color: #eee; }
39 39 table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding: 0.2em;}
40 40 table.filecontent tr.spacing th { text-align:center; }
41 41 table.filecontent tr.spacing td { height: 0.4em; background: #EAF2F5;}
42 42 table.filecontent th.line-num {
43 43 border: 1px solid #d7d7d7;
44 44 font-size: 0.8em;
45 45 text-align: right;
46 46 width: 2%;
47 47 padding-right: 3px;
48 48 color: #999;
49 49 user-select: none;
50 50 -moz-user-select: none;
51 51 -o-user-select: none;
52 52 -ms-user-select: none;
53 53 -webkit-user-select: none;
54 54 }
55 55 table.filecontent th.line-num a {
56 56 text-decoration: none;
57 57 color: inherit;
58 58 }
59 59 table.filecontent td.line-code pre {
60 60 margin: 0px;
61 61 white-space: pre-wrap;
62 62 }
63 63
64 64 /* 12 different colors for the annonate view */
65 65 table.annotate tr.bloc-0 {background: #FFFFBF;}
66 66 table.annotate tr.bloc-1 {background: #EABFFF;}
67 67 table.annotate tr.bloc-2 {background: #BFFFFF;}
68 68 table.annotate tr.bloc-3 {background: #FFD9BF;}
69 69 table.annotate tr.bloc-4 {background: #E6FFBF;}
70 70 table.annotate tr.bloc-5 {background: #BFCFFF;}
71 71 table.annotate tr.bloc-6 {background: #FFBFEF;}
72 72 table.annotate tr.bloc-7 {background: #FFE6BF;}
73 73 table.annotate tr.bloc-8 {background: #FFE680;}
74 74 table.annotate tr.bloc-9 {background: #AA80FF;}
75 75 table.annotate tr.bloc-10 {background: #FFBFDC;}
76 76 table.annotate tr.bloc-11 {background: #BFE4FF;}
77 77
78 78 table.annotate td.revision {
79 79 text-align: center;
80 80 width: 2%;
81 81 padding-left: 1em;
82 82 background: inherit;
83 83 }
84 84
85 85 table.annotate td.author {
86 86 text-align: center;
87 87 border-right: 1px solid #d7d7d7;
88 88 white-space: nowrap;
89 89 padding-left: 1em;
90 90 padding-right: 1em;
91 91 width: 3%;
92 92 background: inherit;
93 93 font-size: 90%;
94 94 }
95 95
96 96 table.annotate td.line-code { background-color: #fafafa; }
97 97
98 98 div.action_M { background: #fd8 }
99 99 div.action_D { background: #f88 }
100 100 div.action_A { background: #bfb }
101 101
102 102 /************* CodeRay styles *************/
103 103 .syntaxhl div {display: inline;}
104 104 .syntaxhl .line-numbers {
105 105 padding: 2px 4px 2px 4px; background-color: #eee; margin:0px 5px 0px 0px;
106 106 user-select: none;
107 107 -moz-user-select: none;
108 108 -o-user-select: none;
109 109 -ms-user-select: none;
110 110 -webkit-user-select: none;
111 111 }
112 112 .syntaxhl .code pre { overflow: auto }
113 .syntaxhl .debug { color:white ! important; background:blue ! important; }
113 .syntaxhl .debug { color: white !important; background: blue !important; }
114 114
115 .syntaxhl .attribute-name { color:#b48 }
116 115 .syntaxhl .annotation { color:#007 }
116 .syntaxhl .attribute-name { color:#b48 }
117 117 .syntaxhl .attribute-value { color:#700 }
118 118 .syntaxhl .binary { color:#509 }
119
120 .syntaxhl .comment { color:#777 }
121 .syntaxhl .comment .char { color:#444 }
122 .syntaxhl .comment .delimiter { color:#444 }
123
124 .syntaxhl .char { color:#D20 }
125 119 .syntaxhl .char .content { color:#D20 }
126 120 .syntaxhl .char .delimiter { color:#710 }
127
121 .syntaxhl .char { color:#D20 }
128 122 .syntaxhl .class { color:#B06; font-weight:bold }
123 .syntaxhl .class-variable { color:#369 }
124 .syntaxhl .color { color:#0A0 }
125 .syntaxhl .comment { color:#777 }
126 .syntaxhl .comment .char { color:#444 }
127 .syntaxhl .comment .delimiter { color:#444 }
129 128 .syntaxhl .complex { color:#A08 }
130 129 .syntaxhl .constant { color:#036; font-weight:bold }
131 .syntaxhl .color { color:#0A0 }
132 .syntaxhl .class-variable { color:#369 }
133 130 .syntaxhl .decorator { color:#B0B }
134 131 .syntaxhl .definition { color:#099; font-weight:bold }
135 .syntaxhl .directive { color:#088; font-weight:bold }
136 132 .syntaxhl .delimiter { color:black }
133 .syntaxhl .directive { color:#088; font-weight:bold }
137 134 .syntaxhl .doc { color:#970 }
138 .syntaxhl .doctype { color:#34b }
139 135 .syntaxhl .doc-string { color:#D42; font-weight:bold }
140 .syntaxhl .escape { color:#666 }
136 .syntaxhl .doctype { color:#34b }
141 137 .syntaxhl .entity { color:#800; font-weight:bold }
142 138 .syntaxhl .error { color:#F00; background-color:#FAA }
139 .syntaxhl .escape { color:#666 }
143 140 .syntaxhl .exception { color:#C00; font-weight:bold }
144 141 .syntaxhl .float { color:#60E }
145 142 .syntaxhl .function { color:#06B; font-weight:bold }
146 143 .syntaxhl .global-variable { color:#d70 }
147 144 .syntaxhl .hex { color:#02b }
148 .syntaxhl .integer { color:#00D }
149 .syntaxhl .include { color:#B44; font-weight:bold }
150 145 .syntaxhl .imaginary { color:#f00 }
151
146 .syntaxhl .include { color:#B44; font-weight:bold }
152 147 .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
153 148 .syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
154
155 149 .syntaxhl .instance-variable { color:#33B }
150 .syntaxhl .integer { color:#00D }
151 .syntaxhl .key .char { color: #60f }
152 .syntaxhl .key .delimiter { color: #404 }
153 .syntaxhl .key { color: #606 }
154 .syntaxhl .keyword { color:#080; font-weight:bold }
156 155 .syntaxhl .label { color:#970; font-weight:bold }
157 156 .syntaxhl .local-variable { color:#963 }
158 157 .syntaxhl .namespace { color:#707; font-weight:bold }
159 158 .syntaxhl .octal { color:#40E }
160 159 .syntaxhl .operator { }
161 .syntaxhl .predefined-constant { color:#069 }
162 160 .syntaxhl .predefined { color:#369; font-weight:bold }
161 .syntaxhl .predefined-constant { color:#069 }
163 162 .syntaxhl .predefined-type { color:#0a5; font-weight:bold }
164 163 .syntaxhl .preprocessor { color:#579 }
165 164 .syntaxhl .pseudo-class { color:#00C; font-weight:bold }
166 .syntaxhl .reserved { color:#080; font-weight:bold }
167
168 .syntaxhl .key .char { color: #60f }
169 .syntaxhl .key .delimiter { color: #404 }
170 .syntaxhl .key { color: #606 }
171 .syntaxhl .keyword { color:#080; font-weight:bold }
172
173 .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
174 165 .syntaxhl .regexp .content { color:#808 }
175 166 .syntaxhl .regexp .delimiter { color:#404 }
176 167 .syntaxhl .regexp .modifier { color:#C2C }
177
178 .syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
179 .syntaxhl .string .content { color: #D20 }
168 .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
169 .syntaxhl .reserved { color:#080; font-weight:bold }
170 .syntaxhl .shell .content { color:#2B2 }
171 .syntaxhl .shell .delimiter { color:#161 }
172 .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
180 173 .syntaxhl .string .char { color: #b0b }
174 .syntaxhl .string .content { color: #D20 }
181 175 .syntaxhl .string .delimiter { color: #710 }
182 176 .syntaxhl .string .modifier { color: #E40 }
183
184 .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
185 .syntaxhl .shell .content { color:#2B2 }
186 .syntaxhl .shell .delimiter { color:#161 }
187
188 .syntaxhl .symbol { color:#A60 }
177 .syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
189 178 .syntaxhl .symbol .content { color:#A60 }
190 179 .syntaxhl .symbol .delimiter { color:#630 }
191
180 .syntaxhl .symbol { color:#A60 }
192 181 .syntaxhl .tag { color:#070 }
193 182 .syntaxhl .type { color:#339; font-weight:bold }
194 183 .syntaxhl .value { color: #088; }
195 184 .syntaxhl .variable { color:#037 }
196
185
197 186 .syntaxhl .insert { background: hsla(120,100%,50%,0.12) }
198 187 .syntaxhl .delete { background: hsla(0,100%,50%,0.12) }
199 188 .syntaxhl .change { color: #bbf; background: #007; }
200 189 .syntaxhl .head { color: #f8f; background: #505 }
201 190 .syntaxhl .head .filename { color: white; }
191
192 .syntaxhl .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; }
193 .syntaxhl .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; }
194
195 .syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold }
196 .syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold }
197 .syntaxhl .change .change { color: #88f }
198 .syntaxhl .head .head { color: #f4f }
General Comments 0
You need to be logged in to leave comments. Login now