jekyll-tasks 0.1.0 → 0.2.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/.github/dependabot.yml +15 -0
- data/.travis.yml +1 -1
- data/CODEOWNERS +4 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +27 -26
- data/LICENSE.txt +1 -1
- data/_data/api/hana/products/product-1.yml +1 -0
- data/_data/api/hana/products/product-2.yml +1 -0
- data/_data/api/hana/products/product-3.yml +1 -0
- data/_data/api/yaml/related/products.yml +2 -0
- data/jekyll-tasks.gemspec +2 -2
- data/lib/jekyll/tasks.rb +2 -0
- data/lib/jekyll/tasks/dates.rb +1 -1
- data/lib/jekyll/tasks/products.rb +36 -0
- data/lib/jekyll/tasks/related.rb +31 -0
- data/lib/jekyll/tasks/version.rb +1 -1
- metadata +16 -11
- data/.dependabot/config.yml +0 -8
- data/bin/console +0 -15
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb2bd9522e96a7b8fafa4905183266847f438dba39e3377f8ed424f101c29dff
|
4
|
+
data.tar.gz: 26756a715081ca1b56c6ad360f88719830a6d1fe40e714341526152159db852b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95c5de860f3ae0a6fe2aec83eef0283208579ec4344999329fc95765479ef60617ea3390b1d2620df82706aba582e5640f18c6131717293557d16ac1f4fb822c
|
7
|
+
data.tar.gz: 0af10c8ca07e5d81697b14f58e6f16512fbe59e7a4b1b88b4a919bb84b2c26e47c7cef05ed2b4b29b0e90252d05875ea6c01681375476088a22008a39a34b046
|
@@ -0,0 +1,15 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
updates:
|
4
|
+
- package-ecosystem: bundler
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: weekly
|
8
|
+
day: thursday
|
9
|
+
time: "09:00"
|
10
|
+
timezone: "America/Chihuahua"
|
11
|
+
open-pull-requests-limit: 10
|
12
|
+
reviewers: ["mlopez-grupopv"]
|
13
|
+
labels:
|
14
|
+
- dependencies
|
15
|
+
- ruby
|
data/.travis.yml
CHANGED
data/CODEOWNERS
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,49 +1,50 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jekyll-tasks (0.
|
4
|
+
jekyll-tasks (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
codecov (0.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
minitest (5.14.0)
|
18
|
-
parallel (1.19.1)
|
19
|
-
parser (2.7.0.2)
|
20
|
-
ast (~> 2.4.0)
|
9
|
+
ast (2.4.2)
|
10
|
+
codecov (0.5.2)
|
11
|
+
simplecov (>= 0.15, < 0.22)
|
12
|
+
docile (1.3.5)
|
13
|
+
minitest (5.14.4)
|
14
|
+
parallel (1.20.1)
|
15
|
+
parser (3.0.1.0)
|
16
|
+
ast (~> 2.4.1)
|
21
17
|
rainbow (3.0.0)
|
22
|
-
rake (13.0.
|
23
|
-
|
24
|
-
|
18
|
+
rake (13.0.3)
|
19
|
+
regexp_parser (2.1.1)
|
20
|
+
rexml (3.2.5)
|
21
|
+
rubocop (1.12.1)
|
25
22
|
parallel (~> 1.10)
|
26
|
-
parser (>=
|
23
|
+
parser (>= 3.0.0.0)
|
27
24
|
rainbow (>= 2.2.2, < 4.0)
|
25
|
+
regexp_parser (>= 1.8, < 3.0)
|
26
|
+
rexml
|
27
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
28
28
|
ruby-progressbar (~> 1.7)
|
29
|
-
unicode-display_width (>= 1.4.0, <
|
30
|
-
|
31
|
-
|
29
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
30
|
+
rubocop-ast (1.4.1)
|
31
|
+
parser (>= 2.7.1.5)
|
32
|
+
ruby-progressbar (1.11.0)
|
33
|
+
simplecov (0.18.5)
|
32
34
|
docile (~> 1.1)
|
33
35
|
simplecov-html (~> 0.11)
|
34
|
-
simplecov-html (0.12.
|
35
|
-
unicode-display_width (
|
36
|
-
url (0.3.2)
|
36
|
+
simplecov-html (0.12.3)
|
37
|
+
unicode-display_width (2.0.0)
|
37
38
|
|
38
39
|
PLATFORMS
|
39
40
|
ruby
|
40
41
|
|
41
42
|
DEPENDENCIES
|
42
|
-
codecov (~> 0.
|
43
|
+
codecov (~> 0.5)
|
43
44
|
jekyll-tasks!
|
44
45
|
minitest (~> 5.14)
|
45
46
|
rake (~> 13.0)
|
46
|
-
rubocop (~>
|
47
|
+
rubocop (~> 1.12)
|
47
48
|
|
48
49
|
BUNDLED WITH
|
49
|
-
2.1.
|
50
|
+
2.1.4
|
data/LICENSE.txt
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
title: PRODUCT/1
|
@@ -0,0 +1 @@
|
|
1
|
+
title: PRODUCT/2
|
@@ -0,0 +1 @@
|
|
1
|
+
title: PRODUCT/3
|
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('>= 2.
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
15
15
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
17
17
|
spec.metadata['source_code_uri'] = 'https://github.com/grupopv/jekyll-tasks/'
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
all_files = `git ls-files -z`.split("\x0")
|
25
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
26
|
all_files.reject do |f|
|
27
|
-
excluded_files = %r{^(test|spec|features)/}
|
27
|
+
excluded_files = %r{^(bin|dependabot|test|spec|features|.gitignore|.travis.yml)/}
|
28
28
|
f.match(excluded_files)
|
29
29
|
end
|
30
30
|
end
|
data/lib/jekyll/tasks.rb
CHANGED
data/lib/jekyll/tasks/dates.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Tasks
|
5
|
+
# Obtain products information
|
6
|
+
module Products
|
7
|
+
extend self
|
8
|
+
|
9
|
+
def products_filename_list
|
10
|
+
products = []
|
11
|
+
products_path_list.each do |product|
|
12
|
+
product = product
|
13
|
+
.gsub('./_data/api/hana/products/', '')
|
14
|
+
.gsub('.yml', '')
|
15
|
+
products << product
|
16
|
+
end
|
17
|
+
products
|
18
|
+
end
|
19
|
+
|
20
|
+
def products_model_list
|
21
|
+
products = []
|
22
|
+
products_path_list.each do |product|
|
23
|
+
data = YAML.load_file(product)
|
24
|
+
products << data['title']
|
25
|
+
end
|
26
|
+
products
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def products_path_list
|
32
|
+
Dir.glob('./_data/api/hana/products/*.yml').to_a.sort
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Tasks
|
5
|
+
# Verify related API
|
6
|
+
module Related
|
7
|
+
extend self
|
8
|
+
|
9
|
+
MINIMUM_RELATED_PRODUCTS = 5
|
10
|
+
|
11
|
+
def all_products_with_related
|
12
|
+
errors = []
|
13
|
+
api = related_api_data
|
14
|
+
Products.products_model_list.each do |product|
|
15
|
+
if api[product]
|
16
|
+
count = api[product].count
|
17
|
+
errors << "Only has #{count} related products: #{product}" if count < MINIMUM_RELATED_PRODUCTS
|
18
|
+
else errors << "Doesn't have related products: #{product}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
errors.empty? ? 'OK' : errors
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def related_api_data
|
27
|
+
YAML.load_file('./_data/api/yaml/related/products.yml')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/jekyll/tasks/version.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edgar Tinajero
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description:
|
14
14
|
email:
|
15
15
|
- 24572406+cetinajero@users.noreply.github.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- ".dependabot
|
20
|
+
- ".github/dependabot.yml"
|
21
21
|
- ".gitignore"
|
22
22
|
- ".travis.yml"
|
23
|
+
- CODEOWNERS
|
23
24
|
- CODE_OF_CONDUCT.md
|
24
25
|
- Gemfile
|
25
26
|
- Gemfile.lock
|
26
27
|
- LICENSE.txt
|
27
28
|
- README.md
|
28
29
|
- Rakefile
|
29
|
-
-
|
30
|
-
-
|
30
|
+
- _data/api/hana/products/product-1.yml
|
31
|
+
- _data/api/hana/products/product-2.yml
|
32
|
+
- _data/api/hana/products/product-3.yml
|
33
|
+
- _data/api/yaml/related/products.yml
|
31
34
|
- jekyll-tasks.gemspec
|
32
35
|
- lib/jekyll/tasks.rb
|
33
36
|
- lib/jekyll/tasks/dates.rb
|
37
|
+
- lib/jekyll/tasks/products.rb
|
38
|
+
- lib/jekyll/tasks/related.rb
|
34
39
|
- lib/jekyll/tasks/version.rb
|
35
40
|
homepage: https://github.com/grupopv/jekyll-tasks/
|
36
41
|
licenses:
|
@@ -39,7 +44,7 @@ metadata:
|
|
39
44
|
homepage_uri: https://github.com/grupopv/jekyll-tasks/
|
40
45
|
source_code_uri: https://github.com/grupopv/jekyll-tasks/
|
41
46
|
changelog_uri: https://github.com/grupopv/jekyll-tasks/blob/master/CHANGELOG.md
|
42
|
-
post_install_message:
|
47
|
+
post_install_message:
|
43
48
|
rdoc_options: []
|
44
49
|
require_paths:
|
45
50
|
- lib
|
@@ -47,15 +52,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
47
52
|
requirements:
|
48
53
|
- - ">="
|
49
54
|
- !ruby/object:Gem::Version
|
50
|
-
version: 2.
|
55
|
+
version: 2.4.0
|
51
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
57
|
requirements:
|
53
58
|
- - ">="
|
54
59
|
- !ruby/object:Gem::Version
|
55
60
|
version: '0'
|
56
61
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
58
|
-
signing_key:
|
62
|
+
rubygems_version: 3.1.6
|
63
|
+
signing_key:
|
59
64
|
specification_version: 4
|
60
65
|
summary: A set of rake tasks to help you on your Jekyll sites.
|
61
66
|
test_files: []
|
data/.dependabot/config.yml
DELETED
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'jekyll/tasks'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|