restforce-db 4.0.0 → 4.0.1

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: c63f46aaa750d8936499c83d7e6f135e962c9d2e
4
- data.tar.gz: 2838e8434cef8bb652fb3aac1251e4ce287f412d
3
+ metadata.gz: eab3aaac473e45e0b8ab82cb1d9d9b3e9d1c17b2
4
+ data.tar.gz: a4e088c191e14afe9152790d43bca091e4210a49
5
5
  SHA512:
6
- metadata.gz: 0c5ac6edc50ab9ea35777bcfc677385feb7ea00734108b560012d249612e7c2f29dd65663d9390ceff16ec9272126f62014f282630f66d566128e0429cc0441c
7
- data.tar.gz: 88c449e199a291dd8ea652d933dd51e0c07ed16e9cba034e297fd1cdeeb7f6aa69f7a9cde5cca5f93ea3125b1ee2b9fc17ab8f1e79d874f46adfc98ca020b139
6
+ metadata.gz: b19df3329f7e61688a59e8fb4b1b8b61b4c55c3204fd55c428f268364c8f9c74eaf1f993cba6bf14880776cba536a3373110653b8a8b318b5486aed458214029
7
+ data.tar.gz: 20ae363668dfcf76c8b8791bfa459d4125f690c589f22c0528d192e81050490d1bc10543f9bbab5499744b2c2188f8a0c4aaed929bfd7d06008c178665eed522
@@ -72,8 +72,10 @@ module Restforce
72
72
  true
73
73
  rescue => e
74
74
  error(e)
75
-
76
75
  false
76
+ rescue Exception => e # rubocop:disable Lint/RescueException
77
+ error(e)
78
+ raise e
77
79
  end
78
80
 
79
81
  # Internal: Run the passed mapping through the supplied Task class.
@@ -14,9 +14,9 @@ module Restforce
14
14
  #
15
15
  # file_path - The Path to the tracking file.
16
16
  def initialize(file_path)
17
- @file = File.open(file_path, "a+")
17
+ @file_path = file_path
18
18
 
19
- timestamp = @file.read
19
+ timestamp = File.open(@file_path, "a+") { |file| file.read }
20
20
  return if timestamp.empty?
21
21
 
22
22
  @last_run = Time.parse(timestamp)
@@ -30,11 +30,7 @@ module Restforce
30
30
  # Returns nothing.
31
31
  def track(time)
32
32
  @last_run = time
33
-
34
- @file.truncate(0)
35
- @file.print(time.utc.iso8601)
36
- @file.flush
37
- @file.rewind
33
+ File.open(@file_path, "w") { |file| file.write(time.utc.iso8601) }
38
34
  end
39
35
 
40
36
  end
@@ -3,7 +3,7 @@ module Restforce
3
3
  # :nodoc:
4
4
  module DB
5
5
 
6
- VERSION = "4.0.0"
6
+ VERSION = "4.0.1"
7
7
 
8
8
  end
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Horner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord