omnievent-api 0.1.0.pre2 → 0.1.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +49 -42
- data/lib/omnievent/api/version.rb +1 -1
- data/lib/omnievent/strategies/api.rb +12 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8963380908fabe9937b9697704f1cab2702358f6e08756a4d4ccb2d3b4e86a04
|
4
|
+
data.tar.gz: 0fef4a1687c6775e8aeb4b3984bdcbc63a7b738f30fc18b6cb6e6df607af5497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 523d360dbb70c9569c6d1bc36682444356ec017967e860092f45ffb46b20fd2ee998bc924227bba517946173dd2d1c015387881af3dfc23282f3622739457adb
|
7
|
+
data.tar.gz: f9c6b83093296d760d0d2d53037cc1ff45d0896f2d823843d7e8d82d1ae4354d62aeaa82e7af60555e2b0da59985ce5e482d2069541368726a1886aa2f8bc56b
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,74 +1,81 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omnievent-api (0.1.0.
|
4
|
+
omnievent-api (0.1.0.pre3)
|
5
5
|
excon
|
6
6
|
omnievent
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.8.
|
12
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.8.7)
|
12
|
+
public_suffix (>= 2.0.2, < 7.0)
|
13
13
|
ast (2.4.2)
|
14
|
+
bigdecimal (3.1.8)
|
14
15
|
byebug (11.1.3)
|
15
|
-
concurrent-ruby (1.
|
16
|
-
crack (0.
|
16
|
+
concurrent-ruby (1.3.4)
|
17
|
+
crack (1.0.0)
|
18
|
+
bigdecimal
|
17
19
|
rexml
|
18
|
-
diff-lcs (1.5.
|
19
|
-
excon (0.
|
20
|
-
hashdiff (1.
|
20
|
+
diff-lcs (1.5.1)
|
21
|
+
excon (0.111.0)
|
22
|
+
hashdiff (1.1.1)
|
21
23
|
hashie (5.0.0)
|
22
|
-
iso-639 (0.3.
|
23
|
-
json (2.
|
24
|
-
|
24
|
+
iso-639 (0.3.6)
|
25
|
+
json (2.7.2)
|
26
|
+
language_server-protocol (3.17.0.3)
|
27
|
+
omnievent (0.1.0.pre5)
|
25
28
|
hashie (>= 3.4.6)
|
26
29
|
iso-639 (~> 0.3.5)
|
27
30
|
tzinfo (~> 2.0)
|
28
|
-
parallel (1.
|
29
|
-
parser (3.
|
31
|
+
parallel (1.26.3)
|
32
|
+
parser (3.3.4.2)
|
30
33
|
ast (~> 2.4.1)
|
31
|
-
|
34
|
+
racc
|
35
|
+
public_suffix (6.0.1)
|
36
|
+
racc (1.8.1)
|
32
37
|
rainbow (3.1.1)
|
33
|
-
rake (13.
|
34
|
-
regexp_parser (2.
|
35
|
-
rexml (3.
|
36
|
-
|
37
|
-
|
38
|
-
rspec-
|
39
|
-
rspec-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
rake (13.2.1)
|
39
|
+
regexp_parser (2.9.2)
|
40
|
+
rexml (3.3.6)
|
41
|
+
strscan
|
42
|
+
rspec (3.13.0)
|
43
|
+
rspec-core (~> 3.13.0)
|
44
|
+
rspec-expectations (~> 3.13.0)
|
45
|
+
rspec-mocks (~> 3.13.0)
|
46
|
+
rspec-core (3.13.1)
|
47
|
+
rspec-support (~> 3.13.0)
|
48
|
+
rspec-expectations (3.13.2)
|
43
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-mocks (3.
|
50
|
+
rspec-support (~> 3.13.0)
|
51
|
+
rspec-mocks (3.13.1)
|
46
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.
|
48
|
-
rspec-support (3.
|
49
|
-
rubocop (1.
|
53
|
+
rspec-support (~> 3.13.0)
|
54
|
+
rspec-support (3.13.1)
|
55
|
+
rubocop (1.66.0)
|
50
56
|
json (~> 2.3)
|
57
|
+
language_server-protocol (>= 3.17.0)
|
51
58
|
parallel (~> 1.10)
|
52
|
-
parser (>= 3.
|
59
|
+
parser (>= 3.3.0.2)
|
53
60
|
rainbow (>= 2.2.2, < 4.0)
|
54
|
-
regexp_parser (>=
|
55
|
-
|
56
|
-
rubocop-ast (>= 1.20.1, < 2.0)
|
61
|
+
regexp_parser (>= 2.4, < 3.0)
|
62
|
+
rubocop-ast (>= 1.32.1, < 2.0)
|
57
63
|
ruby-progressbar (~> 1.7)
|
58
|
-
unicode-display_width (>=
|
59
|
-
rubocop-ast (1.
|
60
|
-
parser (>= 3.
|
61
|
-
ruby-progressbar (1.
|
62
|
-
|
64
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
65
|
+
rubocop-ast (1.32.2)
|
66
|
+
parser (>= 3.3.1.0)
|
67
|
+
ruby-progressbar (1.13.0)
|
68
|
+
strscan (3.1.0)
|
69
|
+
tzinfo (2.0.6)
|
63
70
|
concurrent-ruby (~> 1.0)
|
64
|
-
unicode-display_width (2.
|
65
|
-
webmock (3.
|
71
|
+
unicode-display_width (2.5.0)
|
72
|
+
webmock (3.23.1)
|
66
73
|
addressable (>= 2.8.0)
|
67
74
|
crack (>= 0.3.2)
|
68
75
|
hashdiff (>= 0.4.0, < 2.0.0)
|
69
76
|
|
70
77
|
PLATFORMS
|
71
|
-
|
78
|
+
arm64-darwin-23
|
72
79
|
|
73
80
|
DEPENDENCIES
|
74
81
|
byebug
|
@@ -79,4 +86,4 @@ DEPENDENCIES
|
|
79
86
|
webmock
|
80
87
|
|
81
88
|
BUNDLED WITH
|
82
|
-
2.3.
|
89
|
+
2.3.26
|
@@ -54,7 +54,8 @@ module OmniEvent
|
|
54
54
|
request_response = request_connection.get(request_opts)
|
55
55
|
end
|
56
56
|
|
57
|
-
|
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
|
-
|
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
|
|
@@ -81,6 +84,13 @@ module OmniEvent
|
|
81
84
|
debug: options.debug
|
82
85
|
)
|
83
86
|
end
|
87
|
+
|
88
|
+
def path_with_params(path, params = {})
|
89
|
+
uri = URI.parse(path)
|
90
|
+
params.reject! { |_k, v| v.to_s.strip.empty? }
|
91
|
+
uri.query = URI.encode_www_form(params) unless params.empty?
|
92
|
+
uri.to_s
|
93
|
+
end
|
84
94
|
end
|
85
95
|
end
|
86
96
|
end
|
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.
|
4
|
+
version: 0.1.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angus McLeod
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-14 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.
|
113
|
+
rubygems_version: 3.3.26
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: OmniEvent API strategy
|