debian-mirror-gitlab/config/initializers/gollum.rb

29 lines
657 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
# WARNING changes in this file must be manually propagated to gitaly-ruby.
#
# https://gitlab.com/gitlab-org/gitaly/blob/master/ruby/lib/gitlab/gollum.rb
2016-06-02 11:05:42 +05:30
module Gollum
2017-08-17 22:00:37 +05:30
GIT_ADAPTER = "rugged".freeze
2016-06-02 11:05:42 +05:30
end
require "gollum-lib"
2018-10-15 14:42:47 +05:30
module Gollum
class Page
def text_data(encoding = nil)
data = if raw_data.respond_to?(:encoding)
raw_data.force_encoding(encoding || Encoding::UTF_8)
else
raw_data
end
Gitlab::EncodingHelper.encode!(data)
end
end
end
2018-03-17 18:26:18 +05:30
Rails.application.configure do
config.after_initialize do
Gollum::Page.per_page = Kaminari.config.default_per_page
end
2016-06-02 11:05:42 +05:30
end