bormashino 0.2.0 → 0.3.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: 24847c65754cbdb4e6f83685963e68eab2cad125533c0054e2695eeb53f1929b
4
- data.tar.gz: 63543502d11aabce27b548c4727552de96be7844a92c9d7849d084d19a4b5c27
3
+ metadata.gz: 1a5d5336dddf257af01895f21f5e557d30eb44a6115670743986821e9d93a469
4
+ data.tar.gz: 549f93d8ba5d82456a38df933e13e1e800bb0e9a8e06f46324951e1ed1bbad23
5
5
  SHA512:
6
- metadata.gz: ccd00410f6ae29bb73e06e6d3c72e5681a1f22f8c73a6d541f8da1d80addeb4b5734913dbf281b8a3e69f0d11031c3933e0377cb9c59d1d8d74e806be7300475
7
- data.tar.gz: 9cab31253ef593681cb5379ec2f4d3cf8abeeea0100de35fec1aadba62b65e1a97905ca8766a4de000be9249c76595ce33b37e1497d6f4fc3bf68b4793ec2443
6
+ metadata.gz: 4ff6f1f85a7edeb0be08b6ce79b124df57d12ef33b95a990a1a0f5bb5505ee05024ce1ab2c5db83202e6625828f27864f31345eb61da41744f908e664ae6a7a4
7
+ data.tar.gz: 6cac7076f62658f9787cc742a70280b797163b8297caac4963db56cd21396dbd4f2d922b730d219e0ba4f4d3fb7c34959aca4099d6efe110f9a014ecf54303dc
@@ -19,7 +19,7 @@ module Bormashino
19
19
  def run
20
20
  raise 'No mounted apps' unless Bormashino::Server.mounted?
21
21
 
22
- # rubocop:disable Style::DocumentDynamicEvalDefinition
22
+ # rubocop:disable Style/DocumentDynamicEvalDefinition
23
23
  JS.eval <<-ENDOFEVAL
24
24
  fetch(
25
25
  #{@resource.to_json},
@@ -36,7 +36,7 @@ module Bormashino
36
36
  })
37
37
  })
38
38
  ENDOFEVAL
39
- # rubocop:enable Style::DocumentDynamicEvalDefinition
39
+ # rubocop:enable Style/DocumentDynamicEvalDefinition
40
40
  end
41
41
  end
42
42
  end
@@ -4,6 +4,7 @@ module Bormashino
4
4
  # LocalStorage mock for unit tests
5
5
  class LocalStorage
6
6
  include Singleton
7
+
7
8
  attr_reader :store
8
9
 
9
10
  def initialize
@@ -17,6 +17,7 @@ module Bormashino
17
17
 
