jekyll-tasks 0.5.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/CODEOWNERS +1 -1
- data/Gemfile +5 -4
- data/Gemfile.lock +43 -30
- data/jekyll-tasks.gemspec +1 -1
- data/lib/jekyll/tasks/collections.rb +2 -4
- data/lib/jekyll/tasks/menus.rb +7 -7
- data/lib/jekyll/tasks/products.rb +3 -3
- data/lib/jekyll/tasks/related.rb +15 -6
- data/lib/jekyll/tasks/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dac5a1a0d07aa8ef0d7c726605eefa765c29c41be5b7859b7242d84320d0bd58
|
|
4
|
+
data.tar.gz: d1ceb6657d1d492ce097109d6406ce69da0eb3836e7ce7eefe71528ec0ade6be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54cdac946fa9b48d0818223ced161faa55d7edf90ce568fd07675b93c23565e127377edc40a27052465cbd22bb793843c4337a3d4b3925b1834f2f32ee96c66e
|
|
7
|
+
data.tar.gz: d36a275c79157dfd2ee3fb3786c07667cd22e7996a02b516a0bdc4618f07c0932b34acfe8bfad05026eb4c8abcc6f111047ba87c08dbb79b0ab0c2c66101262a
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CODEOWNERS
CHANGED
data/Gemfile
CHANGED
|
@@ -4,8 +4,9 @@ source 'https://rubygems.org'
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
6
|
group :test do
|
|
7
|
-
gem '
|
|
8
|
-
gem '
|
|
9
|
-
gem '
|
|
10
|
-
gem '
|
|
7
|
+
gem 'minitest', '~> 5.26'
|
|
8
|
+
gem 'rake', '~> 13.4'
|
|
9
|
+
gem 'rubocop', '~> 1.86'
|
|
10
|
+
gem 'simplecov', require: false
|
|
11
|
+
gem 'simplecov-cobertura'
|
|
11
12
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,52 +1,65 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
jekyll-tasks (0.
|
|
4
|
+
jekyll-tasks (1.0.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
ast (2.4.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
ast (2.4.3)
|
|
10
|
+
docile (1.4.1)
|
|
11
|
+
json (2.19.4)
|
|
12
|
+
language_server-protocol (3.17.0.5)
|
|
13
|
+
lint_roller (1.1.0)
|
|
14
|
+
minitest (5.26.1)
|
|
15
|
+
parallel (1.28.0)
|
|
16
|
+
parser (3.3.11.1)
|
|
16
17
|
ast (~> 2.4.1)
|
|
18
|
+
racc
|
|
19
|
+
prism (1.9.0)
|
|
20
|
+
racc (1.8.1)
|
|
17
21
|
rainbow (3.1.1)
|
|
18
|
-
rake (13.
|
|
19
|
-
regexp_parser (2.
|
|
20
|
-
rexml (3.
|
|
21
|
-
rubocop (1.
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
rake (13.4.2)
|
|
23
|
+
regexp_parser (2.12.0)
|
|
24
|
+
rexml (3.4.4)
|
|
25
|
+
rubocop (1.86.1)
|
|
26
|
+
json (~> 2.3)
|
|
27
|
+
language_server-protocol (~> 3.17.0.2)
|
|
28
|
+
lint_roller (~> 1.1.0)
|
|
29
|
+
parallel (>= 1.10)
|
|
30
|
+
parser (>= 3.3.0.2)
|
|
24
31
|
rainbow (>= 2.2.2, < 4.0)
|
|
25
|
-
regexp_parser (>=
|
|
26
|
-
|
|
27
|
-
rubocop-ast (>= 1.16.0, < 2.0)
|
|
32
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
33
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
28
34
|
ruby-progressbar (~> 1.7)
|
|
29
|
-
unicode-display_width (>=
|
|
30
|
-
rubocop-ast (1.
|
|
31
|
-
parser (>= 3.
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
36
|
+
rubocop-ast (1.49.1)
|
|
37
|
+
parser (>= 3.3.7.2)
|
|
38
|
+
prism (~> 1.7)
|
|
39
|
+
ruby-progressbar (1.13.0)
|
|
40
|
+
simplecov (0.22.0)
|
|
34
41
|
docile (~> 1.1)
|
|
35
42
|
simplecov-html (~> 0.11)
|
|
36
43
|
simplecov_json_formatter (~> 0.1)
|
|
37
|
-
simplecov-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
simplecov-cobertura (3.1.0)
|
|
45
|
+
rexml
|
|
46
|
+
simplecov (~> 0.19)
|
|
47
|
+
simplecov-html (0.13.2)
|
|
48
|
+
simplecov_json_formatter (0.1.4)
|
|
49
|
+
unicode-display_width (3.2.0)
|
|
50
|
+
unicode-emoji (~> 4.1)
|
|
51
|
+
unicode-emoji (4.2.0)
|
|
40
52
|
|
|
41
53
|
PLATFORMS
|
|
42
54
|
ruby
|
|
43
55
|
|
|
44
56
|
DEPENDENCIES
|
|
45
|
-
codecov (~> 0.6)
|
|
46
57
|
jekyll-tasks!
|
|
47
|
-
minitest (~> 5.
|
|
48
|
-
rake (~> 13.
|
|
49
|
-
rubocop (~> 1.
|
|
58
|
+
minitest (~> 5.26)
|
|
59
|
+
rake (~> 13.4)
|
|
60
|
+
rubocop (~> 1.86)
|
|
61
|
+
simplecov
|
|
62
|
+
simplecov-cobertura
|
|
50
63
|
|
|
51
64
|
BUNDLED WITH
|
|
52
|
-
2.
|
|
65
|
+
2.3.27
|
data/jekyll-tasks.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = 'A set of rake tasks to help you on your Jekyll sites.'
|
|
12
12
|
spec.homepage = 'https://github.com/grupopv/jekyll-tasks/'
|
|
13
13
|
spec.license = 'MIT'
|
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.7')
|
|
15
15
|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
17
|
spec.metadata['source_code_uri'] = 'https://github.com/grupopv/jekyll-tasks/'
|
|
@@ -7,11 +7,9 @@ module Jekyll
|
|
|
7
7
|
extend self
|
|
8
8
|
|
|
9
9
|
def get
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
collections << collection[3..]
|
|
10
|
+
folders_starting_with_underscore.map do |collection|
|
|
11
|
+
collection[3..]
|
|
13
12
|
end
|
|
14
|
-
collections
|
|
15
13
|
end
|
|
16
14
|
|
|
17
15
|
private
|
data/lib/jekyll/tasks/menus.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Jekyll
|
|
|
56
56
|
|
|
57
57
|
files = markdown_files collection
|
|
58
58
|
files.each do |file|
|
|
59
|
-
data = YAML.load_file(file)
|
|
59
|
+
data = YAML.load_file(file, permitted_classes: [Date])
|
|
60
60
|
conflicts << analyze_conflicts_without_properties(data)
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -66,7 +66,7 @@ module Jekyll
|
|
|
66
66
|
def search_properties(collection, properties, result = [])
|
|
67
67
|
files = markdown_files collection
|
|
68
68
|
files.each do |file|
|
|
69
|
-
data = YAML.load_file(file)
|
|
69
|
+
data = YAML.load_file(file, permitted_classes: [Date])
|
|
70
70
|
properties.each do |property|
|
|
71
71
|
search_property result, data, property
|
|
72
72
|
end
|
|
@@ -77,17 +77,17 @@ module Jekyll
|
|
|
77
77
|
private
|
|
78
78
|
|
|
79
79
|
def analyze_conflicts_without_properties(data, conflicts = [])
|
|
80
|
-
conflicts << "Product without father: '#{data['title']}'" if Products.product_without_father data
|
|
81
|
-
conflicts << "Menu without name: '#{data['title']}'" if menu_without_name data
|
|
82
|
-
conflicts << "Menu without father: '#{data['title']}'" if menu_without_father data
|
|
80
|
+
conflicts << "Product without father: '#{data['title']}'" if Products.product_without_father? data
|
|
81
|
+
conflicts << "Menu without name: '#{data['title']}'" if menu_without_name? data
|
|
82
|
+
conflicts << "Menu without father: '#{data['title']}'" if menu_without_father? data
|
|
83
83
|
conflicts
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
def menu_without_name(data)
|
|
86
|
+
def menu_without_name?(data)
|
|
87
87
|
data['layout'] == 'grid' && data['menu-name'].nil?
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
def menu_without_father(data)
|
|
90
|
+
def menu_without_father?(data)
|
|
91
91
|
data['layout'] == 'grid' && data['menu-father'].nil? && data['permalink'].nil?
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -23,18 +23,18 @@ module Jekyll
|
|
|
23
23
|
def model_list
|
|
24
24
|
products = []
|
|
25
25
|
path_list.each do |product|
|
|
26
|
-
data = YAML.load_file(product)
|
|
26
|
+
data = YAML.load_file(product, permitted_classes: [Date])
|
|
27
27
|
products << data['title']
|
|
28
28
|
end
|
|
29
29
|
products
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def product_without_father(data)
|
|
32
|
+
def product_without_father?(data)
|
|
33
33
|
data['layout'].nil? && data['menu-father'].nil?
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def title(product)
|
|
37
|
-
data = YAML.load_file("#{PRODUCTS_PATH}#{product}#{EXTENSION}")
|
|
37
|
+
data = YAML.load_file("#{PRODUCTS_PATH}#{product}#{EXTENSION}", permitted_classes: [Date])
|
|
38
38
|
data['title']
|
|
39
39
|
end
|
|
40
40
|
|
data/lib/jekyll/tasks/related.rb
CHANGED
|
@@ -23,19 +23,28 @@ module Jekyll
|
|
|
23
23
|
|
|
24
24
|
def all_related_exist
|
|
25
25
|
errors = []
|
|
26
|
-
|
|
26
|
+
models = Products.model_list
|
|
27
27
|
api_data.each do |key, related|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
errors << "Inception detected @ '#{key}' related product" if inception_detected?(products, product, key)
|
|
32
|
-
end
|
|
28
|
+
next unless models.include? key
|
|
29
|
+
|
|
30
|
+
errors += related_rules(key, related)
|
|
33
31
|
end
|
|
34
32
|
errors.empty? ? 'OK' : errors
|
|
35
33
|
end
|
|
36
34
|
|
|
37
35
|
private
|
|
38
36
|
|
|
37
|
+
def related_rules(key, related)
|
|
38
|
+
errors = []
|
|
39
|
+
products = Products.filename_list
|
|
40
|
+
errors << "'#{key}' has duplicate related products" if related.length != related.uniq.length
|
|
41
|
+
related.each do |product|
|
|
42
|
+
errors << "Related '#{product}' (declared @ '#{key}') doesn't exist" unless products.include? product
|
|
43
|
+
errors << "Inception detected @ '#{key}' related product" if inception_detected?(products, product, key)
|
|
44
|
+
end
|
|
45
|
+
errors
|
|
46
|
+
end
|
|
47
|
+
|
|
39
48
|
def api_data
|
|
40
49
|
YAML.load_file('./_data/api/yaml/related/products.yml')
|
|
41
50
|
end
|
data/lib/jekyll/tasks/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Edgar Tinajero
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -59,14 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
59
59
|
requirements:
|
|
60
60
|
- - ">="
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version:
|
|
62
|
+
version: 3.1.7
|
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '0'
|
|
68
68
|
requirements: []
|
|
69
|
-
rubygems_version: 3.
|
|
69
|
+
rubygems_version: 3.3.27
|
|
70
70
|
signing_key:
|
|
71
71
|
specification_version: 4
|
|
72
72
|
summary: A set of rake tasks to help you on your Jekyll sites.
|