Skip to content

Commit 5e5510d

Browse files
committed
for ruby 3.2.2
1 parent d477e96 commit 5e5510d

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

ruby/hyper-component/lib/hyper-component.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
require 'hyperstack/component/isomorphic_helpers'
4848
require 'hyperstack/ext/component/serializers'
4949

50-
Opal.append_path File.expand_path('../', __FILE__).untaint
50+
Opal.append_path File.expand_path('../', __FILE__)
5151
require 'react/react-source'
5252
end

ruby/hyper-component/lib/react/react-source.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
require "react/rails/asset_variant"
1414
variant = Hyperstack.env.production? ? :production : :development
1515
react_directory = React::Rails::AssetVariant.new({ variant: variant }).react_directory
16-
Opal.append_path react_directory.untaint
16+
Opal.append_path react_directory
1717
end

ruby/hyper-console/lib/hyper-console.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
require 'securerandom'
1010
else
1111
require 'hyperloop/console/engine'
12-
Opal.append_path File.expand_path('../', __FILE__).untaint
12+
Opal.append_path File.expand_path('../', __FILE__)
1313
end

ruby/hyper-i18n/lib/hyper-i18n.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
else
2020
require 'opal'
2121

22-
Opal.append_path File.expand_path('../', __FILE__).untaint
22+
Opal.append_path File.expand_path('../', __FILE__)
2323
end

ruby/hyper-model/lib/active_record_base.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -286,23 +286,23 @@ def regulate_relationship(name, &block)
286286

287287
alias pre_syncromesh_has_many has_many
288288

289-
def has_many(name, *args, &block)
289+
def has_many(name, *args,**kwargs, &block)
290290
__synchromesh_regulate_from_macro(
291-
opts = args.extract_options!,
291+
opts = args.extract_options!.merge(kwargs),
292292
name,
293293
method_defined?(:"__secure_remote_access_to_#{name}"),
294294
&method(:regulate_relationship)
295295
)
296-
pre_syncromesh_has_many name, *args, opts.except(:regulate), &block
296+
pre_syncromesh_has_many name, *args, **opts.except(:regulate), &block
297297
end
298298

299299
%i[belongs_to has_one composed_of].each do |macro|
300300
alias_method :"pre_syncromesh_#{macro}", macro
301-
define_method(macro) do |name, *aargs, &block|
302-
define_method(:"__secure_remote_access_to_#{name}") do |this, _acting_user, *args|
303-
this.send(name, *args)
301+
define_method(macro) do |name, *aargs,**kkwargs, &block|
302+
define_method(:"__secure_remote_access_to_#{name}") do |this, _acting_user, *args,**kargs|
303+
this.send(name, *args,**kargs)
304304
end
305-
send(:"pre_syncromesh_#{macro}", name, *aargs, &block)
305+
send(:"pre_syncromesh_#{macro}", name, *aargs,**kkwargs, &block)
306306
end
307307
end
308308
end

ruby/hyper-model/lib/hyper-model.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
require_relative 'active_record_base'
6363
require 'hyper_model/version'
6464

65-
Opal.append_path File.expand_path('../sources/', __FILE__).untaint
66-
Opal.append_path File.expand_path('../', __FILE__).untaint
67-
Opal.append_path File.expand_path('../../vendor', __FILE__).untaint
65+
Opal.append_path File.expand_path('../sources/', __FILE__)
66+
Opal.append_path File.expand_path('../', __FILE__)
67+
Opal.append_path File.expand_path('../../vendor', __FILE__)
6868
end
6969
require 'enumerable/pluck'

ruby/hyper-model/lib/reactive_record/permissions.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,21 @@ class << self
7474
attr_reader :reactive_record_association_keys
7575

