jekyll-cased-categories 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -4
- data/README.md +1 -1
- data/jekyll-cased-categories.gemspec +12 -12
- data/lib/jekyll-cased-categories.rb +13 -23
- data/lib/jekyll-cased-categories/version.rb +1 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c768491299eb35585661b564a376b7cadd5fcf29
|
4
|
+
data.tar.gz: 6f4b7afc8497b214a7c3cd9b93cb3f1804fec003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb4a780f1b390e6671edede4f047dac13fb3ac7d610628f8f848b65d2eb5dd49682d474960d99c3de8d7a587bbd0acfb013b8df7ae648237efb5f65e748ae96
|
7
|
+
data.tar.gz: 995334297ab0393630a5387abdcfdeb06573e37fdefd2d298ee7bb908c07c4c66e707206d9148239d9a0d0b2dc7c0ae77dc3672a292ec1943856d7420fd31c5d
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# jekyll-cased-categories
|
2
2
|
![](https://img.shields.io/gem/dt/jekyll-cased-categories.svg) ![](https://img.shields.io/gem/v/jekyll-cased-categories.svg)
|
3
3
|
|
4
|
-
A plugin to keep categories case-sensitive in Jekyll 3.
|
4
|
+
A plugin to keep categories case-sensitive in Jekyll 3.1 and above. Ruby gems [homepage](https://rubygems.org/gems/jekyll-cased-categories).
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -4,22 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'jekyll-cased-categories/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'jekyll-cased-categories'
|
8
8
|
spec.version = Jekyll::CasedCategories::VERSION
|
9
|
-
spec.summary =
|
10
|
-
spec.description =
|
11
|
-
spec.authors = [
|
12
|
-
spec.email =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
9
|
+
spec.summary = 'Keep categories case-sensitive.'
|
10
|
+
spec.description = 'A plugin to keep categories case-sensitive in Jekyll 3.1 and above.'
|
11
|
+
spec.authors = ['x-way']
|
12
|
+
spec.email = 'x-way@waterwave.ch'
|
13
|
+
spec.homepage = 'https://github.com/x-way/jekyll-cased-categories'
|
14
|
+
spec.license = 'GPL-2.0'
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split(
|
16
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'jekyll', ['>= 3.1', '< 4.0']
|
22
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
23
23
|
spec.add_development_dependency 'rake', '~> 0'
|
24
|
-
spec.add_development_dependency
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
25
25
|
end
|
@@ -1,27 +1,17 @@
|
|
1
1
|
module Jekyll
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
second: date.strftime("%S"),
|
16
|
-
i_day: date.strftime("%-d"),
|
17
|
-
i_month: date.strftime("%-m"),
|
18
|
-
categories: (data['categories'] || []).map { |c| c.to_s.downcase }.uniq.join('/'),
|
19
|
-
cased_categories: (data['categories'] || []).map { |c| c.to_s }.uniq.join('/'),
|
20
|
-
label: data['label'].to_s || Utils.slugify(basename_without_ext),
|
21
|
-
short_month: date.strftime("%b"),
|
22
|
-
short_year: date.strftime("%y"),
|
23
|
-
y_day: date.strftime("%j"),
|
24
|
-
}
|
2
|
+
module Drops
|
3
|
+
class UrlDrop
|
4
|
+
def cased_categories
|
5
|
+
cased_category_set = Set.new
|
6
|
+
Array(@obj.data['categories']).each do |category|
|
7
|
+
cased_category_set << category.to_s
|
8
|
+
end
|
9
|
+
cased_category_set.to_a.join('/')
|
10
|
+
end
|
11
|
+
|
12
|
+
def label
|
13
|
+
@obj.data['label'].to_s || Utils.slugify(@obj.basename_without_ext)
|
14
|
+
end
|
25
15
|
end
|
26
16
|
end
|
27
17
|
end
|
metadata
CHANGED
@@ -1,84 +1,84 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-cased-categories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- x-way
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
20
|
-
- - <
|
19
|
+
version: '3.1'
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '4.0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '3.
|
30
|
-
- - <
|
29
|
+
version: '3.1'
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '4.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ~>
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '3.0'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - ~>
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - ~>
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - ~>
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: bundler
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - ~>
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '1.6'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - ~>
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '1.6'
|
75
|
-
description: A plugin to keep categories case-sensitive in Jekyll 3.
|
75
|
+
description: A plugin to keep categories case-sensitive in Jekyll 3.1 and above.
|
76
76
|
email: x-way@waterwave.ch
|
77
77
|
executables: []
|
78
78
|
extensions: []
|
79
79
|
extra_rdoc_files: []
|
80
80
|
files:
|
81
|
-
- .gitignore
|
81
|
+
- ".gitignore"
|
82
82
|
- Gemfile
|
83
83
|
- LICENSE
|
84
84
|
- README.md
|
@@ -87,7 +87,7 @@ files:
|
|
87
87
|
- lib/jekyll-cased-categories/version.rb
|
88
88
|
homepage: https://github.com/x-way/jekyll-cased-categories
|
89
89
|
licenses:
|
90
|
-
- GPL
|
90
|
+
- GPL-2.0
|
91
91
|
metadata: {}
|
92
92
|
post_install_message:
|
93
93
|
rdoc_options: []
|
@@ -95,17 +95,17 @@ require_paths:
|
|
95
95
|
- lib
|
96
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.1
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Keep categories case-sensitive.
|