arclight 1.6.0 → 1.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cd8f058f35bd06c7a9b48e896a1bd0dda684053f66e166acef680239a7dc9c2
4
- data.tar.gz: 50ce68e81160c39e5e4a1d3ac0ca02b78f390c26749adbb3952b03148561d45c
3
+ metadata.gz: 0f13bc74d37d6281e90bf79c295f073e46aa4de947dc07f6da865d2e32e41254
4
+ data.tar.gz: 93cda2083eeda622d16386a9e4f638a8c4401429d31232da6c774cfb2e53d652
5
5
  SHA512:
6
- metadata.gz: dc195863cc6736a3b345b3837bca5d9018fafde5bdf79bacc3ac27ba9ddf42dc10c76421898caaa6e6867b350e2e1c01593ce6df7a797d8eadbb230387355300
7
- data.tar.gz: fd096b631c537e8846f207500c548da2a552b94910f5bd69ce733f0c986509d122e1282755693bab34d28acada6042f8280ec4dfd69b5af8a7f0899f1c889233
6
+ metadata.gz: 8e380ef67a9684f47038c0b71a309ecbb9969fd754e2fb03b47ffd3f5c44649a8629db2d92a6b84e9d82a733a5f4d1d326f1c02928a7bc281d1411edecd5b107
7
+ data.tar.gz: c7634c62d9b3c2de19f1d1a0e010fc80fd67c1cf873f392a5020ea97540910aee178b8e214e9f43627a7649a2f4c1cb584cc1000f96042175dc982af2ff73f44
@@ -12,12 +12,8 @@ module Arclight
12
12
  end
13
13
 
14
14
  def call
15
- breadcrumb_links = components.drop(@offset)
15
+ return unless breadcrumb_links.any?
16
16
 
17
- if @count && breadcrumb_links.length > @count
18
- breadcrumb_links = breadcrumb_links.first(@count)
19
- breadcrumb_links << tag.li('&hellip;'.html_safe, class: 'breadcrumb-item')
20
- end
21
17
  tag.ol class: 'breadcrumb' do
22
18
  safe_join(breadcrumb_links)
23
19
  end
@@ -36,5 +32,19 @@ module Arclight
36
32
  def build_repository_link
37
33
  render Arclight::RepositoryBreadcrumbComponent.new(document: @document)
38
34
  end
35
+
36
+ private
37
+
38
+ def breadcrumb_links
39
+ @breadcrumb_links ||= limit_breadcrumb_links(components.drop(@offset))
40
+ end
41
+
42
+ def limit_breadcrumb_links(links)
43
+ return links unless @count && links.length > @count
44
+
45
+ limited_links = links.first(@count)
46
+ limited_links << tag.li('&hellip;'.html_safe, class: 'breadcrumb-item')
47
+ limited_links
48
+ end
39
49
  end
40
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arclight
4
- VERSION = '1.6.0'
4
+ VERSION = '1.6.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Hardy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2025-06-09 00:00:00.000000000 Z
14
+ date: 2025-08-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight