omnievent-api 0.1.0.pre2 → 0.1.0.pre3

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
  SHA256:
3
- metadata.gz: 5f03909646c8909dcac894d052609ec5b0a337b7ade88df690029f30866b1710
4
- data.tar.gz: 2ad4e2d181f5bfd005f67515a123d276ed4852382d988844c836694decf0d010
3
+ metadata.gz: 941d3b6b19c8478a4b464277b0dc31902551edf2ab8145ef4747c04e738dbb50
4
+ data.tar.gz: d33a1365a9ee988d625824c8154ea71e343fbdbaeee332d4529cdd6e594f8832
5
5
  SHA512:
6
- metadata.gz: b7d06f35d21485b9a80e006dadff5cf3e3ee78966e501d12a1c2e50a20bd39ea5f25638f1488b030930a4ce883302c8d35d484974ff07e368b1fe4b94dd67fcc
7
- data.tar.gz: 8fc5203c01d016483125eef12a3264d7cd5e15fec5b0fd97b7a36f8c88c23919e48228f0085ef28145fcc53db179429757e086fff494c36725a230ca6397f41d
6
+ metadata.gz: 7a3b6c202b6a908f08f4889ae9b2896a4cc7150556c86dfe5e9be3de0543bd8013925d236559f04327e713c2d1485a09dca2ee0fbeeab8492fd677b184c5feea
7
+ data.tar.gz: d7c05c829b4a20bcecd5b24bafdf313841ead51b88958e921f78c2011ed830297d7d6c5c443200182841848170a560789816a3d5d7d98c9ece6fed202d9bf7ab
data/.rubocop.yml CHANGED
@@ -15,7 +15,7 @@ Metrics/BlockLength:
15
15
 
16
16
  Metrics/MethodLength:
17
17
  CountComments: false
18
- Max: 25
18
+ Max: 30
19
19
 
20
20
  Metrics/ClassLength:
21
21
  Max: 150
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniEvent
4
4
  module API
5
- VERSION = "0.1.0.pre2"
5
+ VERSION = "0.1.0.pre3"
6
6
  end
7
7
  end
@@ -54,7 +54,8 @@ module OmniEvent
54
54
  request_response = request_connection.get(request_opts)
55
55
  end
56
56
 
57
- unless request_response.status == 200
57
+ request_succeeded = [200, 201, 202, 204].include?(request_response.status)
58
+ unless request_succeeded
58
59
  message = "Failed to retrieve events from #{options.name}"
59
60
  message += ": #{request_response.body[0...300]}" if request_response.body
60
61
  log(:error, message)
@@ -62,7 +63,7 @@ module OmniEvent
62
63
 
63
64
  if opts[:raw_response]
64
65
  request_response
65
- else
66
+ elsif !request_response.body.to_s.empty?
66
67
  begin
67
68
  parsed_request_body = JSON.parse(request_response.body)
68
69
  rescue JSON::ParserError
@@ -71,6 +72,8 @@ module OmniEvent
71
72
  end
72
73
 
73
74
  parsed_request_body
75
+ else
76
+ request_succeeded
74
77
  end
75
78
  end
76
79
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnievent-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre2
4
+ version: 0.1.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: 1.3.1
112
112
  requirements: []
113
- rubygems_version: 3.1.4
113
+ rubygems_version: 3.3.26
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: OmniEvent API strategy