beachio-hammer 0.1.0.pre3 → 0.1.0.pre4
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 +1 -1
- data/PUBLISH.md +6 -2
- data/lib/hammer/tag_parser.rb +2 -3
- data/lib/hammer/version.rb +1 -1
- data/spec/path_resolution_spec.rb +10 -0
- 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: 3470eba02cbe963f2f12e5b4d9cc94c2cb7d2b770ada0e7ca90de6c3a57e74a8
|
|
4
|
+
data.tar.gz: 336084edab3f5528a9dc6171b8b5fb363e1e6d05ab456d10fb15905583752b2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dd5e1d16f62a38b7bde783e30313ef54d10c17dd001abbcd1a9ddf374f1255dac772f7f312a0312c28d44da1c8d781dd312d1b915ebe4af95f7a7a22bebd41d
|
|
7
|
+
data.tar.gz: 49089ebfa731d5c58a7f5d91634cf726eb44c320c7dc84782fcf374b4ef9a4eec97745533cb962c8c3ef2f6fbbf7be575b170f8b63c32fa9a548dc55b1bf4970
|
data/Gemfile.lock
CHANGED
data/PUBLISH.md
CHANGED
|
@@ -38,7 +38,11 @@ gem build beachio-hammer.gemspec
|
|
|
38
38
|
gem push beachio-hammer-*.gem
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Prerelease pin for executor team: **`beachio-hammer` `0.1.0.
|
|
41
|
+
Prerelease pin for executor team: **`beachio-hammer` `0.1.0.pre4`**
|
|
42
|
+
|
|
43
|
+
### 0.1.0.pre4 changes (filename digit corruption)
|
|
44
|
+
|
|
45
|
+
- Fix `@path` URL encoding: stop using `tr("%20", " ")` which mangled filenames containing `2` (e.g. `forge-2.jpg` → `forge-%20.jpg`)
|
|
42
46
|
|
|
43
47
|
### 0.1.0.pre3 changes (nested @path resolution)
|
|
44
48
|
|
|
@@ -58,7 +62,7 @@ Prerelease pin for executor team: **`beachio-hammer` `0.1.0.pre3`**
|
|
|
58
62
|
Pin the published gem version in the executor Dockerfile:
|
|
59
63
|
|
|
60
64
|
```dockerfile
|
|
61
|
-
RUN gem install beachio-hammer -v 0.1.0.
|
|
65
|
+
RUN gem install beachio-hammer -v 0.1.0.pre4
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
Build step in the agent:
|
data/lib/hammer/tag_parser.rb
CHANGED
|
@@ -371,14 +371,13 @@ module Hammer
|
|
|
371
371
|
paths = [search_path] unless index_paths.empty?
|
|
372
372
|
end
|
|
373
373
|
|
|
374
|
-
relative_path =
|
|
374
|
+
relative_path = paths.first || search_path
|
|
375
|
+
relative_path = relative_path.gsub(" ", "%20")
|
|
375
376
|
relative_path = "#{relative_path}/" if preserve_slash && !relative_path.end_with?("/")
|
|
376
377
|
|
|
377
378
|
@delegate&.warning(@current_file_path, "File not found: #{ref}") if paths.empty?
|
|
378
379
|
|
|
379
380
|
generate_context_aware_path(relative_path, preserve_trailing_slash: preserve_slash)
|
|
380
|
-
.tr("%20", " ")
|
|
381
|
-
.gsub(" ", "%20")
|
|
382
381
|
end
|
|
383
382
|
|
|
384
383
|
def root_relative_path
|
data/lib/hammer/version.rb
CHANGED
|
@@ -23,4 +23,14 @@ RSpec.describe Hammer::TagParser do
|
|
|
23
23
|
|
|
24
24
|
expect(result).to include('href="../../"')
|
|
25
25
|
end
|
|
26
|
+
|
|
27
|
+
it "does not corrupt digits in image filenames when resolving @path" do
|
|
28
|
+
parser.current_file_path = "products/forge/index.html"
|
|
29
|
+
content = '<img src="<!-- @path assets/images/products/forge-2.jpg -->" />'
|
|
30
|
+
|
|
31
|
+
result = parser.send(:parse, content)
|
|
32
|
+
|
|
33
|
+
expect(result).to include('src="../../assets/images/products/forge-2.jpg"')
|
|
34
|
+
expect(result).not_to include("forge-%20.jpg")
|
|
35
|
+
end
|
|
26
36
|
end
|