rsmp 0.35.2 → 0.38.0

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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/devcontainer.json +22 -0
  3. data/.github/copilot-instructions.md +33 -0
  4. data/.github/workflows/copilot-setup-steps.yml +35 -0
  5. data/.github/workflows/rspec.yaml +2 -1
  6. data/.github/workflows/rubocop.yaml +17 -0
  7. data/.gitignore +7 -7
  8. data/.rubocop.yml +80 -0
  9. data/Gemfile +13 -1
  10. data/Gemfile.lock +73 -35
  11. data/Rakefile +3 -3
  12. data/bin/console +2 -4
  13. data/documentation/tasks.md +4 -4
  14. data/lib/rsmp/cli.rb +147 -124
  15. data/lib/rsmp/collect/ack_collector.rb +8 -7
  16. data/lib/rsmp/collect/aggregated_status_collector.rb +4 -4
  17. data/lib/rsmp/collect/alarm_collector.rb +31 -23
  18. data/lib/rsmp/collect/alarm_matcher.rb +3 -3
  19. data/lib/rsmp/collect/collector/logging.rb +17 -0
  20. data/lib/rsmp/collect/collector/reporting.rb +44 -0
  21. data/lib/rsmp/collect/collector/status.rb +34 -0
  22. data/lib/rsmp/collect/collector.rb +69 -150
  23. data/lib/rsmp/collect/command_matcher.rb +19 -6
  24. data/lib/rsmp/collect/command_response_collector.rb +7 -7
  25. data/lib/rsmp/collect/distributor.rb +14 -11
  26. data/lib/rsmp/collect/filter.rb +31 -15
  27. data/lib/rsmp/collect/matcher.rb +7 -11
  28. data/lib/rsmp/collect/queue.rb +4 -4
  29. data/lib/rsmp/collect/receiver.rb +10 -12
  30. data/lib/rsmp/collect/state_collector.rb +116 -77
  31. data/lib/rsmp/collect/status_collector.rb +6 -6
  32. data/lib/rsmp/collect/status_matcher.rb +17 -7
  33. data/lib/rsmp/{alarm_state.rb → component/alarm_state.rb} +76 -37
  34. data/lib/rsmp/{component.rb → component/component.rb} +15 -15
  35. data/lib/rsmp/component/component_base.rb +89 -0
  36. data/lib/rsmp/component/component_proxy.rb +75 -0
  37. data/lib/rsmp/component/components.rb +63 -0
  38. data/lib/rsmp/convert/export/json_schema.rb +116 -110
  39. data/lib/rsmp/convert/import/yaml.rb +21 -18
  40. data/lib/rsmp/{rsmp.rb → helpers/clock.rb} +5 -6
  41. data/lib/rsmp/{deep_merge.rb → helpers/deep_merge.rb} +2 -1
  42. data/lib/rsmp/helpers/error.rb +71 -0
  43. data/lib/rsmp/{inspect.rb → helpers/inspect.rb} +6 -10
  44. data/lib/rsmp/log/archive.rb +98 -0
  45. data/lib/rsmp/log/colorization.rb +41 -0
  46. data/lib/rsmp/log/filtering.rb +54 -0
  47. data/lib/rsmp/log/logger.rb +206 -0
  48. data/lib/rsmp/{logging.rb → log/logging.rb} +5 -7
  49. data/lib/rsmp/message.rb +159 -148
  50. data/lib/rsmp/{node.rb → node/node.rb} +19 -17
  51. data/lib/rsmp/node/protocol.rb +37 -0
  52. data/lib/rsmp/node/site/site.rb +195 -0
  53. data/lib/rsmp/node/supervisor/modules/configuration.rb +59 -0
  54. data/lib/rsmp/node/supervisor/modules/connection.rb +140 -0
  55. data/lib/rsmp/node/supervisor/modules/sites.rb +64 -0
  56. data/lib/rsmp/node/supervisor/supervisor.rb +72 -0
  57. data/lib/rsmp/{task.rb → node/task.rb} +29 -19
  58. data/lib/rsmp/proxy/modules/acknowledgements.rb +144 -0
  59. data/lib/rsmp/proxy/modules/receive.rb +119 -0
  60. data/lib/rsmp/proxy/modules/send.rb +76 -0
  61. data/lib/rsmp/proxy/modules/state.rb +25 -0
  62. data/lib/rsmp/proxy/modules/tasks.rb +105 -0
  63. data/lib/rsmp/proxy/modules/versions.rb +69 -0
  64. data/lib/rsmp/proxy/modules/watchdogs.rb +66 -0
  65. data/lib/rsmp/proxy/proxy.rb +199 -0
  66. data/lib/rsmp/proxy/site/modules/aggregated_status.rb +52 -0
  67. data/lib/rsmp/proxy/site/modules/alarms.rb +27 -0
  68. data/lib/rsmp/proxy/site/modules/commands.rb +31 -0
  69. data/lib/rsmp/proxy/site/modules/status.rb +110 -0
  70. data/lib/rsmp/proxy/site/site_proxy.rb +205 -0
  71. data/lib/rsmp/proxy/supervisor/modules/aggregated_status.rb +47 -0
  72. data/lib/rsmp/proxy/supervisor/modules/alarms.rb +73 -0
  73. data/lib/rsmp/proxy/supervisor/modules/commands.rb +53 -0
  74. data/lib/rsmp/proxy/supervisor/modules/status.rb +204 -0
  75. data/lib/rsmp/proxy/supervisor/supervisor_proxy.rb +178 -0
  76. data/lib/rsmp/tlc/detector_logic.rb +18 -34
  77. data/lib/rsmp/tlc/input_states.rb +126 -0
  78. data/lib/rsmp/tlc/modules/detector_logics.rb +50 -0
  79. data/lib/rsmp/tlc/modules/display.rb +78 -0
  80. data/lib/rsmp/tlc/modules/helpers.rb +41 -0
  81. data/lib/rsmp/tlc/modules/inputs.rb +173 -0
  82. data/lib/rsmp/tlc/modules/modes.rb +253 -0
  83. data/lib/rsmp/tlc/modules/outputs.rb +30 -0
  84. data/lib/rsmp/tlc/modules/plans.rb +218 -0
  85. data/lib/rsmp/tlc/modules/signal_groups.rb +109 -0
  86. data/lib/rsmp/tlc/modules/startup_sequence.rb +22 -0
  87. data/lib/rsmp/tlc/modules/system.rb +140 -0
  88. data/lib/rsmp/tlc/modules/traffic_data.rb +49 -0
  89. data/lib/rsmp/tlc/signal_group.rb +37 -41
  90. data/lib/rsmp/tlc/signal_plan.rb +14 -11
  91. data/lib/rsmp/tlc/signal_priority.rb +39 -35
  92. data/lib/rsmp/tlc/startup_sequence.rb +59 -0
  93. data/lib/rsmp/tlc/traffic_controller.rb +39 -1006
  94. data/lib/rsmp/tlc/traffic_controller_site.rb +58 -57
  95. data/lib/rsmp/version.rb +1 -1
  96. data/lib/rsmp.rb +86 -49
  97. data/rsmp.gemspec +24 -30
  98. metadata +87 -130
  99. data/lib/rsmp/archive.rb +0 -76
  100. data/lib/rsmp/collect/message_matchers.rb +0 -0
  101. data/lib/rsmp/component_base.rb +0 -87
  102. data/lib/rsmp/component_proxy.rb +0 -57
  103. data/lib/rsmp/components.rb +0 -65
  104. data/lib/rsmp/error.rb +0 -71
  105. data/lib/rsmp/logger.rb +0 -216
  106. data/lib/rsmp/proxy.rb +0 -695
  107. data/lib/rsmp/site.rb +0 -188
  108. data/lib/rsmp/site_proxy.rb +0 -389
  109. data/lib/rsmp/supervisor.rb +0 -287
  110. data/lib/rsmp/supervisor_proxy.rb +0 -516
  111. data/lib/rsmp/tlc/inputs.rb +0 -134
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5c0f93062b73555dd67edda6564054299c1df0240c4ce55f0b854abc7e94931
4
- data.tar.gz: 2659660e29f1ba7b50533b3e89bb80c81ae69f81768cbc4012db6da6776ccebc
3
+ metadata.gz: 3f1f32aacd75ffad7d36662c3e7abd0b0a851b35b287f444dd63cdebc9db1c00
4
+ data.tar.gz: 32d9db803bc5ef274c1838cb961f677863745bb2e2eca105eb17b8ee4f39cea1
5
5
  SHA512:
