wasmify-rails 0.4.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4888ee4d3efedd0bd93074f7856cf0be0789bad2ab092c460af84e79603bd0cf
4
- data.tar.gz: 163b3dbd14d60250ab04f5e6c1d2b2e601b65e79f51b827bcd50e19cf0bb614a
3
+ metadata.gz: 49d32bee847e419e89afba2b7b2beafa25140d79490e0e57089f83f27a9c4b97
4
+ data.tar.gz: b2bd1ce485952cccfc62a5f53ddecfb67b467afa4fa387a4a23b1f134e9d64f8
5
5
  SHA512:
6
- metadata.gz: '00814ba133827f4b932fe3ee8bce0ff3096fe10ff7b41c28d10ac64353888d9aa0b4078b2c6572b082acf83c693abc7071dfd48eece93fd6d6f8e8e8942bb9b2'
7
- data.tar.gz: 2ebed2d0efa0f87e3a8685be5799382ef20dc8b93c7817777c3eb8387e88617197a24a36a7931b8e5790fa6771706c4d689c9382ba12e50e1b9adefae08c2191
6
+ metadata.gz: 711f3f3ee7ad3e45ee08ad7deff8081677bd2922409e786f69753cfa4ece084e5a8f9c3007990fa75bc6a8b501c1ad5b8d5b7e76381ca545732f8cc5dfc13329
7
+ data.tar.gz: 15201d401397e80ebf5dc63df7b909cf24fee6ab6224ccba93e695bd11dce2ab7b99757085a0682086d7df026eda7b5071ffa52fd575cca86f1a6c3316d74b31
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.4.2
6
+
7
+ - Minor fixes.
8
+
9
+ ## 0.4.1
10
+
11
+ - Do not include DataUriUploads middleware in tests.
12
+
5
13
  ## 0.4.0
6
14
 
7
15
  - Backport various patches from Rails tutorial.
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024 Vladimir Dementyev
1
+ Copyright (c) 2026 Vladimir Dementyev
2
2
 
3
3
  MIT License
4
4
 
@@ -20,4 +20,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
-
data/README.md CHANGED
@@ -190,6 +190,10 @@ This gem provides a variety of _adapters_ and plugins to make your Rails applica
190
190
 
191
191
  ## Known Issues
192
192
 
193
+ ### `3.4 fails on gem deprecations`
194
+ Ruby 3.3.3 is a suggested starting point for getting to hello world, as 3.4 currently fails on upstream gem deprecation warnings, per [here](https://github.com/ruby/prism/issues/4065) and [here](https://github.com/palkan/wasmify-rails/pull/12#issuecomment-4274321590)
195
+
196
+
193
197
  ### `can't load bigdecimal.so`
194
198
 
195
199
  Compiling `bigdecimal` as a gem (not a part of the Ruby distribution, i.e., when using recent Ruby versions) doesn't work; at the same time, modern Rails versions have `require 'bigdecimal` call on boot. Currently, we propose the following workaround:
@@ -20,7 +20,10 @@ Rails.application.configure do
20
20
 
21
21
  config.cache_store = :memory_store
22
22
  config.active_job.queue_adapter = :inline
23
- config.action_mailer.delivery_method = :null
23
+
24
+ if config.respond_to?(:action_mailer)
25
+ config.action_mailer.delivery_method = :null
26
+ end
24
27
 
25
28
  if config.respond_to?(:active_storage)
26
29
  config.active_storage.variant_processor = :null
@@ -21,7 +21,7 @@ module Rack
21
21
 
22
22
  if (
23
23
  request.post? || request.put? || request.patch?
24
- ) && request.get_header("HTTP_CONTENT_TYPE").match?(%r{multipart/form-data})
24
+ ) && request.get_header("HTTP_CONTENT_TYPE")&.match?(%r{multipart/form-data})
25
25
  transform_params(request.params)
26
26
  env["action_dispatch.request.request_parameters"] = request.params
27
27
  end
@@ -7,12 +7,20 @@ require "ruby_wasm/cli"
7
7
 
8
8
  # Patch ruby.wasm CLI to use the latest patch versions of Ruby
9
9
  RubyWasm::CLI.singleton_class.prepend(Module.new do
10
- def build_source_aliases(root)
10
+ def build_source_aliases(root) # for ruby_wasm 2.8.x and earlier
11
11
  super.tap do |sources|
12
12
  sources["3.3"][:url] = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.8.tar.gz"
13
13
  sources["3.4"][:url] = "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.3.tar.gz"
14
14
  end
15
15
  end
16
+
17
+ def build_config_aliases(root) # for ruby_wasm 2.9.0+
18
+ super.tap do |sources|
19
+ sources["3.3"][:src][:url] = "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.11.tar.gz"
20
+ sources["3.4"][:src][:url] = "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.8.tar.gz"
21
+ sources["4.0"][:src][:url] = "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.2.tar.gz"
22
+ end
23
+ end
16
24
  end)
17
25
 
18
26
  module Wasmify
@@ -8,6 +8,8 @@ module Wasmify
8
8
  end
9
9
 
10
10
  initializer "wasmify.rack_data_uri" do |app|
11
+ next if ::Rails.env.test?
12
+
11
13
  require "rack/data_uri_uploads"
12
14
 
13
15
  app.middleware.use Rack::DataUriUploads
@@ -13,6 +13,7 @@ end
13
13
  return unless on_wasm?
14
14
 
15
15
  # Setup Bundler
16
+ require "rubygems"
16
17
  require "/bundle/setup"
17
18
  require "bundler"
18
19
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Wasmify
4
4
  module Rails # :nodoc:
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasmify-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-24 00:00:00.000000000 Z
11
+ date: 2026-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties