anyt-core 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 158d005ccb552a059df74166a759a51fc982666cebc182b80d7dda37454c6717
4
- data.tar.gz: 8ef8e1730ec753e623be8f20eadc86b572bc6b935261e855316200d060234115
3
+ metadata.gz: 926764e1377b6d46fecd5ac2027327e22e1641b74b6de7a6c8d46ad0f8aa2926
4
+ data.tar.gz: 924c6b0ba6db8853a2fbb48d1f2710651c08fb7126292037e633182a7d4b9066
5
5
  SHA512:
6
- metadata.gz: 61800da6022b7e877ae71cc7a4b98a09e3e7c3cab36df7d4f03c1e8c53ec439fd27d034968ff46c634ee294ac8eed83902f05b6098710cd0174ddbdc43e7694c
7
- data.tar.gz: d78be5f00123db956c42a87aa8315b63d7b8ce52c8c5cd7fa33865ff7ce36a3408f8a6f7b11be356c081e013251e2de54dfb2339cea685745baa6a034d6d07a9
6
+ metadata.gz: 7720b7b1c5855e11d091e2591d59656e6c0659a898e8590e9eb190254b8498a09a67b08d592b718ad364a1e180667e6e526c6c6e4669c3b62f16ad849bac85cd
7
+ data.tar.gz: d96f721e762200f4e4e247e718cd5e6da73cca4cdc487fe02aabd778dc52e5c7a36c2357b4d905a183df625a238865069946a2b85111e3d3f4d0aa94b1805d98
data/lib/anyt/cli.rb CHANGED
@@ -145,6 +145,11 @@ module Anyt
145
145
  configure_rails_command!
146
146
  end
147
147
 
148
+ cli.on("--rails-command=COMMAND", "A custom command to run Rails server") do |cmd|
149
+ configure_rails_command!(cmd)
150
+ Anyt.config.custom_action_cable = true
151
+ end
152
+
148
153
  cli.on("--only test1,test2,test3", Array, "Run only specified tests") do |only_tests|
149
154
  Anyt.config.only_tests = only_tests
150
155
  end
@@ -196,8 +201,8 @@ module Anyt
196
201
  exit 1
197
202
  end
198
203
 
199
- def configure_rails_command!
200
- Anyt.config.command = RAILS_COMMAND
204
+ def configure_rails_command!(cmd = RAILS_COMMAND)
205
+ Anyt.config.command = cmd % {config: DUMMY_ROOT}
201
206
  Anyt.config.use_action_cable = true
202
207
  end
203
208
 
data/lib/anyt/command.rb CHANGED
@@ -59,6 +59,7 @@ module Anyt
59
59
  AnyCable.logger.debug "Restarting command PID: #{process.pid}"
60
60
 
61
61
  stop
62
+
62
63
  process.wait
63
64
 
64
65
  run
data/lib/anyt/config.rb CHANGED
@@ -13,6 +13,7 @@ module Anyt
13
13
  :tests_relative_path,
14
14
  remote_control_port: 8919,
15
15
  use_action_cable: false,
16
+ custom_action_cable: false,
16
17
  target_url: "ws://localhost:9292/cable",
17
18
  wait_command: 2,
18
19
  timeout_multiplier: 1
@@ -21,7 +21,7 @@ module Anyt
21
21
  end
22
22
 
23
23
  def restart_server!
24
- if Anyt.config.use_action_cable
24
+ if Anyt.config.use_action_cable && !Anyt.config.custom_action_cable
25
25
  remote_client.restart_action_cable
26
26
  else
27
27
  Command.restart
@@ -84,8 +84,8 @@ end
84
84
  # Kernel extensions
85
85
  module Kernel
86
86
  ## Wraps `describe` and include shared helpers
87
- private def feature(*args, &block)
88
- cls = describe(*args, &block)
87
+ private def feature(...)
88
+ cls = describe(...)
89
89
  cls.include Anyt::TestHelpers
90
90
  cls
91
91
  end
@@ -108,12 +108,12 @@ module Minitest::Spec::DSL
108
108
 
109
109
  # Generates Channel class dynamically and
110
110
  # add memoized helper to access its name
111
- def channel(id = nil, &block)
111
+ def channel(id = nil, &)
112
112
  class_name = @name.gsub(/\s+/, "_")
113
113
  class_name += "_#{id}" if id
114
114
  class_name += "_channel"
115
115
 
116
- cls = Class.new(ApplicationCable::Channel, &block)
116
+ cls = Class.new(ApplicationCable::Channel, &)
117
117
 
118
118
  Anyt::TestChannels.const_set(class_name.classify, cls)
119
119
 
@@ -123,8 +123,8 @@ module Minitest::Spec::DSL
123
123
  end
124
124
 
125
125
  # Add new #connect handler
126
- def connect_handler(tag, &block)
127
- Anyt::ConnectHandlers.add(tag, &block)
126
+ def connect_handler(tag, &)
127
+ Anyt::ConnectHandlers.add(tag, &)
128
128
  end
129
129
  end
130
130
 
data/lib/anyt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anyt
4
- VERSION = "1.4.0"
4
+ VERSION = "1.4.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyt-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-13 00:00:00.000000000 Z
11
+ date: 2024-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -153,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="
155
155
  - !ruby/object:Gem::Version
156
- version: 2.6.0
156
+ version: 3.1.0
157
157
  required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - ">="