timesheet_nags 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timesheet_nags/nagger.rb +5 -1
- data/lib/timesheet_nags/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 958b80f262b81c15152122e4cdeb9b0195d2739e
|
4
|
+
data.tar.gz: 777306626137d73ff6277c4b9f241329147087d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb823776189775ccdc68133606c40c1900598a52de189abcaa858e3cdb8b053b81dfc368a2fc02104995a89b26712c7e75519b07fe16317a28c654a0d0b66e7f
|
7
|
+
data.tar.gz: 130e597f17c9ac135d877eea16b50ebe2cad32a2ab84ec44e34da110e31de6c8436d30625710677de6c053e4cce32b83778dd0d6d1789f7c3fb34b05e9c8615c
|
@@ -48,9 +48,13 @@ module TimesheetNags
|
|
48
48
|
req['Authorization'] = 'Bearer ' + ENV.fetch('HARVEST_TOKEN')
|
49
49
|
req['Harvest-Account-Id'] = ENV.fetch('HARVEST_ACCOUNT_ID')
|
50
50
|
|
51
|
-
|
51
|
+
begin
|
52
|
+
@_res ||= Net::HTTP.start(uri.hostname, uri.port, use_ssl: true, timeout: 2) do |http|
|
52
53
|
http.request(req)
|
53
54
|
end
|
55
|
+
rescue SocketError
|
56
|
+
abort "Unable to connect to Harvest!"
|
57
|
+
end
|
54
58
|
|
55
59
|
res = @_res
|
56
60
|
|