bibtex-ruby 4.4.0 → 4.4.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 +4 -4
- data/lib/bibtex/names.rb +4 -2
- data/lib/bibtex/value.rb +7 -1
- data/lib/bibtex/version.rb +1 -1
- data/test/bibtex/test_entry.rb +8 -0
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef0a26aaf978f4cd99e6037f0a73b1073e706016
|
|
4
|
+
data.tar.gz: 51a86aeaf5c95f2ef69bd48d8084b8899de34d0e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c44d89d352432f5b533394fb5146757c53c6914042b5036faf31108049f399544c0938bdce30473671085cbe231fd7595ab50a6ae323385fcbe1a5ba4764d4f0
|
|
7
|
+
data.tar.gz: 2e1efd30bc5da4133154dbe4099c2f55b01344beea48305d5ac4dade97af7a87c128faf0d86aeeb80da67eb27f9b8dbe06729dcc656b72298c548c735e519921
|
data/lib/bibtex/names.rb
CHANGED
|
@@ -145,8 +145,10 @@ module BibTeX
|
|
|
145
145
|
set(attributes)
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
def
|
|
149
|
-
each_pair
|
|
148
|
+
def initialize_copy(other)
|
|
149
|
+
other.each_pair do |k,v|
|
|
150
|
+
self[k] = v.dup unless v.nil?
|
|
151
|
+
end
|
|
150
152
|
end
|
|
151
153
|
|
|
152
154
|
# Set the name tokens to the values defined in the passed-in hash.
|
data/lib/bibtex/value.rb
CHANGED
|
@@ -78,7 +78,13 @@ module BibTeX
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
def initialize_copy(other)
|
|
81
|
-
@tokens = other.tokens.
|
|
81
|
+
@tokens = other.tokens.map do |token|
|
|
82
|
+
case
|
|
83
|
+
when token.nil? then nil
|
|
84
|
+
when token.is_a?(Symbol) then token
|
|
85
|
+
else token.dup
|
|
86
|
+
end
|
|
87
|
+
end
|
|
82
88
|
end
|
|
83
89
|
|
|
84
90
|
def merge(other)
|
data/lib/bibtex/version.rb
CHANGED
data/test/bibtex/test_entry.rb
CHANGED
|
@@ -413,8 +413,16 @@ module BibTeX
|
|
|
413
413
|
it 'does not change the original entry' do
|
|
414
414
|
e = @entry.convert(:latex)
|
|
415
415
|
e.wont_be :==, @entry
|
|
416
|
+
e.title.to_s.wont_be :==, @entry.title.to_s
|
|
416
417
|
e.title.to_s.length.must_be :<, @entry.title.to_s.length
|
|
417
418
|
end
|
|
419
|
+
|
|
420
|
+
it 'does not change the author of a parsed entry' do
|
|
421
|
+
entry = BibTeX.parse('@book{o, author = {M\\"{o}by Dick}}')[0]
|
|
422
|
+
e = entry.convert(:latex)
|
|
423
|
+
e.wont_be :==, entry
|
|
424
|
+
e.author.to_s.length.must_be :<, entry.author.to_s.length
|
|
425
|
+
end
|
|
418
426
|
end
|
|
419
427
|
|
|
420
428
|
describe '#convert!' do
|
metadata
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bibtex-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.4.
|
|
4
|
+
version: 4.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sylvester Keil
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: latex-decode
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - ~>
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0.0'
|
|
27
27
|
description: |
|
|
@@ -135,33 +135,33 @@ require_paths:
|
|
|
135
135
|
- lib
|
|
136
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
|
-
- -
|
|
138
|
+
- - ">="
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
140
|
version: '0'
|
|
141
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
|
-
- -
|
|
143
|
+
- - ">="
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
145
|
version: '0'
|
|
146
146
|
requirements: []
|
|
147
147
|
rubyforge_project:
|
|
148
|
-
rubygems_version: 2.
|
|
148
|
+
rubygems_version: 2.6.3
|
|
149
149
|
signing_key:
|
|
150
150
|
specification_version: 4
|
|
151
151
|
summary: A BibTeX parser, converter and API for Ruby.
|
|
152
152
|
test_files:
|
|
153
|
-
- test/bibtex/
|
|
154
|
-
- test/bibtex/test_bibliography.rb
|
|
155
|
-
- test/bibtex/test_elements.rb
|
|
156
|
-
- test/bibtex/test_entry.rb
|
|
157
|
-
- test/bibtex/test_filters.rb
|
|
153
|
+
- test/bibtex/test_value.rb
|
|
158
154
|
- test/bibtex/test_lexer.rb
|
|
159
|
-
- test/bibtex/test_name_parser.rb
|
|
160
155
|
- test/bibtex/test_names.rb
|
|
161
156
|
- test/bibtex/test_parser.rb
|
|
162
|
-
- test/bibtex/
|
|
157
|
+
- test/bibtex/test_bibliography.rb
|
|
158
|
+
- test/bibtex/test_filters.rb
|
|
163
159
|
- test/bibtex/test_utilities.rb
|
|
164
|
-
- test/bibtex/
|
|
160
|
+
- test/bibtex/test_string.rb
|
|
161
|
+
- test/bibtex/test_entry.rb
|
|
162
|
+
- test/bibtex/test_name_parser.rb
|
|
163
|
+
- test/bibtex/test_elements.rb
|
|
164
|
+
- test/bibtex/entry/test_rdf_converter.rb
|
|
165
165
|
- test/test_bibtex.rb
|
|
166
166
|
- test/test_export.rb
|
|
167
167
|
has_rdoc: yard
|