gitlab-gollum-lib 4.2.7.5 → 4.2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gollum-lib.rb +1 -0
- data/lib/gollum-lib/git_access.rb +4 -0
- data/lib/gollum-lib/version.rb +1 -1
- data/lib/gollum-lib/wiki.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3d050f02e3eebffdd28a3b55d0c9fd2b08eef05
|
4
|
+
data.tar.gz: 01a9193c484d491e60f7343f12d9ac1b40a2019f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd51af7b6c3e1b98a14728e65dfcabd1ffc2c11a97753d71071700906aa7e32e64437ada8fd12f3c789f2a0e1a6c0f9daf0275e1a2a6ce9ae343e60bbf6c66a
|
7
|
+
data.tar.gz: 81652b1fbf2ab4a508db406b5d78a420f8e4f62441f60a3040c540e37c3bca51e0a70d33606ff2418b217dddaeb40cce85d745f479e93eef9c94226b4ae37e73
|
data/lib/gollum-lib.rb
CHANGED
@@ -33,6 +33,7 @@ require File.expand_path('../gollum-lib/markup', __FILE__)
|
|
33
33
|
require File.expand_path('../gollum-lib/markups', __FILE__)
|
34
34
|
require File.expand_path('../gollum-lib/sanitization', __FILE__)
|
35
35
|
require File.expand_path('../gollum-lib/filter', __FILE__)
|
36
|
+
require File.expand_path('../gollum-lib/sorters/wiki_sorter', __FILE__)
|
36
37
|
|
37
38
|
# Set ruby to UTF-8 mode
|
38
39
|
# This is required for Ruby 1.8.7 which gollum still supports.
|
data/lib/gollum-lib/version.rb
CHANGED
data/lib/gollum-lib/wiki.rb
CHANGED
@@ -616,8 +616,17 @@ module Gollum
|
|
616
616
|
# treeish - The String commit ID or ref to find (default: @ref)
|
617
617
|
#
|
618
618
|
# Returns an Array of Gollum::Page instances.
|
619
|
-
def pages(treeish = nil, limit: nil)
|
620
|
-
|
619
|
+
def pages(treeish = nil, limit: nil, sort: nil, direction_desc: false)
|
620
|
+
sha = @access.ref_to_sha(treeish || ref)
|
621
|
+
return [] unless sha
|
622
|
+
commit = @access.commit(sha)
|
623
|
+
|
624
|
+
blobs = tree_map_for(sha).select do |entry|
|
625
|
+
@page_class.valid_page_name?(entry.name)
|
626
|
+
end
|
627
|
+
|
628
|
+
sorter = Gollum::Sorters::WikiSorter.new(sort, direction_desc, limit)
|
629
|
+
sorter.call(sha, @access, blobs).map { |blob| blob.page(self, commit) }
|
621
630
|
end
|
622
631
|
|
623
632
|
# Public: Lists all non-page files for this wiki.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-gollum-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.7.
|
4
|
+
version: 4.2.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gollum-grit_adapter
|