gollum 5.3.0 → 5.3.1

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
  SHA256:
3
- metadata.gz: fc6498c3f4201b606f4fc3919ce8c900b708e95f4599e8d768eb449f7265b422
4
- data.tar.gz: c777311336b3da982568b1d6200bed36fef5f1d4cacdebb94fd3dbdd507faa8e
3
+ metadata.gz: 1e6ee218ec3038d40b887356c370ba15c3447367aae654f3b4e9866b0e710455
4
+ data.tar.gz: 6872a6036fcf1eb464eea8a613ae319feb680c5a5bb2d9ff34b2371d22d620a4
5
5
  SHA512:
6
- metadata.gz: 24f98884dcef45d1522c94c74da652c72b4ec350b78eb7f073f38144eb30aae41451dd3daefdf751902b17ff20da3a03ba327b82f97859b253428dba97fac868
7
- data.tar.gz: 7ec0150d4a1d0f9246924cde38ce0e951059838f9df2a915320f7af83d85b445d7959cdefddc8aaf067fa40a8e486c3be33db2cbbd8699ecde897b3825759d03
6
+ metadata.gz: f4bfe69e3cd37fc8d789496a953e2f7ed875ecc8798ec7f1a68328dece6901823a4d0dae2fa12585f1f2a8cac8f42af8c29e4eafb08b32adb9cfec9dccad42e2
7
+ data.tar.gz: '0160962fa0410dad56f90be9a3ffa10c2d16e2f5ca504aed55968ecb1b500d6e3cc077a8f16028fc8102db397202119b08513b7aef5f09d545d8ff9d0c5ab452'
data/HISTORY.md CHANGED
@@ -1,3 +1,20 @@
1
+ # 5.3.0 / 2023-20-03
2
+
3
+ * Backport fixes from the `master` branch for Ruby 3.2 compatibility.
4
+
5
+ # 5.3.0 / 2022-05-25
6
+
7
+ * Feature: allow for overriding only specific Mustache templates/partials (@beporter)
8
+ * Feature: Add option to show browser's local time (@NikitaIvanovV)
9
+ * Improvement: presentation on mobile devises (@benjaminwil)
10
+ * Improvement: Add page context to template filter. #1603 (@tevino)
11
+ * Fix: restore normalize check on file upload (@manofstick)
12
+ * Fix mathjax on edit and create pages. #1772 (@fhchl)
13
+ * Fix utf-8 issues: #1721 #1758 #1801 (@basking2, @dometto)
14
+ * Fix an IME rendering issue. #1735 (@yy0931)
15
+ * Fix broken history button when viewing historical deleted file. (@NikitaIvanovV)
16
+ * Fix: non-ascii characters in page names are not rendered correctly in the preview tab of the "Edit" page. #1739 (@yy0931)
17
+ * Fix: anchors and header display on JRuby. #1779
1
18
  # 5.2.3 / 2021-04-18
2
19
 
3
20
  * Fix bug preventing page titles from being displayed
data/gollum.gemspec CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.required_ruby_version = '>= 2.6'
4
4
 
5
5
  s.name = 'gollum'
6
- s.version = '5.3.0'
6
+ s.version = '5.3.1'
7
7
  s.license = 'MIT'
8
8
 
9
9
  s.summary = 'A simple, Git-powered wiki.'
@@ -21,12 +21,12 @@ Gem::Specification.new do |s|
21
21
  s.extra_rdoc_files = %w[README.md LICENSE]
22
22
 
23
23
  s.add_dependency 'rdoc', '~> 6'
24
- s.add_dependency 'gollum-lib', '~> 5.1'
24
+ s.add_dependency 'gollum-lib', '>= 5.2.3', '< 6.0'
25
25
  s.add_dependency 'kramdown', '~> 2.3'
26
26
  s.add_dependency 'kramdown-parser-gfm', '~> 1.1.0'
27
27
  s.add_dependency 'sinatra', '~> 2.0'
28
28
  s.add_dependency 'sinatra-contrib', '~> 2.0'
29
- s.add_dependency 'mustache-sinatra', '>= 1.0.1', '< 2'
29
+ s.add_dependency 'mustache-sinatra', '~> 2.0'
30
30
  s.add_dependency 'useragent', '~> 0.16.2'
31
31
  s.add_dependency 'gemojione', '~> 4.1'
32
32
  s.add_dependency 'octicons', '~> 12.0'
data/lib/gollum/app.rb CHANGED
@@ -16,6 +16,7 @@ require 'gollum'
16
16
  require 'gollum/assets'
17
17
  require 'gollum/views/helpers'
18
18
  require 'gollum/views/helpers/locale_helpers'
19
+ require 'gollum/views/template_cascade'
19
20
  require 'gollum/views/layout'
20
21
  require 'gollum/views/editable'
21
22
  require 'gollum/views/has_page'
@@ -23,7 +24,6 @@ require 'gollum/views/has_user_icons'
23
24
  require 'gollum/views/has_math'
24
25
  require 'gollum/views/pagination'
25
26
  require 'gollum/views/rss.rb'
26
- require 'gollum/views/template_cascade'
27
27
 
