bormashino 0.1.3 → 0.1.4

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: 1c6c917023f14695a0b5ae88b3c50b8f2b37d9516d05c1427ed859d8d12c710f
4
- data.tar.gz: c72487b632f901f7d40b68c979cbcf908e53ed2e98323707d0d4e7c0ab806438
3
+ metadata.gz: 746545a9c19d9636a66fe0f695a2960bf96ec9d549eb54eea02f8421033df62c
4
+ data.tar.gz: b5d32e291df6331f2a653ff27a795fc94893dc0d45ad9d793fc3999ce3fe7bd0
5
5
  SHA512:
6
- metadata.gz: 37c859264a65f0af907c3faaabb74cb2f96afe3daeb8de91d65ce1511bf4c41ccfc592f54b30616be68a6de910ef5696d23727befac12471eff45c89adbe235b
7
- data.tar.gz: 2fa7b38d1018c9e0f7ab31fb41d84b0a5ff81a0decd16814ba213953cbbaf615a8227facfafb99947b96c4241e12f5be7e5717401efd02bc25797ab03fb225b7
6
+ metadata.gz: 0a7e007e9615dd0b759c2b8cc30fbb4292c678a241db0bde8dd2ddb472c1f3640e839caac24d2b813ef4be547c01deb69319bc8ebaa61304f63bdc379833d022
7
+ data.tar.gz: ebbf53d4c6d772aea0fc4dff5ed9ac204fd0c0e0550eab18906cc8d5a4846a6e9586def616f7eafebc3ae2f4121fa75b6f36c5f7931b4563f638328190fabccc
@@ -1,18 +1,20 @@
1
1
  require 'js'
2
2
  require_relative 'ext/js'
3
+ require 'cgi'
3
4
 
4
5
  module Bormashino
5
6
  class Fetch
6
- attr_accessor :resource, :init, :resolved_to
7
+ attr_accessor :resource, :init, :resolved_to, :options
7
8
 
8
- def initialize(resource:, resolved_to:, init: {})
9
+ def initialize(resource:, resolved_to:, init: {}, options: {})
9
10
  @resource = resource
10
11
  @init = init
11
12
  @resolved_to = resolved_to
13
+ @options = options
12
14
  end
13
15
 
14
16
  def run
15
- raise 'No app is mounted' unless Bormashino::Server.mounted?
17
+ raise 'No mounted apps' unless Bormashino::Server.mounted?
16
18
 
17
19
  # rubocop:disable Style::DocumentDynamicEvalDefinition
18
20
  JS.eval <<-ENDOFEVAL
@@ -25,7 +27,8 @@ module Bormashino
25
27
  'post',
26
28
  #{@resolved_to.to_json},
27
29
  'status=' + r.status +
28
- '&payload=' + encodeURIComponent(t)
30
+ '&payload=' + encodeURIComponent(t) +
31
+ '&options=' + #{CGI.escape(@options.to_json).to_json}
29
32
  )
30
33
  })
31
34
  })
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bormashino
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bormashino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichiro Yasuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-07 00:00:00.000000000 Z
11
+ date: 2022-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_pure