csl 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -8
- data/Rakefile +7 -3
- data/lib/csl/style/names.rb +9 -9
- data/lib/csl/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0713aebef8b4b19124d4c66d1e676fcad67f00f6
|
4
|
+
data.tar.gz: cdf39965329842bca3883f1990f5e274af212576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dec7d5d77b9b9e480cf8bb7adcc626054a8702cfb4733a1fb084dd00f09e5acaf141b71da301f21021bf5c0667afc6479f101a39b7a7bd3c8dcff7f9f138f7e9
|
7
|
+
data.tar.gz: e59701c6f0016b4610429df1a4c17edc201dad11efd416c92134e6f22a23abd55d62a58cd5fd25b9987644f93012b331229562dbf0e0968532f206d7577b6e25
|
data/Gemfile
CHANGED
@@ -5,9 +5,6 @@ group :development, :test do
|
|
5
5
|
gem 'rake', '~>10.0'
|
6
6
|
gem 'rspec', '~>3.0'
|
7
7
|
gem 'cucumber', '~>1.2'
|
8
|
-
gem 'simplecov', '~>0.8', :require => false
|
9
|
-
gem 'rubinius-coverage', :platform => :rbx
|
10
|
-
gem 'coveralls', :require => false
|
11
8
|
end
|
12
9
|
|
13
10
|
group :debug do
|
@@ -39,12 +36,16 @@ group :extra do
|
|
39
36
|
gem 'redcarpet', '~>3.0', :platforms => :mri
|
40
37
|
end
|
41
38
|
|
39
|
+
group :coverage do
|
40
|
+
gem 'coveralls', :require => false
|
41
|
+
gem 'simplecov', '~>0.8', :require => false
|
42
|
+
gem 'rubinius-coverage', :platform => :rbx
|
43
|
+
end
|
44
|
+
|
42
45
|
group :rbx do
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
gem 'racc'
|
47
|
-
end
|
46
|
+
gem 'rubysl', '~>2.0', :platforms => :rbx
|
47
|
+
gem 'racc', :platforms => :rbx
|
48
|
+
gem 'json', '~>1.8', :platforms => :rbx
|
48
49
|
end
|
49
50
|
|
50
51
|
# vim: syntax=ruby
|
data/Rakefile
CHANGED
@@ -34,9 +34,13 @@ Cucumber::Rake::Task.new(:cucumber) do |t|
|
|
34
34
|
t.profile = 'default'
|
35
35
|
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
begin
|
38
|
+
require 'coveralls/rake/task'
|
39
|
+
Coveralls::RakeTask.new
|
40
|
+
task :test_with_coveralls => [:spec, :cucumber, 'coveralls:push']
|
41
|
+
rescue LoadError => e
|
42
|
+
# ignore
|
43
|
+
end
|
40
44
|
|
41
45
|
task :release do |t|
|
42
46
|
system "gem build csl.gemspec"
|
data/lib/csl/style/names.rb
CHANGED
@@ -88,32 +88,32 @@ module CSL
|
|
88
88
|
def truncate?(names, subsequent = false)
|
89
89
|
names = names.length if names.respond_to?(:length)
|
90
90
|
limit = truncate_when(subsequent)
|
91
|
+
count = truncate_at(subsequent)
|
91
92
|
|
92
|
-
!limit.
|
93
|
+
!count.nil? && !limit.nil? && names.to_i >= limit.to_i
|
93
94
|
end
|
94
95
|
|
95
96
|
# @param [Enumerable] names
|
96
97
|
# @return [Array] the truncated list of names
|
97
98
|
def truncate(names, subsequent = false)
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
names.take limit
|
99
|
+
count = truncate_at(subsequent)
|
100
|
+
count = names.length if count.nil?
|
101
|
+
names.take count.to_i
|
102
102
|
end
|
103
103
|
|
104
104
|
def truncate_when(subsequent = false)
|
105
105
|
if subsequent && attribute?(:'et-al-subsequent-min')
|
106
|
-
attributes[:'et-al-subsequent-min']
|
106
|
+
attributes[:'et-al-subsequent-min']
|
107
107
|
else
|
108
|
-
attributes[:'et-al-min']
|
108
|
+
attributes[:'et-al-min']
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
112
|
def truncate_at(subsequent = false)
|
113
113
|
if subsequent && attribute?(:'et-al-subsequent-use-first')
|
114
|
-
attributes.fetch(:'et-al-subsequent-use-first'
|
114
|
+
attributes.fetch(:'et-al-subsequent-use-first')
|
115
115
|
else
|
116
|
-
attributes.fetch(:'et-al-use-first'
|
116
|
+
attributes.fetch(:'et-al-use-first')
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
data/lib/csl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
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-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.6.3
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: A Ruby CSL parser and library
|
@@ -182,4 +182,3 @@ test_files:
|
|
182
182
|
- spec/fixtures/locales/locales-en-US.xml
|
183
183
|
- spec/fixtures/styles/apa.csl
|
184
184
|
- spec/spec_helper.rb
|
185
|
-
has_rdoc: yard
|