reso 0.1.4.6 → 0.1.4.7

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: 68cb4c25040e12382a725499a3d926ff389d28a8
4
- data.tar.gz: 6534a738c4ccea74dbbd120213f63e60cbda1560
3
+ metadata.gz: dc61854ccc051bf3475545db614427df9a539b24
4
+ data.tar.gz: d43ec38924dc1c334fadb822736b0ec0d873f784
5
5
  SHA512:
6
- metadata.gz: e5add26069c86875f7dadcad6d998911a9c13b6b77e8bc3654cf27637e29ed56731c1892a2df7f191ba0a61ac8c9b6d7f7c168d74c0f90f209b857f0487bc561
7
- data.tar.gz: 053171870d18ad9c1f1681ac19250a0bbe76ef0fad3a8bfac4fea80201b1e46e39301faab0553675482cf134a9f0d838b11a61a3a4bc14c51dfe1e17592bd3d9
6
+ metadata.gz: 8a1563ad87436615689ffcd81c610f6f93081d01a5de1a685532c84884821f9635ee653e5e3c85db494627f8a15a48361b5cf6ad71d02f4971c1f66e8501f0af
7
+ data.tar.gz: 4d8ea124854f74f55febdc8bafeb0195d6275770c28eb4c45069b23a7b2bf1893ba857ffa9a675c202598ce4196e61d8796a509dbcc6ffca1ba7c0d787734417
data/app/models/import.rb CHANGED
@@ -32,17 +32,12 @@ class Import < ActiveRecord::Base
32
32
  end
33
33
 
34
34
  def new_source_data_exists?
35
- result = true
36
- if (source_url_last_modified = self.source_url_last_modified)
37
- if source_url_last_modified.eql? self.source_data_modified)
38
- result = true
39
- else
40
- result = false
41
- end
35
+ source_url_last_modified = self.source_url_last_modified
36
+ if source_url_last_modified.present? && self.source_data_modified.present?
37
+ DateTime.parse(source_url_last_modified.to_s) > DateTime.parse(self.source_data_modified.to_s) ? true : false
42
38
  else
43
- result = true
39
+ true
44
40
  end
45
- result
46
41
  end
47
42
 
48
43
  def run_import
@@ -73,7 +68,7 @@ class Import < ActiveRecord::Base
73
68
  stream.gsub!(xml, '')
74
69
  if ((l += 1) % 100).zero?
75
70
  GC.start
76
- snapshots << [l, ] l/(Time.now - start_time)
71
+ snapshots << [l, l/(Time.now - start_time)]
77
72
  end
78
73
  end
79
74
  end
data/lib/reso/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Reso
2
- VERSION = "0.1.4.6"
2
+ VERSION = "0.1.4.7"
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.6
4
+ version: 0.1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Edlund