active_cached_resource 0.0.1.pre → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/LICENSE +21 -0
  4. data/lib/active_cached_resource/caching.rb +104 -1
  5. data/lib/active_cached_resource/configuration.rb +22 -1
  6. data/lib/active_cached_resource/logger.rb +14 -0
  7. data/lib/active_cached_resource/model.rb +18 -0
  8. data/lib/active_cached_resource/version.rb +1 -8
  9. data/lib/activeresource/lib/active_resource/collection.rb +14 -1
  10. data/lib/activeresource/lib/active_resource/railtie.rb +2 -2
  11. data/lib/activeresource/lib/active_resource.rb +1 -1
  12. metadata +5 -401
  13. data/.rspec +0 -3
  14. data/.rubocop.yml +0 -22
  15. data/.standard.yml +0 -2
  16. data/Rakefile +0 -21
  17. data/example/consumer/.dockerignore +0 -41
  18. data/example/consumer/.gitattributes +0 -9
  19. data/example/consumer/.gitignore +0 -36
  20. data/example/consumer/.kamal/hooks/docker-setup.sample +0 -3
  21. data/example/consumer/.kamal/hooks/post-deploy.sample +0 -14
  22. data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +0 -3
  23. data/example/consumer/.kamal/hooks/pre-build.sample +0 -51
  24. data/example/consumer/.kamal/hooks/pre-connect.sample +0 -47
  25. data/example/consumer/.kamal/hooks/pre-deploy.sample +0 -109
  26. data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  27. data/example/consumer/.kamal/secrets +0 -17
  28. data/example/consumer/Dockerfile +0 -65
  29. data/example/consumer/Gemfile +0 -17
  30. data/example/consumer/Rakefile +0 -6
  31. data/example/consumer/app/controllers/application_controller.rb +0 -2
  32. data/example/consumer/app/controllers/concerns/.keep +0 -0
  33. data/example/consumer/app/jobs/application_job.rb +0 -7
  34. data/example/consumer/app/mailers/application_mailer.rb +0 -4
  35. data/example/consumer/app/models/application_record.rb +0 -3
  36. data/example/consumer/app/models/concerns/.keep +0 -0
  37. data/example/consumer/app/models/person.rb +0 -9
  38. data/example/consumer/app/views/layouts/mailer.html.erb +0 -13
  39. data/example/consumer/app/views/layouts/mailer.text.erb +0 -1
  40. data/example/consumer/bin/brakeman +0 -7
  41. data/example/consumer/bin/bundle +0 -109
  42. data/example/consumer/bin/dev +0 -2
  43. data/example/consumer/bin/docker-entrypoint +0 -14
  44. data/example/consumer/bin/jobs +0 -6
  45. data/example/consumer/bin/kamal +0 -27
  46. data/example/consumer/bin/rails +0 -4
  47. data/example/consumer/bin/rake +0 -4
  48. data/example/consumer/bin/rubocop +0 -8
  49. data/example/consumer/bin/setup +0 -34
  50. data/example/consumer/bin/thrust +0 -5
  51. data/example/consumer/config/application.rb +0 -20
  52. data/example/consumer/config/boot.rb +0 -3
  53. data/example/consumer/config/cache.yml +0 -16
  54. data/example/consumer/config/credentials.yml.enc +0 -1
  55. data/example/consumer/config/database.yml +0 -14
  56. data/example/consumer/config/deploy.yml +0 -116
  57. data/example/consumer/config/environment.rb +0 -5
  58. data/example/consumer/config/environments/development.rb +0 -64
  59. data/example/consumer/config/environments/production.rb +0 -85
  60. data/example/consumer/config/environments/test.rb +0 -50
  61. data/example/consumer/config/initializers/cors.rb +0 -16
  62. data/example/consumer/config/initializers/filter_parameter_logging.rb +0 -8
  63. data/example/consumer/config/initializers/inflections.rb +0 -16
  64. data/example/consumer/config/locales/en.yml +0 -31
  65. data/example/consumer/config/puma.rb +0 -41
  66. data/example/consumer/config/queue.yml +0 -18
  67. data/example/consumer/config/recurring.yml +0 -10
  68. data/example/consumer/config/routes.rb +0 -10
  69. data/example/consumer/config.ru +0 -6
  70. data/example/consumer/db/cache_schema.rb +0 -14
  71. data/example/consumer/db/queue_schema.rb +0 -129
  72. data/example/consumer/db/seeds.rb +0 -0
  73. data/example/consumer/lib/tasks/.keep +0 -0
  74. data/example/consumer/log/.keep +0 -0
  75. data/example/consumer/public/robots.txt +0 -1
  76. data/example/consumer/script/.keep +0 -0
  77. data/example/consumer/storage/.keep +0 -0
  78. data/example/consumer/tmp/.keep +0 -0
  79. data/example/consumer/tmp/cache/.keep +0 -0
  80. data/example/consumer/tmp/pids/.keep +0 -0
  81. data/example/consumer/tmp/storage/.keep +0 -0
  82. data/example/consumer/vendor/.keep +0 -0
  83. data/example/provider/.dockerignore +0 -41
  84. data/example/provider/.gitattributes +0 -9
  85. data/example/provider/.gitignore +0 -32
  86. data/example/provider/.kamal/hooks/docker-setup.sample +0 -3
  87. data/example/provider/.kamal/hooks/post-deploy.sample +0 -14
  88. data/example/provider/.kamal/hooks/post-proxy-reboot.sample +0 -3
  89. data/example/provider/.kamal/hooks/pre-build.sample +0 -51
  90. data/example/provider/.kamal/hooks/pre-connect.sample +0 -47
  91. data/example/provider/.kamal/hooks/pre-deploy.sample +0 -109
  92. data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  93. data/example/provider/.kamal/secrets +0 -17
  94. data/example/provider/Dockerfile +0 -65
  95. data/example/provider/Gemfile +0 -14
  96. data/example/provider/Rakefile +0 -6
  97. data/example/provider/app/controllers/application_controller.rb +0 -2
  98. data/example/provider/app/controllers/concerns/.keep +0 -0
  99. data/example/provider/app/controllers/people_controller.rb +0 -68
  100. data/example/provider/app/jobs/application_job.rb +0 -7
  101. data/example/provider/app/mailers/application_mailer.rb +0 -4
  102. data/example/provider/app/models/address.rb +0 -3
  103. data/example/provider/app/models/application_record.rb +0 -3
  104. data/example/provider/app/models/company.rb +0 -3
  105. data/example/provider/app/models/concerns/.keep +0 -0
  106. data/example/provider/app/models/person.rb +0 -6
  107. data/example/provider/app/views/layouts/mailer.html.erb +0 -13
  108. data/example/provider/app/views/layouts/mailer.text.erb +0 -1
  109. data/example/provider/bin/brakeman +0 -7
  110. data/example/provider/bin/bundle +0 -109
  111. data/example/provider/bin/dev +0 -2
  112. data/example/provider/bin/docker-entrypoint +0 -14
  113. data/example/provider/bin/jobs +0 -6
  114. data/example/provider/bin/kamal +0 -27
  115. data/example/provider/bin/rails +0 -4
  116. data/example/provider/bin/rake +0 -4
  117. data/example/provider/bin/rubocop +0 -8
  118. data/example/provider/bin/setup +0 -34
  119. data/example/provider/bin/thrust +0 -5
  120. data/example/provider/config/application.rb +0 -44
  121. data/example/provider/config/boot.rb +0 -3
  122. data/example/provider/config/cache.yml +0 -16
  123. data/example/provider/config/credentials.yml.enc +0 -1
  124. data/example/provider/config/database.yml +0 -20
  125. data/example/provider/config/deploy.yml +0 -116
  126. data/example/provider/config/environment.rb +0 -5
  127. data/example/provider/config/environments/development.rb +0 -64
  128. data/example/provider/config/environments/production.rb +0 -85
  129. data/example/provider/config/environments/test.rb +0 -50
  130. data/example/provider/config/initializers/cors.rb +0 -16
  131. data/example/provider/config/initializers/filter_parameter_logging.rb +0 -8
  132. data/example/provider/config/initializers/inflections.rb +0 -16
  133. data/example/provider/config/locales/en.yml +0 -31
  134. data/example/provider/config/puma.rb +0 -41
  135. data/example/provider/config/queue.yml +0 -18
  136. data/example/provider/config/recurring.yml +0 -10
  137. data/example/provider/config/routes.rb +0 -4
  138. data/example/provider/config.ru +0 -6
  139. data/example/provider/db/cache_schema.rb +0 -14
  140. data/example/provider/db/migrate/20241202183937_create_people.rb +0 -11
  141. data/example/provider/db/migrate/20241202183955_create_addresses.rb +0 -13
  142. data/example/provider/db/migrate/20241202184017_create_companies.rb +0 -14
  143. data/example/provider/db/queue_schema.rb +0 -129
  144. data/example/provider/db/schema.rb +0 -47
  145. data/example/provider/db/seeds.rb +0 -18
  146. data/example/provider/lib/tasks/.keep +0 -0
  147. data/example/provider/log/.keep +0 -0
  148. data/example/provider/public/robots.txt +0 -1
  149. data/example/provider/script/.keep +0 -0
  150. data/example/provider/storage/.keep +0 -0
  151. data/example/provider/tmp/.keep +0 -0
  152. data/example/provider/tmp/pids/.keep +0 -0
  153. data/example/provider/tmp/storage/.keep +0 -0
  154. data/example/provider/vendor/.keep +0 -0
  155. data/lib/activeresource/.gitignore +0 -15
  156. data/lib/activeresource/examples/performance.rb +0 -72
  157. data/lib/activeresource/test/abstract_unit.rb +0 -153
  158. data/lib/activeresource/test/cases/active_job_serializer_test.rb +0 -53
  159. data/lib/activeresource/test/cases/association_test.rb +0 -104
  160. data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +0 -42
  161. data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +0 -28
  162. data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +0 -28
  163. data/lib/activeresource/test/cases/authorization_test.rb +0 -276
  164. data/lib/activeresource/test/cases/base/custom_methods_test.rb +0 -155
  165. data/lib/activeresource/test/cases/base/equality_test.rb +0 -53
  166. data/lib/activeresource/test/cases/base/load_test.rb +0 -249
  167. data/lib/activeresource/test/cases/base/schema_test.rb +0 -428
  168. data/lib/activeresource/test/cases/base_errors_test.rb +0 -129
  169. data/lib/activeresource/test/cases/base_test.rb +0 -1622
  170. data/lib/activeresource/test/cases/callbacks_test.rb +0 -155
  171. data/lib/activeresource/test/cases/collection_test.rb +0 -172
  172. data/lib/activeresource/test/cases/connection_test.rb +0 -357
  173. data/lib/activeresource/test/cases/finder_test.rb +0 -217
  174. data/lib/activeresource/test/cases/format_test.rb +0 -137
  175. data/lib/activeresource/test/cases/http_mock_test.rb +0 -213
  176. data/lib/activeresource/test/cases/inheritence_test.rb +0 -19
  177. data/lib/activeresource/test/cases/inheriting_hash_test.rb +0 -25
  178. data/lib/activeresource/test/cases/log_subscriber_test.rb +0 -63
  179. data/lib/activeresource/test/cases/reflection_test.rb +0 -65
  180. data/lib/activeresource/test/cases/validations_test.rb +0 -78
  181. data/lib/activeresource/test/fixtures/address.rb +0 -20
  182. data/lib/activeresource/test/fixtures/beast.rb +0 -16
  183. data/lib/activeresource/test/fixtures/comment.rb +0 -5
  184. data/lib/activeresource/test/fixtures/customer.rb +0 -5
  185. data/lib/activeresource/test/fixtures/inventory.rb +0 -14
  186. data/lib/activeresource/test/fixtures/person.rb +0 -15
  187. data/lib/activeresource/test/fixtures/pet.rb +0 -6
  188. data/lib/activeresource/test/fixtures/post.rb +0 -5
  189. data/lib/activeresource/test/fixtures/product.rb +0 -11
  190. data/lib/activeresource/test/fixtures/project.rb +0 -19
  191. data/lib/activeresource/test/fixtures/proxy.rb +0 -6
  192. data/lib/activeresource/test/fixtures/sound.rb +0 -11
  193. data/lib/activeresource/test/fixtures/street_address.rb +0 -6
  194. data/lib/activeresource/test/fixtures/subscription_plan.rb +0 -7
  195. data/lib/activeresource/test/fixtures/weather.rb +0 -21
  196. data/lib/activeresource/test/setter_trap.rb +0 -28
  197. data/lib/activeresource/test/singleton_test.rb +0 -138
  198. data/lib/activeresource/test/threadsafe_attributes_test.rb +0 -91
  199. data/sorbet/config +0 -4
  200. data/sorbet/rbi/annotations/.gitattributes +0 -1
  201. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  202. data/sorbet/rbi/annotations/activesupport.rbi +0 -457
  203. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  204. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  205. data/sorbet/rbi/dsl/.gitattributes +0 -1
  206. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -21
  207. data/sorbet/rbi/gems/.gitattributes +0 -1
  208. data/sorbet/rbi/gems/actioncable@8.0.0.rbi +0 -252
  209. data/sorbet/rbi/gems/actionmailbox@8.0.0.rbi +0 -9
  210. data/sorbet/rbi/gems/actionmailer@8.0.0.rbi +0 -9
  211. data/sorbet/rbi/gems/actionpack@8.0.0.rbi +0 -20909
  212. data/sorbet/rbi/gems/actiontext@8.0.0.rbi +0 -9
  213. data/sorbet/rbi/gems/actionview@8.0.0.rbi +0 -16207
  214. data/sorbet/rbi/gems/activejob@8.0.0.rbi +0 -9
  215. data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +0 -166
  216. data/sorbet/rbi/gems/activemodel@8.0.0.rbi +0 -6857
  217. data/sorbet/rbi/gems/activerecord@8.0.0.rbi +0 -42896
  218. data/sorbet/rbi/gems/activeresource@6.1.4.rbi +0 -3944
  219. data/sorbet/rbi/gems/activestorage@8.0.0.rbi +0 -9
  220. data/sorbet/rbi/gems/activesupport@8.0.0.rbi +0 -21251
  221. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  222. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  223. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  224. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
  225. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  226. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  227. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3607
  228. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  229. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +0 -11645
  230. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  231. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  232. data/sorbet/rbi/gems/date@3.4.0.rbi +0 -75
  233. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -1131
  234. data/sorbet/rbi/gems/docile@1.4.1.rbi +0 -377
  235. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  236. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -150
  237. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  238. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  239. data/sorbet/rbi/gems/io-console@0.7.2.rbi +0 -9
  240. data/sorbet/rbi/gems/json@2.8.2.rbi +0 -1901
  241. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  242. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +0 -240
  243. data/sorbet/rbi/gems/logger@1.6.1.rbi +0 -920
  244. data/sorbet/rbi/gems/loofah@2.23.1.rbi +0 -1081
  245. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  246. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  247. data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -304
  248. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  249. data/sorbet/rbi/gems/minitest@5.25.2.rbi +0 -1547
  250. data/sorbet/rbi/gems/net-imap@0.5.1.rbi +0 -9
  251. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  252. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  253. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +0 -9
  254. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  255. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  256. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +0 -7311
  257. data/sorbet/rbi/gems/parallel@1.26.3.rbi +0 -291
  258. data/sorbet/rbi/gems/parser@3.3.6.0.rbi +0 -5519
  259. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  260. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1151
  261. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10076
  262. data/sorbet/rbi/gems/psych@5.2.0.rbi +0 -1785
  263. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  264. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +0 -727
  265. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +0 -747
  266. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4905
  267. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  268. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -758
  269. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +0 -785
  270. data/sorbet/rbi/gems/rails@8.0.0.rbi +0 -9
  271. data/sorbet/rbi/gems/railties@8.0.0.rbi +0 -6287
  272. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  273. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3091
  274. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  275. data/sorbet/rbi/gems/rdoc@6.8.1.rbi +0 -12572
  276. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +0 -3772
  277. data/sorbet/rbi/gems/reline@0.5.12.rbi +0 -2416
  278. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4858
  279. data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +0 -11287
  280. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +0 -8183
  281. data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +0 -5341
  282. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +0 -1630
  283. data/sorbet/rbi/gems/rspec@3.13.0.rbi +0 -83
  284. data/sorbet/rbi/gems/rubocop-ast@1.36.1.rbi +0 -7303
  285. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +0 -9
  286. data/sorbet/rbi/gems/rubocop@1.65.1.rbi +0 -58170
  287. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  288. data/sorbet/rbi/gems/securerandom@0.3.2.rbi +0 -395
  289. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +0 -225
  290. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  291. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  292. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  293. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +0 -9
  294. data/sorbet/rbi/gems/standard-performance@1.4.0.rbi +0 -9
  295. data/sorbet/rbi/gems/standard@1.40.0.rbi +0 -929
  296. data/sorbet/rbi/gems/stringio@3.1.2.rbi +0 -9
  297. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +0 -3597
  298. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  299. data/sorbet/rbi/gems/timeout@0.4.2.rbi +0 -151
  300. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  301. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +0 -66
  302. data/sorbet/rbi/gems/uri@1.0.2.rbi +0 -2377
  303. data/sorbet/rbi/gems/useragent@0.16.10.rbi +0 -9
  304. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +0 -9
  305. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  306. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  307. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18504
  308. data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +0 -9
  309. data/sorbet/tapioca/config.yml +0 -13
  310. data/sorbet/tapioca/require.rb +0 -12
@@ -1,1347 +0,0 @@
1
- # typed: false
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `drb` gem.
5
- # Please instead update this file by running `bin/tapioca gem drb`.
6
-
7
-
8
- # for ruby-1.8.0
9
- #
10
- # source://drb//lib/drb/eq.rb#2
11
- module DRb
12
- private
13
-
14
- # Get the configuration of the current server.
15
- #
16
- # If there is no current server, this returns the default configuration.
17
- # See #current_server and DRbServer::make_config.
18
- #
19
- # source://drb//lib/drb/drb.rb#1832
20
- def config; end
21
-
22
- # Get the 'current' server.
23
- #
24
- # In the context of execution taking place within the main
25
- # thread of a dRuby server (typically, as a result of a remote
26
- # call on the server or one of its objects), the current
27
- # server is that server. Otherwise, the current server is
28
- # the primary server.
29
- #
30
- # If the above rule fails to find a server, a DRbServerNotFound
31
- # error is raised.
32
- #
33
- # @raise [DRbServerNotFound]
34
- #
35
- # source://drb//lib/drb/drb.rb#1789
36
- def current_server; end
37
-
38
- # Retrieves the server with the given +uri+.
39
- #
40
- # See also regist_server and remove_server.
41
- #
42
- # source://drb//lib/drb/drb.rb#1934
43
- def fetch_server(uri); end
44
-
45
- # Get the front object of the current server.
46
- #
47
- # This raises a DRbServerNotFound error if there is no current server.
48
- # See #current_server.
49
- #
50
- # source://drb//lib/drb/drb.rb#1843
51
- def front; end
52
-
53
- # Is +uri+ the URI for the current local server?
54
- #
55
- # @return [Boolean]
56
- #
57
- # source://drb//lib/drb/drb.rb#1822
58
- def here?(uri); end
59
-
60
- # Set the default ACL to +acl+.
61
- #
62
- # See DRb::DRbServer.default_acl.
63
- #
64
- # source://drb//lib/drb/drb.rb#1888
65
- def install_acl(acl); end
66
-
67
- # Set the default id conversion object.
68
- #
69
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
70
- # #to_id and #to_obj that can convert objects to and from DRb references.
71
- #
72
- # See DRbServer#default_id_conv.
73
- #
74
- # source://drb//lib/drb/drb.rb#1880
75
- def install_id_conv(idconv); end
76
-
77
- # source://drb//lib/drb/drb.rb#1894
78
- def mutex; end
79
-
80
- # The primary local dRuby server.
81
- #
82
- # This is the server created by the #start_service call.
83
- #
84
- # source://drb//lib/drb/drb.rb#1776
85
- def primary_server; end
86
-
87
- # The primary local dRuby server.
88
- #
89
- # This is the server created by the #start_service call.
90
- #
91
- # source://drb//lib/drb/drb.rb#1776
92
- def primary_server=(_arg0); end
93
-
94
- # Registers +server+ with DRb.
95
- #
96
- # This is called when a new DRb::DRbServer is created.
97
- #
98
- # If there is no primary server then +server+ becomes the primary server.
99
- #
100
- # Example:
101
- #
102
- # require 'drb'
103
- #
104
- # s = DRb::DRbServer.new # automatically calls regist_server
105
- # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
106
- #
107
- # source://drb//lib/drb/drb.rb#1912
108
- def regist_server(server); end
109
-
110
- # Removes +server+ from the list of registered servers.
111
- #
112
- # source://drb//lib/drb/drb.rb#1921
113
- def remove_server(server); end
114
-
115
- # Start a dRuby server locally.
116
- #
117
- # The new dRuby server will become the primary server, even
118
- # if another server is currently the primary server.
119
- #
120
- # +uri+ is the URI for the server to bind to. If nil,
121
- # the server will bind to random port on the default local host
122
- # name and use the default dRuby protocol.
123
- #
124
- # +front+ is the server's front object. This may be nil.
125
- #
126
- # +config+ is the configuration for the new server. This may
127
- # be nil.
128
- #
129
- # See DRbServer::new.
130
- #
131
- # source://drb//lib/drb/drb.rb#1768
132
- def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
133
-
134
- # Stop the local dRuby server.
135
- #
136
- # This operates on the primary server. If there is no primary
137
- # server currently running, it is a noop.
138
- #
139
- # source://drb//lib/drb/drb.rb#1801
140
- def stop_service; end
141
-
142
- # Get the thread of the primary server.
143
- #
144
- # This returns nil if there is no primary server. See #primary_server.
145
- #
146
- # source://drb//lib/drb/drb.rb#1869
147
- def thread; end
148
-
149
- # Get a reference id for an object using the current server.
150
- #
151
- # This raises a DRbServerNotFound error if there is no current server.
152
- # See #current_server.
153
- #
154
- # source://drb//lib/drb/drb.rb#1860
155
- def to_id(obj); end
156
-
157
- # Convert a reference into an object using the current server.
158
- #
159
- # This raises a DRbServerNotFound error if there is no current server.
160
- # See #current_server.
161
- #
162
- # source://drb//lib/drb/drb.rb#1852
163
- def to_obj(ref); end
164
-
165
- # Get the URI defining the local dRuby space.
166
- #
167
- # This is the URI of the current server. See #current_server.
168
- #
169
- # source://drb//lib/drb/drb.rb#1810
170
- def uri; end
171
-
172
- class << self
173
- # Get the configuration of the current server.
174
- #
175
- # If there is no current server, this returns the default configuration.
176
- # See #current_server and DRbServer::make_config.
177
- #
178
- # source://drb//lib/drb/drb.rb#1832
179
- def config; end
180
-
181
- # Get the 'current' server.
182
- #
183
- # In the context of execution taking place within the main
184
- # thread of a dRuby server (typically, as a result of a remote
185
- # call on the server or one of its objects), the current
186
- # server is that server. Otherwise, the current server is
187
- # the primary server.
188
- #
189
- # If the above rule fails to find a server, a DRbServerNotFound
190
- # error is raised.
191
- #
192
- # @raise [DRbServerNotFound]
193
- #
194
- # source://drb//lib/drb/drb.rb#1789
195
- def current_server; end
196
-
197
- # Retrieves the server with the given +uri+.
198
- #
199
- # See also regist_server and remove_server.
200
- #
201
- # source://drb//lib/drb/drb.rb#1934
202
- def fetch_server(uri); end
203
-
204
- # Get the front object of the current server.
205
- #
206
- # This raises a DRbServerNotFound error if there is no current server.
207
- # See #current_server.
208
- #
209
- # source://drb//lib/drb/drb.rb#1843
210
- def front; end
211
-
212
- # Is +uri+ the URI for the current local server?
213
- #
214
- # @return [Boolean]
215
- #
216
- # source://drb//lib/drb/drb.rb#1822
217
- def here?(uri); end
218
-
219
- # Set the default ACL to +acl+.
220
- #
221
- # See DRb::DRbServer.default_acl.
222
- #
223
- # source://drb//lib/drb/drb.rb#1888
224
- def install_acl(acl); end
225
-
226
- # Set the default id conversion object.
227
- #
228
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
229
- # #to_id and #to_obj that can convert objects to and from DRb references.
230
- #
231
- # See DRbServer#default_id_conv.
232
- #
233
- # source://drb//lib/drb/drb.rb#1880
234
- def install_id_conv(idconv); end
235
-
236
- # source://drb//lib/drb/drb.rb#1894
237
- def mutex; end
238
-
239
- # The primary local dRuby server.
240
- #
241
- # This is the server created by the #start_service call.
242
- #
243
- # source://drb//lib/drb/drb.rb#1776
244
- def primary_server; end
245
-
246
- # The primary local dRuby server.
247
- #
248
- # This is the server created by the #start_service call.
249
- #
250
- # source://drb//lib/drb/drb.rb#1776
251
- def primary_server=(_arg0); end
252
-
253
- # Registers +server+ with DRb.
254
- #
255
- # This is called when a new DRb::DRbServer is created.
256
- #
257
- # If there is no primary server then +server+ becomes the primary server.
258
- #
259
- # Example:
260
- #
261
- # require 'drb'
262
- #
263
- # s = DRb::DRbServer.new # automatically calls regist_server
264
- # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
265
- #
266
- # source://drb//lib/drb/drb.rb#1912
267
- def regist_server(server); end
268
-
269
- # Removes +server+ from the list of registered servers.
270
- #
271
- # source://drb//lib/drb/drb.rb#1921
272
- def remove_server(server); end
273
-
274
- # Start a dRuby server locally.
275
- #
276
- # The new dRuby server will become the primary server, even
277
- # if another server is currently the primary server.
278
- #
279
- # +uri+ is the URI for the server to bind to. If nil,
280
- # the server will bind to random port on the default local host
281
- # name and use the default dRuby protocol.
282
- #
283
- # +front+ is the server's front object. This may be nil.
284
- #
285
- # +config+ is the configuration for the new server. This may
286
- # be nil.
287
- #
288
- # See DRbServer::new.
289
- #
290
- # source://drb//lib/drb/drb.rb#1768
291
- def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
292
-
293
- # Stop the local dRuby server.
294
- #
295
- # This operates on the primary server. If there is no primary
296
- # server currently running, it is a noop.
297
- #
298
- # source://drb//lib/drb/drb.rb#1801
299
- def stop_service; end
300
-
301
- # Get the thread of the primary server.
302
- #
303
- # This returns nil if there is no primary server. See #primary_server.
304
- #
305
- # source://drb//lib/drb/drb.rb#1869
306
- def thread; end
307
-
308
- # Get a reference id for an object using the current server.
309
- #
310
- # This raises a DRbServerNotFound error if there is no current server.
311
- # See #current_server.
312
- #
313
- # source://drb//lib/drb/drb.rb#1860
314
- def to_id(obj); end
315
-
316
- # Convert a reference into an object using the current server.
317
- #
318
- # This raises a DRbServerNotFound error if there is no current server.
319
- # See #current_server.
320
- #
321
- # source://drb//lib/drb/drb.rb#1852
322
- def to_obj(ref); end
323
-
324
- # Get the URI defining the local dRuby space.
325
- #
326
- # This is the URI of the current server. See #current_server.
327
- #
328
- # source://drb//lib/drb/drb.rb#1810
329
- def uri; end
330
- end
331
- end
332
-
333
- # An Array wrapper that can be sent to another server via DRb.
334
- #
335
- # All entries in the array will be dumped or be references that point to
336
- # the local server.
337
- #
338
- # source://drb//lib/drb/drb.rb#518
339
- class DRb::DRbArray
340
- # Creates a new DRbArray that either dumps or wraps all the items in the
341
- # Array +ary+ so they can be loaded by a remote DRb server.
342
- #
343
- # @return [DRbArray] a new instance of DRbArray
344
- #
345
- # source://drb//lib/drb/drb.rb#523
346
- def initialize(ary); end
347
-
348
- # source://drb//lib/drb/drb.rb#542
349
- def _dump(lv); end
350
-
351
- class << self
352
- # source://drb//lib/drb/drb.rb#538
353
- def _load(s); end
354
- end
355
- end
356
-
357
- # Class handling the connection between a DRbObject and the
358
- # server the real object lives on.
359
- #
360
- # This class maintains a pool of connections, to reduce the
361
- # overhead of starting and closing down connections for each
362
- # method call.
363
- #
364
- # This class is used internally by DRbObject. The user does
365
- # not normally need to deal with it directly.
366
- #
367
- # source://drb//lib/drb/drb.rb#1256
368
- class DRb::DRbConn
369
- # @return [DRbConn] a new instance of DRbConn
370
- #
371
- # source://drb//lib/drb/drb.rb#1317
372
- def initialize(remote_uri); end
373
-
374
- # @return [Boolean]
375
- #
376
- # source://drb//lib/drb/drb.rb#1333
377
- def alive?; end
378
-
379
- # source://drb//lib/drb/drb.rb#1328
380
- def close; end
381
-
382
- # source://drb//lib/drb/drb.rb#1323
383
- def send_message(ref, msg_id, arg, block); end
384
-
385
- # source://drb//lib/drb/drb.rb#1321
386
- def uri; end
387
-
388
- class << self
389
- # source://drb//lib/drb/drb.rb#1259
390
- def make_pool; end
391
-
392
- # source://drb//lib/drb/drb.rb#1297
393
- def open(remote_uri); end
394
-
395
- # source://drb//lib/drb/drb.rb#1292
396
- def stop_pool; end
397
- end
398
- end
399
-
400
- # Class responsible for converting between an object and its id.
401
- #
402
- # This, the default implementation, uses an object's local ObjectSpace
403
- # __id__ as its id. This means that an object's identification over
404
- # drb remains valid only while that object instance remains alive
405
- # within the server runtime.
406
- #
407
- # For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb
408
- # and DRbNameIdConv in sample/name.rb in the full drb distribution.
409
- #
410
- # source://drb//lib/drb/drb.rb#360
411
- class DRb::DRbIdConv
412
- # Convert an object into a reference id.
413
- #
414
- # This implementation returns the object's __id__ in the local
415
- # object space.
416
- #
417
- # source://drb//lib/drb/drb.rb#374
418
- def to_id(obj); end
419
-
420
- # Convert an object reference id to an object.
421
- #
422
- # This implementation looks up the reference id in the local object
423
- # space and returns the object it refers to.
424
- #
425
- # source://drb//lib/drb/drb.rb#366
426
- def to_obj(ref); end
427
- end
428
-
429
- # Handler for sending and receiving drb messages.
430
- #
431
- # This takes care of the low-level marshalling and unmarshalling
432
- # of drb requests and responses sent over the wire between server
433
- # and client. This relieves the implementor of a new drb
434
- # protocol layer with having to deal with these details.
435
- #
436
- # The user does not have to directly deal with this object in
437
- # normal use.
438
- #
439
- # source://drb//lib/drb/drb.rb#556
440
- class DRb::DRbMessage
441
- # @return [DRbMessage] a new instance of DRbMessage
442
- #
443
- # source://drb//lib/drb/drb.rb#557
444
- def initialize(config); end
445
-
446
- # source://drb//lib/drb/drb.rb#562
447
- def dump(obj, error = T.unsafe(nil)); end
448
-
449
- # @raise [DRbConnError]
450
- #
451
- # source://drb//lib/drb/drb.rb#579
452
- def load(soc); end
453
-
454
- # source://drb//lib/drb/drb.rb#639
455
- def recv_reply(stream); end
456
-
457
- # @raise [DRbConnError]
458
- #
459
- # source://drb//lib/drb/drb.rb#619
460
- def recv_request(stream); end
461
-
462
- # source://drb//lib/drb/drb.rb#633
463
- def send_reply(stream, succ, result); end
464
-
465
- # source://drb//lib/drb/drb.rb#605
466
- def send_request(stream, ref, msg_id, arg, b); end
467
-
468
- private
469
-
470
- # source://drb//lib/drb/drb.rb#646
471
- def make_proxy(obj, error = T.unsafe(nil)); end
472
- end
473
-
474
- # source://drb//lib/drb/eq.rb#3
475
- class DRb::DRbObject
476
- # Create a new remote object stub.
477
- #
478
- # +obj+ is the (local) object we want to create a stub for. Normally
479
- # this is +nil+. +uri+ is the URI of the remote object that this
480
- # will be a stub for.
481
- #
482
- # @return [DRbObject] a new instance of DRbObject
483
- #
484
- # source://drb//lib/drb/drb.rb#1089
485
- def initialize(obj, uri = T.unsafe(nil)); end
486
-
487
- # source://drb//lib/drb/eq.rb#4
488
- def ==(other); end
489
-
490
- # Get the reference of the object, if local.
491
- #
492
- # source://drb//lib/drb/drb.rb#1115
493
- def __drbref; end
494
-
495
- # Get the URI of the remote object.
496
- #
497
- # source://drb//lib/drb/drb.rb#1110
498
- def __drburi; end
499
-
500
- # Marshall this object.
501
- #
502
- # The URI and ref of the object are marshalled.
503
- #
504
- # source://drb//lib/drb/drb.rb#1080
505
- def _dump(lv); end
506
-
507
- # source://drb//lib/drb/eq.rb#4
508
- def eql?(other); end
509
-
510
- # source://drb//lib/drb/eq.rb#9
511
- def hash; end
512
-
513
- # source://drb//lib/drb/drb.rb#1135
514
- def method_missing(msg_id, *a, **_arg2, &b); end
515
-
516
- # source://drb//lib/drb/drb.rb#1187
517
- def pretty_print(q); end
518
-
519
- # source://drb//lib/drb/drb.rb#1191
520
- def pretty_print_cycle(q); end
521
-
522
- # Routes respond_to? to the referenced remote object.
523
- #
524
- # @return [Boolean]
525
- #
526
- # source://drb//lib/drb/drb.rb#1123
527
- def respond_to?(msg_id, priv = T.unsafe(nil)); end
528
-
529
- class << self
530
- # Unmarshall a marshalled DRbObject.
531
- #
532
- # If the referenced object is located within the local server, then
533
- # the object itself is returned. Otherwise, a new DRbObject is
534
- # created to act as a stub for the remote referenced object.
535
- #
536
- # source://drb//lib/drb/drb.rb#1051
537
- def _load(s); end
538
-
539
- # Creates a DRb::DRbObject given the reference information to the remote
540
- # host +uri+ and object +ref+.
541
- #
542
- # source://drb//lib/drb/drb.rb#1065
543
- def new_with(uri, ref); end
544
-
545
- # Create a new DRbObject from a URI alone.
546
- #
547
- # source://drb//lib/drb/drb.rb#1073
548
- def new_with_uri(uri); end
549
-
550
- # Returns a modified backtrace from +result+ with the +uri+ where each call
551
- # in the backtrace came from.
552
- #
553
- # source://drb//lib/drb/drb.rb#1173
554
- def prepare_backtrace(uri, result); end
555
-
556
- # Given the +uri+ of another host executes the block provided.
557
- #
558
- # source://drb//lib/drb/drb.rb#1160
559
- def with_friend(uri); end
560
- end
561
- end
562
-
563
- # Module managing the underlying network protocol(s) used by drb.
564
- #
565
- # By default, drb uses the DRbTCPSocket protocol. Other protocols
566
- # can be defined. A protocol must define the following class methods:
567
- #
568
- # [open(uri, config)] Open a client connection to the server at +uri+,
569
- # using configuration +config+. Return a protocol
570
- # instance for this connection.
571
- # [open_server(uri, config)] Open a server listening at +uri+,
572
- # using configuration +config+. Return a
573
- # protocol instance for this listener.
574
- # [uri_option(uri, config)] Take a URI, possibly containing an option
575
- # component (e.g. a trailing '?param=val'),
576
- # and return a [uri, option] tuple.
577
- #
578
- # All of these methods should raise a DRbBadScheme error if the URI
579
- # does not identify the protocol they support (e.g. "druby:" for
580
- # the standard Ruby protocol). This is how the DRbProtocol module,
581
- # given a URI, determines which protocol implementation serves that
582
- # protocol.
583
- #
584
- # The protocol instance returned by #open_server must have the
585
- # following methods:
586
- #
587
- # [accept] Accept a new connection to the server. Returns a protocol
588
- # instance capable of communicating with the client.
589
- # [close] Close the server connection.
590
- # [uri] Get the URI for this server.
591
- #
592
- # The protocol instance returned by #open must have the following methods:
593
- #
594
- # [send_request (ref, msg_id, arg, b)]
595
- # Send a request to +ref+ with the given message id and arguments.
596
- # This is most easily implemented by calling DRbMessage.send_request,
597
- # providing a stream that sits on top of the current protocol.
598
- # [recv_reply]
599
- # Receive a reply from the server and return it as a [success-boolean,
600
- # reply-value] pair. This is most easily implemented by calling
601
- # DRb.recv_reply, providing a stream that sits on top of the
602
- # current protocol.
603
- # [alive?]
604
- # Is this connection still alive?
605
- # [close]
606
- # Close this connection.
607
- #
608
- # The protocol instance returned by #open_server().accept() must have
609
- # the following methods:
610
- #
611
- # [recv_request]
612
- # Receive a request from the client and return a [object, message,
613
- # args, block] tuple. This is most easily implemented by calling
614
- # DRbMessage.recv_request, providing a stream that sits on top of
615
- # the current protocol.
616
- # [send_reply(succ, result)]
617
- # Send a reply to the client. This is most easily implemented
618
- # by calling DRbMessage.send_reply, providing a stream that sits
619
- # on top of the current protocol.
620
- # [close]
621
- # Close this connection.
622
- #
623
- # A new protocol is registered with the DRbProtocol module using
624
- # the add_protocol method.
625
- #
626
- # For examples of other protocols, see DRbUNIXSocket in drb/unix.rb,
627
- # and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full
628
- # drb distribution.
629
- #
630
- # source://drb//lib/drb/drb.rb#721
631
- module DRb::DRbProtocol
632
- private
633
-
634
- # Add a new protocol to the DRbProtocol module.
635
- #
636
- # source://drb//lib/drb/drb.rb#724
637
- def add_protocol(prot); end
638
-
639
- # source://drb//lib/drb/drb.rb#802
640
- def auto_load(uri); end
641
-
642
- # Open a client connection to +uri+ with the configuration +config+.
643
- #
644
- # The DRbProtocol module asks each registered protocol in turn to
645
- # try to open the URI. Each protocol signals that it does not handle that
646
- # URI by raising a DRbBadScheme error. If no protocol recognises the
647
- # URI, then a DRbBadURI error is raised. If a protocol accepts the
648
- # URI, but an error occurs in opening it, a DRbConnError is raised.
649
- #
650
- # @raise [DRbBadURI]
651
- #
652
- # source://drb//lib/drb/drb.rb#736
653
- def open(uri, config, first = T.unsafe(nil)); end
654
-
655
- # Open a server listening for connections at +uri+ with
656
- # configuration +config+.
657
- #
658
- # The DRbProtocol module asks each registered protocol in turn to
659
- # try to open a server at the URI. Each protocol signals that it does
660
- # not handle that URI by raising a DRbBadScheme error. If no protocol
661
- # recognises the URI, then a DRbBadURI error is raised. If a protocol
662
- # accepts the URI, but an error occurs in opening it, the underlying
663
- # error is passed on to the caller.
664
- #
665
- # @raise [DRbBadURI]
666
- #
667
- # source://drb//lib/drb/drb.rb#764
668
- def open_server(uri, config, first = T.unsafe(nil)); end
669
-
670
- # Parse +uri+ into a [uri, option] pair.
671
- #
672
- # The DRbProtocol module asks each registered protocol in turn to
673
- # try to parse the URI. Each protocol signals that it does not handle that
674
- # URI by raising a DRbBadScheme error. If no protocol recognises the
675
- # URI, then a DRbBadURI error is raised.
676
- #
677
- # @raise [DRbBadURI]
678
- #
679
- # source://drb//lib/drb/drb.rb#785
680
- def uri_option(uri, config, first = T.unsafe(nil)); end
681
-
682
- class << self
683
- # Add a new protocol to the DRbProtocol module.
684
- #
685
- # source://drb//lib/drb/drb.rb#724
686
- def add_protocol(prot); end
687
-
688
- # source://drb//lib/drb/drb.rb#802
689
- def auto_load(uri); end
690
-
691
- # Open a client connection to +uri+ with the configuration +config+.
692
- #
693
- # The DRbProtocol module asks each registered protocol in turn to
694
- # try to open the URI. Each protocol signals that it does not handle that
695
- # URI by raising a DRbBadScheme error. If no protocol recognises the
696
- # URI, then a DRbBadURI error is raised. If a protocol accepts the
697
- # URI, but an error occurs in opening it, a DRbConnError is raised.
698
- #
699
- # @raise [DRbBadURI]
700
- #
701
- # source://drb//lib/drb/drb.rb#736
702
- def open(uri, config, first = T.unsafe(nil)); end
703
-
704
- # Open a server listening for connections at +uri+ with
705
- # configuration +config+.
706
- #
707
- # The DRbProtocol module asks each registered protocol in turn to
708
- # try to open a server at the URI. Each protocol signals that it does
709
- # not handle that URI by raising a DRbBadScheme error. If no protocol
710
- # recognises the URI, then a DRbBadURI error is raised. If a protocol
711
- # accepts the URI, but an error occurs in opening it, the underlying
712
- # error is passed on to the caller.
713
- #
714
- # @raise [DRbBadURI]
715
- #
716
- # source://drb//lib/drb/drb.rb#764
717
- def open_server(uri, config, first = T.unsafe(nil)); end
718
-
719
- # Parse +uri+ into a [uri, option] pair.
720
- #
721
- # The DRbProtocol module asks each registered protocol in turn to
722
- # try to parse the URI. Each protocol signals that it does not handle that
723
- # URI by raising a DRbBadScheme error. If no protocol recognises the
724
- # URI, then a DRbBadURI error is raised.
725
- #
726
- # @raise [DRbBadURI]
727
- #
728
- # source://drb//lib/drb/drb.rb#785
729
- def uri_option(uri, config, first = T.unsafe(nil)); end
730
- end
731
- end
732
-
733
- # An exception wrapping an error object
734
- #
735
- # source://drb//lib/drb/drb.rb#431
736
- class DRb::DRbRemoteError < ::DRb::DRbError
737
- # Creates a new remote error that wraps the Exception +error+
738
- #
739
- # @return [DRbRemoteError] a new instance of DRbRemoteError
740
- #
741
- # source://drb//lib/drb/drb.rb#434
742
- def initialize(error); end
743
-
744
- # the class of the error, as a string.
745
- #
746
- # source://drb//lib/drb/drb.rb#441
747
- def reason; end
748
- end
749
-
750
- # source://drb//lib/drb/drb.rb#1350
751
- class DRb::DRbServer
752
- # Create a new DRbServer instance.
753
- #
754
- # +uri+ is the URI to bind to. This is normally of the form
755
- # 'druby://<hostname>:<port>' where <hostname> is a hostname of
756
- # the local machine. If nil, then the system's default hostname
757
- # will be bound to, on a port selected by the system; these value
758
- # can be retrieved from the +uri+ attribute. 'druby:' specifies
759
- # the default dRuby transport protocol: another protocol, such
760
- # as 'drbunix:', can be specified instead.
761
- #
762
- # +front+ is the front object for the server, that is, the object
763
- # to which remote method calls on the server will be passed. If
764
- # nil, then the server will not accept remote method calls.
765
- #
766
- # If +config_or_acl+ is a hash, it is the configuration to
767
- # use for this server. The following options are recognised:
768
- #
769
- # :idconv :: an id-to-object conversion object. This defaults
770
- # to an instance of the class DRb::DRbIdConv.
771
- # :verbose :: if true, all unsuccessful remote calls on objects
772
- # in the server will be logged to $stdout. false
773
- # by default.
774
- # :tcp_acl :: the access control list for this server. See
775
- # the ACL class from the main dRuby distribution.
776
- # :load_limit :: the maximum message size in bytes accepted by
777
- # the server. Defaults to 25 MB (26214400).
778
- # :argc_limit :: the maximum number of arguments to a remote
779
- # method accepted by the server. Defaults to
780
- # 256.
781
- # The default values of these options can be modified on
782
- # a class-wide basis by the class methods #default_argc_limit,
783
- # #default_load_limit, #default_acl, #default_id_conv,
784
- # and #verbose=
785
- #
786
- # If +config_or_acl+ is not a hash, but is not nil, it is
787
- # assumed to be the access control list for this server.
788
- # See the :tcp_acl option for more details.
789
- #
790
- # If no other server is currently set as the primary server,
791
- # this will become the primary server.
792
- #
793
- # The server will immediately start running in its own thread.
794
- #
795
- # @return [DRbServer] a new instance of DRbServer
796
- #
797
- # source://drb//lib/drb/drb.rb#1451
798
- def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end
799
-
800
- # Is this server alive?
801
- #
802
- # @return [Boolean]
803
- #
804
- # source://drb//lib/drb/drb.rb#1506
805
- def alive?; end
806
-
807
- # Check that a method is callable via dRuby.
808
- #
809
- # +obj+ is the object we want to invoke the method on. +msg_id+ is the
810
- # method name, as a Symbol.
811
- #
812
- # If the method is an insecure method (see #insecure_method?) a
813
- # SecurityError is thrown. If the method is private or undefined,
814
- # a NameError is thrown.
815
- #
816
- # @raise [ArgumentError]
817
- #
818
- # source://drb//lib/drb/drb.rb#1594
819
- def check_insecure_method(obj, msg_id); end
820
-
821
- # The configuration of this DRbServer
822
- #
823
- # source://drb//lib/drb/drb.rb#1493
824
- def config; end
825
-
826
- # The front object of the DRbServer.
827
- #
828
- # This object receives remote method calls made on the server's
829
- # URI alone, with an object id.
830
- #
831
- # source://drb//lib/drb/drb.rb#1490
832
- def front; end
833
-
834
- # Is +uri+ the URI for this server?
835
- #
836
- # @return [Boolean]
837
- #
838
- # source://drb//lib/drb/drb.rb#1511
839
- def here?(uri); end
840
-
841
- # Stop this server.
842
- #
843
- # source://drb//lib/drb/drb.rb#1516
844
- def stop_service; end
845
-
846
- # The main thread of this DRbServer.
847
- #
848
- # This is the thread that listens for and accepts connections
849
- # from clients, not that handles each client's request-response
850
- # session.
851
- #
852
- # source://drb//lib/drb/drb.rb#1484
853
- def thread; end
854
-
855
- # Convert a local object to a dRuby reference.
856
- #
857
- # source://drb//lib/drb/drb.rb#1533
858
- def to_id(obj); end
859
-
860
- # Convert a dRuby reference to the local object it refers to.
861
- #
862
- # source://drb//lib/drb/drb.rb#1526
863
- def to_obj(ref); end
864
-
865
- # The URI of this DRbServer.
866
- #
867
- # source://drb//lib/drb/drb.rb#1477
868
- def uri; end
869
-
870
- # Get whether the server is in verbose mode.
871
- #
872
- # In verbose mode, failed calls are logged to stdout.
873
- #
874
- # source://drb//lib/drb/drb.rb#1503
875
- def verbose; end
876
-
877
- # Set whether to operate in verbose mode.
878
- #
879
- # In verbose mode, failed calls are logged to stdout.
880
- #
881
- # source://drb//lib/drb/drb.rb#1498
882
- def verbose=(v); end
883
-
884
- private
885
-
886
- # Coerce an object to a string, providing our own representation if
887
- # to_s is not defined for the object.
888
- #
889
- # source://drb//lib/drb/drb.rb#1580
890
- def any_to_s(obj); end
891
-
892
- # source://drb//lib/drb/drb.rb#1696
893
- def error_print(exception); end
894
-
895
- # Has a method been included in the list of insecure methods?
896
- #
897
- # @return [Boolean]
898
- #
899
- # source://drb//lib/drb/drb.rb#1574
900
- def insecure_method?(msg_id); end
901
-
902
- # The main loop performed by a DRbServer's internal thread.
903
- #
904
- # Accepts a connection from a client, and starts up its own
905
- # thread to handle it. This thread loops, receiving requests
906
- # from the client, invoking them on a local object, and
907
- # returning responses, until the client closes the connection
908
- # or a local method call fails.
909
- #
910
- # source://drb//lib/drb/drb.rb#1714
911
- def main_loop; end
912
-
913
- # Starts the DRb main loop in a new thread.
914
- #
915
- # source://drb//lib/drb/drb.rb#1555
916
- def run; end
917
-
918
- # source://drb//lib/drb/drb.rb#1540
919
- def shutdown; end
920
-
921
- class << self
922
- # Set the default access control list to +acl+. The default ACL is +nil+.
923
- #
924
- # See also DRb::ACL and #new()
925
- #
926
- # source://drb//lib/drb/drb.rb#1375
927
- def default_acl(acl); end
928
-
929
- # Set the default value for the :argc_limit option.
930
- #
931
- # See #new(). The initial default value is 256.
932
- #
933
- # source://drb//lib/drb/drb.rb#1361
934
- def default_argc_limit(argc); end
935
-
936
- # Set the default value for the :id_conv option.
937
- #
938
- # See #new(). The initial default value is a DRbIdConv instance.
939
- #
940
- # source://drb//lib/drb/drb.rb#1382
941
- def default_id_conv(idconv); end
942
-
943
- # Set the default value for the :load_limit option.
944
- #
945
- # See #new(). The initial default value is 25 MB.
946
- #
947
- # source://drb//lib/drb/drb.rb#1368
948
- def default_load_limit(sz); end
949
-
950
- # source://drb//lib/drb/drb.rb#1398
951
- def make_config(hash = T.unsafe(nil)); end
952
-
953
- # Get the default value of the :verbose option.
954
- #
955
- # source://drb//lib/drb/drb.rb#1394
956
- def verbose; end
957
-
958
- # Set the default value of the :verbose option.
959
- #
960
- # See #new(). The initial default value is false.
961
- #
962
- # source://drb//lib/drb/drb.rb#1389
963
- def verbose=(on); end
964
- end
965
- end
966
-
967
- # source://drb//lib/drb/drb.rb#1624
968
- class DRb::DRbServer::InvokeMethod
969
- include ::DRb::DRbServer::InvokeMethod18Mixin
970
-
971
- # @return [InvokeMethod] a new instance of InvokeMethod
972
- #
973
- # source://drb//lib/drb/drb.rb#1625
974
- def initialize(drb_server, client); end
975
-
976
- # source://drb//lib/drb/drb.rb#1630
977
- def perform; end
978
-
979
- private
980
-
981
- # source://drb//lib/drb/drb.rb#1667
982
- def check_insecure_method; end
983
-
984
- # source://drb//lib/drb/drb.rb#1659
985
- def init_with_client; end
986
-
987
- # source://drb//lib/drb/drb.rb#1676
988
- def perform_without_block; end
989
-
990
- # source://drb//lib/drb/drb.rb#1671
991
- def setup_message; end
992
- end
993
-
994
- # source://drb//lib/drb/invokemethod.rb#6
995
- module DRb::DRbServer::InvokeMethod18Mixin
996
- # source://drb//lib/drb/invokemethod.rb#7
997
- def block_yield(x); end
998
-
999
- # source://drb//lib/drb/invokemethod.rb#14
1000
- def perform_with_block; end
1001
- end
1002
-
1003
- # The default drb protocol which communicates over a TCP socket.
1004
- #
1005
- # The DRb TCP protocol URI looks like:
1006
- # <code>druby://<host>:<port>?<option></code>. The option is optional.
1007
- #
1008
- # source://drb//lib/drb/drb.rb#815
1009
- class DRb::DRbTCPSocket
1010
- # Create a new DRbTCPSocket instance.
1011
- #
1012
- # +uri+ is the URI we are connected to.
1013
- # +soc+ is the tcp socket we are bound to. +config+ is our
1014
- # configuration.
1015
- #
1016
- # @return [DRbTCPSocket] a new instance of DRbTCPSocket
1017
- #
1018
- # source://drb//lib/drb/drb.rb#903
1019
- def initialize(uri, soc, config = T.unsafe(nil)); end
1020
-
1021
- # On the server side, for an instance returned by #open_server,
1022
- # accept a client connection and return a new instance to handle
1023
- # the server's side of this client-server session.
1024
- #
1025
- # source://drb//lib/drb/drb.rb#971
1026
- def accept; end
1027
-
1028
- # Check to see if this connection is alive.
1029
- #
1030
- # @return [Boolean]
1031
- #
1032
- # source://drb//lib/drb/drb.rb#1001
1033
- def alive?; end
1034
-
1035
- # Close the connection.
1036
- #
1037
- # If this is an instance returned by #open_server, then this stops
1038
- # listening for new connections altogether. If this is an instance
1039
- # returned by #open or by #accept, then it closes this particular
1040
- # client-server session.
1041
- #
1042
- # source://drb//lib/drb/drb.rb#953
1043
- def close; end
1044
-
1045
- # Get the address of our TCP peer (the other end of the socket
1046
- # we are bound to.
1047
- #
1048
- # source://drb//lib/drb/drb.rb#918
1049
- def peeraddr; end
1050
-
1051
- # On the client side, receive a reply from the server.
1052
- #
1053
- # source://drb//lib/drb/drb.rb#941
1054
- def recv_reply; end
1055
-
1056
- # On the server side, receive a request from the client.
1057
- #
1058
- # source://drb//lib/drb/drb.rb#931
1059
- def recv_request; end
1060
-
1061
- # On the server side, send a reply to the client.
1062
- #
1063
- # source://drb//lib/drb/drb.rb#936
1064
- def send_reply(succ, result); end
1065
-
1066
- # On the client side, send a request to the server.
1067
- #
1068
- # source://drb//lib/drb/drb.rb#926
1069
- def send_request(ref, msg_id, arg, b); end
1070
-
1071
- # source://drb//lib/drb/drb.rb#1010
1072
- def set_sockopt(soc); end
1073
-
1074
- # Graceful shutdown
1075
- #
1076
- # source://drb//lib/drb/drb.rb#996
1077
- def shutdown; end
1078
-
1079
- # Get the socket.
1080
- #
1081
- # source://drb//lib/drb/drb.rb#923
1082
- def stream; end
1083
-
1084
- # Get the URI that we are connected to.
1085
- #
1086
- # source://drb//lib/drb/drb.rb#914
1087
- def uri; end
1088
-
1089
- private
1090
-
1091
- # source://drb//lib/drb/drb.rb#986
1092
- def accept_or_shutdown; end
1093
-
1094
- # source://drb//lib/drb/drb.rb#962
1095
- def close_shutdown_pipe; end
1096
-
1097
- class << self
1098
- # Returns the hostname of this server
1099
- #
1100
- # source://drb//lib/drb/drb.rb#845
1101
- def getservername; end
1102
-
1103
- # Open a client connection to +uri+ (DRb URI string) using configuration
1104
- # +config+.
1105
- #
1106
- # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
1107
- # recognized protocol. See DRb::DRbServer.new for information on built-in
1108
- # URI protocols.
1109
- #
1110
- # source://drb//lib/drb/drb.rb#838
1111
- def open(uri, config); end
1112
-
1113
- # Open a server listening for connections at +uri+ using
1114
- # configuration +config+.
1115
- #
1116
- # source://drb//lib/drb/drb.rb#876
1117
- def open_server(uri, config); end
1118
-
1119
- # For the families available for +host+, returns a TCPServer on +port+.
1120
- # If +port+ is 0 the first available port is used. IPv4 servers are
1121
- # preferred over IPv6 servers.
1122
- #
1123
- # source://drb//lib/drb/drb.rb#861
1124
- def open_server_inaddr_any(host, port); end
1125
-
1126
- # source://drb//lib/drb/drb.rb#818
1127
- def parse_uri(uri); end
1128
-
1129
- # Parse +uri+ into a [uri, option] pair.
1130
- #
1131
- # source://drb//lib/drb/drb.rb#893
1132
- def uri_option(uri, config); end
1133
- end
1134
- end
1135
-
1136
- # Implements DRb over a UNIX socket
1137
- #
1138
- # DRb UNIX socket URIs look like <code>drbunix:<path>?<option></code>. The
1139
- # option is optional.
1140
- #
1141
- # source://drb//lib/drb/unix.rb#15
1142
- class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket
1143
- # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket
1144
- #
1145
- # source://drb//lib/drb/unix.rb#62
1146
- def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end
1147
-
1148
- # source://drb//lib/drb/unix.rb#105
1149
- def accept; end
1150
-
1151
- # source://drb//lib/drb/unix.rb#95
1152
- def close; end
1153
-
1154
- # source://drb//lib/drb/unix.rb#111
1155
- def set_sockopt(soc); end
1156
-
1157
- class << self
1158
- # source://drb//lib/drb/unix.rb#28
1159
- def open(uri, config); end
1160
-
1161
- # source://drb//lib/drb/unix.rb#34
1162
- def open_server(uri, config); end
1163
-
1164
- # :stopdoc:
1165
- #
1166
- # source://drb//lib/drb/unix.rb#17
1167
- def parse_uri(uri); end
1168
-
1169
- # source://drb//lib/drb/unix.rb#72
1170
- def temp_server; end
1171
-
1172
- # source://drb//lib/drb/unix.rb#57
1173
- def uri_option(uri, config); end
1174
- end
1175
- end
1176
-
1177
- # import from tempfile.rb
1178
- #
1179
- # source://drb//lib/drb/unix.rb#70
1180
- DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer)
1181
-
1182
- # source://drb//lib/drb/drb.rb#1021
1183
- class DRb::DRbURIOption
1184
- # @return [DRbURIOption] a new instance of DRbURIOption
1185
- #
1186
- # source://drb//lib/drb/drb.rb#1022
1187
- def initialize(option); end
1188
-
1189
- # source://drb//lib/drb/drb.rb#1028
1190
- def ==(other); end
1191
-
1192
- # source://drb//lib/drb/drb.rb#1028
1193
- def eql?(other); end
1194
-
1195
- # source://drb//lib/drb/drb.rb#1033
1196
- def hash; end
1197
-
1198
- # Returns the value of attribute option.
1199
- #
1200
- # source://drb//lib/drb/drb.rb#1025
1201
- def option; end
1202
-
1203
- # source://drb//lib/drb/drb.rb#1026
1204
- def to_s; end
1205
- end
1206
-
1207
- # Mixin module making an object undumpable or unmarshallable.
1208
- #
1209
- # If an object which includes this module is returned by method
1210
- # called over drb, then the object remains in the server space
1211
- # and a reference to the object is returned, rather than the
1212
- # object being marshalled and moved into the client space.
1213
- #
1214
- # source://drb//lib/drb/drb.rb#390
1215
- module DRb::DRbUndumped
1216
- # @raise [TypeError]
1217
- #
1218
- # source://drb//lib/drb/drb.rb#391
1219
- def _dump(dummy); end
1220
- end
1221
-
1222
- # Class wrapping a marshalled object whose type is unknown locally.
1223
- #
1224
- # If an object is returned by a method invoked over drb, but the
1225
- # class of the object is unknown in the client namespace, or
1226
- # the object is a constant unknown in the client namespace, then
1227
- # the still-marshalled object is returned wrapped in a DRbUnknown instance.
1228
- #
1229
- # If this object is passed as an argument to a method invoked over
1230
- # drb, then the wrapped object is passed instead.
1231
- #
1232
- # The class or constant name of the object can be read from the
1233
- # +name+ attribute. The marshalled object is held in the +buf+
1234
- # attribute.
1235
- #
1236
- # source://drb//lib/drb/drb.rb#457
1237
- class DRb::DRbUnknown
1238
- # Create a new DRbUnknown object.
1239
- #
1240
- # +buf+ is a string containing a marshalled object that could not
1241
- # be unmarshalled. +err+ is the error message that was raised
1242
- # when the unmarshalling failed. It is used to determine the
1243
- # name of the unmarshalled object.
1244
- #
1245
- # @return [DRbUnknown] a new instance of DRbUnknown
1246
- #
1247
- # source://drb//lib/drb/drb.rb#465
1248
- def initialize(err, buf); end
1249
-
1250
- # source://drb//lib/drb/drb.rb#494
1251
- def _dump(lv); end
1252
-
1253
- # Buffer contained the marshalled, unknown object.
1254
- #
1255
- # source://drb//lib/drb/drb.rb#484
1256
- def buf; end
1257
-
1258
- # Create a DRbUnknownError exception containing this object.
1259
- #
1260
- # source://drb//lib/drb/drb.rb#508
1261
- def exception; end
1262
-
1263
- # The name of the unknown thing.
1264
- #
1265
- # Class name for unknown objects; variable name for unknown
1266
- # constants.
1267
- #
1268
- # source://drb//lib/drb/drb.rb#481
1269
- def name; end
1270
-
1271
- # Attempt to load the wrapped marshalled object again.
1272
- #
1273
- # If the class of the object is now known locally, the object
1274
- # will be unmarshalled and returned. Otherwise, a new
1275
- # but identical DRbUnknown object will be returned.
1276
- #
1277
- # source://drb//lib/drb/drb.rb#503
1278
- def reload; end
1279
-
1280
- class << self
1281
- # source://drb//lib/drb/drb.rb#486
1282
- def _load(s); end
1283
- end
1284
- end
1285
-
1286
- # An exception wrapping a DRb::DRbUnknown object
1287
- #
1288
- # source://drb//lib/drb/drb.rb#410
1289
- class DRb::DRbUnknownError < ::DRb::DRbError
1290
- # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
1291
- #
1292
- # @return [DRbUnknownError] a new instance of DRbUnknownError
1293
- #
1294
- # source://drb//lib/drb/drb.rb#413
1295
- def initialize(unknown); end
1296
-
1297
- # source://drb//lib/drb/drb.rb#425
1298
- def _dump(lv); end
1299
-
1300
- # Get the wrapped DRb::DRbUnknown object.
1301
- #
1302
- # source://drb//lib/drb/drb.rb#419
1303
- def unknown; end
1304
-
1305
- class << self
1306
- # source://drb//lib/drb/drb.rb#421
1307
- def _load(s); end
1308
- end
1309
- end
1310
-
1311
- # source://drb//lib/drb/drb.rb#1199
1312
- class DRb::ThreadObject
1313
- include ::MonitorMixin
1314
-
1315
- # @return [ThreadObject] a new instance of ThreadObject
1316
- #
1317
- # source://drb//lib/drb/drb.rb#1202
1318
- def initialize(&blk); end
1319
-
1320
- # source://drb//lib/drb/drb.rb#1237
1321
- def _execute; end
1322
-
1323
- # @return [Boolean]
1324
- #
1325
- # source://drb//lib/drb/drb.rb#1213
1326
- def alive?; end
1327
-
1328
- # source://drb//lib/drb/drb.rb#1217
1329
- def kill; end
1330
-
1331
- # source://drb//lib/drb/drb.rb#1222
1332
- def method_missing(msg, *arg, &blk); end
1333
- end
1334
-
1335
- # source://drb//lib/drb/version.rb#2
1336
- DRb::VERSION = T.let(T.unsafe(nil), String)
1337
-
1338
- # source://drb//lib/drb/drb.rb#1943
1339
- DRbIdConv = DRb::DRbIdConv
1340
-
1341
- # :stopdoc:
1342
- #
1343
- # source://drb//lib/drb/drb.rb#1941
1344
- DRbObject = DRb::DRbObject
1345
-
1346
- # source://drb//lib/drb/drb.rb#1942
1347
- DRbUndumped = DRb::DRbUndumped