anyt 1.2.1 → 1.2.3

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: 02f57d6e046524b530ae2a108dadc661bab7447f0fc237132872e756d79a2cec
4
- data.tar.gz: 7fcff0213d6e3778cc1f8e6235622498be75e2394d52c2e2874de90f643de5b3
3
+ metadata.gz: 98e0ff916d9b26a1c59c1590deaf1991e5b03e9307d9939069d2a7f16360c8a5
4
+ data.tar.gz: 8e425053f5af7706d9a3ea478d6b08e43ef6b7fe15f58fa0c97800c6aafcaff8
5
5
  SHA512:
6
- metadata.gz: d7e581e1a45f8ba0f4ccb433fb95940ba2a8df3078dc0e8fb2522d481eae2081dff07a023689ae435fa6be2dd58ef624c0553d8259968e84e45800ff2806a963
7
- data.tar.gz: 77590b1be0189fd498c82fc8e0f1171bb274d587702c4c75cd64925acd2eb2918527786e3f7578fb184e8268208b52a76c89f89ec670cdeca0bd21de07e7e5f3
6
+ metadata.gz: ef09aae331254a361fe2f62d5f0d00bcac7c1f353c90f88f225cbff3d3e16b145e1225c28d026c3aabe5bac01bcef52944f6a5a4846d48ff4f0ff0841d5ae1ac
7
+ data.tar.gz: 06ecdbdf18997b6ed3e7e4d13a8a68069b35bcd1db124c27cbcb11c739e68abbd7e168b655cf0b1c366d3ab0d72b6e9d65394472c5135e9b31d25790e13124a7
data/lib/anyt/cli.rb CHANGED
@@ -97,7 +97,6 @@ module Anyt
97
97
 
98
98
  cli.on("--only-rpc", TrueClass, "Run only RPC server") do |flag|
99
99
  @only_rpc = flag
100
- @skip_tests = true
101
100
  end
102
101
 
103
102
  cli.on("--only-rails", TrueClass, "Run only Rails server") do
@@ -42,6 +42,8 @@ module ApplicationCable
42
42
  end
43
43
  end
44
44
 
45
+ ECHO_DELAY = ENV["ANYCABLE_BENCHMARK_ECHO_DELAY"].to_f
46
+
45
47
  # BenchmarkChannel is useful when running Rails app only or RPC only
46
48
  class BenchmarkChannel < ApplicationCable::Channel
47
49
  def subscribed
@@ -49,6 +51,9 @@ class BenchmarkChannel < ApplicationCable::Channel
49
51
  end
50
52
 
51
53
  def echo(data)
54
+ if ECHO_DELAY > 0
55
+ sleep ECHO_DELAY
56
+ end
52
57
  transmit data
53
58
  end
54
59
 
@@ -58,6 +63,12 @@ class BenchmarkChannel < ApplicationCable::Channel
58
63
  transmit data
59
64
  end
60
65
 
66
+
67
+ def counter(data)
68
+ num = data.fetch("num", 100).to_i
69
+ num.times { ActionCable.server.broadcast "all", {text: "Count: #{_1}"} }
70
+ end
71
+
61
72
  private
62
73
 
63
74
  def stream_id
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.2.1"
4
+ VERSION = "1.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-03 00:00:00.000000000 Z
11
+ date: 2023-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
278
  - !ruby/object:Gem::Version
279
279
  version: '0'
280
280
  requirements: []
281
- rubygems_version: 3.3.11
281
+ rubygems_version: 3.4.8
282
282
  signing_key:
283
283
  specification_version: 4
284
284
  summary: Anycable conformance testing tool