6
- metadata.gz: c48367c147156f5adb8cdabfd5fc81cde4cbb3e842f05c982307b6400f6fb33deb583cc57737faa2e7a1fe2a87f7e629dde7b335f063e126a403e45f49774c2f
7
- data.tar.gz: 77c5e1343d7106bd9a60ff55e666d69cb4589655e7ad9bcbcf84cb95101e3b7c004bf373943f018d24b38d5cb6f6cccc97f7a0202fe2c8f5dc6ad7e687134c1b
6
+ metadata.gz: a655dab4868d9544a0242303da7d26254f3d953ecc5d789c78f7e4553e946b98eebab7f59fa4ee69c736123dfa198417885595db490724b6238fa051b1fb2a87
7
+ data.tar.gz: f24fe238a17439e6e0b91e75f816733da49f9e348dd22cc00f3c68938505ca68ba7ed32575a71e9dfc18330a10f2b92fe23ade7679bdb3f0878b37e894fd55aa
@@ -0,0 +1,22 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/ruby:3.4",
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+
14
+ // A command to run when creating the container and rerun when the workspace content was updated while creating the container
15
+ "updateContentCommand": "bundle install"
16
+
17
+ // Configure tool-specific properties.
18
+ // "customizations": {},
19
+
20
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21
+ // "remoteUser": "root"
22
+ }
@@ -0,0 +1,33 @@
1
+ # rsmp gem
2
+ This is a Ruby based repository contaning an implementation of RSMP (RoadSide Message Protocol), including:
3
+
4
+ - Ruby classes that can be used to build tests or other RSMP tools.
5
+ - Command-line tools for quickly running RSMP supervisors or sites and view messages exchanged.
6
+
7
+ It relies on the gem `rsmp_schema` to validate RSMP message using JSON schema.
8
+
9
+ Always reference these instructions first, and fall back to search or bash commands only when you encounter unexpected information that does not match the info here.
10
+
11
+ ## Development Flow
12
+ - Ruby and required gems are already installed by the action .github/copilot-setup-steps.yml, do not install them again.
13
+ - All gem executables must be run from the bundle environment using `bundle exec ...`
14
+ - Before any commit, run `bundle exec rspec` to verify that all tests pass.
15
+
16
+ ## Repository Structure
17
+ - `bin/`: Main service entry points and executables
18
+ - `lib/`: Ruby source code
19
+ - `spec/`: RSpec test files for validating Ruby code
20
+ - `features/`: Cucumber test files for validating the CLI component
21
+ - `config/`: Configuration files used when running the 'rsmp' command line
22
+ - `documentation/`: Documentation
23
+
24
+ ## Guidelines
25
+ - Follow Ruby best practices and idiomatic patterns.
26
+ - Maintain existing code structure and organization.
27
+ - Always use existing async patterns to handle concurrency, also in tests.
28
+ - Code behaviour should adhere to the RSMP specifications defined at https://github.com/rsmp-nordic/rsmp_core.
29
+ - Write and verify rspec tests for new functionality.
30
+ - Document public APIs and complex logic. Suggest changes to the `documentation/` folder when appropriate.
31
+ - Don't commit example scripts.
32
+ - Prefer real classes over test doubles or mocks in tests and use async contexts to run sites and supervisors.
33
+ - When reporting on progress, claims should be supported by tests or other data.
@@ -0,0 +1,35 @@
1
+ name: "Copilot Setup Steps"
2
+
3
+ # Automatically run the setup steps when they are changed to allow for easy validation, and
4
+ # allow manual testing through the repository's "Actions" tab
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ paths:
9
+ - .github/workflows/copilot-setup-steps.yml
10
+ pull_request:
11
+ paths:
12
+ - .github/workflows/copilot-setup-steps.yml
13
+
14
+ jobs:
15
+ # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16
+ copilot-setup-steps:
17
+ runs-on: ubuntu-latest
18
+
19
+ # Set the permissions to the lowest permissions possible needed for your steps.
20
+ # Copilot will be given its own token for its operations.
21
+ permissions:
22
+ # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
23
+ contents: read
24
+
25
+ # You can define any steps you want, and they will run before the agent starts.
26
+ # If you do not check out your code, Copilot will do this for you.
27
+ steps:
28
+ - name: Checkout code
29
+ uses: actions/checkout@v4
30
+
31
+ - uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: 3.4
34
+ bundler-cache: true
35
+
@@ -14,6 +14,7 @@ jobs:
14
14
  - uses: actions/checkout@v4
15
15
  - uses: ruby/setup-ruby@v1
16
16
  with:
17
- ruby-version: 3.3
17
+ ruby-version: 3.4
18
18
  bundler-cache: true
19
19
  - run: bundle exec rspec -f d
20
+
@@ -0,0 +1,17 @@
1
+ # This workflow runs RSpec tests
2
+
3
+ name: Rubocop
4
+ on: [push]
5
+ jobs:
6
+ test:
7
+ timeout-minutes: 10
8
+ strategy:
9
+ fail-fast: false
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ bundler-cache: true
16
+ - run: bundle exec rubocop
17
+
data/.gitignore CHANGED
@@ -1,16 +1,16 @@
1
- ignore
2
- log
3
- .DS_Store
4
- .rspec_status
5
-
1
+ /.DS_Store
2
+ /.rspec_status
3
+ /ignore/
4
+ /log/
6
5
  /.bundle/
7
- /.yardoc
6
+ /.yardoc/
8
7
  /_yardoc/
9
8
  /coverage/
10
9
  /doc/
11
10
  /pkg/
12
- /spec/reports/
13
11
  /tmp/
12
+ /vendor/
13
+ /spec/reports/
14
14
  /config/private/
15
15
 
16
16
 
data/.rubocop.yml ADDED
@@ -0,0 +1,80 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 3.4
4
+ Exclude:
5
+ - 'vendor/**/*'
6
+ - 'bin/**/*'
7
+ - '.bundle/**/*'
8
+ - 'ignore/**/*'
9
+ - 'config/private/**/*'
10
+
11
+ # Allow longer line lengths for tests with long JSON strings
12
+ Layout/LineLength:
13
+ Max: 120
14
+ Exclude:
15
+ - 'spec/**/*'
16
+
17
+ # Allow some reasonable flexibility for domain-specific code
18
+ Metrics/MethodLength:
19
+ Max: 25
20
+
21
+ Metrics/ClassLength:
22
+ Max: 200
23
+
24
+ Metrics/ModuleLength:
25
+ Max: 200
26
+
27
+ Metrics/AbcSize:
28
+ Max: 20
29
+
30
+ Metrics/CyclomaticComplexity:
31
+ Max: 10
32
+
33
+ Metrics/PerceivedComplexity:
34
+ Max: 10
35
+
36
+ Metrics/ParameterLists:
37
+ Max: 5
38
+
39
+ # Allow some blocks to be longer for complex configurations and tests
40
+ Metrics/BlockLength:
41
+ Exclude:
42
+ - 'spec/**/*'
43
+ - 'features/**/*'
44
+ - '*.gemspec'
45
+
46
+ # Keep some reasonable exceptions
47
+ Style/Documentation:
48
+ Enabled: false
49
+
50
+ Style/FrozenStringLiteralComment:
51
+ Enabled: false
52
+
53
+ # Allow double negation for boolean coercion - common Ruby pattern
54
+ Style/DoubleNegation:
55
+ Enabled: false
56
+
57
+ # Allow mix-in usage at top level in test files
58
+ Style/MixinUsage:
59
+ Exclude:
60
+ - 'spec/**/*'
61
+ - 'features/**/*'
62
+
63
+ # Allow constant definition in blocks for test helpers
64
+ Lint/ConstantDefinitionInBlock:
65
+ Exclude:
66
+ - 'spec/**/*'
67
+
68
+ # Keep critical domain-specific logic intact
69
+ Style/ReturnNilInPredicateMethodDefinition:
70
+ Enabled: false
71
+
72
+
73
+ plugins:
74
+ - rubocop-rspec
75
+
76
+ RSpec/MultipleExpectations:
77
+ Max: 20
78
+
79
+ RSpec/ExampleLength:
80
+ Max: 50
data/Gemfile CHANGED
@@ -1,5 +1,17 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rsmp.gemspec
4
4
 
