citeproc 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66ce4e398cb9a4ab393a5f4baf0bbb08b54b053c
4
- data.tar.gz: 222b8101e61b1aac744082a5155106cc15e49499
3
+ metadata.gz: 78ef5a51c4293349898a747075a3e904884843e1
4
+ data.tar.gz: 1f81ce6ed54bf27c657fd75ca0f4f1b737e7468f
5
5
  SHA512:
6
- metadata.gz: 07a7857820062116708c5f0716471016b065eafb460da34d07b8e401030fac0e5207e2b314a7cfbd1ca26caa53ccbf47ed7888d61831abb5454a13c80197d53a
7
- data.tar.gz: c67fcd016def1e8664b42651848549ab3fc2355e1945e5ac6f8e5c260a2c2db152057828729be5903fd60ffd1548f8ab149155adcefe32f6c7a7b98f9aadba33
6
+ metadata.gz: ab468c07a8248a0fc03d55bab26a5f20c96341f01a33ce5c971c1b604a24ba7e95c7945625ba35e8a79c1b28487adb6d1a9d4523054a2cbf43baf665a3e33936
7
+ data.tar.gz: f759c43e6235d3a52c5a14408909b8ad9f049cbb22391fba4efc2d3bff463d89c6e0b4849263d1f6a4be6614154fd7ef8e12ddc3e5c0aa9a28bd55f079381604
data/Gemfile CHANGED
@@ -19,11 +19,11 @@ group :optional do
19
19
  gem 'chronic', '~>0.10', :require => false
20
20
  gem 'edtf', '~>2.1'
21
21
 
22
- gem 'bibtex-ruby', '~>3.0', :require => 'bibtex'
22
+ gem 'bibtex-ruby', '~>4.0', :require => 'bibtex'
23
23
 
24
24
  gem 'guard', '~>2.2'
25
25
  gem 'guard-rspec', '~>4.2'
26
- gem 'guard-cucumber', '~>1.4'
26
+ gem 'guard-cucumber', '~>2.0'
27
27
 
28
28
  gem 'pry'
29
29
 
@@ -36,7 +36,7 @@ end
36
36
  group :development do
37
37
  gem 'rake'
38
38
  gem 'cucumber'
39
- gem 'rspec', '~>2.0'
39
+ gem 'rspec', '~>3.0'
40
40
  gem 'simplecov', '~>0.8', :require => false
41
41
  gem 'rubinius-coverage', :platform => :rbx
42
42
  gem 'coveralls', :require => false
