unf 0.2.0.beta1 → 0.2.0.beta2

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: eed3d742a59f55821ce74d0e8f96073f3479b999
4
- data.tar.gz: d7d1e8e1350c0322dfbe9e8b4bee7924ae03358c
3
+ metadata.gz: d964b81e503ce604541a7126e56d5640cbd34b90
4
+ data.tar.gz: 5041633ac9a97a13eabaa36a6fd45a8c92848db4
5
5
  SHA512:
6
- metadata.gz: 9f172d71e972352b19a6bdb7730e8927075d033bbd5952094e11d88e63e81ff6855551c4f187aff1e6f1f6dcfb33ef20868843f0abc982fe1d3f2a75334b79bd
7
- data.tar.gz: d3d0d5555d3cc08f63ebcd22f70f93af20bb7de1f811893d35ced0c135001bb91f61c74c2e647d8fcebd513fb737e721f5744951e9e9e1694ffd986787585c51
6
+ metadata.gz: 984f5a09ebe248429bb17b9e51ee8da743dbc32bf1b432d5ed4d5c43d16df17a2bd6743c6b70726dfc4e6fe935e059bfaac7c86857cbb1a4c674c58da86a8353
7
+ data.tar.gz: be6dee4bf2a39ab2e6b6af3bf4057a2be5b63869e17454b4ff9bcb84af7310d8112a28420aadc79e910a1120855269632e50993067345b7ae02347f0f9b05487
@@ -1,8 +1,7 @@
1
- begin
2
- require 'unf_ext'
3
- rescue LoadError
4
- String.method_defined?(:unicode_normalize) or raise
5
-
1
+ case
2
+ when defined?(UNF::Normalizer)
3
+ # Probably unf_ext is preloaded.
4
+ when String.method_defined?(:unicode_normalize)
6
5
  class String
7
6
  [:nfc, :nfd, :nfkc, :nfkd].each { |form|
8
7
  eval %{
@@ -20,4 +19,6 @@ rescue LoadError
20
19
  end
21
20
  end
22
21
  end
22
+ else
23
+ require 'unf_ext'
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module UNF
2
- VERSION = '0.2.0.beta1'
2
+ VERSION = '0.2.0.beta2'
3
3
  end
@@ -28,4 +28,5 @@ to Ruby/JRuby.
28
28
  gem.add_development_dependency 'rake', '>= 0.9.2.2'
29
29
  gem.add_development_dependency 'rdoc', '> 2.4.2'
30
30
  gem.add_development_dependency 'test-unit'
31
+ gem.add_development_dependency 'unf_ext', '>= 0' unless defined?(JRUBY_VERSION)
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta1
4
+ version: 0.2.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: unf_ext
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: |
70
84
  This is a wrapper library to bring Unicode Normalization Form support
71
85
  to Ruby/JRuby.