5
5
  gemspec
6
+
7
+ group :development do
8
+ gem 'aruba', '~> 2.3'
9
+ gem 'bundler', '~> 2.6'
10
+ gem 'cucumber', '~> 9.2'
11
+ gem 'rake', '~> 13.2'
12
+ gem 'rspec', '~> 3.13'
13
+ gem 'rspec-expectations', '~> 3.13'
14
+ gem 'rubocop', '~> 1.65'
15
+ gem 'rubocop-rspec', require: false
16
+ gem 'timecop', '~> 0.9'
17
+ end
data/Gemfile.lock CHANGED
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.35.2)
5
- async (~> 2.21)
6
- async-io (~> 1.43)
4
+ rsmp (0.38.0)
5
+ async (~> 2.32)
7
6
  colorize (~> 1.1)
7
+ io-endpoint (~> 0.15)
8
+ io-stream (~> 0.10)
8
9
  logger (~> 1.6)
9
10
  ostruct (~> 0.6)
10
11
  rsmp_schema (~> 0.8)
@@ -12,24 +13,23 @@ PATH
12
13
  GEM
13
14
  remote: https://rubygems.org/
14
15
  specs:
15
- aruba (2.3.0)
16
+ aruba (2.3.1)
16
17
  bundler (>= 1.17, < 3.0)
