spectre-core 1.14.3 → 1.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/spectre +5 -5
- data/lib/spectre/curl.rb +1 -1
- data/lib/spectre/helpers.rb +4 -4
- data/lib/spectre/http.rb +1 -1
- data/lib/spectre/mixin.rb +3 -0
- data/lib/spectre.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 338caf54824ce03967eced5d5456e62bc634bcff544f75159c2e775c47fe2a99
|
4
|
+
data.tar.gz: e4717d1f68ae3d47af657d6e088a1b61bba06fcc03da8ba023c3c59cd8c240fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2a12fcb6fde8f139fc28e2656c7e6a36dcc319fa27d05b94b0fcf1db9cd1b23935fb6d7cde0522f29910139033ce57f2a3afff5c444abda30ecfb8fd1d2a356
|
7
|
+
data.tar.gz: b4862086c69bb6208237fcbe021d33694e62081e357bfaa07983239146465342f0a17e49cb67306aa383966010f9ab51005805e5d6419e276c95e74e44135367
|
data/exe/spectre
CHANGED
@@ -187,7 +187,7 @@ cfg.deep_merge! DEFAULT_CONFIG
|
|
187
187
|
# Load global config file first
|
188
188
|
global_config_file = File.join File.expand_path('~'), '.spectre'
|
189
189
|
|
190
|
-
if File.
|
190
|
+
if File.exist? global_config_file
|
191
191
|
global_options = load_yaml(global_config_file)
|
192
192
|
cfg.deep_merge! global_options if global_options
|
193
193
|
end
|
@@ -195,7 +195,7 @@ end
|
|
195
195
|
# Then load local config file
|
196
196
|
config_file = cmd_options['config_file'] || cfg['config_file']
|
197
197
|
|
198
|
-
if File.
|
198
|
+
if File.exist? config_file
|
199
199
|
file_options = load_yaml(config_file)
|
200
200
|
cfg.deep_merge! file_options
|
201
201
|
Dir.chdir File.dirname(config_file)
|
@@ -332,10 +332,10 @@ if ['list', 'run'].include? action
|
|
332
332
|
mod_file = mod + '.rb'
|
333
333
|
spectre_lib_mod = File.join(File.dirname(__dir__), 'lib', mod_file)
|
334
334
|
|
335
|
-
if File.
|
335
|
+
if File.exist? mod_file
|
336
336
|
require_relative mod_file
|
337
337
|
|
338
|
-
elsif File.
|
338
|
+
elsif File.exist? spectre_lib_mod
|
339
339
|
require_relative spectre_lib_mod
|
340
340
|
|
341
341
|
else
|
@@ -550,7 +550,7 @@ if 'init' == action
|
|
550
550
|
end
|
551
551
|
|
552
552
|
DEFAULT_FILES.each do |file, content|
|
553
|
-
unless File.
|
553
|
+
unless File.exist? file
|
554
554
|
File.write(file, content)
|
555
555
|
end
|
556
556
|
end
|
data/lib/spectre/curl.rb
CHANGED
@@ -281,7 +281,7 @@ module Spectre::Curl
|
|
281
281
|
|
282
282
|
# Add certificate path if one is given
|
283
283
|
if req['cert']
|
284
|
-
raise "Certificate '#{req['cert']}' does not exist" unless File.
|
284
|
+
raise "Certificate '#{req['cert']}' does not exist" unless File.exist? req['cert']
|
285
285
|
|
286
286
|
cmd.append('--cacert', req['cert'])
|
287
287
|
elsif req['use_ssl'] or uri.start_with? 'https'
|
data/lib/spectre/helpers.rb
CHANGED
@@ -52,7 +52,7 @@ class ::String
|
|
52
52
|
# File helpers
|
53
53
|
|
54
54
|
def content with: nil
|
55
|
-
fail "'#{self}' is not a file path, or the file does not exist." unless File.
|
55
|
+
fail "'#{self}' is not a file path, or the file does not exist." unless File.exist? self
|
56
56
|
|
57
57
|
file_content = File.read(self)
|
58
58
|
|
@@ -64,17 +64,17 @@ class ::String
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def file_size
|
67
|
-
fail "'#{self}' is not a file path, or the file does not exist." unless File.
|
67
|
+
fail "'#{self}' is not a file path, or the file does not exist." unless File.exist? self
|
68
68
|
|
69
69
|
File.size(self)
|
70
70
|
end
|
71
71
|
|
72
72
|
def exists?
|
73
|
-
File.
|
73
|
+
File.exist? self
|
74
74
|
end
|
75
75
|
|
76
76
|
def remove!
|
77
|
-
fail "'#{self}' is not a file path, or the file does not exist." unless File.
|
77
|
+
fail "'#{self}' is not a file path, or the file does not exist." unless File.exist? self
|
78
78
|
|
79
79
|
File.delete self
|
80
80
|
end
|
data/lib/spectre/http.rb
CHANGED
@@ -282,7 +282,7 @@ module Spectre
|
|
282
282
|
net_http.use_ssl = true
|
283
283
|
|
284
284
|
if req['cert']
|
285
|
-
raise HttpError.new("Certificate '#{req['cert']}' does not exist") unless File.
|
285
|
+
raise HttpError.new("Certificate '#{req['cert']}' does not exist") unless File.exist? req['cert']
|
286
286
|
|
287
287
|
net_http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
288
288
|
net_http.ca_file = req['cert']
|
data/lib/spectre/mixin.rb
CHANGED
data/lib/spectre.rb
CHANGED
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectre-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Neubauer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ectoplasm
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.2.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|