jekyll_href 1.2.9 → 1.2.11

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
  SHA256:
3
- metadata.gz: 8927ecf8ccf707335285be9467677e70958b442a80d26b64dd218e5364a7d3d0
4
- data.tar.gz: a8676a2ba7eca1e6e69e76c56b688bbd7b9afcefce89a8ca95cdd7510125f2e5
3
+ metadata.gz: 79cf3cccc7fc8072d6b2f7ae73d59845633f48026e0d0923d9749fbdcdd75ddf
4
+ data.tar.gz: 3e93f0d18068f86997210ddd93a3d90f899f28d82dd130c08177f4c70915e315
5
5
  SHA512:
6
- metadata.gz: 48288f3dfb9a59461c402bf6bc9632a1d80a1f7a05384f86d2673c31c6bc739f7f375e4843fb5a370b82a404754988a3eac48873a7cf3460e90f516035b860c2
7
- data.tar.gz: fbca9027c22d67524d50872fa7fd91a8230cb3c88110eb60cb4a06110e1050b8db4689730e7861d972394148740b2439f6f8c88d01b79b6a2590cf0d6001c377
6
+ metadata.gz: acafa56a136b24199a00febabfc2ff420974ae0d3e09eb6a772ce482691adc1709a765cc7a8e78ce7160eff6c819da8e72350c52160a8dc0c615cef4ee4063dc
7
+ data.tar.gz: c0c4e34adb9ef314b270f742860ee52ddcc82855f031693233ae8516d69e86c107bd0ed415958a872356e52e3afae58f5e82c53a4d43d5a8ae03a992b7f53adb
data/.rubocop.yml CHANGED
@@ -5,13 +5,10 @@ require:
5
5
  - rubocop-rake
6
6
  - rubocop-rspec
7
7
 
8
- # inherit_gem:
9
- # rubocop-jekyll: .rubocop.yml
10
-
11
8
  AllCops:
12
9
  Exclude:
13
- - demo/_site/**/*
14
10
  - binstub/**/*
11
+ - demo/_site/*
15
12
  - vendor/**/*
16
13
  - Gemfile*
17
14
  NewCops: enable
@@ -29,87 +26,60 @@ Layout/HashAlignment:
29
26
  EnforcedColonStyle: table
30
27
  EnforcedHashRocketStyle: table
31
28
 
32
- Layout/InitialIndentation:
33
- Exclude:
34
- - README.md
35
-
36
29
  Layout/LineLength:
37
30
  Max: 150
38
- Exclude:
39
- - spec/**/*
40
-
41
- Layout/MultilineMethodCallIndentation:
42
- Enabled: false
43
-
44
- Lint/RedundantCopDisableDirective:
45
- Exclude:
46
- - jekyll_href.gemspec
47
31
 
48
32
  Metrics/AbcSize:
49
- Max: 45
33
+ Max: 55
50
34
 
51
35
  Metrics/BlockLength:
52
36
  Exclude:
53
- - jekyll_href.gemspec
54
- - spec/**/*
55
- Max: 40
37
+ - jekyll_plugin_support.gemspec
38
+ Max: 30
56
39
 
57
40
  Metrics/ClassLength:
58
- Exclude:
59
- - spec/**/*
60
41
  Max: 150
61
42
 
62
43
  Metrics/CyclomaticComplexity:
63
- Max: 20
44
+ Max: 25
64
45
 
65
46
  Metrics/MethodLength:
66
- Max: 40
47
+ Max: 50
67
48
 
68
49
  Metrics/PerceivedComplexity:
69
- Max: 20
50
+ Max: 25
70
51
 
71
52
  Naming/FileName:
72
53
  Exclude:
73
54
  - Rakefile
55
+ - "*.md"
74
56
 
75
57
  RSpec/ExampleLength:
76
- Max: 40
58
+ Max: 30
77
59
 
78
- RSpec/FilePath:
60
+ RSpec/SpecFilePathFormat:
79
61
  Enabled: false
62
+ IgnoreMethods: true
80
63
 
81
- RSpec/MultipleExpectations:
82
- Max: 15
83
-
84
- RSpec/MultipleMemoizedHelpers:
85
- Max: 20
86
-
87
- Style/CommandLiteral:
64
+ RSpec/SpecFilePathSuffix:
88
65
  Enabled: false
89
66
 
90
- Style/CommentedKeyword:
67
+ RSpec/IndexedLet:
91
68
  Enabled: false
92
69
 
93
- Style/Documentation:
94
- Enabled: false
70
+ RSpec/MultipleExpectations:
71
+ Max: 15
95
72
 
96
- Style/FrozenStringLiteralComment:
73
+ Style/ClassVars:
97
74
  Enabled: false
98
75
 
99
- Style/PercentLiteralDelimiters:
76
+ Style/Documentation:
100
77
  Enabled: false
101
78
 
102
- Style/RegexpLiteral:
79
+ Style/FrozenStringLiteralComment:
103
80
  Enabled: false
104
81
 
105
82
  Style/StringConcatenation:
