mithraic_events 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +26 -0
- data/Gemfile.lock +236 -0
- data/LICENSE.txt +21 -0
- data/README.md +37 -0
- data/Rakefile +12 -0
- data/lib/mithraic_events/version.rb +5 -0
- data/lib/mithraic_events.rb +109 -0
- data/lib/plugin/plugin.rb +39 -0
- data/sig/mithraic_events.rbs +4 -0
- metadata +293 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: db3b5d0600288d73eb9d87fa7e95fb8edd29e89fed0c32785af57d177174bad7
|
4
|
+
data.tar.gz: 31e280deb76a41862314fbf00dd9d808082acbbaa65f8e06db7f21ee9028536f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bd84fbea1e2b064b3e3f7350606320de4ff03d6cfb7347dda2efcc7b86837e86dea860c3737dbf9992c4b0a5546f91c365e7a9a34fedc4d6ec57f171eaa731db
|
7
|
+
data.tar.gz: e116896ce0f5f66451f658820cbc2c278c541b9191f2f9feae423987762872523fb6ecdad4627075805ac282cec28aed6606b9e49d6d3dc9299a389f904069d9
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in mithraic-events.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "activesupport"
|
9
|
+
gem "date"
|
10
|
+
gem "httparty"
|
11
|
+
gem "json"
|
12
|
+
gem "ostruct"
|
13
|
+
gem "prawn"
|
14
|
+
gem "pry"
|
15
|
+
gem "pry-nav"
|
16
|
+
gem "rake"
|
17
|
+
gem "rdebug"
|
18
|
+
gem "rdoc"
|
19
|
+
gem "regexp-examples"
|
20
|
+
gem "report_builder"
|
21
|
+
gem "rspec"
|
22
|
+
gem "rspec-expectations"
|
23
|
+
gem "rubocop"
|
24
|
+
gem "rubocop-gitlab-security"
|
25
|
+
gem "ruby-debug-ide"
|
26
|
+
gem "solargraph"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mithraic_events (0.1.0)
|
5
|
+
httmultiparty
|
6
|
+
httparty
|
7
|
+
jmespath
|
8
|
+
net-sftp
|
9
|
+
nokogiri
|
10
|
+
os
|
11
|
+
poltergeist
|
12
|
+
pry
|
13
|
+
rake
|
14
|
+
rspec
|
15
|
+
rspec-retry
|
16
|
+
savon
|
17
|
+
without_accents
|
18
|
+
|
19
|
+
GEM
|
20
|
+
remote: https://rubygems.org/
|
21
|
+
specs:
|
22
|
+
activesupport (7.0.3)
|
23
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
24
|
+
i18n (>= 1.6, < 2)
|
25
|
+
minitest (>= 5.1)
|
26
|
+
tzinfo (~> 2.0)
|
27
|
+
addressable (2.8.0)
|
28
|
+
public_suffix (>= 2.0.2, < 5.0)
|
29
|
+
akami (1.3.1)
|
30
|
+
gyoku (>= 0.4.0)
|
31
|
+
nokogiri
|
32
|
+
ast (2.4.2)
|
33
|
+
backport (1.2.0)
|
34
|
+
benchmark (0.2.0)
|
35
|
+
builder (3.2.4)
|
36
|
+
capybara (3.37.1)
|
37
|
+
addressable
|
38
|
+
matrix
|
39
|
+
mini_mime (>= 0.1.3)
|
40
|
+
nokogiri (~> 1.8)
|
41
|
+
rack (>= 1.6.0)
|
42
|
+
rack-test (>= 0.6.3)
|
43
|
+
regexp_parser (>= 1.5, < 3.0)
|
44
|
+
xpath (~> 3.2)
|
45
|
+
cliver (0.3.2)
|
46
|
+
coderay (1.1.3)
|
47
|
+
concurrent-ruby (1.1.10)
|
48
|
+
date (3.2.2)
|
49
|
+
diff-lcs (1.5.0)
|
50
|
+
e2mmap (0.1.0)
|
51
|
+
gyoku (1.4.0)
|
52
|
+
builder (>= 2.1.2)
|
53
|
+
rexml (~> 3.0)
|
54
|
+
httmultiparty (0.3.16)
|
55
|
+
httparty (>= 0.7.3)
|
56
|
+
mimemagic
|
57
|
+
multipart-post
|
58
|
+
httparty (0.20.0)
|
59
|
+
mime-types (~> 3.0)
|
60
|
+
multi_xml (>= 0.5.2)
|
61
|
+
httpi (2.5.0)
|
62
|
+
rack
|
63
|
+
socksify
|
64
|
+
i18n (1.10.0)
|
65
|
+
concurrent-ruby (~> 1.0)
|
66
|
+
jaro_winkler (1.5.4)
|
67
|
+
jmespath (1.6.1)
|
68
|
+
json (2.6.2)
|
69
|
+
kramdown (2.4.0)
|
70
|
+
rexml
|
71
|
+
kramdown-parser-gfm (1.1.0)
|
72
|
+
kramdown (~> 2.0)
|
73
|
+
matrix (0.4.2)
|
74
|
+
method_source (1.0.0)
|
75
|
+
mime-types (3.4.1)
|
76
|
+
mime-types-data (~> 3.2015)
|
77
|
+
mime-types-data (3.2022.0105)
|
78
|
+
mimemagic (0.4.3)
|
79
|
+
nokogiri (~> 1)
|
80
|
+
rake
|
81
|
+
mini_mime (1.1.2)
|
82
|
+
minitest (5.15.0)
|
83
|
+
multi_xml (0.6.0)
|
84
|
+
multipart-post (2.2.3)
|
85
|
+
net-sftp (3.0.0)
|
86
|
+
net-ssh (>= 5.0.0, < 7.0.0)
|
87
|
+
net-ssh (6.1.0)
|
88
|
+
nokogiri (1.13.6-x86_64-linux)
|
89
|
+
racc (~> 1.4)
|
90
|
+
nori (2.6.0)
|
91
|
+
os (1.1.4)
|
92
|
+
ostruct (0.5.5)
|
93
|
+
parallel (1.22.1)
|
94
|
+
parser (3.1.2.0)
|
95
|
+
ast (~> 2.4.1)
|
96
|
+
pdf-core (0.9.0)
|
97
|
+
poltergeist (1.18.1)
|
98
|
+
capybara (>= 2.1, < 4)
|
99
|
+
cliver (~> 0.3.1)
|
100
|
+
websocket-driver (>= 0.2.0)
|
101
|
+
prawn (2.4.0)
|
102
|
+
pdf-core (~> 0.9.0)
|
103
|
+
ttfunk (~> 1.7)
|
104
|
+
pry (0.14.1)
|
105
|
+
coderay (~> 1.1)
|
106
|
+
method_source (~> 1.0)
|
107
|
+
pry-nav (1.0.0)
|
108
|
+
pry (>= 0.9.10, < 0.15)
|
109
|
+
psych (4.0.4)
|
110
|
+
stringio
|
111
|
+
public_suffix (4.0.7)
|
112
|
+
racc (1.6.0)
|
113
|
+
rack (2.2.3.1)
|
114
|
+
rack-test (1.1.0)
|
115
|
+
rack (>= 1.0, < 3)
|
116
|
+
rainbow (3.1.1)
|
117
|
+
rake (13.0.6)
|
118
|
+
rdebug (0.1)
|
119
|
+
rdoc (6.4.0)
|
120
|
+
psych (>= 4.0.0)
|
121
|
+
regexp-examples (1.5.1)
|
122
|
+
regexp_parser (2.5.0)
|
123
|
+
report_builder (1.9)
|
124
|
+
json (>= 2.3.0)
|
125
|
+
reverse_markdown (2.1.1)
|
126
|
+
nokogiri
|
127
|
+
rexml (3.2.5)
|
128
|
+
rspec (3.11.0)
|
129
|
+
rspec-core (~> 3.11.0)
|
130
|
+
rspec-expectations (~> 3.11.0)
|
131
|
+
rspec-mocks (~> 3.11.0)
|
132
|
+
rspec-core (3.11.0)
|
133
|
+
rspec-support (~> 3.11.0)
|
134
|
+
rspec-expectations (3.11.0)
|
135
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
136
|
+
rspec-support (~> 3.11.0)
|
137
|
+
rspec-mocks (3.11.1)
|
138
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
139
|
+
rspec-support (~> 3.11.0)
|
140
|
+
rspec-retry (0.6.2)
|
141
|
+
rspec-core (> 3.3)
|
142
|
+
rspec-support (3.11.0)
|
143
|
+
rubocop (1.30.1)
|
144
|
+
parallel (~> 1.10)
|
145
|
+
parser (>= 3.1.0.0)
|
146
|
+
rainbow (>= 2.2.2, < 4.0)
|
147
|
+
regexp_parser (>= 1.8, < 3.0)
|
148
|
+
rexml (>= 3.2.5, < 4.0)
|
149
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
150
|
+
ruby-progressbar (~> 1.7)
|
151
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
152
|
+
rubocop-ast (1.18.0)
|
153
|
+
parser (>= 3.1.1.0)
|
154
|
+
rubocop-checkstyle_formatter (0.5.0)
|
155
|
+
rubocop (>= 1.14.0)
|
156
|
+
rubocop-gitlab-security (0.1.1)
|
157
|
+
rubocop (>= 0.51)
|
158
|
+
ruby-debug-ide (0.7.3)
|
159
|
+
rake (>= 0.8.1)
|
160
|
+
ruby-progressbar (1.11.0)
|
161
|
+
savon (2.12.1)
|
162
|
+
akami (~> 1.2)
|
163
|
+
builder (>= 2.1.2)
|
164
|
+
gyoku (~> 1.2)
|
165
|
+
httpi (~> 2.3)
|
166
|
+
nokogiri (>= 1.8.1)
|
167
|
+
nori (~> 2.4)
|
168
|
+
wasabi (~> 3.4)
|
169
|
+
socksify (1.7.1)
|
170
|
+
solargraph (0.45.0)
|
171
|
+
backport (~> 1.2)
|
172
|
+
benchmark
|
173
|
+
bundler (>= 1.17.2)
|
174
|
+
diff-lcs (~> 1.4)
|
175
|
+
e2mmap
|
176
|
+
jaro_winkler (~> 1.5)
|
177
|
+
kramdown (~> 2.3)
|
178
|
+
kramdown-parser-gfm (~> 1.1)
|
179
|
+
parser (~> 3.0)
|
180
|
+
reverse_markdown (>= 1.0.5, < 3)
|
181
|
+
rubocop (>= 0.52)
|
182
|
+
thor (~> 1.0)
|
183
|
+
tilt (~> 2.0)
|
184
|
+
yard (~> 0.9, >= 0.9.24)
|
185
|
+
stringio (3.0.2)
|
186
|
+
thor (1.2.1)
|
187
|
+
tilt (2.0.10)
|
188
|
+
ttfunk (1.7.0)
|
189
|
+
tzinfo (2.0.4)
|
190
|
+
concurrent-ruby (~> 1.0)
|
191
|
+
unicode-display_width (2.1.0)
|
192
|
+
utf8_utils (2.0.1)
|
193
|
+
wasabi (3.7.0)
|
194
|
+
addressable
|
195
|
+
httpi (~> 2.0)
|
196
|
+
nokogiri (>= 1.4.2)
|
197
|
+
webrick (1.7.0)
|
198
|
+
websocket-driver (0.7.5)
|
199
|
+
websocket-extensions (>= 0.1.0)
|
200
|
+
websocket-extensions (0.1.5)
|
201
|
+
without_accents (0.9.1)
|
202
|
+
utf8_utils
|
203
|
+
xpath (3.2.0)
|
204
|
+
nokogiri (~> 1.8)
|
205
|
+
yard (0.9.28)
|
206
|
+
webrick (~> 1.7.0)
|
207
|
+
|
208
|
+
PLATFORMS
|
209
|
+
x86_64-linux
|
210
|
+
|
211
|
+
DEPENDENCIES
|
212
|
+
activesupport
|
213
|
+
bundler
|
214
|
+
date
|
215
|
+
httparty
|
216
|
+
json
|
217
|
+
mithraic_events!
|
218
|
+
ostruct
|
219
|
+
prawn
|
220
|
+
pry
|
221
|
+
pry-nav
|
222
|
+
rake
|
223
|
+
rdebug
|
224
|
+
rdoc
|
225
|
+
regexp-examples
|
226
|
+
report_builder
|
227
|
+
rspec
|
228
|
+
rspec-expectations
|
229
|
+
rubocop
|
230
|
+
rubocop-checkstyle_formatter
|
231
|
+
rubocop-gitlab-security
|
232
|
+
ruby-debug-ide
|
233
|
+
solargraph
|
234
|
+
|
235
|
+
BUNDLED WITH
|
236
|
+
2.3.14
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 callyca
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# MithraicEvents
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mithraic_events`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Install the gem and add to the application's Gemfile by executing:
|
10
|
+
|
11
|
+
$ bundle add mithraic_events
|
12
|
+
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
|
+
|
15
|
+
$ gem install mithraic_events
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
TODO: Write usage instructions here
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
+
|
25
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mithraic_events. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/mithraic_events/blob/master/CODE_OF_CONDUCT.md).
|
30
|
+
|
31
|
+
## License
|
32
|
+
|
33
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
+
|
35
|
+
## Code of Conduct
|
36
|
+
|
37
|
+
Everyone interacting in the MithraicEvents project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/mithraic_events/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "mithraic_events/version"
|
4
|
+
require "httparty"
|
5
|
+
|
6
|
+
module MithraicEvents
|
7
|
+
include HTTParty
|
8
|
+
|
9
|
+
class Error < StandardError; end
|
10
|
+
|
11
|
+
def get(url, query: nil, headers: nil, body: nil)
|
12
|
+
headers = build_request(headers)
|
13
|
+
response = HTTParty.get(url, query: query, headers: headers, body: body.to_json)
|
14
|
+
print_info("GET", url, query, headers, body, response) if ISPDF == "true"
|
15
|
+
response
|
16
|
+
end
|
17
|
+
|
18
|
+
def post(url, query: nil, headers: nil, body: nil)
|
19
|
+
body = body.to_json unless body.eql?("grant_type=client_credentials")
|
20
|
+
headers = build_request(headers)
|
21
|
+
response = HTTParty.post(url, query: query, headers: headers, body: body, timeout: 180)
|
22
|
+
print_info("POST", url, query, headers, body, response) if ISPDF == "true"
|
23
|
+
response
|
24
|
+
end
|
25
|
+
|
26
|
+
def put(url, query: nil, headers: nil, body: nil)
|
27
|
+
headers = build_request(headers)
|
28
|
+
response = HTTParty.put(url, query: query, headers: headers, body: body.to_json)
|
29
|
+
print_info("PUT", url, query, headers, body, response) if ISPDF == "true"
|
30
|
+
response
|
31
|
+
end
|
32
|
+
|
33
|
+
def patch(url, query: nil, headers: nil, body: nil)
|
34
|
+
headers = build_request(headers)
|
35
|
+
response = HTTParty.patch(url, query: query, headers: headers, body: body.to_json)
|
36
|
+
print_info("PATCH", url, query, headers, body, response) if ISPDF == "true"
|
37
|
+
response
|
38
|
+
end
|
39
|
+
|
40
|
+
def delete(url, query: nil, headers: nil, body: nil)
|
41
|
+
headers = build_request(headers)
|
42
|
+
response = HTTParty.delete(url, query: query, headers: headers, body: body.to_json)
|
43
|
+
print_info("DELETE", url, query, headers, body, response) if ISPDF == "true"
|
44
|
+
response
|
45
|
+
end
|
46
|
+
|
47
|
+
def prepare_new_token(token)
|
48
|
+
@@token = token
|
49
|
+
end
|
50
|
+
|
51
|
+
def build_request(headers)
|
52
|
+
headers = { 'Content-Type': "application/json" } if headers.nil?
|
53
|
+
headers.merge!('Content-Type': "application/json") unless headers.key?(:'Content-Type')
|
54
|
+
headers.merge!('Authorization': @@token) unless defined?(@@token).nil?
|
55
|
+
headers
|
56
|
+
end
|
57
|
+
|
58
|
+
def print_info(verb, url, query, headers, body, response)
|
59
|
+
write_evidence("Request Method:", verb)
|
60
|
+
write_evidence("Request URL:", url)
|
61
|
+
write_evidence("Response Status:", response.code)
|
62
|
+
write_evidence("Query params:", query) unless query.nil?
|
63
|
+
write_evidence("Headers:", headers) unless headers.nil?
|
64
|
+
write_evidence("Request Body:", body) unless body.nil?
|
65
|
+
write_evidence("Response Body:", response.parsed_response) unless response.body.nil? || response.body.empty?
|
66
|
+
end
|
67
|
+
|
68
|
+
def write_evidence(text, value)
|
69
|
+
if value.instance_of?(Hash) || value.instance_of?(HTTParty::Response)
|
70
|
+
value = JSON.pretty_generate(value,
|
71
|
+
indent: Prawn::Text::NBSP * 5)
|
72
|
+
end
|
73
|
+
EVIDENCE.text("\n#{text}", size: 10, style: :bold)
|
74
|
+
EVIDENCE.text(value.to_s, size: 8)
|
75
|
+
end
|
76
|
+
|
77
|
+
def convert_hash_keys_to_string(hash)
|
78
|
+
JSON.parse(JSON.dump(hash))
|
79
|
+
end
|
80
|
+
|
81
|
+
def prepare_mock_invalid(payload, field, max_length, character)
|
82
|
+
json_navigate = field.split(/-/)
|
83
|
+
object = JSON.parse(payload.to_json)
|
84
|
+
value = "".rjust(max_length.to_i, character)
|
85
|
+
payload = set_value_iter(object, json_navigate, value)
|
86
|
+
payload.to_h
|
87
|
+
end
|
88
|
+
|
89
|
+
def set_value_iter(obj, params, value)
|
90
|
+
tmp_obj = obj
|
91
|
+
if params.count > 1
|
92
|
+
params[0..(params.count - 2)].each do |p|
|
93
|
+
tmp_obj = tmp_obj[p]
|
94
|
+
end
|
95
|
+
tmp_obj[params[-1]] = value
|
96
|
+
else
|
97
|
+
tmp_obj[params[0]] = value
|
98
|
+
end
|
99
|
+
obj
|
100
|
+
end
|
101
|
+
|
102
|
+
def wait(timeout, &block)
|
103
|
+
timeout.times do
|
104
|
+
break if block.call
|
105
|
+
|
106
|
+
sleep 1
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Dir[File.join(File.dirname(__FILE__), "../*.rb")].sort.each { |file| require file }
|
4
|
+
|
5
|
+
OpenStruct.class_eval do
|
6
|
+
def to_hash
|
7
|
+
each_pair.with_object({}) do |(key, value), hash|
|
8
|
+
hash[key] = case value
|
9
|
+
when OpenStruct
|
10
|
+
value.to_hash
|
11
|
+
when Array
|
12
|
+
value.map!(&:to_hash)
|
13
|
+
else
|
14
|
+
value
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def set_nested_value(keys, value)
|
20
|
+
keys = keys.split(" ") if keys.is_a?(String)
|
21
|
+
create_nest(keys)
|
22
|
+
*keys, final_key = keys
|
23
|
+
to_set = keys.empty? ? self : dig(*keys)
|
24
|
+
|
25
|
+
return unless to_set
|
26
|
+
|
27
|
+
to_set[final_key] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_nest(keys)
|
31
|
+
keys = keys.split(" ") if keys.is_a?(String)
|
32
|
+
ostruct = self
|
33
|
+
keys.each do |key|
|
34
|
+
ostruct[key] = OpenStruct.new unless ostruct[key].is_a?(OpenStruct)
|
35
|
+
ostruct = ostruct[key]
|
36
|
+
end
|
37
|
+
self
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,293 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mithraic_events
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- callyca
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-06-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httmultiparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jmespath
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: net-sftp
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: nokogiri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: os
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: poltergeist
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-retry
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: savon
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: without_accents
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: bundler
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rake
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rubocop-checkstyle_formatter
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
description: Mithraic Event is a tool to help in the API testing with HTTParty
|
252
|
+
email:
|
253
|
+
- thiago.callyxz@gmail.com
|
254
|
+
executables: []
|
255
|
+
extensions: []
|
256
|
+
extra_rdoc_files: []
|
257
|
+
files:
|
258
|
+
- ".rspec"
|
259
|
+
- ".rubocop.yml"
|
260
|
+
- CHANGELOG.md
|
261
|
+
- Gemfile
|
262
|
+
- Gemfile.lock
|
263
|
+
- LICENSE.txt
|
264
|
+
- README.md
|
265
|
+
- Rakefile
|
266
|
+
- lib/mithraic_events.rb
|
267
|
+
- lib/mithraic_events/version.rb
|
268
|
+
- lib/plugin/plugin.rb
|
269
|
+
- sig/mithraic_events.rbs
|
270
|
+
homepage: https://github.com/CallyCa/MithraicEvents
|
271
|
+
licenses:
|
272
|
+
- MIT
|
273
|
+
metadata: {}
|
274
|
+
post_install_message:
|
275
|
+
rdoc_options: []
|
276
|
+
require_paths:
|
277
|
+
- lib
|
278
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
279
|
+
requirements:
|
280
|
+
- - ">="
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
version: 2.6.0
|
283
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
284
|
+
requirements:
|
285
|
+
- - ">="
|
286
|
+
- !ruby/object:Gem::Version
|
287
|
+
version: '0'
|
288
|
+
requirements: []
|
289
|
+
rubygems_version: 3.1.2
|
290
|
+
signing_key:
|
291
|
+
specification_version: 4
|
292
|
+
summary: Modules of the HTTParty and more stuff
|
293
|
+
test_files: []
|