Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Johansen <christian@gitorious.com>2013-01-29 08:20:02 (GMT)
committer Christian Johansen <christian@gitorious.com>2013-01-29 08:20:02 (GMT)
commit26ec94e51b1fa23d8381bf51d16d7ae21d0d32dc (patch)
tree0463b22091dd90d0ed85bb8607c8b848b7b1a2d6
parent523dbe5f0e7924f1ae17bf61d3e5546559b05ad8 (diff)
parent82ba04bbe1c436ffa3bd89462258505d608262aa (diff)
Merge branch '2.x-stable'
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock36
-rw-r--r--app/helpers/blobs_helper.rb22
-rw-r--r--config/environment.rb2
-rw-r--r--lib/gitorious.rb4
-rw-r--r--test/unit/helpers/blobs_helper_test.rb2
6 files changed, 34 insertions, 34 deletions
diff --git a/Gemfile b/Gemfile
index f8d8caf..cbfbb09 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source "http://rubygems.org"
-gem "rails", "2.3.15"
+gem "rails", "2.3.16"
gem "chronic", "0.3.0"
gem "geoip", "0.8.9"
gem "daemons", "1.1.0", :require => false
diff --git a/Gemfile.lock b/Gemfile.lock
index f5d9d6f..12f7e01 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,22 +8,22 @@ GEM
remote: http://rubygems.org/
specs:
SystemTimer (1.2.3)
- actionmailer (2.3.15)
- actionpack (= 2.3.15)
- actionpack (2.3.15)
- activesupport (= 2.3.15)
- rack (~> 1.1.3)
+ actionmailer (2.3.16)
+ actionpack (= 2.3.16)
+ actionpack (2.3.16)
+ activesupport (= 2.3.16)
+ rack (~> 1.1.0)
activemessaging (0.7.1)
activesupport (>= 1.0.0)
- activerecord (2.3.15)
- activesupport (= 2.3.15)
+ activerecord (2.3.16)
+ activesupport (= 2.3.16)
activerecord-jdbc-adapter (1.2.2.1)
activerecord-jdbcmysql-adapter (1.2.2.1)
activerecord-jdbc-adapter (~> 1.2.2.1)
jdbc-mysql (~> 5.1.0)
- activeresource (2.3.15)
- activesupport (= 2.3.15)
- activesupport (2.3.15)
+ activeresource (2.3.16)
+ activesupport (= 2.3.16)
+ activesupport (2.3.16)
acts-as-taggable-on (2.0.6)
addressable (2.2.8)
after_commit (1.0.10)
@@ -90,15 +90,15 @@ GEM
mime-types
proxymachine (1.2.4)
eventmachine (>= 0.12.10)
- rack (1.1.4)
+ rack (1.1.5)
rack-test (0.6.2)
rack (>= 1.0)
- rails (2.3.15)
- actionmailer (= 2.3.15)
- actionpack (= 2.3.15)
- activerecord (= 2.3.15)
- activeresource (= 2.3.15)
- activesupport (= 2.3.15)
+ rails (2.3.16)
+ actionmailer (= 2.3.16)
+ actionpack (= 2.3.16)
+ activerecord (= 2.3.16)
+ activeresource (= 2.3.16)
+ activesupport (= 2.3.16)
rake (>= 0.8.3)
raindrops (0.10.0)
rake (0.8.7)
@@ -192,7 +192,7 @@ DEPENDENCIES
oauth (= 0.4.4)
paperclip (~> 2.7.2)
proxymachine (= 1.2.4)
- rails (= 2.3.15)
+ rails (= 2.3.16)
rake (= 0.8.7)
rdiscount (= 1.3.1.1)
resque (= 1.9.8)
diff --git a/app/helpers/blobs_helper.rb b/app/helpers/blobs_helper.rb
index 7335838..5d2c419 100644
--- a/app/helpers/blobs_helper.rb
+++ b/app/helpers/blobs_helper.rb
@@ -21,7 +21,7 @@
module BlobsHelper
include RepositoriesHelper
include TreesHelper
-
+
HIGHLIGHTER_TO_EXT = {
"apollo"=> /\.(apollo|agc|aea)$/,
"css" => /\.css$/,
@@ -37,21 +37,21 @@ module BlobsHelper
"wiki" => /\.(mediawiki|wikipedia|wiki)$/,
"yaml" => /\.(yaml|yml)$/,
}
-
+
ASCII_MIME_TYPES_EXCEPTIONS = [ /^text/ ]
-
+
def textual?(blob)
!binary?(blob)
end
-
+
def binary?(blob)
blob.binary?
end
-
+
def image?(blob)
blob.mime_type =~ /^image/
end
-
+
def highlightable?(blob)
if File.extname(blob.name) == ""
return false
@@ -61,13 +61,13 @@ module BlobsHelper
end
true
end
-
+
def language_of_file(filename)
if lang_tuple = HIGHLIGHTER_TO_EXT.find{|lang, matcher| filename =~ matcher }
return lang_tuple.first
end
end
-
+
def render_highlighted(text, filename, code_theme_class = nil)
render_highlighted_list(text.to_s.split("\n"), filename, {:code_theme_class => code_theme_class})
end
@@ -97,7 +97,7 @@ module BlobsHelper
out << "</table>"
out.join("\n")
end
-
+
def too_big_to_render?(size)
size > eval(GitoriousConfig["max_render_blob_size"] || '350.kilobytes')
end
@@ -109,7 +109,7 @@ module BlobsHelper
@project = project
@repository = repository
end
-
+
def blame_info_for_commit(commit)
return %Q{<td class="blame_info unchanged"></td>} if commit.id == @previous_sha
author = commit.author.name
@@ -120,6 +120,6 @@ module BlobsHelper
first = ' first' if not @previous_sha
@previous_sha = commit.id
%Q{<td class="blame_info#{first}">#{commit_link}</td>}
- end
+ end
end
end
diff --git a/config/environment.rb b/config/environment.rb
index bd06aaf..393eebc 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -4,7 +4,7 @@
# you don't control web/app server and can't set it the proper way
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.16' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
diff --git a/lib/gitorious.rb b/lib/gitorious.rb
index b383289..2880d02 100644
--- a/lib/gitorious.rb
+++ b/lib/gitorious.rb
@@ -1,6 +1,6 @@
# encoding: utf-8
#--
-# Copyright (C) 2011 Gitorious AS
+# Copyright (C) 2011-2013 Gitorious AS
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -16,5 +16,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#++
module Gitorious
- VERSION = "2.4.5"
+ VERSION = "2.4.6"
end
diff --git a/test/unit/helpers/blobs_helper_test.rb b/test/unit/helpers/blobs_helper_test.rb
index f90e12d..20fb57f 100644
--- a/test/unit/helpers/blobs_helper_test.rb
+++ b/test/unit/helpers/blobs_helper_test.rb
@@ -36,7 +36,7 @@ class BlobsHelperTest < ActionView::TestCase
context "render_highlighted()" do
should "html escape the line & add the proper class" do
res = render_highlighted("puts '<foo>'", "foo.rb")
- assert res.include?(%Q{<td class="code"><pre class="prettyprint lang-rb">puts '&lt;foo&gt;'</pre></td>}), res
+ assert res.include?(%Q{<td class="code"><pre class="prettyprint lang-rb">puts &#x27;&lt;foo&gt;&#x27;</pre></td>}), res
end
should "add line numbers" do