tzf 0.1.0 → 0.2.1

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: 48df16af5b451c34d6846702e7d9b1be6c611265373c6a8d029acc91a3c408df
4
- data.tar.gz: 5fc86e8dc9ca12cd85b9012435be01d4c2b4219570d5bf81951bc0136d204749
3
+ metadata.gz: c80b6ca046967ff228dd5cb4b7cc1e5496a8dc5aa5f846c1b379aa1e7242ffb7
4
+ data.tar.gz: 6fa7cb0747cad4a8e9c1ad63f72118ff800aab3273bf7de16b63f55195df8fee
5
5
  SHA512:
6
- metadata.gz: e11348024a150255d2f28e7d364bd1bbadc32c44b8207350f614a58217ea6f046ecb242266d5931563bc554011117ff4f5b9174f43ac527689abe0daef9694de
7
- data.tar.gz: f1b14261e4fe77be1d3a2100d9f7ebfd996394577534f88b2a2759736abf4b417fd4b7567426edda46675a161ce9df43e1b6744c41a3d755ae31784940953e8c
6
+ metadata.gz: 6f2a1c7e289115079db4eb51d8b642f1310687508b21f55b673cfe539fb399845283fec1b7bd0cac9711ac3f1c48739ccecd9ee58597617c9bd7810298f213ce
7
+ data.tar.gz: 5a29a4726445df194ddd768152a0ae8b5e8e633ee23bb692907a76c16703bec6073823e250dd2c78c403a8d3af04ee2154bd406bec3a3b1303780dcd21d1002e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2023-02-22
4
+
5
+ - Migrate to [magnus](https://github.com/matsadler/magnus)
6
+
3
7
  ## [0.1.0] - 2023-02-21
4
8
 
5
9
  - Initial release
data/Cargo.lock CHANGED
@@ -29,6 +29,15 @@ dependencies = [
29
29
  "version_check",
30
30
  ]
31
31
 
32
+ [[package]]
33
+ name = "aho-corasick"
34
+ version = "0.7.20"
35
+ source = "registry+https://github.com/rust-lang/crates.io-index"
36
+ checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
37
+ dependencies = [
38
+ "memchr",
39
+ ]
40
+
32
41
  [[package]]
33
42
  name = "anyhow"
34
43
  version = "1.0.69"
@@ -62,6 +71,25 @@ dependencies = [
62
71
  "rustc-demangle",
63
72
  ]
64
73
 
74
+ [[package]]
75
+ name = "bindgen"
76
+ version = "0.60.1"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
79
+ dependencies = [
80
+ "bitflags",
81
+ "cexpr",
82
+ "clang-sys",
83
+ "lazy_static",
84
+ "lazycell",
85
+ "peeking_take_while",
86
+ "proc-macro2",
87
+ "quote",
88
+ "regex",
89
+ "rustc-hash",
90
+ "shlex",
91
+ ]
92
+
65
93
  [[package]]
66
94
  name = "bitflags"
67
95
  version = "1.3.2"
@@ -86,6 +114,15 @@ version = "1.0.79"
86
114
  source = "registry+https://github.com/rust-lang/crates.io-index"
87
115
  checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
88
116
 
117
+ [[package]]
118
+ name = "cexpr"
119
+ version = "0.6.0"
120
+ source = "registry+https://github.com/rust-lang/crates.io-index"
121
+ checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
122
+ dependencies = [
123
+ "nom",
124
+ ]
125
+
89
126
  [[package]]
90
127
  name = "cfg-if"
91
128
  version = "1.0.0"
@@ -104,6 +141,17 @@ dependencies = [
104
141
  "serde_json",
105
142
  ]
106
143
 
144
+ [[package]]
145
+ name = "clang-sys"
146
+ version = "1.6.0"
147
+ source = "registry+https://github.com/rust-lang/crates.io-index"
148
+ checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a"
149
+ dependencies = [
150
+ "glob",
151
+ "libc",
152
+ "libloading",
153
+ ]
154
+
107
155
  [[package]]
108
156
  name = "clap"
109
157
  version = "4.1.6"
@@ -248,6 +296,12 @@ version = "0.27.2"
248
296
  source = "registry+https://github.com/rust-lang/crates.io-index"
249
297
  checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
250
298
 
299
+ [[package]]
300
+ name = "glob"
301
+ version = "0.3.1"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
304
+
251
305
  [[package]]
252
306
  name = "hashbrown"
253
307
  version = "0.12.3"
@@ -346,12 +400,28 @@ version = "1.4.0"
346
400
  source = "registry+https://github.com/rust-lang/crates.io-index"
347
401
  checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
348
402
 
403
+ [[package]]
404
+ name = "lazycell"
405
+ version = "1.3.0"
406
+ source = "registry+https://github.com/rust-lang/crates.io-index"
407
+ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
408
+
349
409
  [[package]]
350
410
  name = "libc"
351
411
  version = "0.2.139"
352
412
  source = "registry+https://github.com/rust-lang/crates.io-index"
353
413
  checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
354
414
 
415
+ [[package]]
416
+ name = "libloading"
417
+ version = "0.7.4"
418
+ source = "registry+https://github.com/rust-lang/crates.io-index"
419
+ checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
420
+ dependencies = [
421
+ "cfg-if",
422
+ "winapi",
423
+ ]
424
+
355
425
  [[package]]
356
426
  name = "linux-raw-sys"
357
427
  version = "0.1.4"
@@ -377,6 +447,28 @@ dependencies = [
377
447
  "cfg-if",
378
448
  ]
379
449
 
450
+ [[package]]
451
+ name = "magnus"
452
+ version = "0.4.4"
453
+ source = "registry+https://github.com/rust-lang/crates.io-index"
454
+ checksum = "fc87660cd7daa49fddbfd524c836de54d5c927d520cd163f43700c5087c57d6c"
455
+ dependencies = [
456
+ "magnus-macros",
457
+ "rb-sys",
458
+ "rb-sys-env",
459
+ ]
460
+
461
+ [[package]]
462
+ name = "magnus-macros"
463
+ version = "0.3.0"
464
+ source = "registry+https://github.com/rust-lang/crates.io-index"
465
+ checksum = "206cb23bfeea05180c97522ef6a3e52a4eb17b0ed2f30ee3ca9c4f994d2378ae"
466
+ dependencies = [
467
+ "proc-macro2",
468
+ "quote",
469
+ "syn",
470
+ ]
471
+
380
472
  [[package]]
381
473
  name = "memchr"
382
474
  version = "2.5.0"
@@ -392,6 +484,12 @@ dependencies = [
392
484
  "libc",
393
485
  ]
394
486
 
487
+ [[package]]
488
+ name = "minimal-lexical"
489
+ version = "0.2.1"
490
+ source = "registry+https://github.com/rust-lang/crates.io-index"
491
+ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
492
+
395
493
  [[package]]
396
494
  name = "miniz_oxide"
397
495
  version = "0.6.2"
@@ -418,6 +516,16 @@ dependencies = [
418
516
  "libc",
419
517
  ]
420
518
 
519
+ [[package]]
520
+ name = "nom"
521
+ version = "7.1.3"
522
+ source = "registry+https://github.com/rust-lang/crates.io-index"
523
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
524
+ dependencies = [
525
+ "memchr",
526
+ "minimal-lexical",
527
+ ]
528
+
421
529
  [[package]]
422
530
  name = "num-format"
423
531
  version = "0.4.4"
@@ -481,6 +589,12 @@ dependencies = [
481
589
  "windows-sys",
482
590
  ]
483
591
 
592
+ [[package]]
593
+ name = "peeking_take_while"
594
+ version = "0.1.2"
595
+ source = "registry+https://github.com/rust-lang/crates.io-index"
596
+ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
597
+
484
598
  [[package]]
485
599
  name = "petgraph"
486
600
  version = "0.6.3"
@@ -664,6 +778,35 @@ dependencies = [
664
778
  "getrandom",
665
779
  ]
666
780
 
781
+ [[package]]
782
+ name = "rb-sys"
783
+ version = "0.9.65"
784
+ source = "registry+https://github.com/rust-lang/crates.io-index"
785
+ checksum = "e8fe617bad8e88fd7e5d6f432e35f09e5f94144dfb8e8ee4adde82fb920dc59b"
786
+ dependencies = [
787
+ "rb-sys-build",
788
+ ]
789
+
790
+ [[package]]
791
+ name = "rb-sys-build"
792
+ version = "0.9.65"
793
+ source = "registry+https://github.com/rust-lang/crates.io-index"
794
+ checksum = "007e63597f91c711cbb299e60fecbdb6f5ad4a066d6a20c81943893f1584c895"
795
+ dependencies = [
796
+ "bindgen",
797
+ "lazy_static",
798
+ "quote",
799
+ "regex",
800
+ "shell-words",
801
+ "syn",
802
+ ]
803
+
804
+ [[package]]
805
+ name = "rb-sys-env"
806
+ version = "0.1.2"
807
+ source = "registry+https://github.com/rust-lang/crates.io-index"
808
+ checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
809
+
667
810
  [[package]]
668
811
  name = "redox_syscall"
669
812
  version = "0.2.16"
@@ -679,6 +822,8 @@ version = "1.7.1"
679
822
  source = "registry+https://github.com/rust-lang/crates.io-index"
680
823
  checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
681
824
  dependencies = [
825
+ "aho-corasick",
826
+ "memchr",
682
827
  "regex-syntax",
683
828
  ]
684
829
 
@@ -712,6 +857,12 @@ version = "0.1.21"
712
857
  source = "registry+https://github.com/rust-lang/crates.io-index"
713
858
  checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
714
859
 
860
+ [[package]]
861
+ name = "rustc-hash"
862
+ version = "1.1.0"
863
+ source = "registry+https://github.com/rust-lang/crates.io-index"
864
+ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
865
+
715
866
  [[package]]
716
867
  name = "rustix"
717
868
  version = "0.36.8"
@@ -769,6 +920,18 @@ dependencies = [
769
920
  "serde",
770
921
  ]
771
922
 
923
+ [[package]]
924
+ name = "shell-words"
925
+ version = "1.1.0"
926
+ source = "registry+https://github.com/rust-lang/crates.io-index"
927
+ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
928
+
929
+ [[package]]
930
+ name = "shlex"
931
+ version = "1.1.0"
932
+ source = "registry+https://github.com/rust-lang/crates.io-index"
933
+ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
934
+
772
935
  [[package]]
773
936
  name = "smallvec"
774
937
  version = "1.10.0"
@@ -875,6 +1038,7 @@ name = "tzf"
875
1038
  version = "0.1.0"
876
1039
  dependencies = [
877
1040
  "lazy_static",
1041
+ "magnus",
878
1042
  "tzf-rs",
879
1043
  ]
880
1044
 
data/Cargo.toml CHANGED
@@ -1,13 +1,7 @@
1
- [package]
2
- name = "tzf"
3
- version = "0.1.0"
4
- edition = "2021"
1
+ # This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
2
+ # a Rust project. Your extensions dependencies should be added to the Cargo.toml
3
+ # in the ext/ directory.
5
4
 
6
- # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
-
8
- [lib]
9
- crate-type = ["cdylib"]
10
-
11
- [dependencies]
12
- lazy_static = "1.4.0"
13
- tzf-rs = "0.3.0"
5
+ [workspace]
6
+ members = ["./ext/tzf"]
7
+ resolver = "2"
data/Gemfile CHANGED
@@ -6,6 +6,8 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
+ gem "rake-compiler"
10
+ gem "rb_sys"
9
11
 
10
12
  gem "rspec", "~> 3.0"
11
13
 
data/Gemfile.lock CHANGED
@@ -1,21 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tzf (0.1.0)
5
- ffi (~> 1.0)
4
+ tzf (0.2.1)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
10
9
  ast (2.4.2)
11
10
  diff-lcs (1.5.0)
12
- ffi (1.15.5)
13
11
  json (2.6.3)
14
12
  parallel (1.22.1)
15
13
  parser (3.2.0.0)
16
14
  ast (~> 2.4.1)
17
15
  rainbow (3.1.1)
18
16
  rake (13.0.6)
17
+ rake-compiler (1.2.1)
18
+ rake
19
+ rb_sys (0.9.65)
19
20
  regexp_parser (2.6.1)
20
21
  rexml (3.2.5)
21
22
  rspec (3.12.0)
@@ -58,6 +59,8 @@ PLATFORMS
58
59
 
59
60
  DEPENDENCIES
60
61
  rake (~> 13.0)
62
+ rake-compiler
63
+ rb_sys
61
64
  rspec (~> 3.0)
62
65
  rubocop (~> 1.21)
63
66
  rubocop-rake (~> 0.6)
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # tzf-rb
2
2
 
3
- Time zone lookup using [tzf-rs](https://github.com/ringsaturn/tzf-rs).
3
+ [![Gem Version](https://badge.fury.io/rb/tzf.svg)](https://badge.fury.io/rb/tzf)
4
+
5
+ Ruby time zone lookup for coordinates using the [tzf-rs](https://github.com/ringsaturn/tzf-rs) Rust library.
6
+
7
+ Data is sourced from [Timezone Boundary Builder](https://github.com/evansiroky/timezone-boundary-builder).
4
8
 
5
9
  ## Installation
6
10
 
data/Rakefile CHANGED
@@ -9,16 +9,13 @@ require "rubocop/rake_task"
9
9
 
10
10
  RuboCop::RakeTask.new
11
11
 
12
- desc "Build rust dependencies"
13
- task :rust_build do
14
- `cargo rustc --release`
15
- `cp ./target/release/libtzf.so ./lib/tzf/`
16
- end
12
+ require "rake/extensiontask"
13
+
14
+ desc "Build extension"
15
+ task build: :compile
17
16
 
18
- desc "Clean rust dependencies"
19
- task :rust_clean do
20
- `cargo clean`
21
- `rm -f ./lib/tzf/libtzf.so`
17
+ Rake::ExtensionTask.new("tzf") do |ext|
18
+ ext.lib_dir = "lib/tzf"
22
19
  end
23
20
 
24
- task default: %i[rust_build spec rubocop]
21
+ task default: %i[compile spec rubocop]