106
- Exclude:
107
- - spec/**/*
108
-
109
- Style/StringLiterals:
110
- Enabled: false
111
-
112
- Style/StringLiteralsInInterpolation:
113
83
  Enabled: false
114
84
 
115
85
  Style/TrailingCommaInHashLiteral:
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## 1.2.11 / 2024-07-27
5
+
6
+ * Fixed an unqualified reference to `JekyllPluginHelper`.
7
+ * Shortened the very long stack dump for an error condition.
8
+
9
+
10
+ ## 1.2.10 / 2024-07-23
11
+
12
+ * Make compatible with `jekyll_plugin_support` 1.0.0
13
+
14
+
4
15
  ## 1.2.9 / 2024-07-17
5
16
 
6
17
  * Fixed missing ` target="_blank"` for links without labels, when `blank` was specified.
data/jekyll_href.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_dependency 'ipaddress'
34
34
  spec.add_dependency 'jekyll', '>= 3.5.0'
35
- spec.add_dependency 'jekyll_all_collections', '>= 0.3.3'
36
- spec.add_dependency 'jekyll_plugin_support', '>= 0.8.5'
35
+ spec.add_dependency 'jekyll_all_collections'
36
+ spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
37
37
  spec.add_dependency 'typesafe_enum'
38
38
  end
data/lib/hash_array.rb CHANGED
@@ -6,7 +6,7 @@ module HashArray
6
6
 
7
7
  def add_link_for_page(href, hash)
8
8
  enclosing_page = href.path
9
- hash[enclosing_page] = [] if hash[enclosing_page].nil?
9
+ hash[enclosing_page] = hash[enclosing_page] || []
10
10
  pre_existing = hash[enclosing_page].find { |h| h.link_save == href.link_save }
11
11
  if pre_existing
12
12
  if pre_existing.follow != href.follow
data/lib/href_match.rb CHANGED
@@ -1,4 +1,4 @@
1
- module MSlinn
1
+ module JekyllSupport
2
2
  class HRefTag
3
3
  private
4
4
 
@@ -1,4 +1,4 @@
1
- module MSlinn
1
+ module JekyllSupport
2
2
  class HRefTag
3
3
  private
4
4
 
data/lib/href_private.rb CHANGED
@@ -1,4 +1,4 @@
1
- module MSlinn
1
+ module JekyllSupport
2
2
  class HRefTag
3
3
  private
4
4
 
@@ -25,7 +25,7 @@ module MSlinn
25
25
  No URL was provided on #{@path}:#{@line_number} (after front matter).
26
26
  <pre>{% href #{@argument_string.strip} %}</pre>
27
27
  END_MESSAGE
28
- @logger.error { JekyllPluginHelper.remove_html_tags msg.strip }
28
+ @logger.error { JekyllSupport::JekyllPluginHelper.remove_html_tags msg.strip }
29
29
  "<div class='href_error'>HRefError: #{msg}</div>"
30
30
  end
31
31
 
data/lib/href_summary.rb CHANGED
@@ -1,4 +1,4 @@
1
- module MSlinn
1
+ module JekyllSupport
2
2
  class HRefTag
3
3
  private
4
4
 
@@ -2,10 +2,8 @@ require 'jekyll_plugin_logger'
2
2
  require 'jekyll_plugin_support'
3
3
  require_relative 'jekyll_href/version'
4
4
 
5
- module MSlinn
6
- class HrefSummary < JekyllSupport::JekyllTag
7
- include JekyllHrefVersion
8
-
5
+ module JekyllSupport
6
+ class HrefSummary < JekyllTag
9
7
  # Class instance variables accumulate hrefs across invocations.
10
8
  # These are hashes of arrays;
11
9
  # the hash keys are page paths (strings) and the hash values are arrays of HRefTags.
@@ -85,6 +83,6 @@ module MSlinn
85
83
  END_RENDER
86
84
  end
87
85
 
88
- JekyllPluginHelper.register(self, 'href_summary')
86
+ JekyllSupport::JekyllPluginHelper.register(self, 'href_summary')
89
87
  end
90
88
  end
data/lib/href_tag.rb CHANGED
@@ -11,13 +11,13 @@ require_relative 'hash_array'
11
11
  # @license SPDX-License-Identifier: Apache-2.0
12
12
  # Generates an href.
13
13
 
14
- module MSlinn
14
+ module JekyllSupport
15
15
  MiniHref = Struct.new(:follow, :html, :link, :line_number, :link_save, :path, :summary_exclude, :summary_href, keyword_init: true)
16
16
 
17
17
  HRefError = JekyllSupport.define_error
18
18
 
19
19
  # Implements href Jekyll tag
20
- class HRefTag < JekyllSupport::JekyllTag
20
+ class HRefTag < JekyllTag
21
21
  attr_reader :follow, :helper, :line_number, :link_save, :match, :page, :path, :site,
22
22
  :summary, :summary_exclude, :summary_href, :target, :text, :url
23
23
  attr_accessor :link
@@ -47,14 +47,15 @@ module MSlinn
47
47
  @helper_save = @helper.clone
48
48
  globals_update(@helper.argv, linkk) # Sets @link and @text, might clear @follow and @target
49
49
  handle_match(@link) if @match
50
- raise HrefError, "@link_type was not set" if @link_type == LinkType::UNKNOWN
50
+ raise HrefError, '@link_type was not set' if @link_type == LinkType::UNKNOWN
51
51
 
52
52
  save_summary
53
53
  klass = " class='#{@klass}'" if @klass
54
54
  style = " style='#{@style}'" if @style
55
55
  "<a href='#{@link}'#{klass}#{style}#{@target}#{@follow}>#{@text}</a>"
56
56
  rescue HRefError => e # jekyll_plugin_support handles StandardError
57
- msg = format_error_message "#{e.message}\n<pre> {% href #{@argument_string.strip} %}</pre>"
57
+ msg = format_error_message e.message
58
+ msg = "#{msg}\n<pre> {% href #{@argument_string.strip} %}</pre>"
58
59
  @text = "<div class='href_error'>#{msg}</div>"
59
60
  e.shorten_backtrace
60
61
  @logger.error "#{e.class} raised #{msg}"
@@ -68,7 +69,7 @@ module MSlinn
68
69
  "On line #{line_number} of #{path}: #{follow} #{match} #{target} #{link} => '#{text}'"
69
70
  end
70
71
 
71
- JekyllPluginHelper.register(self, 'href')
72
+ JekyllSupport::JekyllPluginHelper.register(self, 'href')
72
73
  end
73
74
  end
74
75
 
@@ -1,3 +1,3 @@
1
1
  module JekyllHrefVersion
2
- VERSION = '1.2.9'.freeze
2
+ VERSION = '1.2.11'.freeze
3
3
  end
data/lib/jekyll_href.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  require_relative 'href_tag'
2
2
  require_relative 'href_summary_tag'
3
3
 
4
- HrefError = Class.new Liquid::Error
5
-
6
- module JekyllHrefModule
7
- include MSlinn
4
+ module JekyllSupport
8
5
  end
@@ -1,29 +1,15 @@
1
1
  example_id | status | run_time |
2
2
  ----------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/hash_array_spec.rb[1:1] | passed | 0.17104 seconds |
4
- ./spec/href_spec.rb[1:1] | passed | 0.03236 seconds |
5
- ./spec/href_spec.rb[1:2] | passed | 0.02884 seconds |
6
- ./spec/href_spec.rb[1:3] | passed | 0.02956 seconds |
7
- ./spec/href_spec.rb[1:4] | passed | 0.02841 seconds |
8
- ./spec/href_spec.rb[1:5] | passed | 0.02897 seconds |
9
- ./spec/href_spec.rb[1:6] | passed | 0.02866 seconds |
10
- ./spec/href_spec.rb[1:7] | passed | 0.02966 seconds |
11
- ./spec/href_spec.rb[1:8] | passed | 0.02983 seconds |
12
- ./spec/href_spec.rb[1:9] | passed | 0.02735 seconds |
13
- ./spec/href_spec.rb[1:10] | passed | 0.02928 seconds |
14
- ./spec/href_spec.rb[1:11] | passed | 0.02861 seconds |
15
- ./spec/href_spec.rb[1:12] | passed | 0.02958 seconds |
16
- ./spec/href_spec.rb[1:13] | passed | 0.02714 seconds |
17
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:1] | passed | 0.02582 seconds |
18
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:2] | passed | 0.01031 seconds |
19
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:3] | passed | 0.01045 seconds |
20
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:4] | passed | 0.01038 seconds |
21
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:5] | passed | 0.01081 seconds |
22
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:6] | passed | 0.01053 seconds |
23
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:7] | passed | 0.01125 seconds |
24
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:8] | passed | 0.01113 seconds |
25
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:9] | passed | 0.01088 seconds |
26
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:10] | passed | 0.01066 seconds |
27
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:11] | failed | 0.06099 seconds |
28
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:12] | passed | 0.01096 seconds |
29
- /mnt/_/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:13] | passed | 0.01028 seconds |
3
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:1] | passed | 0.00938 seconds |
4
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:2] | failed | 0.01389 seconds |
5
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:3] | failed | 0.00319 seconds |
6
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:4] | failed | 0.00211 seconds |
7
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:5] | failed | 0.00196 seconds |
8
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:6] | failed | 0.00205 seconds |
9
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:7] | passed | 0.00212 seconds |
10
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:8] | failed | 0.00209 seconds |
11
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:9] | failed | 0.0021 seconds |
12
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:10] | passed | 0.00278 seconds |
13
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:11] | passed | 0.00237 seconds |
14
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:12] | passed | 0.00218 seconds |
15
+ /mnt/f/work/jekyll/my_plugins/jekyll_href/spec/href_spec.rb[1:13] | passed | 0.00211 seconds |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_href
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-19 00:00:00.000000000 Z
11
+ date: 2024-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ipaddress
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.3
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.3
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jekyll_plugin_support
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.8.5
61
+ version: 1.0.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.8.5
68
+ version: 1.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: typesafe_enum
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.4.22
139
+ rubygems_version: 3.5.16
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Generates an 'a href' tag, possibly with target='_blank' and rel='nofollow'.