18
18
  @app.call({
19
19
  'HTTP_HOST' => 'example.com:0',
20
+ 'HTTP_ORIGIN' => 'http://example.com:0',
20
21
  'REQUEST_METHOD' => method.upcase,
21
22
  'CONTENT_TYPE' => 'application/x-www-form-urlencoded',
22
23
  'QUERY_STRING' => u.query,
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ # stub module which won't work on ruby.wasm
4
+ # provides minimal constants needed by ipaddr.rb
5
+ module Socket
6
+ # Address families
7
+ AF_INET = 2
8
+ AF_INET6 = 10
9
+ AF_UNSPEC = 0
10
+ AF_UNIX = 1
11
+
12
+ # Protocol families
13
+ PF_INET = 2
14
+ PF_INET6 = 10
15
+ PF_UNSPEC = 0
16
+ PF_UNIX = 1
17
+
18
+ # Socket types
19
+ SOCK_STREAM = 1
20
+ SOCK_DGRAM = 2
21
+ SOCK_RAW = 3
22
+ SOCK_RDM = 4
23
+ SOCK_SEQPACKET = 5
24
+
25
+ # Socket options
26
+ SOL_SOCKET = 1
27
+ SO_REUSEADDR = 2
28
+ SO_KEEPALIVE = 9
29
+ SO_ERROR = 4
30
+
31
+ # IP protocols
32
+ IPPROTO_IP = 0
33
+ IPPROTO_TCP = 6
34
+ IPPROTO_UDP = 17
35
+
36
+ # Error codes
37
+ EAI_AGAIN = 2
38
+ EAI_BADFLAGS = 3
39
+ EAI_FAIL = 4
40
+ EAI_FAMILY = 5
41
+ EAI_MEMORY = 6
42
+ EAI_NODATA = 7
43
+ EAI_NONAME = 8
44
+ EAI_SERVICE = 9
45
+ EAI_SOCKTYPE = 10
46
+ EAI_SYSTEM = 11
47
+ EAI_OVERFLOW = 12
48
+
49
+ # Flags
50
+ AI_PASSIVE = 1
51
+ AI_CANONNAME = 2
52
+ AI_NUMERICHOST = 4
53
+ AI_NUMERICSERV = 8
54
+
55
+ # Constants for getnameinfo
56
+ NI_NUMERICHOST = 2
57
+ NI_NUMERICSERV = 8
58
+ NI_NOFQDN = 1
59
+ NI_NAMEREQD = 4
60
+ NI_DGRAM = 16
61
+
62
+ # Socket constants
63
+ MSG_OOB = 1
64
+ MSG_PEEK = 2
65
+ MSG_DONTROUTE = 4
66
+ MSG_WAITALL = 256
67
+
68
+ # SCM credentials
69
+ SCM_RIGHTS = 1
70
+ SCM_CREDENTIALS = 2
71
+
72
+ # Sockaddr constants
73
+ SOCKADDR_STORAGE_SIZE = 128
74
+ SOCKADDR_IN_SIZE = 16
75
+ SOCKADDR_IN6_SIZE = 28
76
+ SOCKADDR_UN_SIZE = 110
77
+
78
+ # INADDR constants
79
+ INADDR_ANY = 0
80
+ INADDR_LOOPBACK = 2130706433
81
+ INADDR_BROADCAST = 4294967295
82
+ INADDR_NONE = 4294967295
83
+
84
+ # IPv6 constants
85
+ IPV6_JOIN_GROUP = 12
86
+ IPV6_LEAVE_GROUP = 13
87
+ IPV6_MULTICAST_HOPS = 10
88
+ IPV6_MULTICAST_IF = 9
89
+ IPV6_MULTICAST_LOOP = 11
90
+ IPV6_UNICAST_HOPS = 4
91
+ IPV6_V6ONLY = 26
92
+ end
93
+
94
+ # Error class for socket operations
95
+ class SocketError < StandardError; end
@@ -83,8 +83,7 @@ namespace :bormashino do
83
83
  digest = Digest::MD5.file('tmp/ruby.wasm').hexdigest
84
84
  FileUtils.cp('tmp/ruby.wasm', "#{args[:destination]}/ruby.#{digest}.wasm")
85
85
  File.open(DIGEST, 'w') do |f|
86
- f.puts "export default rubyDigest = '#{digest}'
87
- "
86
+ f.puts "const rubyDigest = '#{digest}'; export default rubyDigest;"
88
87
  end
89
88
  end
90
89
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bormashino
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.1'
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.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichiro Yasuda
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-30 00:00:00.000000000 Z
11
+ date: 2026-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_pure
@@ -34,16 +34,16 @@ dependencies:
34
34
  name: sinatra
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '2.2'
39
+ version: 4.0.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '2.2'
46
+ version: 4.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: ruby2_keywords
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -97,6 +97,7 @@ files:
97
97
  - lib/bormashino/mock/local_storage.rb
98
98
  - lib/bormashino/server.rb
99
99
  - lib/bormashino/stub/openssl.rb
100
+ - lib/bormashino/stub/socket.rb
100
101
  - lib/bormashino/stub/zlib.rb
101
102
  - lib/bormashino/tasks/bormashino.rake
102
103
  - lib/bormashino/version.rb
@@ -108,7 +109,7 @@ metadata:
108
109
  source_code_uri: https://github.com/keyasuda/bormashino
109
110
  changelog_uri: https://github.com/keyasuda/bormashino/blob/main/CHANGELOG.md
110
111
  rubygems_mfa_required: 'true'
111
- post_install_message:
112
+ post_install_message:
112
113
  rdoc_options: []
113
114
  require_paths:
114
115
  - lib
@@ -116,15 +117,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
117
  requirements:
117
118
  - - "~>"
118
119
  - !ruby/object:Gem::Version
119
- version: 3.2.0.pre.preview1
120
+ version: 3.2.0
120
121
  required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  requirements:
122
123
  - - ">="
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
125
126
  requirements: []
126
- rubygems_version: 3.4.1
127
- signing_key:
127
+ rubygems_version: 3.4.19
128
+ signing_key:
128
129
  specification_version: 4
129
130
  summary: The package to build SPAs with Ruby
130
131
  test_files: []