jekyll-scholar 7.2.0 → 7.2.2

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: 2a514c66d1cbe097d3d8837a024e5957ef136a03b54823915e6de74d4b7d395d
4
- data.tar.gz: 49430b47d8eacc48bf7b34ffad39ad813bfcb223acbeb38ab9f95b4493381f29
3
+ metadata.gz: 96c5b24c4df1aa7949bf11cf8210ea487f9b85ea4180f5145c190ee242e0277b
4
+ data.tar.gz: e4bcb6488ca468e0fb91c1e9b4a22c030355c85a537c12b4aa3f2993e7f78c7d
5
5
  SHA512:
6
- metadata.gz: d7219d317f46e6c14e49a3a1a90c674022944511c5f71aab5688a8d22d3e50bade5d0b81660fe3a26157035ac3d1b5fa1726361c299bc7717753539e95b3cb4a
7
- data.tar.gz: df23787617a54cd0275167ccc956482c086d9485db06fe6ce31e074711bbe7992b8182b4e7bf86ed665f839e010d4bd4aa1974a79a841637fdddc9e53d83275a
6
+ metadata.gz: 29268971571a049654b6c11d67b2162774a48bf98cac2c7671b99fb22b06f04e4df317007b798e36a6c8d2cb4123296e82880d225350c1e655dc5d1613904396
7
+ data.tar.gz: 5f44150f850146c225493f0cfb3f9b855d85cb14e6d1d495a9b6c1a0cea1bedd4228baa4fa6ee790cb4a45a880e0605f47f344eb151bac24bac0c6d895653be8
@@ -6,13 +6,12 @@ on:
6
6
  branches: [ main ]
7
7
  jobs:
8
8
  ci:
9
- name: ${{ matrix.ruby-version }} ${{ matrix.friendlyName }}-${{ matrix.arch }}
9
+ name: ${{ matrix.ruby-version }} ${{ matrix.friendlyName }}
10
10
  runs-on: ${{ matrix.os }}
11
11
 
12
12
  strategy:
13
13
  matrix:
14
14
  ruby-version:
15
- - "3.1"
16
15
  - "3.2"
17
16
  - "3.3"
18
17
  - "3.4"
@@ -20,8 +19,6 @@ jobs:
20
19
  - ubuntu-latest
21
20
  - macos-latest
22
21
  - windows-latest
23
- arch:
24
- - x64
25
22
  include:
26
23
  - os: ubuntu-latest
27
24
  friendlyName: Linux
@@ -32,7 +29,7 @@ jobs:
32
29
 
33
30
  steps:
34
31
  - name: Checkout repository
35
- uses: actions/checkout@v3
32
+ uses: actions/checkout@v5
36
33
  - name: Setup Ruby and install bundle
37
34
  uses: ruby/setup-ruby@v1
38
35
  with:
@@ -293,6 +293,34 @@ Feature: Citations
293
293
  And the "_site/scholar.html" file should exist
294
294
  And I should see "Matsumoto, 2008, pp. 2-3; Shaughnessy, 2013, pp. 23 & 42" in "_site/scholar.html"
295
295
 
296
+ @tags @cite @locator
297
+ Scenario: Citations with locators
298
+ Given I have a scholar configuration with:
299
+ | key | value |
300
+ | source | ./_bibliography |
301
+ | style | chicago-author-date |
302
+ | bibliography | my_references |
303
+ And I have a "_bibliography" directory
304
+ And I have a file "_bibliography/my_references.bib":
305
+ """
306
+ @book{ruby,
307
+ title = {The Ruby Programming Language},
308
+ author = {Flanagan, David and Matsumoto, Yukihiro},
309
+ year = {2008},
310
+ publisher = {O'Reilly Media}
311
+ }
312
+ """
313
+ And I have a page "scholar.html":
314
+ """
315
+ ---
316
+ ---
317
+ {% cite ruby -A --locator 284 %}
318
+ """
319
+ When I run jekyll
320
+ Then the _site directory should exist
321
+ And the "_site/scholar.html" file should exist
322
+ And I should see "(2008, p. 284)" in "_site/scholar.html"
323
+
296
324
  @tags @cite @locator @label