28
28
  require File.expand_path '../helpers', __FILE__
29
29
 
@@ -112,7 +112,6 @@ module Precious
112
112
  @wiki_title = settings.wiki_options.fetch(:title, 'Gollum Wiki')
113
113
 
114
114
  if settings.wiki_options[:template_dir]
115
- Precious::Views::Layout.extend Precious::Views::TemplateCascade
116
115
  Precious::Views::Layout.template_priority_path = settings.wiki_options[:template_dir]
117
116
  end
118
117
 
@@ -3,7 +3,6 @@ require 'cgi'
3
3
  module Precious
4
4
  module Views
5
5
  class Layout < Mustache
6
- include Rack::Utils
7
6
  include Sprockets::Helpers
8
7
  include Precious::Views::AppHelpers
9
8
  include Precious::Views::LocaleHelpers
@@ -11,10 +10,21 @@ module Precious
11
10
  include Precious::Views::RouteHelpers
12
11
  include Precious::Views::OcticonHelpers
13
12
 
14
- alias_method :h, :escape_html
15
-
16
13
  attr_reader :name, :path
17
14
 
15
+ self.extend Precious::Views::TemplateCascade
16
+
17
+ # Method should track lib/mustache.rb from Mustache project.
18
+ def partial(name)
19
+ path = self.class.first_path_available(name)
20
+ begin
21
+ File.read(path)
22
+ rescue
23
+ raise if raise_on_context_miss?
24
+ ""
25
+ end
26
+ end
27
+
18
28
  def escaped_name
19
29
  CGI.escape(@name)
20
30
  end
@@ -15,7 +15,6 @@ module Precious
15
15
 
16
16
  DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
17
17
  DEFAULT_AUTHOR = 'you'
18
- @@to_xml = { :save_with => Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML ^ 1, :indent => 0, :encoding => 'UTF-8' }
19
18
 
20
19
  def title
21
20
  h1 = @h1_title ? page_header_from_content(@content) : false
@@ -252,7 +251,7 @@ module Precious
252
251
  title.remove unless title.empty?
253
252
  end
254
253
  # .inner_html will cause href escaping on UTF-8
255
- doc.css("div#gollum-root").children.to_xml(@@to_xml)
254
+ doc.css("div#gollum-root").children.to_xml(Gollum::Markup.to_xml_opts)
256
255
  end
257
256
 
258
257
  def table(data)
@@ -2,7 +2,7 @@ module Precious
2
2
  module Views
3
3
  module TemplateCascade
4
4
  def template_priority_path
5
- @@template_priority_path
5
+ @@template_priority_path ||= nil
6
6
  end
7
7
 
8
8
  def template_priority_path=(path)
@@ -24,17 +24,6 @@ module Precious
24
24
  def template_file
25
25
  @template_file || first_path_available(template_name)
26
26
  end
27
-
28
- # Method should track lib/mustache.rb from Mustache project.
29
- def partial(name)
30
- path = first_path_available(name)
31
- begin
32
- File.read(path)
33
- rescue
34
- raise if raise_on_context_miss?
35
- ""
36
- end
37
- end
38
27
  end
39
28
  end
40
29
  end
data/lib/gollum.rb CHANGED
@@ -13,7 +13,7 @@ require 'rhino' if RUBY_PLATFORM == 'java'
13
13
  require ::File.expand_path('../gollum/uri_encode_component', __FILE__)
14
14
 
15
15
  module Gollum
16
- VERSION = '5.3.0'
16
+ VERSION = '5.3.1'
17
17
 
18
18
  ::I18n.available_locales = [:en]
19
19
  ::I18n.load_path = Dir[::File.expand_path("lib/gollum/locales") + "/*.yml"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.3.1
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: 2022-05-25 00:00:00.000000000 Z
12
+ date: 2023-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -29,16 +29,22 @@ dependencies:
29
29
  name: gollum-lib
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '5.1'
34
+ version: 5.2.3
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '6.0'
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - "~>"
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 5.2.3
45
+ - - "<"
40
46
  - !ruby/object:Gem::Version
41
- version: '5.1'
47
+ version: '6.0'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: kramdown
44
50
  requirement: !ruby/object:Gem::Requirement
@@ -99,22 +105,16 @@ dependencies:
99
105
  name: mustache-sinatra
100
106
  requirement: !ruby/object:Gem::Requirement
101
107
  requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 1.0.1
105
- - - "<"
108
+ - - "~>"
106
109
  - !ruby/object:Gem::Version
107
- version: '2'
110
+ version: '2.0'
108
111
  type: :runtime
109
112
  prerelease: false
110
113
  version_requirements: !ruby/object:Gem::Requirement
111
114
  requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: 1.0.1
115
- - - "<"
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '2'
117
+ version: '2.0'
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: useragent
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -1557,7 +1557,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1557
1557
  - !ruby/object:Gem::Version
1558
1558
  version: '0'
1559
1559
  requirements: []
1560
- rubygems_version: 3.0.3
1560
+ rubygems_version: 3.2.3
1561
1561
  signing_key:
1562
1562
  specification_version: 4
1563
1563
  summary: A simple, Git-powered wiki.