gitlab-gollum-lib 4.2.7.5 → 4.2.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0e380d14141192ca16d3efe1c7a1ea5e4f49d89
4
- data.tar.gz: 9f3bdf886f22399403ad0b1892df31440604225c
3
+ metadata.gz: b3d050f02e3eebffdd28a3b55d0c9fd2b08eef05
4
+ data.tar.gz: 01a9193c484d491e60f7343f12d9ac1b40a2019f
5
5
  SHA512:
6
- metadata.gz: 68d39cdffc221d0b3aa0afaddd381dedead101fbcd7b0a5cff2914925c93d5483d622abb94741924d15b391a3d003b32ada92c5c507c8191c179728853fcfd9c
7
- data.tar.gz: 5e9fdf42a45a48c3716df5d83c1a222203b04445f4397ab2145f4894ec7a175a132baf06a1f9d26bf168bb081a4bdba0df8f6211b96feb871c2c626efc86dbe3
6
+ metadata.gz: cfd51af7b6c3e1b98a14728e65dfcabd1ffc2c11a97753d71071700906aa7e32e64437ada8fd12f3c789f2a0e1a6c0f9daf0275e1a2a6ce9ae343e60bbf6c66a
7
+ data.tar.gz: 81652b1fbf2ab4a508db406b5d78a420f8e4f62441f60a3040c540e37c3bca51e0a70d33606ff2418b217dddaeb40cce85d745f479e93eef9c94226b4ae37e73
@@ -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.
@@ -172,6 +172,10 @@ module Gollum
172
172
  end
173
173
  end
174
174
 
175
+ def files_sorted_by_created_at(ref)
176
+ @repo.files_sorted_by_created_at(ref)
177
+ end
178
+
175
179
  # Reads the content from the Git db at the given SHA.
176
180
  #
177
181
  # sha - The String SHA.
@@ -1,5 +1,5 @@
1
1
  module Gollum
2
2
  module Lib
3
- VERSION = '4.2.7.5'
3
+ VERSION = '4.2.7.6'
4
4
  end
5
5
  end
@@ -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
- tree_list((treeish || @ref), limit: limit)
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.5
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: 2018-06-15 00:00:00.000000000 Z
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