data/README.md CHANGED
@@ -135,7 +135,7 @@ this project as part of [Google Summer of Code](https://developers.google.com/op
135
135
 
136
136
  Copyright
137
137
  ---------
138
- Copyright 2009-2014 Sylvester Keil. All rights reserved.
138
+ Copyright 2009-2016 Sylvester Keil. All rights reserved.
139
139
 
140
140
  Copyright 2012 President and Fellows of Harvard College.
141
141
 
@@ -1,3 +1,3 @@
1
1
  module CiteProc
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
@@ -19,7 +19,7 @@ module CiteProc
19
19
  o
20
20
  end
21
21
 
22
- it { should_not be_nil }
22
+ it { is_expected.not_to be_nil }
23
23
 
24
24
  describe '.attr_fields' do
25
25
 
@@ -4,8 +4,8 @@ module CiteProc
4
4
 
5
5
  describe Bibliography do
6
6
 
7
- it { should be_empty }
8
- it { should_not have_errors }
7
+ it { is_expected.to be_empty }
8
+ it { is_expected.not_to have_errors }
9
9
 
10
10
  describe '#to_citeproc conversion' do
11
11
 
@@ -21,8 +21,8 @@ module CiteProc
21
21
 
22
22
  describe CitationData do
23
23
 
24
- it { should_not be nil }
25
- it { should be_empty }
24
+ it { is_expected.not_to be nil }
25
+ it { is_expected.to be_empty }
26
26
 
27
27
  it 'has not been processed by default' do
28
28
  expect(CitationData.new).not_to be_processed
@@ -61,8 +61,8 @@ module CiteProc
61
61
 
62
62
  describe CitationItem do
63
63
 
64
- it { should_not be nil }
65
- it { should be_empty }
64
+ it { is_expected.not_to be nil }
65
+ it { is_expected.to be_empty }
66
66
 
67
67
  describe '.new' do
68
68
 
@@ -3,96 +3,94 @@ require 'spec_helper'
3
3
  module CiteProc
4
4
  describe Date do
5
5
 
6
- class Date
7
- describe DateParts do
8
- it { should_not be_nil }
9
- it { should be_empty }
10
-
11
- describe 'sorting' do
12
- it 'treats [2003] as less than [2003,1]' do
13
- expect(DateParts.new(2003)).to be < DateParts.new(2003,1)
14
- end
15
-
16
- it 'treats [1992,9,23] as less than [1993,8,22]' do
17
- expect(DateParts.new(1992,9,23)).to be < DateParts.new(1993,8,22)
18
- end
19
-
20
- it 'treats [1992,9,23] as less than [1992,10,22]' do
21
- expect(DateParts.new(1992,9,23)).to be < DateParts.new(1992,10,22)
22
- end
23
-
24
- it 'treats [1992,9,23] as less than [1992,9,24]' do
25
- expect(DateParts.new(1992,9,23)).to be < DateParts.new(1992,9,24)
26
- end
27
-
28
- it 'treats [-50] as less than [-25]' do
29
- expect(DateParts.new(-50)).to be < DateParts.new(-25)
30
- end
31
-
32
- it 'treats [-50] as less than [-50,12]' do
33
- expect(DateParts.new(-50)).to be < DateParts.new(-50,12)
34
- end
35
-
36
- it 'treats [1994,1,23] as less than today' do
37
- expect(DateParts.new(1994,1,23)).to be < ::Date.today
38
- end
6
+ describe Date::DateParts do
7
+ it { is_expected.not_to be_nil }
8
+ it { is_expected.to be_empty }
9
+
10
+ describe 'sorting' do
11
+ it 'treats [2003] as less than [2003,1]' do
12
+ expect(Date::DateParts.new(2003)).to be < Date::DateParts.new(2003,1)
13
+ end
14
+
15
+ it 'treats [1992,9,23] as less than [1993,8,22]' do
16
+ expect(Date::DateParts.new(1992,9,23)).to be < Date::DateParts.new(1993,8,22)
17
+ end
18
+
19
+ it 'treats [1992,9,23] as less than [1992,10,22]' do
20
+ expect(Date::DateParts.new(1992,9,23)).to be < Date::DateParts.new(1992,10,22)
21
+ end
22
+
23
+ it 'treats [1992,9,23] as less than [1992,9,24]' do
24
+ expect(Date::DateParts.new(1992,9,23)).to be < Date::DateParts.new(1992,9,24)
25
+ end
26
+
27
+ it 'treats [-50] as less than [-25]' do
28
+ expect(Date::DateParts.new(-50)).to be < Date::DateParts.new(-25)
29
+ end
30
+
31
+ it 'treats [-50] as less than [-50,12]' do
32
+ expect(Date::DateParts.new(-50)).to be < Date::DateParts.new(-50,12)
33
+ end
34
+
35
+ it 'treats [1994,1,23] as less than today' do
36
+ expect(Date::DateParts.new(1994,1,23)).to be < ::Date.today
39
37
  end
38
+ end
40
39
 
41
- describe '#dup' do
42
- let(:date) { DateParts.new(1991,8,22) }
40
+ describe '#dup' do
41
+ let(:date) { Date::DateParts.new(1991,8,22) }
43
42
 
44
- it 'creates a copy that contains the same parts' do
45
- expect(date.dup.to_a).to eq([1991,8,22])
46
- end
43
+ it 'creates a copy that contains the same parts' do
44
+ expect(date.dup.to_a).to eq([1991,8,22])
45
+ end
47
46
 
48
- it 'does not return self' do
49
- expect(date.dup).not_to equal(date)
50
- expect(date.dup).to eq(date)
51
- end
47
+ it 'does not return self' do
48
+ expect(date.dup).not_to equal(date)
49
+ expect(date.dup).to eq(date)
52
50
  end
51
+ end
53
52
 
54
- describe '#update' do
55
- it 'accepts a hash' do
56
- expect(DateParts.new.update(:month => 2, :year => 80).to_a).to eq([80,2,nil])
57
- end
53
+ describe '#update' do
54
+ it 'accepts a hash' do
55
+ expect(Date::DateParts.new.update(:month => 2, :year => 80).to_a).to eq([80,2,nil])
56
+ end
58
57
 
59
- it 'accepts an array' do
60
- expect(DateParts.new.update([80,2]).to_a).to eq([80,2,nil])
61
- end
58
+ it 'accepts an array' do
59
+ expect(Date::DateParts.new.update([80,2]).to_a).to eq([80,2,nil])
62
60
  end
61
+ end
63
62
 
64
- describe '#strftime' do
65
- it 'formats the date parts according to the format string' do
66
- expect(DateParts.new(1998,2,4).strftime('FOO %0m%0d%y')).to eq('FOO 020498')
67
- end
63
+ describe '#strftime' do
64
+ it 'formats the date parts according to the format string' do
65
+ expect(Date::DateParts.new(1998,2,4).strftime('FOO %0m%0d%y')).to eq('FOO 020498')
68
66
  end
67
+ end
69
68
 
70
- describe 'to_citeproc' do
71
- it 'returns an empty list by default' do
72
- expect(DateParts.new.to_citeproc).to eq([])
73
- end
69
+ describe 'to_citeproc' do
70
+ it 'returns an empty list by default' do
71
+ expect(Date::DateParts.new.to_citeproc).to eq([])
72
+ end
74
73
 
75
- it 'returns a list with the year if only the year is set' do
76
- expect(DateParts.new(2001).to_citeproc).to eq([2001])
77
- end
74
+ it 'returns a list with the year if only the year is set' do
75
+ expect(Date::DateParts.new(2001).to_citeproc).to eq([2001])
76
+ end
78
77
 
79
- it 'supports zero parts' do
80
- expect(DateParts.new(0,0).to_citeproc).to eq([0,0])
81
- end
78
+ it 'supports zero parts' do
79
+ expect(Date::DateParts.new(0,0).to_citeproc).to eq([0,0])
82
80
  end
81
+ end
83
82
 
84
- describe '#open?' do
85
- it 'returns false by default' do
86
- expect(DateParts.new).not_to be_open
87
- end
83
+ describe '#open?' do
84
+ it 'returns false by default' do
85
+ expect(Date::DateParts.new).not_to be_open
86
+ end
88
87
 
89
- it 'returns false for [1999,8,24]' do
90
- expect(DateParts.new(1999, 8, 24)).not_to be_open
91
- end
88
+ it 'returns false for [1999,8,24]' do
89
+ expect(Date::DateParts.new(1999, 8, 24)).not_to be_open
90
+ end
92
91
 
93
- it 'returns true for [0]' do
94
- expect(DateParts.new(0)).to be_open
95
- end
92
+ it 'returns true for [0]' do
93
+ expect(Date::DateParts.new(0)).to be_open
96
94
  end
97
95
  end
98
96
  end
@@ -107,9 +105,9 @@ module CiteProc
107
105
  let(:ad50) { Date.create('date-parts' => [[50]]) }
108
106
  let(:ad100) { Date.create('date-parts' => [[100]]) }
109
107
 
110
- it { should_not be nil }
108
+ it { is_expected.not_to be nil }
111
109
 
112
- it { should_not be_numeric }
110
+ it { is_expected.not_to be_numeric }
113
111
 
114
112
  describe '.new' do
115
113
  it 'accepts a hash as input' do
@@ -5,7 +5,7 @@ module CiteProc
5
5
 
6
6
 
7
7
  describe '.new' do
8
- it { should_not be nil }
8
+ it { is_expected.not_to be nil }
9
9
 
10
10
  it 'creates number variables for number fields' do
11
11
  expect(Item.new(:edition => 23).edition).to be_a(Number)
@@ -32,7 +32,7 @@ module CiteProc
32
32
  end
33
33
 
34
34
  describe '#empty' do
35
- it { should be_empty }
35
+ it { is_expected.to be_empty }
36
36
 
37
37
  it 'returns false when there is at least one variable in the item' do
38
38
  expect(Item.new(:title => 'foo')).not_to be_empty
@@ -70,7 +70,7 @@ module CiteProc
70
70
  describe Name do
71
71
 
72
72
 
73
- it { should_not be_nil }
73
+ it { is_expected.not_to be_nil }
74
74
 
75
75
  describe 'formatting options' do
76
76
 
@@ -452,8 +452,8 @@ module CiteProc
452
452
  Names.parse!('Erich Gamma and Richard Helm and Ralph Johnson and John Vlissides')
453
453
  }
