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 +4 -4
- data/lib/anyt/cli.rb +7 -2
- data/lib/anyt/command.rb +1 -0
- data/lib/anyt/config.rb +1 -0
- data/lib/anyt/ext/minitest.rb +7 -7
- data/lib/anyt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 926764e1377b6d46fecd5ac2027327e22e1641b74b6de7a6c8d46ad0f8aa2926
|
4
|
+
data.tar.gz: 924c6b0ba6db8853a2fbb48d1f2710651c08fb7126292037e633182a7d4b9066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
data/lib/anyt/config.rb
CHANGED
data/lib/anyt/ext/minitest.rb
CHANGED
@@ -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(
|
88
|
-
cls = describe(
|
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, &
|
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, &
|
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, &
|
127
|
-
Anyt::ConnectHandlers.add(tag, &
|
126
|
+
def connect_handler(tag, &)
|
127
|
+
Anyt::ConnectHandlers.add(tag, &)
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
data/lib/anyt/version.rb
CHANGED
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.
|
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-
|
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:
|
156
|
+
version: 3.1.0
|
157
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
158
|
requirements:
|
159
159
|
- - ">="
|