citeproc 1.0.9 → 1.1.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/workflows/ci.yml +33 -0
- data/BSDL +1 -1
- data/Gemfile +4 -5
- data/README.md +2 -15
- data/lib/citeproc/assets.rb +3 -3
- data/lib/citeproc/bibliography.rb +2 -2
- data/lib/citeproc/citation_data.rb +3 -3
- data/lib/citeproc/engine.rb +2 -2
- data/lib/citeproc/item.rb +4 -4
- data/lib/citeproc/names.rb +3 -3
- data/lib/citeproc/version.rb +1 -1
- metadata +78 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db40316ba1ffbee282afc7c803b98fc2205c4687f2ccfad319661ce8bccacbaa
|
4
|
+
data.tar.gz: 0c95ef58ae66fb9101dce5e91d70b760ed93dc6aa15a1ce18356af1b38c9a2af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2db1938d6f1f5b8248f5e9f97d1c242055a695cd2dea7b26f96cfe8b7bdca30eed1e21fe9630adc96b2f22920c117cacf8255dfb18de10e034e80745c084f157
|
7
|
+
data.tar.gz: 339dea1c644ca79ca5379d2094b4f08f1fa41058053f511fd0e52b072349a880a3b8721e2ed82498b50ded6f74b57eff42eebc6a77e2cb70dbd9f2643870a601
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
branches:
|
8
|
+
- master
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
env:
|
13
|
+
BUNDLE_WITHOUT: debug:extra
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby-version:
|
17
|
+
- '3.4'
|
18
|
+
- '3.3'
|
19
|
+
- '3.2'
|
20
|
+
- '3.1'
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v4
|
23
|
+
- uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
bundler-cache: true
|
27
|
+
- run: bundle exec rake
|
28
|
+
- name: Upload coverage results
|
29
|
+
if: matrix.ruby-version == '3.3'
|
30
|
+
continue-on-error: true
|
31
|
+
uses: coverallsapp/github-action@v2
|
32
|
+
with:
|
33
|
+
github-token: ${{ github.token }}
|
data/BSDL
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Copyright 2012 President and Fellows of Harvard College.
|
2
|
-
Copyright 2009-
|
2
|
+
Copyright 2009-2020 Sylvester Keil. All rights reserved.
|
3
3
|
|
4
4
|
Redistribution and use in source and binary forms, with or without
|
5
5
|
modification, are permitted provided that the following conditions are met:
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
group :debug do
|
5
|
-
gem '
|
5
|
+
gem 'debug', '>= 1.0.0', require: false, platforms: :mri
|
6
6
|
gem 'ruby-debug', require: false, platforms: :jruby
|
7
7
|
end
|
8
8
|
|
@@ -11,8 +11,7 @@ group :optional do
|
|
11
11
|
gem 'chronic', require: false
|
12
12
|
gem 'edtf'
|
13
13
|
gem 'bibtex-ruby', require: 'bibtex'
|
14
|
-
gem '
|
15
|
-
gem 'citeproc-ruby', github: 'inukshuk/citeproc-ruby'
|
14
|
+
gem 'citeproc-ruby' #, github: 'inukshuk/citeproc-ruby'
|
16
15
|
#gem 'csl', github: 'inukshuk/csl-ruby'
|
17
16
|
end
|
18
17
|
|
@@ -21,12 +20,12 @@ group :development do
|
|
21
20
|
gem 'cucumber'
|
22
21
|
gem 'rspec'
|
23
22
|
gem 'unicode_utils', require: false unless RUBY_VERSION >= '2.4'
|
24
|
-
gem 'csl-styles', '~>
|
23
|
+
gem 'csl-styles', '~>2.0', require: false
|
25
24
|
end
|
26
25
|
|
27
26
|
group :coverage do
|
28
27
|
gem 'simplecov', require: false
|
29
|
-
gem '
|
28
|
+
gem 'simplecov-lcov', require: false
|
30
29
|
end
|
31
30
|
|
32
31
|
group :extra do
|
data/README.md
CHANGED
@@ -3,20 +3,7 @@ CiteProc
|
|
3
3
|
CiteProc is a cite processor interface and citation data API based on the
|
4
4
|
Citation Style Language (CSL) specifications. To actually process citations
|
5
5
|
a dedicated processor engine is required; a pure Ruby engine is available
|
6
|
-
in the [citeproc-ruby](https://rubygems/gems/citeproc-ruby) gem.
|
7
|
-
|
8
|
-
|
9
|
-
[](http://travis-ci.org/inukshuk/citeproc)
|
10
|
-
[](https://coveralls.io/r/inukshuk/citeproc?branch=master)
|
11
|
-
[](https://gemnasium.com/inukshuk/citeproc)
|
12
|
-
|
13
|
-
[](http://travis-ci.org/inukshuk/citeproc-ruby)
|
14
|
-
[](https://coveralls.io/r/inukshuk/citeproc-ruby?branch=master)
|
15
|
-
[](https://gemnasium.com/inukshuk/citeproc-ruby)
|
16
|
-
|
17
|
-
[](http://travis-ci.org/inukshuk/csl-ruby)
|
18
|
-
[](https://coveralls.io/r/inukshuk/csl-ruby?branch=master)
|
19
|
-
[](https://gemnasium.com/inukshuk/csl-ruby)
|
6
|
+
in the [citeproc-ruby](https://rubygems.org/gems/citeproc-ruby) gem.
|
20
7
|
|
21
8
|
Quickstart
|
22
9
|
----------
|
@@ -135,7 +122,7 @@ this project as part of [Google Summer of Code](https://developers.google.com/op
|
|
135
122
|
|
136
123
|
Copyright
|
137
124
|
---------
|
138
|
-
Copyright 2009-
|
125
|
+
Copyright 2009-2025 Sylvester Keil. All rights reserved.
|
139
126
|
|
140
127
|
Copyright 2012 President and Fellows of Harvard College.
|
141
128
|
|
data/lib/citeproc/assets.rb
CHANGED
@@ -22,11 +22,11 @@ module CiteProc
|
|
22
22
|
@asset = input.to_s.dup
|
23
23
|
else
|
24
24
|
case
|
25
|
-
when File.
|
25
|
+
when File.exist?(input)
|
26
26
|
@location = input
|
27
|
-
when File.
|
27
|
+
when File.exist?(self.class.extend_name(input))
|
28
28
|
@location = self.class.extend_name(input)
|
29
|
-
when File.
|
29
|
+
when File.exist?(self.class.extend_path(input))
|
30
30
|
@location = self.class.extend_path(input)
|
31
31
|
else
|
32
32
|
@location = input
|
@@ -169,12 +169,12 @@ module CiteProc
|
|
169
169
|
|
170
170
|
alias update merge
|
171
171
|
|
172
|
-
def each
|
172
|
+
def each(&block)
|
173
173
|
if block_given?
|
174
174
|
if sorted?
|
175
|
-
sorted_items.each(&
|
175
|
+
sorted_items.each(&block)
|
176
176
|
else
|
177
|
-
items.each(&
|
177
|
+
items.each(&block)
|
178
178
|
end
|
179
179
|
|
180
180
|
self
|
data/lib/citeproc/engine.rb
CHANGED
@@ -35,9 +35,9 @@ module CiteProc
|
|
35
35
|
end
|
36
36
|
|
37
37
|
# Loads the engine with the given name and returns the engine class.
|
38
|
-
def detect!(name)
|
38
|
+
def detect!(name, &block)
|
39
39
|
load(name)
|
40
|
-
block_given? ? detect(name, &
|
40
|
+
block_given? ? detect(name, &block) : detect(name)
|
41
41
|
end
|
42
42
|
|
43
43
|
# Returns the best available engine class or nil.
|
data/lib/citeproc/item.rb
CHANGED
@@ -165,9 +165,9 @@ module CiteProc
|
|
165
165
|
# @yieldparam field [Symbol] the field name
|
166
166
|
# @yieldparam value [Variable] the value
|
167
167
|
# @return [self,Enumerator] the item or an enumerator if no block is given
|
168
|
-
def each
|
168
|
+
def each(&block)
|
169
169
|
if block_given?
|
170
|
-
attributes.each_pair(&
|
170
|
+
attributes.each_pair(&block)
|
171
171
|
self
|
172
172
|
else
|
173
173
|
to_enum
|
@@ -188,9 +188,9 @@ module CiteProc
|
|
188
188
|
#
|
189
189
|
# @yieldparam value [Variable] the value
|
190
190
|
# @return [self,Enumerator] the item or an enumerator if no block is given
|
191
|
-
def each_value
|
191
|
+
def each_value(&block)
|
192
192
|
if block_given?
|
193
|
-
attributes.each_value(&
|
193
|
+
attributes.each_value(&block)
|
194
194
|
self
|
195
195
|
else
|
196
196
|
enum_for :each_value
|
data/lib/citeproc/names.rb
CHANGED
@@ -152,7 +152,7 @@ module CiteProc
|
|
152
152
|
#
|
153
153
|
# @return [Boolean] whether or not the name is romanesque
|
154
154
|
def romanesque?
|
155
|
-
!!([given, family].join.gsub(Variable.markup, '') =~ Name.romanesque)
|
155
|
+
!!([given&.unicode_normalize(:nfc), family&.unicode_normalize(:nfc)].join.gsub(Variable.markup, '') =~ Name.romanesque)
|
156
156
|
end
|
157
157
|
|
158
158
|
alias byzantine? romanesque?
|
@@ -689,9 +689,9 @@ module CiteProc
|
|
689
689
|
#
|
690
690
|
# @yieldparam name [Name] a name in the list
|
691
691
|
# @return [self,Enumerator] self or an enumerator if no block is given
|
692
|
-
def each
|
692
|
+
def each(&block)
|
693
693
|
if block_given?
|
694
|
-
names.each(&
|
694
|
+
names.each(&block)
|
695
695
|
self
|
696
696
|
else
|
697
697
|
to_enum
|
data/lib/citeproc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citeproc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|
@@ -24,6 +24,76 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: date
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: forwardable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: observer
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "<"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: open-uri
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "<"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "<"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.0'
|
27
97
|
description: A cite processor interface for Citation Style Language (CSL) styles.
|
28
98
|
email:
|
29
99
|
- sylvester@keil.or.at
|
@@ -32,6 +102,7 @@ extensions: []
|
|
32
102
|
extra_rdoc_files: []
|
33
103
|
files:
|
34
104
|
- ".document"
|
105
|
+
- ".github/workflows/ci.yml"
|
35
106
|
- ".yardopts"
|
36
107
|
- AGPL
|
37
108
|
- BSDL
|
@@ -59,9 +130,9 @@ files:
|
|
59
130
|
- lib/citeproc/version.rb
|
60
131
|
homepage: https://github.com/inukshuk/citeproc
|
61
132
|
licenses:
|
62
|
-
-
|
133
|
+
- BSD-2-Clause
|
63
134
|
metadata: {}
|
64
|
-
post_install_message:
|
135
|
+
post_install_message:
|
65
136
|
rdoc_options: []
|
66
137
|
require_paths:
|
67
138
|
- lib
|
@@ -76,9 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
147
|
- !ruby/object:Gem::Version
|
77
148
|
version: '0'
|
78
149
|
requirements: []
|
79
|
-
|
80
|
-
|
81
|
-
signing_key:
|
150
|
+
rubygems_version: 3.5.6
|
151
|
+
signing_key:
|
82
152
|
specification_version: 4
|
83
153
|
summary: A cite processor interface.
|
84
154
|
test_files: []
|