454
454
 
455
- it { should_not be nil }
456
- it { should_not be_numeric }
455
+ it { is_expected.not_to be nil }
456
+ it { is_expected.not_to be_numeric }
457
457
 
458
458
  describe 'constructing' do
459
459
 
@@ -7,7 +7,7 @@ module CiteProc
7
7
  let(:palefire) { Item.new(:id => 'palefire', :type => :book, :title => 'Pale Fire') }
8
8
  let(:despair) { Item.new(:id => 'despair', :type => :book, :title => 'Despair') }
9
9
 
10
- it { should_not be nil }
10
+ it { is_expected.not_to be nil }
11
11
 
12
12
  it { expect(p.engine).not_to be nil }
13
13
  it { expect(p.engine.name).to eq('citeproc-ruby') }
@@ -6,8 +6,8 @@ module CiteProc
6
6
 
7
7
  let(:select_books) { Selector.new(:all => { :type => :book }) }
8
8
 
9
- it { should_not be nil }
10
- it { should be_empty }
9
+ it { is_expected.not_to be nil }
10
+ it { is_expected.to be_empty }
11
11
 
12
12
 
13
13
  it 'should have no skip_condtions by default' do
@@ -76,13 +76,13 @@ module CiteProc
76
76
 
77
77
  describe '#matches?' do
78
78
  it 'always matches by default' do
79
- expect(Selector.new.matches?(nil)).to be_true
79
+ expect(Selector.new.matches?(nil)).to be_truthy
80
80
  end
81
81
  end
82
82
 
83
83
  describe '#skip?' do
84
84
  it 'never skips when by default' do
85
- expect(Selector.new.skip?(nil)).to be_false
85
+ expect(Selector.new.skip?(nil)).to be_falsey
86
86
  end
87
87
  end
88
88
  end
@@ -4,7 +4,7 @@ module CiteProc
4
4
  describe Variable do
5
5
 
6
6
  describe '.new' do
7
- it { should be_an_instance_of(Variable) }
7
+ it { is_expected.to be_an_instance_of(Variable) }
8
8
 
9
9
  it 'is empty by default' do
10
10
  expect(Variable.new).to be_empty
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae
@@ -83,7 +83,7 @@ files:
83
83
  - tasks/testsuite.rb
84
84
  homepage: https://github.com/inukshuk/citeproc
85
85
  licenses:
86
- - AGPL
86
+ - AGPL-3.0
87
87
  metadata: {}
88
88
  post_install_message:
89
89
  rdoc_options: []
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.4.5
104
+ rubygems_version: 2.5.1
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: A cite processor interface.