ftr_ruby 0.1.11 → 0.1.13
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/CHANGELOG.md +10 -0
- data/lib/ftr_ruby/version.rb +1 -1
- data/lib/output.rb +11 -10
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f01bdc7760b54fbe420367a78c59e4b8539073b99e321f46f277aa1b6695600
|
|
4
|
+
data.tar.gz: 2dda7ed64ce4ca85a77f34a863da866cef94cba75bce18f4701169b671d564a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1d0aa5cee43240b3a2536841b9709b4b61e8d9adbe84ee3720b8366f5a12f589f4b90efe1714ff99475d51635e90b17f4c067f28d42236a339646fc3f875ab3
|
|
7
|
+
data.tar.gz: 87b71b41d91fe24b8e96674cb9fbbefbd10c2e888cc959ccd24edb4613f0320b14bf2f4bdc5d44898a4c55ece0a19da98c6468007062c38ea398e442ebe0ec83
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.13] - 2026-06-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- `Output#initialize`: replaced aggressive `gsub(%r{[:/]}, "")` stripping on `protocol`, `host`, and `basePath` with holistic URL component normalization — strips scheme prefix from `host`, extracts only the scheme name from `protocol` (downcased), strips leading/trailing slashes from `basePath` while preserving internal path separators, and strips leading slashes from `testid` in `softwareid` construction; previously, a `basePath` like `/path/to/test` would be corrupted to `pathtotest` and port numbers in `host` would be destroyed
|
|
7
|
+
|
|
8
|
+
## [0.1.12] - 2026-05-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `Output#createEvaluationResponse`: `score = "fail"` inside the `rescue` block and `summary = ...` inside the `if` block both introduced local variables that shadowed the `attr_accessor` methods for the entire method scope; replaced all references with `@score` and `@summary` to read and write the instance variables directly — this was causing `prov:value` to always be serialized as `nil` regardless of what callers set on `output.score`
|
|
12
|
+
|
|
3
13
|
## [0.1.11] - 2026-05-26
|
|
4
14
|
|
|
5
15
|
### Changed
|
data/lib/ftr_ruby/version.rb
CHANGED
data/lib/output.rb
CHANGED
|
@@ -48,10 +48,11 @@ module FtrRuby
|
|
|
48
48
|
@comments = []
|
|
49
49
|
@guidance = meta.fetch(:guidance, [])
|
|
50
50
|
@creator = meta[:creator]
|
|
51
|
-
@protocol
|
|
52
|
-
@host
|
|
53
|
-
@basePath
|
|
54
|
-
|
|
51
|
+
@protocol = meta[:protocol].to_s.split(%r{://}).first.to_s.strip.downcase
|
|
52
|
+
@host = meta[:host].to_s.sub(%r{\A[a-zA-Z][a-zA-Z0-9+\-.]*://}, "").split("/").first.to_s.strip
|
|
53
|
+
@basePath = meta[:basePath].to_s.sub(%r{\A[a-zA-Z][a-zA-Z0-9+\-.]*://[^/]*/}, "").gsub(%r{\A/+|/+\z}, "")
|
|
54
|
+
testid = meta[:testid].to_s.sub(%r{\A/+}, "")
|
|
55
|
+
@softwareid = "#{@protocol}://#{@host}/#{[@basePath, testid].reject(&:empty?).join("/")}"
|
|
55
56
|
@api = "#{@softwareid}/api"
|
|
56
57
|
end
|
|
57
58
|
|
|
@@ -80,9 +81,9 @@ module FtrRuby
|
|
|
80
81
|
|
|
81
82
|
add_newline_to_comments
|
|
82
83
|
|
|
83
|
-
if summary =~ /^Summary$/
|
|
84
|
-
summary = "Summary of test results: #{comments[-1]}"
|
|
85
|
-
summary ||= "Summary of test results: #{comments[-2]}"
|
|
84
|
+
if @summary =~ /^Summary$/
|
|
85
|
+
@summary = "Summary of test results: #{comments[-1]}"
|
|
86
|
+
@summary ||= "Summary of test results: #{comments[-2]}"
|
|
86
87
|
end
|
|
87
88
|
|
|
88
89
|
executionid = "urn:ostrails:testexecutionactivity:" + SecureRandom.uuid
|
|
@@ -99,7 +100,7 @@ module FtrRuby
|
|
|
99
100
|
triplify(uniqueid, dct.title, "#{name} OUTPUT", g)
|
|
100
101
|
triplify(uniqueid, dct.description, "OUTPUT OF #{description}", g)
|
|
101
102
|
triplify(uniqueid, dct.license, license, g)
|
|
102
|
-
triplify(uniqueid, prov.value, score, g)
|
|
103
|
+
triplify(uniqueid, prov.value, @score, g)
|
|
103
104
|
triplify(uniqueid, ftr.summary, summary, g)
|
|
104
105
|
triplify(uniqueid, RDF::Vocab::PROV.generatedAtTime, dt, g)
|
|
105
106
|
triplify(uniqueid, ftr.log, comments.join, g)
|
|
@@ -134,10 +135,10 @@ module FtrRuby
|
|
|
134
135
|
rescue StandardError
|
|
135
136
|
triplify(uniqueid, ftr.assessmentTarget, "not a URI", g)
|
|
136
137
|
triplify(executionid, prov.used, "not a URI", g)
|
|
137
|
-
score = "fail"
|
|
138
|
+
@score = "fail"
|
|
138
139
|
end
|
|
139
140
|
|
|
140
|
-
unless score == "pass"
|
|
141
|
+
unless @score == "pass"
|
|
141
142
|
guidance.each do |advice, label|
|
|
142
143
|
adviceid = "urn:ostrails:testexecutionactivity:advice:" + SecureRandom.uuid
|
|
143
144
|
triplify(uniqueid, ftr.suggestion, adviceid, g)
|