reso 0.1.4.3 → 0.1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca58f3464ba417971d5acd3b87c679322a8e9d05
4
- data.tar.gz: 916803a8d34eecf022bd895c6fddd8aaaa0e3f82
3
+ metadata.gz: 07dc44bc68ae6d83c97f0ab022954dd379b95ed4
4
+ data.tar.gz: 5385bb75c6ca69a86679d793abe14fe239b46923
5
5
  SHA512:
6
- metadata.gz: fbc863d0a0564216a93a74dcc06d26dfb17ce21d4034d2467bdc4910a807bbd6123a0f5abc742ec1a6b94a5afdfd022006bb986279707ffc13981b7d100f32a7
7
- data.tar.gz: 8bbc41aae82a81f5c439184ee8aa4e45d8f91fecd8e0ebfbc90822ad658784b10c8f68b7a5af8da69957595e4af1fe2112332e15fe693a77a008d534788aa7dc
6
+ metadata.gz: 75d9130f3b7a639711c1fe1121e92a4b1a97ae2a31f7396f5f36ca623972e878924de8397b8287cca2b6050b09744b0c449383a2c1c828925b557b94606183b6
7
+ data.tar.gz: 0b57bb28791728eaea2a322a19b7eed522eb3f0c1549995f64b6491f52f69b0f5432ddd9d7294977cc5f9d3b871408124144a3d39ddc9ae95f31b4d28436a185
@@ -32,7 +32,12 @@ class Import < ActiveRecord::Base
32
32
  end
33
33
 
34
34
  def new_source_data_exists?
35
- (self.source_url_last_modified > self.source_data_modified) ? true : false
35
+ if (source_url_last_modified = self.source_url_last_modified)
36
+ (self.source_url_last_modified.eql? self.source_data_modified) ? result = true : result = false
37
+ else
38
+ result = true
39
+ end
40
+ result
36
41
  end
37
42
 
38
43
  def run_import
@@ -65,17 +70,17 @@ class Import < ActiveRecord::Base
65
70
  end
66
71
  end_time = Time.now
67
72
  removed_listing_keys = self.remove_listings_not_present(found_listing_keys)
73
+ self.assign_attributes({
74
+ status: :active,
75
+ source_data_modified: source_data_modified
76
+ })
77
+ self.save
68
78
  import_result.assign_attributes({
69
79
  end_time: end_time,
70
80
  found_listing_keys: found_listing_keys,
71
81
  removed_listing_keys: removed_listing_keys.inspect
72
82
  })
73
83
  import_result.save
74
- self.assign_attributes({
75
- status: :active,
76
- source_data_modified: source_data_modified
77
- })
78
- self.save
79
84
  File.delete(filepath)
80
85
  end
81
86
  end
@@ -1,3 +1,3 @@
1
1
  module Reso
2
- VERSION = "0.1.4.3"
2
+ VERSION = "0.1.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.3
4
+ version: 0.1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Edlund