unf 0.0.5-jruby → 0.1.1-jruby

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - ree
5
+ - 1.9.2
6
+ - 1.9.3
7
+ - 2.0.0
8
+ - ruby-head
9
+ - jruby-18mode
10
+ - jruby-19mode
11
+ - jruby-head
12
+ - rbx-18mode
13
+ - rbx-19mode
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: rbx-18mode
17
+ - rvm: rbx-19mode
data/Rakefile CHANGED
@@ -1,2 +1,21 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+
4
+ gemspec = Bundler::GemHelper.gemspec
5
+
6
+ require 'rake/testtask'
7
+ Rake::TestTask.new(:test) do |test|
8
+ test.libs << 'test'
9
+ test.test_files = gemspec.test_files
10
+ test.verbose = true
11
+ end
12
+
13
+ require 'rdoc/task'
14
+ Rake::RDocTask.new do |rdoc|
15
+ rdoc.rdoc_dir = 'rdoc'
16
+ rdoc.title = "#{gemspec.name} #{gemspec.version}"
17
+ rdoc.rdoc_files.include(gemspec.extra_rdoc_files)
18
+ rdoc.rdoc_files.include('lib/**/*.rb')
19
+ end
20
+
21
+ task :default => :test
data/lib/unf.rb CHANGED
@@ -12,6 +12,18 @@ class String
12
12
  '/[^\x00-\x7f]/ !~ self'
13
13
  end
14
14
 
15
+ # :method: to_nfc
16
+ # Converts the string to NFC.
17
+
18
+ # :method: to_nfd
19
+ # Converts the string to NFD.
20
+
21
+ # :method: to_nfkc
22
+ # Converts the string to NFKC.
23
+
24
+ # :method: to_nfkd
25
+ # Converts the string to NFKD.
26
+
15
27
  [:nfc, :nfd, :nfkc, :nfkd].each { |form|
16
28
  eval %{
17
29
  def to_#{form.to_s}
@@ -4,14 +4,33 @@ else
4
4
  require 'unf/normalizer_cruby'
5
5
  end
6
6
 
7
+ # UTF-8 string normalizer class. Implementations may vary depending
8
+ # on the platform.
7
9
  class UNF::Normalizer
8
10
  class << self
11
+ # :singleton-method: new
12
+ # :call-seq:
13
+ # new
14
+ # instance
15
+ #
16
+ # Returns a normalizer instance.
17
+
18
+ # :stopdoc:
9
19
  def instance
10
20
  @@normalizer ||= new
11
21
  end
22
+ # :startdoc:
12
23
 
24
+ # A shortcut for new.normalize(string, form).
13
25
  def normalize(string, form)
14
26
  instance.normalize(string, form)
15
27
  end
16
28
  end
29
+
30
+ # :method: normalize
31
+ # :call-seq:
32
+ # normalize(string, form)
33
+ #
34
+ # Normalizes a UTF-8 string into a given form (:nfc, :nfd, :nfkc or
35
+ # :nfkd).
17
36
  end
@@ -1,6 +1,6 @@
1
1
  require 'java'
2
2
 
3
- module UNF
3
+ module UNF # :nodoc: all
4
4
  class Normalizer
5
5
  def initialize()
6
6
  @normalizer = java.text.Normalizer
@@ -1,3 +1,3 @@
1
1
  module UNF
2
- VERSION = '0.0.5'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -2,6 +2,8 @@
2
2
  require File.expand_path('../lib/unf/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
+ gem.name = "unf"
6
+ gem.version = UNF::VERSION
5
7
  gem.authors = ["Akinori MUSHA"]
6
8
  gem.email = ["knu@idaemons.org"]
7
9
  gem.description = <<-'EOS'
@@ -14,15 +16,14 @@ to Ruby/JRuby.
14
16
 
15
17
  gem.files = `git ls-files`.split("\n")
16
18
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.name = "unf"
19
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/.*\.rb})
19
20
  gem.require_paths = ["lib"]
20
- gem.version = UNF::VERSION
21
+ gem.extra_rdoc_files = ['README.md', 'LICENSE']
21
22
 
22
23
  gem.add_dependency 'unf_ext', '>= 0' unless defined?(JRUBY_VERSION)
23
24
 
24
25
  gem.add_development_dependency 'shoulda', '>= 0'
25
- gem.add_development_dependency 'bundler', '~> 1.0.0'
26
- gem.add_development_dependency 'jeweler', '~> 1.6.4'
27
- gem.add_development_dependency 'rcov', '>= 0'
26
+ gem.add_development_dependency 'bundler', '>= 1.2.0'
27
+ gem.add_development_dependency 'rake', '>= 0.9.2.2'
28
+ gem.add_development_dependency 'rdoc', '> 2.4.2'
28
29
  end
metadata CHANGED
@@ -1,116 +1,136 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: unf
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
6
6
  platform: jruby
7
- authors:
8
- - Akinori MUSHA
9
- autorequire:
7
+ authors:
8
+ - Akinori MUSHA
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-04 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: shoulda
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: bundler
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- version: 1.0.0
35
- type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: jeweler
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 1.6.4
46
- type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rcov
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
57
- type: :development
58
- version_requirements: *id004
12
+ date: 2013-03-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: shoulda
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: !binary |-
21
+ MA==
22
+ none: false
23
+ requirement: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: !binary |-
28
+ MA==
29
+ none: false
30
+ prerelease: false
31
+ type: :development
32
+ - !ruby/object:Gem::Dependency
33
+ name: bundler
34
+ version_requirements: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 1.2.0
39
+ none: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.2.0
45
+ none: false
46
+ prerelease: false
47
+ type: :development
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.2.2
55
+ none: false
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 0.9.2.2
61
+ none: false
62
+ prerelease: false
63
+ type: :development
64
+ - !ruby/object:Gem::Dependency
65
+ name: rdoc
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - !binary |-
69
+ Pg==
70
+ - !ruby/object:Gem::Version
71
+ version: 2.4.2
72
+ none: false
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - !binary |-
76
+ Pg==
77
+ - !ruby/object:Gem::Version
78
+ version: 2.4.2
79
+ none: false
80
+ prerelease: false
81
+ type: :development
59
82
  description: |
60
83
  This is a wrapper library to bring Unicode Normalization Form support
61
84
  to Ruby/JRuby.
62
-
63
- email:
64
- - knu@idaemons.org
85
+ email:
86
+ - knu@idaemons.org
65
87
  executables: []
66
-
67
88
  extensions: []
68
-
69
- extra_rdoc_files: []
70
-
71
- files:
72
- - .gitignore
73
- - Gemfile
74
- - LICENSE
75
- - README.md
76
- - Rakefile
77
- - lib/unf.rb
78
- - lib/unf/normalizer.rb
79
- - lib/unf/normalizer_cruby.rb
80
- - lib/unf/normalizer_jruby.rb
81
- - lib/unf/version.rb
82
- - test/helper.rb
83
- - test/normalization-test.txt
84
- - test/test_unf.rb
85
- - unf.gemspec
89
+ extra_rdoc_files:
90
+ - README.md
91
+ - LICENSE
92
+ files:
93
+ - ".gitignore"
94
+ - ".travis.yml"
95
+ - Gemfile
96
+ - LICENSE
97
+ - README.md
98
+ - Rakefile
99
+ - lib/unf.rb
100
+ - lib/unf/normalizer.rb
101
+ - lib/unf/normalizer_cruby.rb
102
+ - lib/unf/normalizer_jruby.rb
103
+ - lib/unf/version.rb
104
+ - test/helper.rb
105
+ - test/normalization-test.txt
106
+ - test/test_unf.rb
107
+ - unf.gemspec
86
108
  homepage: https://github.com/knu/ruby-unf
87
109
  licenses: []
88
-
89
- post_install_message:
110
+ post_install_message:
90
111
  rdoc_options: []
91
-
92
- require_paths:
93
- - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: !binary |-
119
+ MA==
95
120
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: !binary |-
126
+ MA==
101
127
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: "0"
106
128
  requirements: []
107
-
108
- rubyforge_project:
109
- rubygems_version: 1.8.17
110
- signing_key:
129
+ rubyforge_project:
130
+ rubygems_version: 1.8.24
131
+ signing_key:
111
132
  specification_version: 3
112
133
  summary: A wrapper library to bring Unicode Normalization Form support to Ruby/JRuby
113
- test_files:
114
- - test/helper.rb
115
- - test/normalization-test.txt
116
- - test/test_unf.rb
134
+ test_files:
135
+ - test/helper.rb
136
+ - test/test_unf.rb