minio_runner 0.1.2 → 1.0.1
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 +4 -4
- data/Gemfile.lock +91 -42
- data/README.md +3 -0
- data/lib/minio_runner/config.rb +4 -3
- data/lib/minio_runner/network.rb +9 -2
- data/lib/minio_runner/version.rb +1 -1
- data/lib/minio_runner.rb +2 -2
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce1a05760ce2ec7932d48b99d21d94b8a4d9c7e88521b82aa36a1845bd934f96
|
|
4
|
+
data.tar.gz: 2e0dc3f55ed0f9a78a93d00f5ad98648e61b32ab470966e9662d76f416ac5f89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d778019e25efa46ec83b05f5ca63f59c52f9f5de005363a1feebc1765593fd21191f0ff6f80c767ec785d120e69bb9b0b3a0c7b9be6c56c0f287b1f51d1f1c1
|
|
7
|
+
data.tar.gz: a6d5f557141f850dd40435aaf8f664f9361066a24552dd7809c994f2ca9fe9fa879add876f65e5de54b63048385f4d6b861a95b4930d0202882e2aa9812dd0ed
|
data/Gemfile.lock
CHANGED
|
@@ -1,78 +1,127 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minio_runner (0.1
|
|
4
|
+
minio_runner (1.0.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
+
activesupport (8.0.2)
|
|
10
|
+
base64
|
|
11
|
+
benchmark (>= 0.3)
|
|
12
|
+
bigdecimal
|
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
14
|
+
connection_pool (>= 2.2.5)
|
|
15
|
+
drb
|
|
16
|
+
i18n (>= 1.6, < 2)
|
|
17
|
+
logger (>= 1.4.2)
|
|
18
|
+
minitest (>= 5.1)
|
|
19
|
+
securerandom (>= 0.3)
|
|
20
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
21
|
+
uri (>= 0.13.1)
|
|
9
22
|
ansi (1.5.0)
|
|
10
|
-
ast (2.4.
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
ast (2.4.3)
|
|
24
|
+
base64 (0.2.0)
|
|
25
|
+
benchmark (0.4.0)
|
|
26
|
+
bigdecimal (3.1.9)
|
|
27
|
+
builder (3.3.0)
|
|
28
|
+
byebug (12.0.0)
|
|
13
29
|
coderay (1.1.3)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
30
|
+
concurrent-ruby (1.3.5)
|
|
31
|
+
connection_pool (2.5.2)
|
|
32
|
+
drb (2.2.1)
|
|
33
|
+
i18n (1.14.7)
|
|
34
|
+
concurrent-ruby (~> 1.0)
|
|
35
|
+
json (2.11.0)
|
|
36
|
+
language_server-protocol (3.17.0.4)
|
|
37
|
+
lint_roller (1.1.0)
|
|
38
|
+
logger (1.7.0)
|
|
39
|
+
method_source (1.1.0)
|
|
40
|
+
minitest (5.25.5)
|
|
18
41
|
minitest-color (0.0.2)
|
|
19
42
|
minitest (~> 5)
|
|
20
43
|
minitest-line (0.6.5)
|
|
21
44
|
minitest (~> 5.0)
|
|
22
|
-
minitest-reporters (1.
|
|
45
|
+
minitest-reporters (1.7.1)
|
|
23
46
|
ansi
|
|
24
47
|
builder
|
|
25
48
|
minitest (>= 5.0)
|
|
26
49
|
ruby-progressbar
|
|
27
|
-
parallel (1.
|
|
28
|
-
parser (3.
|
|
50
|
+
parallel (1.27.0)
|
|
51
|
+
parser (3.3.8.0)
|
|
29
52
|
ast (~> 2.4.1)
|
|
30
53
|
racc
|
|
31
54
|
prettier_print (1.2.1)
|
|
32
|
-
|
|
55
|
+
prism (1.4.0)
|
|
56
|
+
pry (0.15.2)
|
|
33
57
|
coderay (~> 1.1)
|
|
34
58
|
method_source (~> 1.0)
|
|
35
|
-
pry-byebug (3.
|
|
36
|
-
byebug (~>
|
|
37
|
-
pry (>= 0.13, < 0.
|
|
38
|
-
racc (1.
|
|
59
|
+
pry-byebug (3.11.0)
|
|
60
|
+
byebug (~> 12.0)
|
|
61
|
+
pry (>= 0.13, < 0.16)
|
|
62
|
+
racc (1.8.1)
|
|
63
|
+
rack (3.1.18)
|
|
39
64
|
rainbow (3.1.1)
|
|
40
|
-
rake (13.
|
|
41
|
-
regexp_parser (2.
|
|
42
|
-
|
|
43
|
-
rubocop (1.55.1)
|
|
65
|
+
rake (13.2.1)
|
|
66
|
+
regexp_parser (2.10.0)
|
|
67
|
+
rubocop (1.75.3)
|
|
44
68
|
json (~> 2.3)
|
|
45
|
-
language_server-protocol (
|
|
69
|
+
language_server-protocol (~> 3.17.0.2)
|
|
70
|
+
lint_roller (~> 1.1.0)
|
|
46
71
|
parallel (~> 1.10)
|
|
47
|
-
parser (>= 3.
|
|
72
|
+
parser (>= 3.3.0.2)
|
|
48
73
|
rainbow (>= 2.2.2, < 4.0)
|
|
49
|
-
regexp_parser (>=
|
|
50
|
-
|
|
51
|
-
rubocop-ast (>= 1.28.1, < 2.0)
|
|
74
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
75
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
52
76
|
ruby-progressbar (~> 1.7)
|
|
53
|
-
unicode-display_width (>= 2.4.0, <
|
|
54
|
-
rubocop-ast (1.
|
|
55
|
-
parser (>= 3.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
rubocop (>= 1.1
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
rubocop (
|
|
65
|
-
rubocop-
|
|
66
|
-
rubocop-
|
|
77
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
78
|
+
rubocop-ast (1.44.1)
|
|
79
|
+
parser (>= 3.3.7.2)
|
|
80
|
+
prism (~> 1.4)
|
|
81
|
+
rubocop-capybara (2.22.1)
|
|
82
|
+
lint_roller (~> 1.1)
|
|
83
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
84
|
+
rubocop-discourse (3.12.1)
|
|
85
|
+
activesupport (>= 6.1)
|
|
86
|
+
lint_roller (>= 1.1.0)
|
|
87
|
+
rubocop (>= 1.73.2)
|
|
88
|
+
rubocop-capybara (>= 2.22.0)
|
|
89
|
+
rubocop-factory_bot (>= 2.27.0)
|
|
90
|
+
rubocop-rails (>= 2.30.3)
|
|
91
|
+
rubocop-rspec (>= 3.0.1)
|
|
92
|
+
rubocop-rspec_rails (>= 2.31.0)
|
|
93
|
+
rubocop-factory_bot (2.27.1)
|
|
94
|
+
lint_roller (~> 1.1)
|
|
95
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
96
|
+
rubocop-rails (2.31.0)
|
|
97
|
+
activesupport (>= 4.2.0)
|
|
98
|
+
lint_roller (~> 1.1)
|
|
99
|
+
rack (>= 1.1)
|
|
100
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
101
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
102
|
+
rubocop-rspec (3.6.0)
|
|
103
|
+
lint_roller (~> 1.1)
|
|
104
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
105
|
+
rubocop-rspec_rails (2.31.0)
|
|
106
|
+
lint_roller (~> 1.1)
|
|
107
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
108
|
+
rubocop-rspec (~> 3.5)
|
|
67
109
|
ruby-progressbar (1.13.0)
|
|
110
|
+
securerandom (0.4.1)
|
|
68
111
|
spy (1.0.5)
|
|
69
|
-
syntax_tree (6.
|
|
112
|
+
syntax_tree (6.2.0)
|
|
70
113
|
prettier_print (>= 1.2.0)
|
|
71
114
|
syntax_tree-disable_ternary (1.0.0)
|
|
72
|
-
|
|
115
|
+
tzinfo (2.0.6)
|
|
116
|
+
concurrent-ruby (~> 1.0)
|
|
117
|
+
unicode-display_width (3.1.4)
|
|
118
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
119
|
+
unicode-emoji (4.0.4)
|
|
120
|
+
uri (1.0.3)
|
|
73
121
|
|
|
74
122
|
PLATFORMS
|
|
75
123
|
arm64-darwin-21
|
|
124
|
+
arm64-darwin-24
|
|
76
125
|
x86_64-linux
|
|
77
126
|
|
|
78
127
|
DEPENDENCIES
|
|
@@ -90,4 +139,4 @@ DEPENDENCIES
|
|
|
90
139
|
syntax_tree-disable_ternary
|
|
91
140
|
|
|
92
141
|
BUNDLED WITH
|
|
93
|
-
2.4
|
|
142
|
+
2.6.4
|
data/README.md
CHANGED
|
@@ -42,6 +42,9 @@ setup and teardown for rspec.
|
|
|
42
42
|
# is greater than the installed version.
|
|
43
43
|
MinioRunner.start
|
|
44
44
|
|
|
45
|
+
# Start the server without attempting to locate or download the minio binary
|
|
46
|
+
MinioRunner.start(install: false)
|
|
47
|
+
|
|
45
48
|
# Stop the currently running server.
|
|
46
49
|
MinioRunner.stop
|
|
47
50
|
```
|
data/lib/minio_runner/config.rb
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module MinioRunner
|
|
4
4
|
class Config
|
|
5
|
-
attr_accessor :
|
|
6
|
-
attr_accessor :
|
|
7
|
-
:minio_root_user,
|
|
5
|
+
attr_accessor :cache_time, :buckets, :public_buckets, :log_level
|
|
6
|
+
attr_accessor :minio_root_user,
|
|
8
7
|
:minio_root_password,
|
|
9
8
|
:minio_domain,
|
|
10
9
|
:minio_port,
|
|
11
10
|
:minio_console_port
|
|
12
11
|
|
|
12
|
+
attr_reader :install_dir, :minio_data_directory
|
|
13
|
+
|
|
13
14
|
DEFAULT_INSTALL_DIR = "~/.minio_runner"
|
|
14
15
|
DEFAULT_CACHE_TIME = 86_400 # 24 hours in seconds
|
|
15
16
|
|
data/lib/minio_runner/network.rb
CHANGED
|
@@ -20,8 +20,10 @@ module MinioRunner
|
|
|
20
20
|
127.0.0.1 minio.local testbucket.minio.local
|
|
21
21
|
END
|
|
22
22
|
|
|
23
|
+
MAX_REDIRECTS = 5
|
|
24
|
+
|
|
23
25
|
class << self
|
|
24
|
-
def get(url)
|
|
26
|
+
def get(url, redirect_limit: MAX_REDIRECTS)
|
|
25
27
|
MinioRunner.logger.debug("Making network call to #{url}")
|
|
26
28
|
uri = URI(url)
|
|
27
29
|
response = nil
|
|
@@ -33,7 +35,7 @@ module MinioRunner
|
|
|
33
35
|
uri.port,
|
|
34
36
|
use_ssl: uri.scheme == "https",
|
|
35
37
|
open_timeout: MinioRunner::System.mac? ? 10 : 3,
|
|
36
|
-
) { |http| response = http.get(uri.
|
|
38
|
+
) { |http| response = http.get(uri.request_uri) }
|
|
37
39
|
rescue SocketError, Net::OpenTimeout => err
|
|
38
40
|
MinioRunner.logger.debug(
|
|
39
41
|
"Connection error when checking minio server health: #{err.message}",
|
|
@@ -50,6 +52,11 @@ module MinioRunner
|
|
|
50
52
|
when Net::HTTPSuccess
|
|
51
53
|
log_time_error(request_start_time)
|
|
52
54
|
response.body
|
|
55
|
+
when Net::HTTPRedirection
|
|
56
|
+
raise MinioRunner::Network::NetworkError.new("Too many redirects for #{url}") if redirect_limit <= 0
|
|
57
|
+
location = response["location"]
|
|
58
|
+
MinioRunner.logger.debug("Following redirect to #{location}")
|
|
59
|
+
get(location, redirect_limit: redirect_limit - 1)
|
|
53
60
|
else
|
|
54
61
|
raise MinioRunner::Network::NetworkError.new(
|
|
55
62
|
"#{response.class::EXCEPTION_TYPE}: #{response.code} \"#{response.message}\" with #{url}",
|
data/lib/minio_runner/version.rb
CHANGED
data/lib/minio_runner.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minio_runner
|
|
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
|
- Martin Brennan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: syntax_tree
|
|
@@ -165,7 +164,6 @@ homepage: https://rubygemspec.org/gems/minio_runner
|
|
|
165
164
|
licenses:
|
|
166
165
|
- MIT
|
|
167
166
|
metadata: {}
|
|
168
|
-
post_install_message:
|
|
169
167
|
rdoc_options: []
|
|
170
168
|
require_paths:
|
|
171
169
|
- lib
|
|
@@ -173,15 +171,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
173
171
|
requirements:
|
|
174
172
|
- - ">="
|
|
175
173
|
- !ruby/object:Gem::Version
|
|
176
|
-
version:
|
|
174
|
+
version: 3.3.0
|
|
177
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
176
|
requirements:
|
|
179
177
|
- - ">="
|
|
180
178
|
- !ruby/object:Gem::Version
|
|
181
179
|
version: '0'
|
|
182
180
|
requirements: []
|
|
183
|
-
rubygems_version: 3.
|
|
184
|
-
signing_key:
|
|
181
|
+
rubygems_version: 3.6.9
|
|
185
182
|
specification_version: 4
|
|
186
183
|
summary: Manages local minio binary installs
|
|
187
184
|
test_files: []
|