297
325
  Scenario: Citations with locator labels
298
326
  Given I have a scholar configuration with:
@@ -56,6 +56,11 @@ Feature: Grouping BibTeX Bibliographies
56
56
  year = {2007},
57
57
  publisher = {O'Reilly Media}
58
58
  }
59
+ @book{future,
60
+ title = {Future},
61
+ author = {Someone},
62
+ status = {forthcoming}
63
+ }
59
64
  """
60
65
  And I have a page "scholar.html":
61
66
  """
@@ -67,6 +72,8 @@ Feature: Grouping BibTeX Bibliographies
67
72
  Then the _site directory should exist
68
73
  And the "_site/scholar.html" file should exist
69
74
  Then "<h2 class=\"bibliography\">2007</h2>" should come before "<h2 class=\"bibliography\">2008</h2>" in "_site/scholar.html"
75
+ And "<h2 class=\"bibliography\"></h2>" should come before "<h2 class=\"bibliography\">2007</h2>" in "_site/scholar.html"
76
+ And I should see "(forthcoming)" in "_site/scholar.html"
70
77
 
71
78
  @tags @grouping
72
79
  Scenario: Reverse Group Order
@@ -23,9 +23,10 @@ Gem::Specification.new do |s|
23
23
  s.date = Time.now
24
24
 
25
25
  s.required_rubygems_version = '>= 1.3.6'
26
+ s.required_ruby_version = '>= 3.0'
26
27
 
27
28
  s.add_runtime_dependency('jekyll', '~> 4.0')
28
- s.add_runtime_dependency('citeproc-ruby', '~> 2.0')
29
+ s.add_runtime_dependency('citeproc-ruby', '>= 2.1.3')
29
30
  s.add_runtime_dependency('csl-styles', '~> 2.0')
30
31
  s.add_runtime_dependency('bibtex-ruby', '~> 6.0')
31
32
 
@@ -343,12 +343,17 @@ module Jekyll
343
343
  case key
344
344
  when 'type'
345
345
  type_aliases[item.type.to_s] || item.type.to_s
346
+ when 'year', 'date'
347
+ value = item[key]
348
+ if value&.date?
349
+ value.to_date
350
+ else
351
+ value.to_s
352
+ end
346
353
  else
347
354
  value = item[key]
348
355
  if value.numeric?
349
356
  value.to_i
350
- elsif value.date?
351
- value.to_date
352
357
  else
353
358
  value.to_s
354
359
  end
@@ -638,7 +643,7 @@ module Jekyll
638
643
  url_placeholders = {}
639
644
  entry.fields.each_pair do |k, v|
640
645
  value = v.to_s.dup
641
- value = Jekyll::Utils::slugify(value, :mode => 'pretty') unless k == :doi
646
+ value = Jekyll::Utils::slugify(value, :mode => 'pretty') unless k == :doi || value.empty?
642
647
  url_placeholders[k] = value
643
648
  end
644
649
  # Maintain the same URLs are previous versions of jekyll-scholar
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '7.2.0'.freeze
3
+ VERSION = '7.2.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 7.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-04 00:00:00.000000000 Z
10
+ date: 2025-11-03 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: jekyll
@@ -27,16 +27,16 @@ dependencies:
27
27
  name: citeproc-ruby
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - "~>"
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: 2.1.3
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '2.0'
39
+ version: 2.1.3
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: csl-styles
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -143,14 +143,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: '0'
146
+ version: '3.0'
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: 1.3.6
152
152
  requirements: []
153
- rubygems_version: 3.6.6
153
+ rubygems_version: 3.7.2
154
154
  specification_version: 4
155
155
  summary: Jekyll extensions for the academic blogger.
156
156
  test_files: