mini_phone 1.1.8 → 1.2.0

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
  SHA256:
3
- metadata.gz: ebcb47083ca24a0f63795c4431ae65181ed25e6cca2b1a800603d36bd480fb98
4
- data.tar.gz: 7bdd9504face792c9ac115132830bcef3a8427365c6fa44a078332175e5fad10
3
+ metadata.gz: c398c60b592f86860c4e077e2c645d6a581dbac7819f1ddfa2a15af5bcf5d6bf
4
+ data.tar.gz: 2332e7b03cf3a703d98a3bca80a5eeadfbcb285136a1c1402240c10e2d189021
5
5
  SHA512:
6
- metadata.gz: 55b46d7a81ac2e377addb268586a7f4b6b883803dddaa7aa6970bb868d598f91c8cd5933effadbda658a4cfb5b4caeb918f697709df129319b62b1db26139f90
7
- data.tar.gz: 1361bf8922c55170646d6da8b163da65d13ad6e88cc5ee8621e68ed732d21adf03880d95a6d3db353b397e8ef6ecafcdca44ce5790185fb9ee52a1c8736fd7d6
6
+ metadata.gz: 4004538e8696f32e6ca6947c6ee66ff18ccd2383c53ee5097c9597d2614f6107273e6beaee7a959a365f8063dde1543be013d803b9e2afff44bceb29b8fdb1b6
7
+ data.tar.gz: f9c11923842410cfbb77e78289d7c2f181d1f8cca95902b2b7d506f6a00c4435fbe82fc3b9aac0bb6c1aeed78f1b1562e98b56668ea9247ea60d952879c9d0f8
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -121,6 +121,20 @@ TelephoneNumber: e164: 228.8 i/s - 179.99x (± 0.00) slower
121
121
  gem install mini_phone
122
122
  ```
123
123
 
124
+ ### Installation on Heroku
125
+
126
+ 1. In addition to the steps above add the [apt buildpack](https://github.com/heroku/heroku-buildpack-apt) to your Heroku app:
127
+
128
+ ```sh
129
+ heroku buildpacks:add --index 1 heroku-community/apt
130
+ ```
131
+
132
+ 2. Create Aptfile in your repo with the following content:
133
+
134
+ ```
135
+ libphonenumber-dev
136
+ ```
137
+
124
138
  ## Development
125
139
 
126
140
  After checking out the repo, run `bin/setup` to install dependencies. Then,
data/Rakefile CHANGED
@@ -5,6 +5,8 @@ require 'rspec/core/rake_task'
5
5
  require 'rubygems/package_task'
6
6
  require 'rake/extensiontask'
7
7
 
8
+ CXX_FILES = FileList['ext/**/*.{c,cc,cpp,cxx,h}']
9
+
8
10
  RSpec::Core::RakeTask.new(:spec)
9
11
 
10
12
  task default: %i[clobber compile spec lint]
@@ -21,18 +23,20 @@ Rake::ExtensionTask.new('mini_phone', spec) do |ext|
21
23
  end
22
24
 
23
25
  task bench: %i[clobber compile] do
24
- Dir['bench/**/*'].sort.each do |f|
26
+ Dir['bench/**/*'].each do |f|
25
27
  require_relative f
26
28
  end
27
29
  end
28
30
 
29
31
  task :lint do
32
+ require 'mkmf'
30
33
  sh 'bundle exec rubocop'
34
+ sh 'clang-format', '--dry-run', '-i', *CXX_FILES if find_executable('clang-format')
31
35
  end
32
36
 
33
37
  task :format do
34
38
  sh 'bundle exec rubocop -A'
35
- sh 'clang-format -i ext/**/*.{h,cc}'
39
+ sh 'clang-format', '--dry-run', '-i', *CXX_FILES
36
40
  end
37
41
 
38
42
  task deploy: :default do
data/certs/ianks.pem CHANGED
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtpLmtl
2
+ MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQsFADBCMRQwEgYDVQQDDAtpLmtl
3
3
  cnNleW1lcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
4
- Y29tMB4XDTIyMDQxMzE5NTY1MVoXDTIzMDQxMzE5NTY1MVowQjEUMBIGA1UEAwwL
4
+ Y29tMB4XDTIzMDQxNDEzMzYxNVoXDTI0MDQxMzEzMzYxNVowQjEUMBIGA1UEAwwL
5
5
  aS5rZXJzZXltZXIxFTATBgoJkiaJk/IsZAEZFgVn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EdrwbH+PbYjELnKcTIEZqcCWTk8pgssGrNyjkMhxGSsSUo9qTz0
19
+ DIZ6NVmpBvohJVCCCDxQQxFKLXZp1ivoxjN+m7eJSW7yzIz062pH4u8pPNQsiVSb
20
+ I5rgRPbDr2rAFGXKoQ0+u6CLkRxqrVsITl/OPfZhBQI=
21
21
  -----END CERTIFICATE-----
@@ -12,7 +12,7 @@ if conf['target_cpu'] == 'arm64' && conf['target_os'].start_with?('darwin')
12
12
  $CXXFLAGS << ' -I/opt/homebrew/include '
13
13
  end
14
14
 
15
- unless have_library('phonenumber')
15
+ unless have_library('phonenumber') && have_library('protobuf')
16
16
  abort <<~MSG
17
17
 
18
18
  ,----------------------------------------------------------------------,
@@ -38,8 +38,8 @@ unless have_library('phonenumber')
38
38
  end
39
39
 
40
40
  dir_config('mini_phone')
41
-
42
- $CXXFLAGS += ' -std=c++14 -ofast '
41
+ append_cppflags('-O3')
42
+ $CXXFLAGS << ' -std=c++17 ' unless $CXXFLAGS.include?('-std=c++')
43
43
 
44
44
  create_makefile('mini_phone/mini_phone')
45
45
 
@@ -14,7 +14,9 @@ static VALUE rb_cPhoneNumber;
14
14
  static RepeatedPtrField<NumberFormat> raw_national_format;
15
15
  static RepeatedPtrField<NumberFormat> dasherized_national_format;
16
16
 
17
- extern "C" struct PhoneNumberInfo { PhoneNumber *phone_number; };
17
+ extern "C" struct PhoneNumberInfo {
18
+ PhoneNumber *phone_number;
19
+ };
18
20
 
19
21
  extern "C" size_t phone_number_info_size(const void *data) { return sizeof(PhoneNumberInfo); }
20
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MiniPhone
4
- VERSION = '1.1.8'
4
+ VERSION = '1.2.0'
5
5
  end
data/mini_phone.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  MSG
15
15
  spec.homepage = 'https://github.com/ianks/mini_phone'
16
16
  spec.license = 'MIT'
17
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
17
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
18
18
 
19
19
  spec.platform = Gem::Platform::RUBY
20
20
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_phone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -10,9 +10,9 @@ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtpLmtl
13
+ MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQsFADBCMRQwEgYDVQQDDAtpLmtl
14
14
  cnNleW1lcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYD
15
- Y29tMB4XDTIyMDQxMzE5NTY1MVoXDTIzMDQxMzE5NTY1MVowQjEUMBIGA1UEAwwL
15
+ Y29tMB4XDTIzMDQxNDEzMzYxNVoXDTI0MDQxMzEzMzYxNVowQjEUMBIGA1UEAwwL
16
16
  aS5rZXJzZXltZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
17
17
  ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMJ2pG+er4cP
18
18
  PasxsMIKL9/tmLL4gh80EMuF3SCS0qZoh+Oo8dkvRYxW8NXdwEIcp3cCNgE+5G+J
@@ -23,14 +23,14 @@ cert_chain:
23
23
  eWGea+yCZkECAwEAAaN9MHswCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
24
24
  BBYEFOkrF6hsocaIMOjR/K3JBzyXCLJPMCAGA1UdEQQZMBeBFWkua2Vyc2V5bWVy
25
25
  QGdtYWlsLmNvbTAgBgNVHRIEGTAXgRVpLmtlcnNleW1lckBnbWFpbC5jb20wDQYJ
26
- KoZIhvcNAQEFBQADggEBADHnvHbZn5nldcpArIQcFF9URCBloCBZHqLFMhlGj5BX
27
- bFvuoq4CBmEFiJpTazeoEaxPlsmIK1+4CqBXwg8lHEMC9RV5g9QtJHQry2eFE/8U
28
- WrgCbqdxb8HBl9ayOHRcdfcv0RHBlmBHwBOoQ+hXMlInjssjfIX4BS39mTYefclE
29
- zxOFntl+vb4kluo0j9/BGzdnGCo7iE+GfGSENFdOn2J38RCDLUzgOCmCtxzSvldq
30
- Rl+ASkq2/1i07TkBpCf+2hq66+h/hx+/Y/KrUzXfe0jtvil0WESkJT2kqRqHWNhD
31
- 9GKBxaQlXokNDtWCm1/gl6cD8WRZ0N5S4ZGJT1FLLsA=
26
+ KoZIhvcNAQELBQADggEBAMAohCl0cdVlYrJl9viGtzbEyLV/Krn0ZD/LM9d2cIRj
27
+ WBu7HRkP6AfYVzhZwdgUgDYw67d715kOMpLNGeWQw3QGEHFqbVzRML64jL8IxuTz
28
+ J8ttZVqM8f4GrHyISJnL92u6iP4WzdbVqx89EFjrrHd14OJXK+ZpdRh0YvnN/vMJ
29
+ t2EcDweRHkN/MEdrwbH+PbYjELnKcTIEZqcCWTk8pgssGrNyjkMhxGSsSUo9qTz0
30
+ DIZ6NVmpBvohJVCCCDxQQxFKLXZp1ivoxjN+m7eJSW7yzIz062pH4u8pPNQsiVSb
31
+ I5rgRPbDr2rAFGXKoQ0+u6CLkRxqrVsITl/OPfZhBQI=
32
32
  -----END CERTIFICATE-----
33
- date: 2022-07-16 00:00:00.000000000 Z
33
+ date: 2023-05-24 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description: Plugs directly in the the Google's native C++ [libphonenumber](https://github.com/google/libphonenumber)
36
36
  for extemely _fast_ and _robust_ phone number parsing, validation, and formatting.
@@ -75,14 +75,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 2.5.0
78
+ version: 3.0.0
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.3.7
85
+ rubygems_version: 3.4.6
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Uses the Google libphonenumber C lib to parse, validate, and format phone
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- 9��I��,.��j���l˽`&҂p���>�xw��!�:
2
- b�"(,Ӕw ��af��h�3 �B�?�wG����um_G�Ee�*T�������T���7�.��}@\~�3�"��x�5n��)�� ��
3
- ǭ铹�������i2�<���qiuΦ��LaE��@��U�@\qz����֗_i���~yW��mXǘG��z˧�bGv����P+�+ԲRMZ] �ן0�|ȗ�����螉
1
+ 56h��
2
+ � Sl/���lW|� *��{`>�q
3
+ \�avi�U|��t6^�!��=n7�5��X��G�QD�u���{�.����b�1�u�����