jekyll-language-plugin 1.3.1 → 1.3.2

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: 7c7704b2ff0cb1824410529bf25350b8eaa0f5b2
4
- data.tar.gz: 3209dfccc89f1e276ed629f72dc483bc79dc3185
3
+ metadata.gz: fee49fa7fb042a2ef15391e28f207a926e6c1e42
4
+ data.tar.gz: 09f0617905cd7b4949814aa3c454f9c77ed0e23a
5
5
  SHA512:
6
- metadata.gz: 87a48ff5a6e780e190fb1979913d8994a74d5ccd886080279ddcb8b81e067b53b3ec8644be063814efaab38109d1082f580f692cf0e6d870e52e0415d694aadc
7
- data.tar.gz: f555ac40a54161773de03e2f202e0db6ae60b736a3b5ccc5d44266b7cfe0311ec00f6d49828f715d9a605c0f6f5fc96dfb2089db6541cc498b28de3c169eb231
6
+ metadata.gz: 5b93d0cccdfc62796317197db5a1357d9360c2e071bb58de8421c2d7abdd85b6698801b76cf9be4189061c048aa4c02253d9ca08472865437b83882adabd280c
7
+ data.tar.gz: a126a06ebef76129853539d11987933884bf52edb5a3ba6f9d27de7f9b43221f6261dd3cc88e5bb9351165a352691252e63bc0f10998c2393c77b20df4d562af
@@ -7,6 +7,7 @@ require_relative 'jekyll/language_reader.rb'
7
7
  require_relative 'jekyll/language_properties.rb'
8
8
  require_relative 'jekyll/language_page.rb'
9
9
  require_relative 'jekyll/language_document.rb'
10
+ require_relative 'jekyll/drops/language_url_drop.rb'
10
11
  require_relative 'jekyll/readers/language_collection_reader.rb'
11
12
  require_relative 'jekyll/readers/language_page_reader.rb'
12
13
  require_relative 'jekyll/readers/language_post_reader.rb'
@@ -0,0 +1,13 @@
1
+ module Jekyll
2
+ module Drops
3
+ class LanguageUrlDrop < UrlDrop
4
+ def language
5
+ @obj.language
6
+ end
7
+
8
+ def subset
9
+ @obj.subset
10
+ end
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Jekyll
5
5
  module LanguagePlugin
6
- VERSION = '1.3.1'
6
+ VERSION = '1.3.2'
7
7
  end
8
8
  end
@@ -14,10 +14,7 @@ module Jekyll
14
14
  end
15
15
 
16
16
  def url_placeholders
17
- url_placeholders_orig.merge!({
18
- language: language,
19
- subset: subset
20
- })
17
+ @url_placeholders ||= Drops::LanguageUrlDrop.new(self)
21
18
  end
22
19
  end
23
20
  end
@@ -2,4 +2,4 @@
2
2
  # Encoding: utf-8
3
3
 
4
4
  require_relative 'patches/jekyll/site'
5
- require_relative 'patches/jekyll/url'
5
+ require_relative 'patches/jekyll/renderer'
@@ -0,0 +1,13 @@
1
+ # Frozen-string-literal: true
2
+ # Encoding: utf-8
3
+
4
+ module Jekyll
5
+ class Renderer
6
+ def permalink_ext
7
+ if document.permalink && !document.permalink.end_with?("/")
8
+ ext_match = document.permalink.match(/\.[\w+-]+$/)
9
+ ext_match[0] unless ext_match.nil?
10
+ end
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-language-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Wochnik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-22 00:00:00.000000000 Z
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: 3.1.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: 3.1.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - lib/jekyll-language-plugin.rb
77
+ - lib/jekyll/drops/language_url_drop.rb
77
78
  - lib/jekyll/language-plugin/date_localizer.rb
78
79
  - lib/jekyll/language-plugin/filters/language_date.rb
79
80
  - lib/jekyll/language-plugin/filters.rb
@@ -94,8 +95,8 @@ files:
94
95
  - lib/jekyll/language_page.rb
95
96
  - lib/jekyll/language_properties.rb
96
97
  - lib/jekyll/language_reader.rb
98
+ - lib/jekyll/patches/jekyll/renderer.rb
97
99
  - lib/jekyll/patches/jekyll/site.rb
98
- - lib/jekyll/patches/jekyll/url.rb
99
100
  - lib/jekyll/patches.rb
100
101
  - lib/jekyll/readers/language_collection_reader.rb
101
102
  - lib/jekyll/readers/language_page_reader.rb
@@ -1,11 +0,0 @@
1
- # Frozen-string-literal: true
2
- # Encoding: utf-8
3
-
4
- module Jekyll
5
- class URL
6
- # optimized version by Jordon Bedwell
7
- def sanitize_url(str)
8
- "/" + str.gsub(/\/{2,}/, "/").gsub(%r!\.+\/|\A/+!, "")
9
- end
10
- end
11
- end