mass_record 0.0.3 → 0.0.3.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
  SHA1:
3
- metadata.gz: aa0932cb1a7cca3be43da636721f64a1bf561f99
4
- data.tar.gz: 5a06ac8edb6dc364b469272afbb74195e174567c
3
+ metadata.gz: 2274b5908e73c6ef4979b62e286b4e4ff45aa4d4
4
+ data.tar.gz: 9bfb8204e07590ccf17f68616b8b8555ab9387dc
5
5
  SHA512:
6
- metadata.gz: 4563ff2538f3580206787a73b93d43d798267099400b48806e32b5a29ea94e80bd4ee3d22c44975e481503d07490cb2d672619dfd07bbfbc5e444f68a57ac326
7
- data.tar.gz: 784a6ed6e6747e55111289496e0e04169f963095e01f3162b2b8c4b72a77c37cf7c20fb1e19af9fd63dfacbcded5221cb835e042a47f7b5562b5a8c97b046a92
6
+ metadata.gz: 593872b1c3b26944cbfb7b6ba7015ca45ff5c77c2f3a86bb6d25c69ac8914f43df073a46f6176eb25cd3ae3af25ad8b03f99b054a667f05831cb5950c0c8d500
7
+ data.tar.gz: 3a9162c425dc5f785d05dc6c7c6ba7256624b1442d8aa2e396fa2eaed95f87bcec05efa6d5ac46742133462b2bc676b9447bb49dfdf085459afeaecd4cca90f7
@@ -1,3 +1,3 @@
1
1
  module MassRecord
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.3.1" # changed file tags to use milliseconds
3
3
  end
data/lib/mass_record.rb CHANGED
@@ -39,11 +39,12 @@ module MassRecord
39
39
  end
40
40
  end
41
41
 
42
+ # TODO: add logic to append the data if the filename already exists
42
43
  # accepts an array of objects with the option to specify what rails operation to perform
43
44
  def queue_for_quick_query object_array,
44
45
  operation: :save,
45
46
  folder:{queued:path[:queued_queries]},
46
- file_tag:Time.now.strftime("%Y%m%d%H%M%S").to_s,
47
+ file_tag:Time.now.strftime("%Y%m%d%H%M%S%L").to_s,
47
48
  key:{
48
49
  table: "table",
49
50
  operation: "operation",
@@ -52,7 +53,7 @@ module MassRecord
52
53
 
53
54
  object_array = [object_array] unless object_array.is_a? Array
54
55
  return false if object_array.blank?
55
-
56
+
56
57
  queue = []
57
58
 
58
59
  object_array.each do |object|
@@ -79,7 +80,7 @@ module MassRecord
79
80
  queued:path[:queued_queries],
80
81
  errored:path[:errored_queries],
81
82
  completed:path[:completed_queries]
82
- },file_tag:Time.now.strftime("%Y%m%d%H%M%S").to_s
83
+ },file_tag:Time.now.strftime("%Y%m%d%H%M%S%L").to_s
83
84
 
84
85
  files = Dir.foreach(folder[:queued]).collect{|x| x}.keep_if{|y|y=~/\.json$/i}
85
86
  json_objects = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mass_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hanna