boondoc 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c13a5463fe03339e80ae333ab749e43ea5c7cb96fdbb84ea912e8244137f6e1
4
- data.tar.gz: 1f5c49a3410b19c83702dd14c132c86ae6d2e2713f355a55d1785ca61d06b20f
3
+ metadata.gz: 6cbdd516e6da9211f975ecd000e60bfa3bb32ae28207dc99f03f5d94e02f4c58
4
+ data.tar.gz: 6e63542bd53905ac6b2de03f6716eacd776088467fe18ae11553c5a5b7879721
5
5
  SHA512:
6
- metadata.gz: 8e66df66817ff7dad455164c0b73370af4878cd278515b1f0037e3348a8736a6480801ad08c2aa4b972cda1794ba3635f290b21fc81b0e029e3b02037155ab46
7
- data.tar.gz: 1acb6c00c6d5d089d709f1303ca1dd768d597fe6a0446efa42bfa82b8d9105165c8e81a90225a7d904f659b89481fbeeec542fa06dd80197fbf15253069cdf46
6
+ metadata.gz: edb48fcd7b76844db3eba44f1991b2794ff7461394657ca8a253fb0c028d812d975b5376e73e5477f551fbb25f232e94ecea9254ed81f18b7ceda946f46899cb
7
+ data.tar.gz: a288272020e41ea3153ec9a4e785b5b17253f8c73653517c005983271edb4bf9b9b482584a2e48e95b6e5c5f5722d03758c02437d7a71a357fdbb3277ee7eb88
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2026-11-06
4
+
5
+ ### 🐛 Fixes
6
+ - **Files are read as UTF-8** regardless of the system locale. Under a US-ASCII locale (common when running under Guard), a README or other file with a non-ASCII character failed with `invalid byte sequence in US-ASCII`.
7
+
3
8
  ## [0.2.0] - 2026-11-03
4
9
 
5
10
  ### 📦 Dependencies
@@ -15,7 +15,7 @@ module Boondoc
15
15
  # @param label [String] the path to record on objects (usually relative to the project)
16
16
  # @return [void]
17
17
  def parse_file(path, label: path)
18
- parse(File.read(path), label)
18
+ parse(File.read(path, encoding: Encoding::UTF_8), label)
19
19
  end
20
20
 
21
21
  # @param source [String] Ruby source
@@ -95,7 +95,7 @@ module Boondoc
95
95
  # Only files inside the project can be included.
96
96
  def read_file(path)
97
97
  full = File.expand_path(path, @config.root)
98
- File.read(full) if File.file?(full) && Containment.inside?(full, @config.root)
98
+ File.read(full, encoding: Encoding::UTF_8) if File.file?(full) && Containment.inside?(full, @config.root)
99
99
  end
100
100
 
101
101
  def reference(match, object, from)
@@ -55,7 +55,7 @@ module Boondoc
55
55
  private
56
56
 
57
57
  def load(source, output, readme: false)
58
- content = File.read(File.expand_path(source, @config.root))
58
+ content = File.read(File.expand_path(source, @config.root), encoding: Encoding::UTF_8)
59
59
  content = "# #{File.basename(source)}\n\n```\n#{content.rstrip}\n```\n" unless MARKDOWN.match?(source)
60
60
  ExtraFile.new(source: source, output: output, content: content, readme: readme)
61
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boondoc
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -43,7 +43,7 @@ module Boondoc
43
43
  path = File.join(@output_dir, MANIFEST)
44
44
  return [] unless File.file?(path)
45
45
 
46
- File.readlines(path, chomp: true).reject(&:empty?)
46
+ File.readlines(path, chomp: true, encoding: Encoding::UTF_8).reject(&:empty?)
47
47
  end
48
48
 
49
49
  def check(paths, previous)
@@ -68,7 +68,7 @@ module Boondoc
68
68
  path = File.join(root, FILE)
69
69
  return nil unless File.file?(path)
70
70
 
71
- parse(File.read(path))
71
+ parse(File.read(path, encoding: Encoding::UTF_8))
72
72
  rescue SystemCallError => e
73
73
  raise Error, "could not read #{FILE}: #{e.message}"
74
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boondoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Sharp
@@ -98,7 +98,7 @@ licenses:
98
98
  - MIT
99
99
  metadata:
100
100
  homepage_uri: https://github.com/joe-sharp/boondoc
101
- source_code_uri: https://github.com/joe-sharp/boondoc/tree/v0.2.0
101
+ source_code_uri: https://github.com/joe-sharp/boondoc/tree/v0.2.1
102
102
  bug_tracker_uri: https://github.com/joe-sharp/boondoc/issues
103
103
  changelog_uri: https://github.com/joe-sharp/boondoc/blob/main/CHANGELOG.md
104
104
  rubygems_mfa_required: 'true'