wrata_api 0.1.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wrata_api/clients_methods.rb +11 -0
- data/lib/wrata_api/server_methods.rb +4 -3
- data/lib/wrata_api/version.rb +1 -1
- data/lib/wrata_api/wrata_api_request.rb +2 -1
- data/lib/wrata_api.rb +3 -1
- metadata +80 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2099697f34d23435434ded7a938fcab544834277270eb1be734f14b910265c
|
4
|
+
data.tar.gz: 86c54e5e56fc7b254b2a7949f900ecef18954e2f6f0184ae2fff75ce48340189
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c67ce5c6102297b9c32285c11415fb1b015aea9c750289d3d163241a0bd38f3c5c0dcd918584d45788991b745df6fd5210eb285bfd39403d2fabb4489c50e3
|
7
|
+
data.tar.gz: e37cc67dffbcb95830353ad864cbe256eedb4c6c284ea59e0b6b2531394f5261eb9e702fafc38465f3cb5ba3bc12384b90f7d11aa68bdb479d362a06ea8ed38a
|
@@ -34,9 +34,10 @@ module WrataApi
|
|
34
34
|
def powering_status(server_name)
|
35
35
|
all_data = server_data(server_name)
|
36
36
|
status = all_data['_status']
|
37
|
-
|
37
|
+
case status
|
38
|
+
when 'created'
|
38
39
|
:on
|
39
|
-
|
40
|
+
when 'destroyed'
|
40
41
|
:off
|
41
42
|
else
|
42
43
|
:other
|
@@ -106,7 +107,7 @@ module WrataApi
|
|
106
107
|
# @return [String] error for server timeout
|
107
108
|
def server_status_timeout_error(server, status)
|
108
109
|
"Couldn't wait until #{server} have status "\
|
109
|
-
|
110
|
+
"#{status} in specified timeout"
|
110
111
|
end
|
111
112
|
end
|
112
113
|
end
|
data/lib/wrata_api/version.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'cgi'
|
3
4
|
require 'net/http'
|
4
5
|
module WrataApi
|
5
6
|
# Module for describing base request actions
|
@@ -7,7 +8,7 @@ module WrataApi
|
|
7
8
|
# @return [Hash] default header for requests
|
8
9
|
def default_header
|
9
10
|
{ 'Cookie' => "remember_token=#{@cookie}; \
|
10
|
-
_runner_session=#{@wrata_session}",
|
11
|
+
_runner_session=#{CGI.escape(@wrata_session)}",
|
11
12
|
'X-CSRF-Token' => @csrf_token }
|
12
13
|
end
|
13
14
|
|
data/lib/wrata_api.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'wrata_api/clients_methods'
|
3
4
|
require_relative 'wrata_api/wrata_api_request'
|
4
5
|
require_relative 'wrata_api/server_list'
|
5
6
|
require_relative 'wrata_api/server_methods'
|
@@ -13,6 +14,7 @@ require 'yaml'
|
|
13
14
|
module WrataApi
|
14
15
|
# Class for working with wrata api
|
15
16
|
class WrataApi
|
17
|
+
include ClientsMethods
|
16
18
|
include WrataApiRequest
|
17
19
|
include ServerMethods
|
18
20
|
include FileListMethods
|
@@ -24,7 +26,7 @@ module WrataApi
|
|
24
26
|
@cookie = config['cookie']
|
25
27
|
@wrata_session = config['wrata_session']
|
26
28
|
@csrf_token = config['csrf_token']
|
27
|
-
@logger = Logger.new(
|
29
|
+
@logger = Logger.new($stdout)
|
28
30
|
@waiting_timeout = 5 * 60
|
29
31
|
@between_request_timeout = 10
|
30
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrata_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -9,78 +9,134 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: codecov
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: overcommit
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
14
42
|
- !ruby/object:Gem::Dependency
|
15
43
|
name: rake
|
16
44
|
requirement: !ruby/object:Gem::Requirement
|
17
45
|
requirements:
|
18
46
|
- - "~>"
|
19
47
|
- !ruby/object:Gem::Version
|
20
|
-
version: '13
|
48
|
+
version: '13'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '13'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3'
|
21
63
|
type: :development
|
22
64
|
prerelease: false
|
23
65
|
version_requirements: !ruby/object:Gem::Requirement
|
24
66
|
requirements:
|
25
67
|
- - "~>"
|
26
68
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
69
|
+
version: '3'
|
28
70
|
- !ruby/object:Gem::Dependency
|
29
71
|
name: rubocop
|
30
72
|
requirement: !ruby/object:Gem::Requirement
|
31
73
|
requirements:
|
32
|
-
- -
|
74
|
+
- - "~>"
|
33
75
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
76
|
+
version: '1'
|
35
77
|
type: :development
|
36
78
|
prerelease: false
|
37
79
|
version_requirements: !ruby/object:Gem::Requirement
|
38
80
|
requirements:
|
39
|
-
- -
|
81
|
+
- - "~>"
|
40
82
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
83
|
+
version: '1'
|
42
84
|
- !ruby/object:Gem::Dependency
|
43
85
|
name: rubocop-performance
|
44
86
|
requirement: !ruby/object:Gem::Requirement
|
45
87
|
requirements:
|
46
|
-
- -
|
88
|
+
- - "~>"
|
47
89
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1
|
90
|
+
version: '1'
|
49
91
|
type: :development
|
50
92
|
prerelease: false
|
51
93
|
version_requirements: !ruby/object:Gem::Requirement
|
52
94
|
requirements:
|
53
|
-
- -
|
95
|
+
- - "~>"
|
54
96
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1
|
97
|
+
version: '1'
|
56
98
|
- !ruby/object:Gem::Dependency
|
57
99
|
name: rubocop-rake
|
58
100
|
requirement: !ruby/object:Gem::Requirement
|
59
101
|
requirements:
|
60
|
-
- -
|
102
|
+
- - "~>"
|
61
103
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0
|
104
|
+
version: '0'
|
63
105
|
type: :development
|
64
106
|
prerelease: false
|
65
107
|
version_requirements: !ruby/object:Gem::Requirement
|
66
108
|
requirements:
|
67
|
-
- -
|
109
|
+
- - "~>"
|
68
110
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0
|
111
|
+
version: '0'
|
70
112
|
- !ruby/object:Gem::Dependency
|
71
113
|
name: rubocop-rspec
|
72
114
|
requirement: !ruby/object:Gem::Requirement
|
73
115
|
requirements:
|
74
|
-
- -
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '2'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '2'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: yard
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
75
131
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
132
|
+
version: 0.9.20
|
77
133
|
type: :development
|
78
134
|
prerelease: false
|
79
135
|
version_requirements: !ruby/object:Gem::Requirement
|
80
136
|
requirements:
|
81
|
-
- -
|
137
|
+
- - ">="
|
82
138
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
139
|
+
version: 0.9.20
|
84
140
|
description: Wrapper around wrata API
|
85
141
|
email:
|
86
142
|
- shockwavenn@gmail.com
|
@@ -89,6 +145,7 @@ extensions: []
|
|
89
145
|
extra_rdoc_files: []
|
90
146
|
files:
|
91
147
|
- lib/wrata_api.rb
|
148
|
+
- lib/wrata_api/clients_methods.rb
|
92
149
|
- lib/wrata_api/file_tree.rb
|
93
150
|
- lib/wrata_api/name.rb
|
94
151
|
- lib/wrata_api/queue_methos.rb
|
@@ -106,6 +163,7 @@ metadata:
|
|
106
163
|
documentation_uri: https://www.rubydoc.info/gems/wrata_api
|
107
164
|
homepage_uri: https://github.com/ONLYOFFICE/wrata_api
|
108
165
|
source_code_uri: https://github.com/ONLYOFFICE/wrata_api
|
166
|
+
rubygems_mfa_required: 'true'
|
109
167
|
post_install_message:
|
110
168
|
rdoc_options: []
|
111
169
|
require_paths:
|
@@ -114,14 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
172
|
requirements:
|
115
173
|
- - ">="
|
116
174
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
175
|
+
version: '2.5'
|
118
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
177
|
requirements:
|
120
178
|
- - ">="
|
121
179
|
- !ruby/object:Gem::Version
|
122
180
|
version: '0'
|
123
181
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
182
|
+
rubygems_version: 3.3.7
|
125
183
|
signing_key:
|
126
184
|
specification_version: 4
|
127
185
|
summary: Wrata API Gem
|