zone_detect 0.2.0 → 0.3.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: 5c5fa51707db0e4ded3e1fa680b3354e22deccd868a3b953190918979cce32b3
4
- data.tar.gz: 12ae78865eb600807b27855e6cc4fddefe2e3fbe5d19c61b4a95ca49cdf84f39
3
+ metadata.gz: eab45a650216269901698dbeecddd81629bbf020d6c8587796f3eb277e9b826c
4
+ data.tar.gz: 32c501fccc73e6d72e1dc01df0b47cc1aef66419118d995363141f791f499942
5
5
  SHA512:
6
- metadata.gz: e602ee96fe1f093410bf66bd9313416545c366e4f0659ce4b612346ed4178203ae47e87169c033bee78a9328aaeae7cbbac30b645eb0a036a539d044fa431851
7
- data.tar.gz: 0b749e0ced9a56dac993771d43e681e5cf2872e12cc049560699b91850b689e48d5b868a3abcda13590d2ea67e4149f60572b5733aaa32df7df355e028a487e1
6
+ metadata.gz: 449ffcc53731f690872b2158710a5b37e449241c839e7718975b78246254a74ea2ed451611660fd9efca748344aebf69bc6d585d20fd16cba9318afdfd0d71a5
7
+ data.tar.gz: 139293051e7ee43faa6021f59cb0ce6d29c7e2293689ab969838e5f1c763f6ab17c7361bb538d8a436dfa7285ea7f627368f772674496cf8a666560927fcef8c
data/CHANGELOG.markdown CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2023-01-24
4
+
5
+ ### Added
6
+
7
+ - Add check for no result
8
+
3
9
  ## [0.2.0] - 2023-01-20
4
10
 
5
11
  ### Added
@@ -1257,4 +1257,4 @@ done:
1257
1257
  void ZDHelperSimpleLookupStringFree(char* str)
1258
1258
  {
1259
1259
  free(str);
1260
- }
1260
+ }
@@ -45,6 +45,9 @@ static VALUE find(VALUE self, VALUE lat, VALUE lng) {
45
45
  struct zd_data *d;
46
46
  TypedData_Get_Struct(self, struct zd_data, &zd_type, d);
47
47
  char *simple = ZDHelperSimpleLookupString(d->cd, NUM2DBL(lat), NUM2DBL(lng));
48
+ if (!simple) {
49
+ return Qnil;
50
+ }
48
51
  VALUE str = rb_str_new(simple, strlen(simple));
49
52
  free(simple);
50
53
  return str;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ZoneDetect
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
data/sig/zone_detect.rbs CHANGED
@@ -1,7 +1,15 @@
1
1
  class ZoneDetect
2
2
  VERSION: String
3
3
 
4
- def initialize: (path: String) -> void
4
+ class Config
5
+ attr_accessor timezone_data_path: String
6
+ end
5
7
 
6
- def find: (lat: Numeric, lng: Numeric) -> String
8
+ def initialize: (String) -> void
9
+
10
+ def find: (Numeric, Numeric) -> String
11
+
12
+ def self.configure: () { (Config) -> void } -> void
13
+
14
+ def self.find: (Numeric, Numeric) -> String
7
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zone_detect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Cederblad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-20 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: