citeproc 1.0.8 → 1.0.9

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
- SHA1:
3
- metadata.gz: cf4d8a6186f5ddd346d49c1af523c4c98d42f817
4
- data.tar.gz: 63ea3ff389fc935b0c2ec339e28c77dcdbc90d73
2
+ SHA256:
3
+ metadata.gz: 20a2ab14fd3b94de5314f42db4bd136c846439ec469536c1f81eff599d47773f
4
+ data.tar.gz: b6a2ddded0041d6ae7ca23f93de114adad73398a277905f6e0b4c9699c2c3d90
5
5
  SHA512:
6
- metadata.gz: fb7d96ea9e9bd12dc4579c80c0baa8881349857e24ff3a65c47566cab2a9d19794de68c5a13cac63f86ade49544d3b3f88caf8e29b373b8855e9f3ac7f17401b
7
- data.tar.gz: 2408ad6fe369a0ab086b0b27dbb609d9070292732d3803d6f8052df065b92bcfe50ed10112f45be4013e5c8f0a3a997f836a58aa256cbf65af2dc9cefd4cd93e
6
+ metadata.gz: 54b1fd589e6d2c789857b0a62587998b5545a4fb81f22ef3b31e85c688f4320ade9c883414858fa12cf7b57352970ddf8135792964bdd626e07332ed2cfdf955
7
+ data.tar.gz: 7b7252e7a1a0687f0921e8d3b3570f9d7977a170ab2942c4646f0781344840d32520f251aa54fb42bd36bdd84f3d32cd4ddcd6a41895f8ec64d0fc0d03fadef1
data/Gemfile CHANGED
@@ -20,6 +20,7 @@ group :development do
20
20
  gem 'rake'
21
21
  gem 'cucumber'
22
22
  gem 'rspec'
23
+ gem 'unicode_utils', require: false unless RUBY_VERSION >= '2.4'
23
24
  gem 'csl-styles', '~>1.0.1', require: false
24
25
  end
25
26
 
@@ -10,7 +10,6 @@ if RUBY_PLATFORM =~ /java/i
10
10
  puts java.lang.System.getProperty('file.encoding')
11
11
 
12
12
  module CiteProc
13
-
14
13
  def upcase(string)
15
14
  java.lang.String.new(string).to_upper_case(java.util.Locale::ENGLISH).to_s
16
15
  end
@@ -23,7 +22,7 @@ if RUBY_PLATFORM =~ /java/i
23
22
  else
24
23
 
25
24
  module CiteProc
26
- if RUBY_VERSION >= '2.3'
25
+ if RUBY_VERSION >= '2.4'
27
26
  def upcase(string)
28
27
  string.upcase
29
28
  end
@@ -32,48 +31,28 @@ else
32
31
  string.downcase
33
32
  end
34
33
  else
34
+ # Ruby 2.3 and older require extra Gems
35
35
  begin
36
- require 'unicode'
37
-
36
+ require 'unicode_utils'
38
37
  def upcase(string)
39
- Unicode.upcase(string)
38
+ UnicodeUtils.upcase(string)
40
39
  end
41
40
 
42
41
  def downcase(string)
43
- Unicode.downcase(string)
42
+ UnicodeUtils.downcase(string)
44
43
  end
45
44
  rescue LoadError
46
45
  begin
47
- require 'unicode_utils'
48
-
46
+ require 'unicode'
49
47
  def upcase(string)
50
- UnicodeUtils.upcase(string)
48
+ Unicode.upcase(string)
51
49
  end
52
50
 
53
51
  def downcase(string)
54
- UnicodeUtils.downcase(string)
55
- end
56
- rescue
57
- begin
58
- require 'active_support/multibyte/chars'
59
-
60
- def upcase(string)
61
- ActiveSupport::Multibyte::Chars.new(string).upcase.to_s
62
- end
63
-
64
- def downcase(string)
65
- ActiveSupport::Multibyte::Chars.new(string).downcase.to_s
66
- end
67
- rescue
68
-
69
- def upcase(string)
70
- string.upcase
71
- end
72
-
73
- def downcase(string)
74
- string.downcase
75
- end
52
+ Unicode.downcase(string)
76
53
  end
54
+ rescue LoadError
55
+ warn "CiteProc requires the `unicode_utils` or `unicode` Gem on Ruby 2.3"
77
56
  end
78
57
  end
79
58
  end
@@ -1,3 +1,3 @@
1
1
  module CiteProc
2
- VERSION = '1.0.8'.freeze
2
+ VERSION = '1.0.9'.freeze
3
3
  end
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.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-22 00:00:00.000000000 Z
11
+ date: 2018-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.6.13
80
+ rubygems_version: 2.7.4
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: A cite processor interface.