sumologic 0.1.0 → 0.1.2
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 +5 -5
- data/{LICENSE.txt → LICENSE.md} +1 -1
- data/README.md +9 -5
- data/lib/sumologic.rb +9 -2
- data/test/test_helper.rb +1 -4
- data/test/test_setup.rb +1 -1
- metadata +32 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 54a395a71f11171bd422704c37c380977f570087237d85572d50d4b22a37fe7e
|
4
|
+
data.tar.gz: 13aa337412ba9e64340efaf7cbb9b626c0265545fdfc6ec5f8657013ca85d88b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad14b58f5331ae1727b4e37c09ce16438be17b3b06111741e4015156707b56b95123f6bb552ba3f5a6f4e516570745980eca07e0a27d499f70914855b6158f7
|
7
|
+
data.tar.gz: c96ea2039e491d83d7d5fa4c7f07ca438c639f0b3237572cc2b866d6666d52e86c73c3552970918140163c2f018094033e4cbbb906e6f6733bf951e35fd3fab6
|
data/{LICENSE.txt → LICENSE.md}
RENAMED
data/README.md
CHANGED
@@ -5,12 +5,9 @@ Sumo Logic Ruby SDK
|
|
5
5
|
[![Build Status][build-status-svg]][build-status-link]
|
6
6
|
[![Code Climate][codeclimate-status-svg]][codeclimate-status-link]
|
7
7
|
[![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-link]
|
8
|
-
[![Downloads][downloads-svg]][downloads-link]
|
9
8
|
[![Docs][docs-rubydoc-svg]][docs-rubydoc-link]
|
10
9
|
[![License][license-svg]][license-link]
|
11
10
|
|
12
|
-
[![Stories in Ready][story-status-svg]][story-status-link]
|
13
|
-
|
14
11
|
Ruby interface to the Sumo Logic REST API.
|
15
12
|
|
16
13
|
## Usage
|
@@ -64,6 +61,9 @@ r = sumo.create_content path, data
|
|
64
61
|
r = sumo.get_content path
|
65
62
|
|
66
63
|
r = sumo.delete_content path
|
64
|
+
|
65
|
+
# Low-Level
|
66
|
+
r = sumo.post path, data
|
67
67
|
```
|
68
68
|
|
69
69
|
Note, for the search methods, the query parameter can be exactly the same query that is entered into the Sumo Logic web console.
|
@@ -99,9 +99,9 @@ Please report these on [Github](https://github.com/grokify/sumologic-sdk-ruby)
|
|
99
99
|
|
100
100
|
## License
|
101
101
|
|
102
|
-
Sumo Logic Ruby SDK is available under an MIT-style license. See [LICENSE.
|
102
|
+
Sumo Logic Ruby SDK is available under an MIT-style license. See [LICENSE.md](LICENSE.md) for details.
|
103
103
|
|
104
|
-
Sumo Logic Ruby SDK © 2015-
|
104
|
+
Sumo Logic Ruby SDK © 2015-2023 by John Wang
|
105
105
|
|
106
106
|
[gem-version-svg]: https://badge.fury.io/rb/sumologic.svg
|
107
107
|
[gem-version-link]: http://badge.fury.io/rb/sumologic
|
@@ -109,6 +109,10 @@ Sumo Logic Ruby SDK © 2015-2016 by John Wang
|
|
109
109
|
[downloads-link]: https://rubygems.org/gems/sumologic
|
110
110
|
[build-status-svg]: https://api.travis-ci.org/grokify/sumologic-sdk-ruby.svg?branch=master
|
111
111
|
[build-status-link]: https://travis-ci.org/grokify/sumologic-sdk-ruby
|
112
|
+
[dependency-status-svg]: https://gemnasium.com/grokify/sumologic-sdk-ruby.svg
|
113
|
+
[dependency-status-link]: https://gemnasium.com/grokify/sumologic-sdk-ruby
|
114
|
+
[codacy-svg]: https://api.codacy.com/project/badge/Grade/d6c7f184a9394629a9a65a1406e9f767
|
115
|
+
[codacy-link]: https://www.codacy.com/app/grokify/sumologic-sdk-ruby
|
112
116
|
[codeclimate-status-svg]: https://codeclimate.com/github/grokify/sumologic-sdk-ruby/badges/gpa.svg
|
113
117
|
[codeclimate-status-link]: https://codeclimate.com/github/grokify/sumologic-sdk-ruby
|
114
118
|
[scrutinizer-status-svg]: https://scrutinizer-ci.com/g/grokify/sumologic-sdk-ruby/badges/quality-score.png?b=master
|
data/lib/sumologic.rb
CHANGED
@@ -4,7 +4,7 @@ require 'faraday-cookie_jar'
|
|
4
4
|
require 'multi_json'
|
5
5
|
|
6
6
|
module SumoLogic
|
7
|
-
VERSION = '0.1.
|
7
|
+
VERSION = '0.1.2'
|
8
8
|
URL = 'https://api.sumologic.com/api/v1'
|
9
9
|
|
10
10
|
class Client
|
@@ -23,11 +23,18 @@ module SumoLogic
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
def post(path, data={})
|
27
|
+
@http.post do |req|
|
28
|
+
req.url path
|
29
|
+
req.body = data unless data.empty?
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
26
33
|
def search(query, from_time=nil, to_time=nil, time_zone='UTC')
|
27
34
|
@http.get do |req|
|
28
35
|
req.url 'logs/search'
|
29
36
|
req.params = {q: query, from: from_time, to: to_time, tz: time_zone}
|
30
|
-
end
|
37
|
+
end
|
31
38
|
end
|
32
39
|
|
33
40
|
def search_job(query, from_time=nil, to_time=nil, time_zone='UTC')
|
data/test/test_helper.rb
CHANGED
data/test/test_setup.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sumologic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Wang
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,40 +16,40 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.10'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.10.3
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '1.10'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 1.10.3
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday_middleware
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '1.2'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 1.2.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '1.2'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
52
|
+
version: 1.2.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: faraday-cookie_jar
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
93
|
+
version: '2'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
100
|
+
version: '2'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: coveralls
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,14 +118,20 @@ dependencies:
|
|
118
118
|
requirements:
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
121
|
+
version: '13'
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 13.0.6
|
122
125
|
type: :development
|
123
126
|
prerelease: false
|
124
127
|
version_requirements: !ruby/object:Gem::Requirement
|
125
128
|
requirements:
|
126
129
|
- - "~>"
|
127
130
|
- !ruby/object:Gem::Version
|
128
|
-
version: '
|
131
|
+
version: '13'
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 13.0.6
|
129
135
|
- !ruby/object:Gem::Dependency
|
130
136
|
name: simplecov
|
131
137
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +139,9 @@ dependencies:
|
|
133
139
|
- - "~>"
|
134
140
|
- !ruby/object:Gem::Version
|
135
141
|
version: '0'
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.22.0
|
136
145
|
type: :development
|
137
146
|
prerelease: false
|
138
147
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -140,6 +149,9 @@ dependencies:
|
|
140
149
|
- - "~>"
|
141
150
|
- !ruby/object:Gem::Version
|
142
151
|
version: '0'
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 0.22.0
|
143
155
|
- !ruby/object:Gem::Dependency
|
144
156
|
name: test-unit
|
145
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,14 +166,14 @@ dependencies:
|
|
154
166
|
- - "~>"
|
155
167
|
- !ruby/object:Gem::Version
|
156
168
|
version: '3'
|
157
|
-
description:
|
169
|
+
description:
|
158
170
|
email: johncwang@gmail.com
|
159
171
|
executables: []
|
160
172
|
extensions: []
|
161
173
|
extra_rdoc_files: []
|
162
174
|
files:
|
163
175
|
- CHANGELOG.md
|
164
|
-
- LICENSE.
|
176
|
+
- LICENSE.md
|
165
177
|
- README.md
|
166
178
|
- Rakefile
|
167
179
|
- lib/sumologic.rb
|
@@ -171,7 +183,7 @@ homepage: https://github.com/grokify/sumologic-sdk-ruby
|
|
171
183
|
licenses:
|
172
184
|
- MIT
|
173
185
|
metadata: {}
|
174
|
-
post_install_message:
|
186
|
+
post_install_message:
|
175
187
|
rdoc_options: []
|
176
188
|
require_paths:
|
177
189
|
- lib
|
@@ -186,9 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
198
|
- !ruby/object:Gem::Version
|
187
199
|
version: '0'
|
188
200
|
requirements: []
|
189
|
-
|
190
|
-
|
191
|
-
signing_key:
|
201
|
+
rubygems_version: 3.4.2
|
202
|
+
signing_key:
|
192
203
|
specification_version: 4
|
193
204
|
summary: Ruby Sumo Logic SDK for the Sumo Logic REST API
|
194
205
|
test_files:
|