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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a22e0f2be8873f1509b0295c4033de7e66f1efc
4
- data.tar.gz: 6620767bc7ab66cc60aa99c14ce660f9f71c7249
3
+ metadata.gz: c768491299eb35585661b564a376b7cadd5fcf29
4
+ data.tar.gz: 6f4b7afc8497b214a7c3cd9b93cb3f1804fec003
5
5
  SHA512:
6
- metadata.gz: 67926754b46577ce2ce5117f692900caf64e71263414d96aab889e753e81a6abd7c1ea35ea3029c9c97abe9114872aa3ac2ff7daa7d4440fb799143192f3a649
7
- data.tar.gz: 27a0d26366579f31d2a90d1df17dcd9be79315685514fb9c9a306dfd91bebe5071c278d5a18b668ab1159cb6a8e50e520b7ac7947bfbc9418ca9a9959753e0a1
6
+ metadata.gz: fdb4a780f1b390e6671edede4f047dac13fb3ac7d610628f8f848b65d2eb5dd49682d474960d99c3de8d7a587bbd0acfb013b8df7ae648237efb5f65e748ae96
7
+ data.tar.gz: 995334297ab0393630a5387abdcfdeb06573e37fdefd2d298ee7bb908c07c4c66e707206d9148239d9a0d0b2dc7c0ae77dc3672a292ec1943856d7420fd31c5d
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- if ENV["JEKYLL_VERSION"]
5
- gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
6
- end
4
+ gem 'jekyll', "~> #{ENV['JEKYLL_VERSION']}" if ENV['JEKYLL_VERSION']
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.0 and above. Ruby gems [homepage](https://rubygems.org/gems/jekyll-cased-categories).
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 = "jekyll-cased-categories"
7
+ spec.name = 'jekyll-cased-categories'
8
8
  spec.version = Jekyll::CasedCategories::VERSION
9
- spec.summary = "Keep categories case-sensitive."
10
- spec.description = "A plugin to keep categories case-sensitive in Jekyll 3.0 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"
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 = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency "jekyll", [">= 3.0", "< 4.0"]
22
- spec.add_development_dependency "rspec", "~> 3.0"
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 "bundler", "~> 1.6"
24
+ spec.add_development_dependency 'bundler', '~> 1.6'
25
25
  end
@@ -1,27 +1,17 @@
1
1
  module Jekyll
2
- class Document
3
- def url_placeholders
4
- {
5
- collection: collection.label,
6
- path: cleaned_relative_path,
7
- output_ext: output_ext,
8
- name: Utils.slugify(basename_without_ext),
9
- title: Utils.slugify(data['slug']) || Utils.slugify(basename_without_ext),
10
- year: date.strftime("%Y"),
11
- month: date.strftime("%m"),
12
- day: date.strftime("%d"),
13
- hour: date.strftime("%H"),
14
- minute: date.strftime("%M"),
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
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module CasedCategories
3
- VERSION = "0.0.2"
3
+ VERSION = '0.0.3'.freeze
4
4
  end
5
5
  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.2
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-01-17 00:00:00.000000000 Z
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.0'
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.0'
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.0 and above.
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.0.14
108
+ rubygems_version: 2.5.1
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Keep categories case-sensitive.