apidae 1.4.2 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,6 +66,20 @@ module Apidae
66
66
  assert_equal({'prev' => 44.715026, 'ts' => Time.current.to_i}, obj.prev_data['latitude'])
67
67
  end
68
68
 
69
+ test 'archive previously blank geolocation value' do
70
+ obj = setup_obj('test/data/hot_fr_en.json', [Apidae::LOCALE_FR])
71
+ obj.skip_archiving = true
72
+ obj.update(latitude: nil, longitude: nil)
73
+ obj.skip_archiving = false
74
+
75
+ obj.latitude = 1.2345
76
+ obj.longitude = 2.3456
77
+ obj.save
78
+
79
+ assert_equal({'prev' => nil, 'ts' => Time.current.to_i}, obj.prev_data['latitude'])
80
+ assert_equal({'prev' => nil, 'ts' => Time.current.to_i}, obj.prev_data['longitude'])
81
+ end
82
+
69
83
  test 'archive references list update' do
70
84
  obj = setup_obj('test/data/hot_fr_en.json', [Apidae::LOCALE_FR])
71
85
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-03 00:00:00.000000000 Z
11
+ date: 2024-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails