lib/gollum-lib.rb in gitlab-gollum-lib-1.1.0 vs lib/gollum-lib.rb in gitlab-gollum-lib-4.2.7
- old
+ new
@@ -1,37 +1,46 @@
# ~*~ encoding: utf-8 ~*~
# stdlib
require 'digest/md5'
require 'digest/sha1'
require 'ostruct'
+require 'pathname'
+DEFAULT_ADAPTER = RUBY_PLATFORM == 'java' ? 'rjgit_adapter' : 'grit_adapter'
+
+if defined?(Gollum::GIT_ADAPTER)
+ require "#{Gollum::GIT_ADAPTER.downcase}_adapter"
+else
+ require DEFAULT_ADAPTER
+end
+
# external
-require 'grit'
-require File.expand_path('../gollum-lib/grit_ext', __FILE__)
require 'github/markup'
require 'sanitize'
+require 'gemojione'
# internal
require File.expand_path('../gollum-lib/git_access', __FILE__)
+require File.expand_path('../gollum-lib/hook', __FILE__)
require File.expand_path('../gollum-lib/committer', __FILE__)
require File.expand_path('../gollum-lib/pagination', __FILE__)
require File.expand_path('../gollum-lib/blob_entry', __FILE__)
require File.expand_path('../gollum-lib/wiki', __FILE__)
require File.expand_path('../gollum-lib/page', __FILE__)
+require File.expand_path('../gollum-lib/macro', __FILE__)
require File.expand_path('../gollum-lib/file', __FILE__)
require File.expand_path('../gollum-lib/file_view', __FILE__)
require File.expand_path('../gollum-lib/markup', __FILE__)
require File.expand_path('../gollum-lib/markups', __FILE__)
require File.expand_path('../gollum-lib/sanitization', __FILE__)
-require File.expand_path('../gollum-lib/web_sequence_diagram', __FILE__)
+require File.expand_path('../gollum-lib/filter', __FILE__)
# Set ruby to UTF-8 mode
# This is required for Ruby 1.8.7 which gollum still supports.
-$KCODE = 'U' if RUBY_VERSION[0,3] == '1.8'
+$KCODE = 'U' if RUBY_VERSION[0, 3] == '1.8'
module Gollum
- VERSION = '1.0.0'
def self.assets_path
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
end
@@ -47,7 +56,10 @@
@existing_path = existing
@attempted_path = attempted
super(message || "Cannot write #{@dir}/#{@attempted_path}, found #{@dir}/#{@existing_path}.")
end
end
-end
+ class InvalidGitRepositoryError < StandardError; end
+ class NoSuchPathError < StandardError; end
+
+end