utf8_proc 0.2.1 → 0.2.2

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: 75c3813b3648ed26bcc1c9471bcffe8e895a97b7
4
- data.tar.gz: 85489c6148cadd519920ac4ccf001cfdb39cd02f
3
+ metadata.gz: 6d9b7e197b0e827d0ce3df4f1859f1b9fc405d49
4
+ data.tar.gz: 6ed9d4f8fcacef1623d6c526f7343b6c78e2037a
5
5
  SHA512:
6
- metadata.gz: 8d1cbf5d22f5cf6bc3959d9f0eb785e5380675b5dcde4fb681538a1c775c3f08744c9f9a4a3c49a5d58fa0e22822a9bfd6e685d33ad0f0c2e23bfc959b71508f
7
- data.tar.gz: 94e2492d8e7ced92e05620b2b859b2fbcc4405773c1076c2cb2647e43c918c9599b461925f4aaf3fd86fdeba310ac0abc7f0d4c749a1a848bfce6d4b441f0d61
6
+ metadata.gz: 00a888e9d9866ded8d419037633962afa65f32a232985c454ed49f2cc30b2417eab4c240cbb57b413fe2338543501332edb1f52badb2e92e410360230a0a40cd
7
+ data.tar.gz: b68cd49b1495c6a97160353341ebaf16ffba1db0d89a84f76f3af6b42a299b150697dbf4d4287182da7e35addab88436bab593abbe6fa8987d9ec26b8ec61c6f
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ .clang_complete
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
- # rubocop:disable GlobalVars
3
2
  require "mkmf"
4
3
 
5
- $CFLAGS << " -Wall"
4
+ pkg_config("utf8proc")
6
5
 
7
6
  have_library("utf8proc") || abort("This extension requires the utf8proc library.")
8
7
 
@@ -12,7 +12,7 @@ ID NFKC_CF;
12
12
  static inline void checkStrEncoding(VALUE *string) {
13
13
  rb_encoding *enc = rb_enc_get(*string);
14
14
  if (enc != enc_utf8 && enc != enc_usascii) {
15
- rb_raise(rb_eRuntimeError, "%s", "String must be in UTF-8 or US-ASCII encoding.");
15
+ rb_raise(rb_eEncodingError, "%s", "String must be in UTF-8 or US-ASCII encoding.");
16
16
  }
17
17
  }
18
18
 
@@ -71,12 +71,12 @@ VALUE norm(int argc, VALUE* argv, VALUE self){
71
71
  }else if(s_form == NFKC_CF) {
72
72
  return toNFKC_CF(self, string);
73
73
  }else{
74
- rb_raise(rb_eRuntimeError, "%s",
75
- "Second optional argument must be one of [:nfc, :nfd, :nfkc, :nfkd, :nfkc_cf] (defaults to :nfc)");
74
+ rb_raise(rb_eArgError, "%s",
75
+ "Second argument must be one of [:nfc (default), :nfd, :nfkc, " \
76
+ ":nfkd, :nfkc_cf]");
76
77
  }
77
78
  }
78
79
 
79
-
80
80
  void Init_utf8_proc(void) {
81
81
  VALUE rb_mBase = rb_define_module("UTF8Proc");
82
82
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module UTF8Proc
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
data/utf8_proc.gemspec CHANGED
@@ -14,11 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/nomoon/utf8_proc"
15
15
  spec.license = "MIT"
16
16
 
17
+ spec.required_ruby_version = ">= 2.0"
18
+
17
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
20
  f.match(%r{^(test|spec|features)/})
19
21
  end
20
- spec.bindir = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
  spec.extensions = ["ext/utf8_proc/extconf.rb"]
24
24
 
@@ -27,5 +27,4 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "pry", "~> 0.10"
28
28
  spec.add_development_dependency "rake-compiler", "~> 1.0"
29
29
  spec.add_development_dependency "minitest", "~> 5.10"
30
- spec.add_development_dependency "minitest-assert_errors"
31
30
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utf8_proc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Bellefleur
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-02-22 00:00:00.000000000 Z
12
12
  dependencies:
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '5.10'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest-assert_errors
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  description:
98
84
  email:
99
85
  - nomoon@phoebus.ca
@@ -131,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
117
  requirements:
132
118
  - - ">="
133
119
  - !ruby/object:Gem::Version
134
- version: '0'
120
+ version: '2.0'
135
121
  required_rubygems_version: !ruby/object:Gem::Requirement
136
122
  requirements:
137
123
  - - ">="