17
18
  contracts (>= 0.16.0, < 0.18.0)
18
- cucumber (>= 8.0, < 10.0)
19
+ cucumber (>= 8.0, < 11.0)
19
20
  rspec-expectations (~> 3.4)
20
21
  thor (~> 1.0)
21
- async (2.23.0)
22
+ ast (2.4.3)
23
+ async (2.32.0)
22
24
  console (~> 1.29)
23
25
  fiber-annotation
24
- io-event (~> 1.9)
26
+ io-event (~> 1.11)
25
27
  metrics (~> 0.12)
26
- traces (~> 0.15)
27
- async-io (1.43.2)
28
- async
29
- bigdecimal (3.1.9)
28
+ traces (~> 0.18)
29
+ bigdecimal (3.2.3)
30
30
  builder (3.3.0)
31
31
  colorize (1.1.0)
32
- console (1.29.3)
32
+ console (1.34.0)
33
33
  fiber-annotation
34
34
  fiber-local (~> 1.1)
35
35
  json
@@ -55,57 +55,93 @@ GEM
55
55
  bigdecimal
56
56
  cucumber-gherkin (27.0.0)
57
57
  cucumber-messages (>= 19.1.4, < 23)
58
- cucumber-html-formatter (21.9.0)
58
+ cucumber-html-formatter (21.14.0)
59
59
  cucumber-messages (> 19, < 28)
60
60
  cucumber-messages (22.0.0)
61
61
  cucumber-tag-expressions (6.1.2)
62
- diff-lcs (1.6.0)
63
- ffi (1.17.1)
62
+ diff-lcs (1.6.2)
63
+ ffi (1.17.2)
64
+ ffi (1.17.2-arm64-darwin)
64
65
  fiber-annotation (0.2.0)
65
66
  fiber-local (1.1.0)
66
67
  fiber-storage
67
- fiber-storage (1.0.0)
68
+ fiber-storage (1.0.1)
68
69
  hana (1.3.7)
69
- io-event (1.9.0)
70
- json (2.10.1)
71
- json_schemer (2.3.0)
70
+ io-endpoint (0.15.2)
71
+ io-event (1.14.0)
72
+ io-stream (0.10.0)
73
+ json (2.14.1)
74
+ json_schemer (2.4.0)
72
75
  bigdecimal
73
76
  hana (~> 1.3)
74
77
  regexp_parser (~> 2.0)
75
78
  simpleidn (~> 0.2)
76
- logger (1.6.6)
77
- metrics (0.12.1)
79
+ language_server-protocol (3.17.0.5)
80
+ lint_roller (1.1.0)
81
+ logger (1.7.0)
82
+ memoist3 (1.0.0)
83
+ metrics (0.15.0)
78
84
  mini_mime (1.1.5)
79
85
  multi_test (1.1.0)
80
- ostruct (0.6.1)
81
- rake (13.2.1)
82
- regexp_parser (2.10.0)
83
- rsmp_schema (0.8.7)
84
- json_schemer (~> 2.3.0)
85
- thor (~> 1.3.1)
86
- rspec (3.13.0)
86
+ ostruct (0.6.3)
87
+ parallel (1.27.0)
88
+ parser (3.3.9.0)
89
+ ast (~> 2.4.1)
90
+ racc
91
+ prism (1.5.1)
92
+ racc (1.8.1)
93
+ rainbow (3.1.1)
94
+ rake (13.3.0)
95
+ regexp_parser (2.11.2)
96
+ rsmp_schema (0.8.9)
97
+ json_schemer (~> 2.4.0)
98
+ thor (~> 1.4.0)
99
+ rspec (3.13.1)
87
100
  rspec-core (~> 3.13.0)
88
101
  rspec-expectations (~> 3.13.0)
89
102
  rspec-mocks (~> 3.13.0)
90
- rspec-core (3.13.3)
103
+ rspec-core (3.13.5)
91
104
  rspec-support (~> 3.13.0)
92
- rspec-expectations (3.13.3)
105
+ rspec-expectations (3.13.5)
93
106
  diff-lcs (>= 1.2.0, < 2.0)
94
107
  rspec-support (~> 3.13.0)
95
- rspec-mocks (3.13.2)
108
+ rspec-mocks (3.13.5)
96
109
  diff-lcs (>= 1.2.0, < 2.0)
97
110
  rspec-support (~> 3.13.0)
98
- rspec-support (3.13.2)
111
+ rspec-support (3.13.5)
112
+ rubocop (1.81.0)
113
+ json (~> 2.3)
114
+ language_server-protocol (~> 3.17.0.2)
115
+ lint_roller (~> 1.1.0)
116
+ parallel (~> 1.10)
117
+ parser (>= 3.3.0.2)
118
+ rainbow (>= 2.2.2, < 4.0)
119
+ regexp_parser (>= 2.9.3, < 3.0)
120
+ rubocop-ast (>= 1.47.1, < 2.0)
121
+ ruby-progressbar (~> 1.7)
122
+ unicode-display_width (>= 2.4.0, < 4.0)
123
+ rubocop-ast (1.47.1)
124
+ parser (>= 3.3.7.2)
125
+ prism (~> 1.4)
126
+ rubocop-rspec (3.7.0)
127
+ lint_roller (~> 1.1)
128
+ rubocop (~> 1.72, >= 1.72.1)
129
+ ruby-progressbar (1.13.0)
99
130
  simpleidn (0.2.3)
100
- sys-uname (1.3.1)
131
+ sys-uname (1.4.1)
101
132
  ffi (~> 1.1)
102
- thor (1.3.2)
133
+ memoist3 (~> 1.0.0)
134
+ thor (1.4.0)
103
135
  timecop (0.9.10)
104
- traces (0.15.2)
136
+ traces (0.18.2)
137
+ unicode-display_width (3.2.0)
138
+ unicode-emoji (~> 4.1)
139
+ unicode-emoji (4.1.0)
105
140
 
106
141
  PLATFORMS
107
142
  arm64-darwin-22
108
143
  arm64-darwin-23
144
+ arm64-darwin-24
109
145
  x64-mingw-ucrt
110
146
  x64-mingw32
111
147
  x86_64-darwin-19
@@ -122,6 +158,8 @@ DEPENDENCIES
122
158
  rsmp!
123
159
  rspec (~> 3.13)
124
160
  rspec-expectations (~> 3.13)
161
+ rubocop (~> 1.65)
162
+ rubocop-rspec
125
163
  timecop (~> 0.9)
126
164
 
127
165
  BUNDLED WITH
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
data/bin/console CHANGED
@@ -14,10 +14,8 @@ module IRB
14
14
  class MyInputMethod < StdioInputMethod
15
15
  def initialize
16
16
  super
17
- @input = Async::IO::Protocol::Line.new(
18
- Async::IO::Stream.new(
19
- Async::IO::Generic.new($stdin)
20
- )
17
+ @input = RSMP::Protocol.new(
18
+ IO::Stream::Buffered.new($stdin)
21
19
  )
22
20
  end
23
21
 
@@ -74,16 +74,16 @@ SiteProxy and SupervisorProxy both inherit from Proxy and have a reader task and
74
74
  ## Task Hierachy
75
75
  When you start an Async task, the parent will be the currently running task, unless you specify a different parent task.
76
76
 
77
- The Async task hierarchy is similar to the object hierachy, with the difference that proxies have reader and timer tasks. And Async::IO which is used to handle TPC connections concurently, will create some intermediate tasks:
77
+ The Async task hierarchy is similar to the object hierachy, with the difference that proxies have reader and timer tasks. And IO::Endpoint which is used to handle TCP connections concurently, will create some intermediate tasks:
78
78
 
79
79
  ```
80
80
  Supervisor @task
81
- accepting connections # this task is created by Async::IO
82
- incoming connection 1 # this task is created by Async::IO
81
+ accepting connections # this task is created by IO::Endpoint
82
+ incoming connection 1 # this task is created by IO::Endpoint
83
83
  SiteProxy @task
84
84
  SiteProxy @reader
85
85
  SiteProxy @timer
86
- incoming connection 2 # this task is created by Async::IO
86
+ incoming connection 2 # this task is created by IO::Endpoint
87
87
  SiteProxy @task
88
88
  SiteProxy @reader
89
89
  SiteProxy @timer