7676
[:has_many, :belongs_to, :composed_of].each do |macro|
77-
define_method "#{macro}_with_reactive_record_add_changed_method".to_sym do |attr_name, *args, &block|
77+
define_method "#{macro}_with_reactive_record_add_changed_method".to_sym do |attr_name, *args,**kwargs, &block|
7878
define_method "#{attr_name}_changed?".to_sym do
7979
instance_variable_get "@reactive_record_#{attr_name}_changed".to_sym
8080
end
8181
(@reactive_record_association_keys ||= []) << attr_name
82-
send "#{macro}_without_reactive_record_add_changed_method".to_sym, attr_name, *args, &block
82+
send "#{macro}_without_reactive_record_add_changed_method".to_sym, attr_name, *args,**kwargs, &block
8383
end
8484
alias_method "#{macro}_without_reactive_record_add_changed_method".to_sym, macro
8585
alias_method macro, "#{macro}_with_reactive_record_add_changed_method".to_sym
8686
end
8787

8888
alias belongs_to_without_reactive_record_add_is_method belongs_to
8989

90-
def belongs_to(attr_name, *args)
91-
belongs_to_without_reactive_record_add_is_method(attr_name, *args).tap do
90+
def belongs_to(attr_name, *args,**kwargs)
91+
belongs_to_without_reactive_record_add_is_method(attr_name, *args,**kwargs).tap do
9292
define_method "#{attr_name}_is?".to_sym do |model|
9393
attributes[self.class.reflections[attr_name.to_s].foreign_key] == model.id
9494
end

ruby/hyper-operation/lib/hyper-operation.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def titleize
5959
require 'hyper-operation/server_op'
6060
require 'hyper-operation/boot'
6161
Opal.use_gem 'mutations', false
62-
Opal.append_path File.expand_path('../sources/', __FILE__).untaint
63-
Opal.append_path File.expand_path('../', __FILE__).untaint
64-
Opal.append_path File.expand_path('../../vendor', __FILE__).untaint
62+
Opal.append_path File.expand_path('../sources/', __FILE__)
63+
Opal.append_path File.expand_path('../', __FILE__)
64+
Opal.append_path File.expand_path('../../vendor', __FILE__)
6565
end

ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def self.send_data(channel, data)
127127
elsif transport == :pusher
128128
pusher.trigger("#{Hyperstack.channel}-#{data[1][:channel].gsub('::', '==')}", *data)
129129
elsif transport == :action_cable
130-
ActionCable.server.broadcast("hyperstack-#{channel}", message: data[0], data: data[1])
130+
ActionCable.server.broadcast("hyperstack-#{channel}", { message: data[0], data: data[1] })
131131
end
132132
end
133133

ruby/hyper-router/lib/hyper-router.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
require 'hyperstack/internal/router/isomorphic_methods'
2626
require 'hyperstack/router/version'
2727

28-
Opal.append_path File.expand_path('../', __FILE__).untaint
28+
Opal.append_path File.expand_path('../', __FILE__)
2929
end

ruby/hyper-state/lib/hyper-state.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
require 'ext/object_space'
1717
else
1818
require 'opal'
19-
Opal.append_path(File.expand_path('../', __FILE__).untaint)
19+
Opal.append_path(File.expand_path('../', __FILE__))
2020
end

ruby/hyper-store/lib/hyper-store.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ class BaseStoreClass < BasicObject
2525

2626
if RUBY_ENGINE != 'opal'
2727
require 'opal'
28-
Opal.append_path(File.expand_path('../', __FILE__).untaint)
28+
Opal.append_path(File.expand_path('../', __FILE__))
2929
end

ruby/hyper-trace/lib/hyper-trace.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
require 'hyper_trace/react_trace.rb'
55
else
66
require 'opal'
7-
Opal.append_path File.expand_path('../', __FILE__).untaint
7+
Opal.append_path File.expand_path('../', __FILE__)
88
end

ruby/hyperstack-config/lib/hyperstack-config.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ def self.naming_convention
5858
Hyperstack.import 'hyperstack/autoloader_starter'
5959
# based on the environment pick the directory containing the file with the matching
6060
# value for the client. This avoids use of ERB for builds outside of sprockets environment
61-
Opal.append_path(File.expand_path("../hyperstack/environment/#{Hyperstack.env}/", __FILE__).untaint)
62-
Opal.append_path(File.expand_path('../', __FILE__).untaint)
61+
Opal.append_path(File.expand_path("../hyperstack/environment/#{Hyperstack.env}/", __FILE__))
62+
Opal.append_path(File.expand_path('../', __FILE__))
6363
end

0 commit comments

Comments
 (0)