ruby_wasm_ic_minimal 0.1.1 → 0.1.2
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/README.md +9 -7
- data/lib/ruby_wasm_ic_minimal/guard.rb +10 -5
- data/lib/ruby_wasm_ic_minimal/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '090a9add2dd75ce82b61b540e6ade977432b95ab9af802b3080ba256a6827e45'
|
|
4
|
+
data.tar.gz: bc0d2ad7477bbe23e43bdd52b289e973a98f3e80d4d359324efd4b916e72a2c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9167d20361835add5b83004ad2e60411a3413cbcc8e64ee6fffa52313a18956f5229bae23a6913a97acd585dc37f3fc307197af9c8bd92eb1a5cb7320aa8a649
|
|
7
|
+
data.tar.gz: 16871d884ecd2eaa7c86b101153a621fecce1a9d9f9477a9d12cf0f27bebcf8a6564967e9db965cdc170b8618fc598e23d39aa4f638b8a91b8d6f303cdd12340
|
data/README.md
CHANGED
|
@@ -23,10 +23,10 @@ formats and reads HTTP dates, which need nothing from `Date`; `Time.parse`,
|
|
|
23
23
|
**Do not put this gem in a Gemfile.** Each file shadows a real library by its
|
|
24
24
|
name, and `date.rb` is a stub. So every file refuses to load anywhere but a
|
|
25
25
|
`minimal` canister, raising `LoadError`. A `minimal` canister is one where the
|
|
26
|
-
builder's wrapper gem has defined `IC::DATA_DIR` and the core
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
builder's wrapper gem has defined `IC::DATA_DIR` and the core has no encoding
|
|
27
|
+
database (`ISO-8859-1` is not in `Encoding.name_list`). On the `full` Build,
|
|
28
|
+
which links the real libraries and every encoding, it refuses too: carry none
|
|
29
|
+
of it there.
|
|
30
30
|
|
|
31
31
|
## Carrying it
|
|
32
32
|
|
|
@@ -57,8 +57,10 @@ specs are in that repository's `spec/gems/`, and run with the builder's suite,
|
|
|
57
57
|
including the 0.7.0 `roda_on_minimal` Script played as `minimal` with this
|
|
58
58
|
gem in place of the Challenge's own `carried/` files.
|
|
59
59
|
|
|
60
|
-
**
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
**The rule, observed on a canister** (28 October 2026, the 0.6.0 Base Module
|
|
61
|
+
on PocketIC): a `minimal` canister knows 12 encodings, the ones CRuby's core
|
|
62
|
+
registers without its encoding database, so 0.1.1's rule
|
|
63
|
+
(`Encoding.list.size <= 3`) refused to load there. 0.1.2 asks whether
|
|
64
|
+
`ISO-8859-1` is a known name instead.
|
|
63
65
|
|
|
64
66
|
MIT licensed.
|
|
@@ -4,15 +4,20 @@
|
|
|
4
4
|
# take the real library away. The guard refuses that instead, with LoadError.
|
|
5
5
|
#
|
|
6
6
|
# A `minimal` canister is one where the wrapper gem has defined IC::DATA_DIR
|
|
7
|
-
# (every canister packed by ruby_wasm_builder) and the core
|
|
8
|
-
#
|
|
9
|
-
# encodings
|
|
10
|
-
#
|
|
7
|
+
# (every canister packed by ruby_wasm_builder) and the core has no encoding
|
|
8
|
+
# database: no ISO-8859-1 among Encoding.name_list. A `minimal` canister knows
|
|
9
|
+
# only the encodings CRuby's core registers without Init_enc (12 on the 0.6.0
|
|
10
|
+
# Base Module, observed 28 October 2026); any CRuby with the database, `full`
|
|
11
|
+
# or MRI, knows ISO-8859-1 by name. 0.1.1 counted the encodings and expected 3
|
|
12
|
+
# or fewer, which refused on the canister itself. The guard asks by name rather
|
|
13
|
+
# than looking for Encoding::UTF_8, which this gem's own encoding_constants.rb
|
|
14
|
+
# defines, and rather than counting, which a Ruby version can change. Decided
|
|
15
|
+
# once, at the first stand-in loaded,
|
|
11
16
|
# and kept in RubyWasmIcMinimal::ON_MINIMAL; a test harness may set that constant
|
|
12
17
|
# first (the builder's MRI player does, for `minimal: true`).
|
|
13
18
|
module RubyWasmIcMinimal
|
|
14
19
|
unless const_defined?(:ON_MINIMAL, false)
|
|
15
|
-
ON_MINIMAL = !defined?(IC::DATA_DIR).nil? && Encoding.
|
|
20
|
+
ON_MINIMAL = !defined?(IC::DATA_DIR).nil? && !Encoding.name_list.include?("ISO-8859-1")
|
|
16
21
|
end
|
|
17
22
|
|
|
18
23
|
def self.guard!(feature)
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_wasm_ic_minimal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- graial
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-10-28 00:00:00.000000000 Z
|
|
11
12
|
dependencies: []
|
|
12
13
|
description: This gem contains the four carried files required for running rack and
|
|
13
14
|
roda on the minimal ruby.wasm build.
|
|
@@ -30,6 +31,7 @@ homepage: https://github.com/graial/ruby_wasm_ic_minimal
|
|
|
30
31
|
licenses:
|
|
31
32
|
- MIT
|
|
32
33
|
metadata: {}
|
|
34
|
+
post_install_message:
|
|
33
35
|
rdoc_options: []
|
|
34
36
|
require_paths:
|
|
35
37
|
- lib
|
|
@@ -44,7 +46,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
44
46
|
- !ruby/object:Gem::Version
|
|
45
47
|
version: '0'
|
|
46
48
|
requirements: []
|
|
47
|
-
rubygems_version: 3.
|
|
49
|
+
rubygems_version: 3.5.11
|
|
50
|
+
signing_key:
|
|
48
51
|
specification_version: 4
|
|
49
52
|
summary: Four carried files required for running rack and roda on the minimal ruby.wasm
|
|
50
53
|
build
|