File: 0003-encoding.patch

package info (click to toggle)
nanoc 4.14.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,588 kB
  • sloc: ruby: 41,753; sh: 31; makefile: 15
file content (61 lines) | stat: -rw-r--r-- 2,258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Fri, 29 Jan 2021 07:43:55 -0300
Subject: force encoding to UTF-8 to fix test in clean environment

Last-Update: 2026-02-13
Forwarded: not-needed
---
 nanoc-cli/spec/nanoc/cli/commands/shell_spec.rb    | 2 ++
 nanoc-live/spec/nanoc/live/live_recompiler_spec.rb | 1 +
 nanoc/spec/contributors_spec.rb                    | 2 ++
 nanoc/test/orig_cli/commands/test_create_site.rb   | 2 ++
 4 files changed, 7 insertions(+)

diff --git a/nanoc-cli/spec/nanoc/cli/commands/shell_spec.rb b/nanoc-cli/spec/nanoc/cli/commands/shell_spec.rb
index d4289fd..c4dd9fb 100644
--- a/nanoc-cli/spec/nanoc/cli/commands/shell_spec.rb
+++ b/nanoc-cli/spec/nanoc/cli/commands/shell_spec.rb
@@ -1,6 +1,8 @@
 # frozen_string_literal: true
 
+Encoding.default_external = "UTF-8"
 describe Nanoc::CLI::Commands::Shell, :site, :stdio do
+
   describe '#run' do
     before do
       # Prevent double-loading
diff --git a/nanoc-live/spec/nanoc/live/live_recompiler_spec.rb b/nanoc-live/spec/nanoc/live/live_recompiler_spec.rb
index 138d834..d244d59 100644
--- a/nanoc-live/spec/nanoc/live/live_recompiler_spec.rb
+++ b/nanoc-live/spec/nanoc/live/live_recompiler_spec.rb
@@ -1,5 +1,6 @@
 # frozen_string_literal: true
 
+Encoding.default_external = "UTF-8"
 describe Nanoc::Live::LiveRecompiler, :fork, :site, :stdio do
   before do
     Nanoc::CLI::ErrorHandler.enable
diff --git a/nanoc/spec/contributors_spec.rb b/nanoc/spec/contributors_spec.rb
index 56925ae..752b68d 100644
--- a/nanoc/spec/contributors_spec.rb
+++ b/nanoc/spec/contributors_spec.rb
@@ -1,5 +1,7 @@
 # frozen_string_literal: true
 
+Encoding.default_external = "UTF-8"
+
 describe 'list of contributors in README', chdir: false do
   let(:contributors_in_readme) do
     File.readlines('../README.md').last.chomp.split(', ')
diff --git a/nanoc/test/orig_cli/commands/test_create_site.rb b/nanoc/test/orig_cli/commands/test_create_site.rb
index 3e032ac..b0a7106 100644
--- a/nanoc/test/orig_cli/commands/test_create_site.rb
+++ b/nanoc/test/orig_cli/commands/test_create_site.rb
@@ -1,5 +1,7 @@
 # frozen_string_literal: true
 
+Encoding.default_external = "UTF-8"
+
 require 'helper'
 
 class Nanoc::CLI::Commands::CreateSiteTest < Nanoc::TestCase