inspec-reporter-flex 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/inspec-reporter-flex/mixin/file_resolver.rb +19 -1
- data/lib/inspec-reporter-flex/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1736a2271d0d47572a5526143e1be8749458bff449bfff46136d82cfea1da69e
|
4
|
+
data.tar.gz: 0c2e251562ed792fc4b422c24c88acac1196a8459856ef58d95d8152a46b4c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfa59013c14c881cb62f92ddfb5b47a027223a6109e7420a2372f54146b87b390683b8ec40d5911ceb06091ca42ca9f348b13a26b38987dfce3950f6c2820576
|
7
|
+
data.tar.gz: be75da5f152ce45b502fb07ad9bc575a1d109201e8ad1b26a7c8b9a79bef2bc361d3914e5439d59c35ca7e507e79ba4e94558556c7ffd63e4493db2f0cfd5061
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
1
3
|
module InspecPlugins::FlexReporter
|
2
4
|
module FileResolver
|
3
5
|
# Resolve the full path for a file in order absolute path/gem bundled file/relative.
|
@@ -22,7 +24,23 @@ module InspecPlugins::FlexReporter
|
|
22
24
|
# @param [String] name name or path of a file
|
23
25
|
# @return [Boolean] if it is an absolute path
|
24
26
|
def absolute_path?(name)
|
25
|
-
name
|
27
|
+
absolute_unix_path?(name) || absolute_windows_path?(name)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Is this an absolute path on UNIX systems?
|
31
|
+
#
|
32
|
+
# @param [String] name name or path of a file
|
33
|
+
# @return [Boolean] if it is an absolute path
|
34
|
+
def absolute_unix_path?(name)
|
35
|
+
File.exist?(name) && name.start_with?("/")
|
36
|
+
end
|
37
|
+
|
38
|
+
# Is this an absolute path on Windows systems?
|
39
|
+
#
|
40
|
+
# @param [String] name name or path of a file
|
41
|
+
# @return [Boolean] if it is an absolute path
|
42
|
+
def absolute_windows_path?(name)
|
43
|
+
File.exist?(name) && name.match?(/^[a-zA-C]:/)
|
26
44
|
end
|
27
45
|
|
28
46
|
# Is this an relative path?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec-reporter-flex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Heinen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.1.4
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: InSpec Reporter for flexible, template-based reports
|