active_cached_resource 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +22 -0
  4. data/.standard.yml +2 -0
  5. data/CHANGELOG.md +5 -0
  6. data/README.md +45 -0
  7. data/Rakefile +21 -0
  8. data/example/consumer/.dockerignore +41 -0
  9. data/example/consumer/.gitattributes +9 -0
  10. data/example/consumer/.gitignore +36 -0
  11. data/example/consumer/.kamal/hooks/docker-setup.sample +3 -0
  12. data/example/consumer/.kamal/hooks/post-deploy.sample +14 -0
  13. data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +3 -0
  14. data/example/consumer/.kamal/hooks/pre-build.sample +51 -0
  15. data/example/consumer/.kamal/hooks/pre-connect.sample +47 -0
  16. data/example/consumer/.kamal/hooks/pre-deploy.sample +109 -0
  17. data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  18. data/example/consumer/.kamal/secrets +17 -0
  19. data/example/consumer/Dockerfile +65 -0
  20. data/example/consumer/Gemfile +17 -0
  21. data/example/consumer/Rakefile +6 -0
  22. data/example/consumer/app/controllers/application_controller.rb +2 -0
  23. data/example/consumer/app/controllers/concerns/.keep +0 -0
  24. data/example/consumer/app/jobs/application_job.rb +7 -0
  25. data/example/consumer/app/mailers/application_mailer.rb +4 -0
  26. data/example/consumer/app/models/application_record.rb +3 -0
  27. data/example/consumer/app/models/concerns/.keep +0 -0
  28. data/example/consumer/app/models/person.rb +9 -0
  29. data/example/consumer/app/views/layouts/mailer.html.erb +13 -0
  30. data/example/consumer/app/views/layouts/mailer.text.erb +1 -0
  31. data/example/consumer/bin/brakeman +7 -0
  32. data/example/consumer/bin/bundle +109 -0
  33. data/example/consumer/bin/dev +2 -0
  34. data/example/consumer/bin/docker-entrypoint +14 -0
  35. data/example/consumer/bin/jobs +6 -0
  36. data/example/consumer/bin/kamal +27 -0
  37. data/example/consumer/bin/rails +4 -0
  38. data/example/consumer/bin/rake +4 -0
  39. data/example/consumer/bin/rubocop +8 -0
  40. data/example/consumer/bin/setup +34 -0
  41. data/example/consumer/bin/thrust +5 -0
  42. data/example/consumer/config/application.rb +20 -0
  43. data/example/consumer/config/boot.rb +3 -0
  44. data/example/consumer/config/cache.yml +16 -0
  45. data/example/consumer/config/credentials.yml.enc +1 -0
  46. data/example/consumer/config/database.yml +14 -0
  47. data/example/consumer/config/deploy.yml +116 -0
  48. data/example/consumer/config/environment.rb +5 -0
  49. data/example/consumer/config/environments/development.rb +64 -0
  50. data/example/consumer/config/environments/production.rb +85 -0
  51. data/example/consumer/config/environments/test.rb +50 -0
  52. data/example/consumer/config/initializers/cors.rb +16 -0
  53. data/example/consumer/config/initializers/filter_parameter_logging.rb +8 -0
  54. data/example/consumer/config/initializers/inflections.rb +16 -0
  55. data/example/consumer/config/locales/en.yml +31 -0
  56. data/example/consumer/config/puma.rb +41 -0
  57. data/example/consumer/config/queue.yml +18 -0
  58. data/example/consumer/config/recurring.yml +10 -0
  59. data/example/consumer/config/routes.rb +10 -0
  60. data/example/consumer/config.ru +6 -0
  61. data/example/consumer/db/cache_schema.rb +14 -0
  62. data/example/consumer/db/queue_schema.rb +129 -0
  63. data/example/consumer/db/seeds.rb +0 -0
  64. data/example/consumer/lib/tasks/.keep +0 -0
  65. data/example/consumer/log/.keep +0 -0
  66. data/example/consumer/public/robots.txt +1 -0
  67. data/example/consumer/script/.keep +0 -0
  68. data/example/consumer/storage/.keep +0 -0
  69. data/example/consumer/tmp/.keep +0 -0
  70. data/example/consumer/tmp/cache/.keep +0 -0
  71. data/example/consumer/tmp/pids/.keep +0 -0
  72. data/example/consumer/tmp/storage/.keep +0 -0
  73. data/example/consumer/vendor/.keep +0 -0
  74. data/example/provider/.dockerignore +41 -0
  75. data/example/provider/.gitattributes +9 -0
  76. data/example/provider/.gitignore +32 -0
  77. data/example/provider/.kamal/hooks/docker-setup.sample +3 -0
  78. data/example/provider/.kamal/hooks/post-deploy.sample +14 -0
  79. data/example/provider/.kamal/hooks/post-proxy-reboot.sample +3 -0
  80. data/example/provider/.kamal/hooks/pre-build.sample +51 -0
  81. data/example/provider/.kamal/hooks/pre-connect.sample +47 -0
  82. data/example/provider/.kamal/hooks/pre-deploy.sample +109 -0
  83. data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +3 -0
  84. data/example/provider/.kamal/secrets +17 -0
  85. data/example/provider/Dockerfile +65 -0
  86. data/example/provider/Gemfile +14 -0
  87. data/example/provider/Rakefile +6 -0
  88. data/example/provider/app/controllers/application_controller.rb +2 -0
  89. data/example/provider/app/controllers/concerns/.keep +0 -0
  90. data/example/provider/app/controllers/people_controller.rb +68 -0
  91. data/example/provider/app/jobs/application_job.rb +7 -0
  92. data/example/provider/app/mailers/application_mailer.rb +4 -0
  93. data/example/provider/app/models/address.rb +3 -0
  94. data/example/provider/app/models/application_record.rb +3 -0
  95. data/example/provider/app/models/company.rb +3 -0
  96. data/example/provider/app/models/concerns/.keep +0 -0
  97. data/example/provider/app/models/person.rb +6 -0
  98. data/example/provider/app/views/layouts/mailer.html.erb +13 -0
  99. data/example/provider/app/views/layouts/mailer.text.erb +1 -0
  100. data/example/provider/bin/brakeman +7 -0
  101. data/example/provider/bin/bundle +109 -0
  102. data/example/provider/bin/dev +2 -0
  103. data/example/provider/bin/docker-entrypoint +14 -0
  104. data/example/provider/bin/jobs +6 -0
  105. data/example/provider/bin/kamal +27 -0
  106. data/example/provider/bin/rails +4 -0
  107. data/example/provider/bin/rake +4 -0
  108. data/example/provider/bin/rubocop +8 -0
  109. data/example/provider/bin/setup +34 -0
  110. data/example/provider/bin/thrust +5 -0
  111. data/example/provider/config/application.rb +44 -0
  112. data/example/provider/config/boot.rb +3 -0
  113. data/example/provider/config/cache.yml +16 -0
  114. data/example/provider/config/credentials.yml.enc +1 -0
  115. data/example/provider/config/database.yml +20 -0
  116. data/example/provider/config/deploy.yml +116 -0
  117. data/example/provider/config/environment.rb +5 -0
  118. data/example/provider/config/environments/development.rb +64 -0
  119. data/example/provider/config/environments/production.rb +85 -0
  120. data/example/provider/config/environments/test.rb +50 -0
  121. data/example/provider/config/initializers/cors.rb +16 -0
  122. data/example/provider/config/initializers/filter_parameter_logging.rb +8 -0
  123. data/example/provider/config/initializers/inflections.rb +16 -0
  124. data/example/provider/config/locales/en.yml +31 -0
  125. data/example/provider/config/puma.rb +41 -0
  126. data/example/provider/config/queue.yml +18 -0
  127. data/example/provider/config/recurring.yml +10 -0
  128. data/example/provider/config/routes.rb +4 -0
  129. data/example/provider/config.ru +6 -0
  130. data/example/provider/db/cache_schema.rb +14 -0
  131. data/example/provider/db/migrate/20241202183937_create_people.rb +11 -0
  132. data/example/provider/db/migrate/20241202183955_create_addresses.rb +13 -0
  133. data/example/provider/db/migrate/20241202184017_create_companies.rb +14 -0
  134. data/example/provider/db/queue_schema.rb +129 -0
  135. data/example/provider/db/schema.rb +47 -0
  136. data/example/provider/db/seeds.rb +18 -0
  137. data/example/provider/lib/tasks/.keep +0 -0
  138. data/example/provider/log/.keep +0 -0
  139. data/example/provider/public/robots.txt +1 -0
  140. data/example/provider/script/.keep +0 -0
  141. data/example/provider/storage/.keep +0 -0
  142. data/example/provider/tmp/.keep +0 -0
  143. data/example/provider/tmp/pids/.keep +0 -0
  144. data/example/provider/tmp/storage/.keep +0 -0
  145. data/example/provider/vendor/.keep +0 -0
  146. data/lib/active_cached_resource/caching.rb +176 -0
  147. data/lib/active_cached_resource/caching_strategies/active_support_cache.rb +31 -0
  148. data/lib/active_cached_resource/caching_strategies/base.rb +114 -0
  149. data/lib/active_cached_resource/caching_strategies/sql_cache.rb +32 -0
  150. data/lib/active_cached_resource/configuration.rb +50 -0
  151. data/lib/active_cached_resource/logger.rb +22 -0
  152. data/lib/active_cached_resource/model.rb +33 -0
  153. data/lib/active_cached_resource/version.rb +12 -0
  154. data/lib/active_cached_resource.rb +64 -0
  155. data/lib/activeresource/.gitignore +15 -0
  156. data/lib/activeresource/README.md +283 -0
  157. data/lib/activeresource/examples/performance.rb +72 -0
  158. data/lib/activeresource/lib/active_resource/active_job_serializer.rb +26 -0
  159. data/lib/activeresource/lib/active_resource/associations/builder/association.rb +32 -0
  160. data/lib/activeresource/lib/active_resource/associations/builder/belongs_to.rb +16 -0
  161. data/lib/activeresource/lib/active_resource/associations/builder/has_many.rb +14 -0
  162. data/lib/activeresource/lib/active_resource/associations/builder/has_one.rb +14 -0
  163. data/lib/activeresource/lib/active_resource/associations.rb +175 -0
  164. data/lib/activeresource/lib/active_resource/base.rb +1741 -0
  165. data/lib/activeresource/lib/active_resource/callbacks.rb +22 -0
  166. data/lib/activeresource/lib/active_resource/collection.rb +214 -0
  167. data/lib/activeresource/lib/active_resource/connection.rb +298 -0
  168. data/lib/activeresource/lib/active_resource/custom_methods.rb +129 -0
  169. data/lib/activeresource/lib/active_resource/exceptions.rb +98 -0
  170. data/lib/activeresource/lib/active_resource/formats/json_format.rb +28 -0
  171. data/lib/activeresource/lib/active_resource/formats/xml_format.rb +27 -0
  172. data/lib/activeresource/lib/active_resource/formats.rb +24 -0
  173. data/lib/activeresource/lib/active_resource/http_mock.rb +386 -0
  174. data/lib/activeresource/lib/active_resource/inheriting_hash.rb +34 -0
  175. data/lib/activeresource/lib/active_resource/log_subscriber.rb +26 -0
  176. data/lib/activeresource/lib/active_resource/railtie.rb +31 -0
  177. data/lib/activeresource/lib/active_resource/reflection.rb +78 -0
  178. data/lib/activeresource/lib/active_resource/schema.rb +60 -0
  179. data/lib/activeresource/lib/active_resource/singleton.rb +111 -0
  180. data/lib/activeresource/lib/active_resource/threadsafe_attributes.rb +65 -0
  181. data/lib/activeresource/lib/active_resource/validations.rb +176 -0
  182. data/lib/activeresource/lib/active_resource.rb +49 -0
  183. data/lib/activeresource/lib/activeresource.rb +3 -0
  184. data/lib/activeresource/test/abstract_unit.rb +153 -0
  185. data/lib/activeresource/test/cases/active_job_serializer_test.rb +53 -0
  186. data/lib/activeresource/test/cases/association_test.rb +104 -0
  187. data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +42 -0
  188. data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +28 -0
  189. data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +28 -0
  190. data/lib/activeresource/test/cases/authorization_test.rb +276 -0
  191. data/lib/activeresource/test/cases/base/custom_methods_test.rb +155 -0
  192. data/lib/activeresource/test/cases/base/equality_test.rb +53 -0
  193. data/lib/activeresource/test/cases/base/load_test.rb +249 -0
  194. data/lib/activeresource/test/cases/base/schema_test.rb +428 -0
  195. data/lib/activeresource/test/cases/base_errors_test.rb +129 -0
  196. data/lib/activeresource/test/cases/base_test.rb +1622 -0
  197. data/lib/activeresource/test/cases/callbacks_test.rb +155 -0
  198. data/lib/activeresource/test/cases/collection_test.rb +172 -0
  199. data/lib/activeresource/test/cases/connection_test.rb +357 -0
  200. data/lib/activeresource/test/cases/finder_test.rb +217 -0
  201. data/lib/activeresource/test/cases/format_test.rb +137 -0
  202. data/lib/activeresource/test/cases/http_mock_test.rb +213 -0
  203. data/lib/activeresource/test/cases/inheritence_test.rb +19 -0
  204. data/lib/activeresource/test/cases/inheriting_hash_test.rb +25 -0
  205. data/lib/activeresource/test/cases/log_subscriber_test.rb +63 -0
  206. data/lib/activeresource/test/cases/reflection_test.rb +65 -0
  207. data/lib/activeresource/test/cases/validations_test.rb +78 -0
  208. data/lib/activeresource/test/fixtures/address.rb +20 -0
  209. data/lib/activeresource/test/fixtures/beast.rb +16 -0
  210. data/lib/activeresource/test/fixtures/comment.rb +5 -0
  211. data/lib/activeresource/test/fixtures/customer.rb +5 -0
  212. data/lib/activeresource/test/fixtures/inventory.rb +14 -0
  213. data/lib/activeresource/test/fixtures/person.rb +15 -0
  214. data/lib/activeresource/test/fixtures/pet.rb +6 -0
  215. data/lib/activeresource/test/fixtures/post.rb +5 -0
  216. data/lib/activeresource/test/fixtures/product.rb +11 -0
  217. data/lib/activeresource/test/fixtures/project.rb +19 -0
  218. data/lib/activeresource/test/fixtures/proxy.rb +6 -0
  219. data/lib/activeresource/test/fixtures/sound.rb +11 -0
  220. data/lib/activeresource/test/fixtures/street_address.rb +6 -0
  221. data/lib/activeresource/test/fixtures/subscription_plan.rb +7 -0
  222. data/lib/activeresource/test/fixtures/weather.rb +21 -0
  223. data/lib/activeresource/test/setter_trap.rb +28 -0
  224. data/lib/activeresource/test/singleton_test.rb +138 -0
  225. data/lib/activeresource/test/threadsafe_attributes_test.rb +91 -0
  226. data/lib/generators/active_cached_resource/install_generator.rb +31 -0
  227. data/lib/generators/active_cached_resource/templates/migration.erb +16 -0
  228. data/sorbet/config +4 -0
  229. data/sorbet/rbi/annotations/.gitattributes +1 -0
  230. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  231. data/sorbet/rbi/annotations/activesupport.rbi +457 -0
  232. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  233. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  234. data/sorbet/rbi/dsl/.gitattributes +1 -0
  235. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  236. data/sorbet/rbi/gems/.gitattributes +1 -0
  237. data/sorbet/rbi/gems/actioncable@8.0.0.rbi +252 -0
  238. data/sorbet/rbi/gems/actionmailbox@8.0.0.rbi +9 -0
  239. data/sorbet/rbi/gems/actionmailer@8.0.0.rbi +9 -0
  240. data/sorbet/rbi/gems/actionpack@8.0.0.rbi +20909 -0
  241. data/sorbet/rbi/gems/actiontext@8.0.0.rbi +9 -0
  242. data/sorbet/rbi/gems/actionview@8.0.0.rbi +16207 -0
  243. data/sorbet/rbi/gems/activejob@8.0.0.rbi +9 -0
  244. data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +166 -0
  245. data/sorbet/rbi/gems/activemodel@8.0.0.rbi +6857 -0
  246. data/sorbet/rbi/gems/activerecord@8.0.0.rbi +42896 -0
  247. data/sorbet/rbi/gems/activeresource@6.1.4.rbi +3944 -0
  248. data/sorbet/rbi/gems/activestorage@8.0.0.rbi +9 -0
  249. data/sorbet/rbi/gems/activesupport@8.0.0.rbi +21251 -0
  250. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  251. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  252. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  253. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +78 -0
  254. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  255. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  256. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3607 -0
  257. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  258. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +11645 -0
  259. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  260. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  261. data/sorbet/rbi/gems/date@3.4.0.rbi +75 -0
  262. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  263. data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
  264. data/sorbet/rbi/gems/drb@2.2.1.rbi +1347 -0
  265. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  266. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  267. data/sorbet/rbi/gems/i18n@1.14.6.rbi +2359 -0
  268. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  269. data/sorbet/rbi/gems/json@2.8.2.rbi +1901 -0
  270. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  271. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  272. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  273. data/sorbet/rbi/gems/loofah@2.23.1.rbi +1081 -0
  274. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  275. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  276. data/sorbet/rbi/gems/method_source@1.1.0.rbi +304 -0
  277. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  278. data/sorbet/rbi/gems/minitest@5.25.2.rbi +1547 -0
  279. data/sorbet/rbi/gems/net-imap@0.5.1.rbi +9 -0
  280. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  281. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  282. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +9 -0
  283. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  284. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +9 -0
  285. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  286. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  287. data/sorbet/rbi/gems/parser@3.3.6.0.rbi +5519 -0
  288. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  289. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1151 -0
  290. data/sorbet/rbi/gems/pry@0.14.2.rbi +10076 -0
  291. data/sorbet/rbi/gems/psych@5.2.0.rbi +1785 -0
  292. data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
  293. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +727 -0
  294. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +747 -0
  295. data/sorbet/rbi/gems/rack@3.1.8.rbi +4905 -0
  296. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  297. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +758 -0
  298. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +785 -0
  299. data/sorbet/rbi/gems/rails@8.0.0.rbi +9 -0
  300. data/sorbet/rbi/gems/railties@8.0.0.rbi +6287 -0
  301. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  302. data/sorbet/rbi/gems/rake@13.2.1.rbi +3091 -0
  303. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  304. data/sorbet/rbi/gems/rdoc@6.8.1.rbi +12572 -0
  305. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  306. data/sorbet/rbi/gems/reline@0.5.12.rbi +2416 -0
  307. data/sorbet/rbi/gems/rexml@3.3.9.rbi +4858 -0
  308. data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +11287 -0
  309. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  310. data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +5341 -0
  311. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  312. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  313. data/sorbet/rbi/gems/rubocop-ast@1.36.1.rbi +7303 -0
  314. data/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +9 -0
  315. data/sorbet/rbi/gems/rubocop@1.65.1.rbi +58170 -0
  316. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  317. data/sorbet/rbi/gems/securerandom@0.3.2.rbi +395 -0
  318. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +225 -0
  319. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  320. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  321. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  322. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
  323. data/sorbet/rbi/gems/standard-performance@1.4.0.rbi +9 -0
  324. data/sorbet/rbi/gems/standard@1.40.0.rbi +929 -0
  325. data/sorbet/rbi/gems/stringio@3.1.2.rbi +9 -0
  326. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3597 -0
  327. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  328. data/sorbet/rbi/gems/timeout@0.4.2.rbi +151 -0
  329. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  330. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
  331. data/sorbet/rbi/gems/uri@1.0.2.rbi +2377 -0
  332. data/sorbet/rbi/gems/useragent@0.16.10.rbi +9 -0
  333. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +9 -0
  334. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  335. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  336. data/sorbet/rbi/gems/yard@0.9.37.rbi +18504 -0
  337. data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +9 -0
  338. data/sorbet/tapioca/config.yml +13 -0
  339. data/sorbet/tapioca/require.rb +12 -0
  340. metadata +543 -0
@@ -0,0 +1,618 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `benchmark` gem.
5
+ # Please instead update this file by running `bin/tapioca gem benchmark`.
6
+
7
+
8
+ # The Benchmark module provides methods to measure and report the time
9
+ # used to execute Ruby code.
10
+ #
11
+ # * Measure the time to construct the string given by the expression
12
+ # <code>"a"*1_000_000_000</code>:
13
+ #
14
+ # require 'benchmark'
15
+ #
16
+ # puts Benchmark.measure { "a"*1_000_000_000 }
17
+ #
18
+ # On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
19
+ #
20
+ # 0.350000 0.400000 0.750000 ( 0.835234)
21
+ #
22
+ # This report shows the user CPU time, system CPU time, the sum of
23
+ # the user and system CPU times, and the elapsed real time. The unit
24
+ # of time is seconds.
25
+ #
26
+ # * Do some experiments sequentially using the #bm method:
27
+ #
28
+ # require 'benchmark'
29
+ #
30
+ # n = 5000000
31
+ # Benchmark.bm do |x|
32
+ # x.report { for i in 1..n; a = "1"; end }
33
+ # x.report { n.times do ; a = "1"; end }
34
+ # x.report { 1.upto(n) do ; a = "1"; end }
35
+ # end
36
+ #
37
+ # The result:
38
+ #
39
+ # user system total real
40
+ # 1.010000 0.000000 1.010000 ( 1.014479)
41
+ # 1.000000 0.000000 1.000000 ( 0.998261)
42
+ # 0.980000 0.000000 0.980000 ( 0.981335)
43
+ #
44
+ # * Continuing the previous example, put a label in each report:
45
+ #
46
+ # require 'benchmark'
47
+ #
48
+ # n = 5000000
49
+ # Benchmark.bm(7) do |x|
50
+ # x.report("for:") { for i in 1..n; a = "1"; end }
51
+ # x.report("times:") { n.times do ; a = "1"; end }
52
+ # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
53
+ # end
54
+ #
55
+ # The result:
56
+ #
57
+ # user system total real
58
+ # for: 1.010000 0.000000 1.010000 ( 1.015688)
59
+ # times: 1.000000 0.000000 1.000000 ( 1.003611)
60
+ # upto: 1.030000 0.000000 1.030000 ( 1.028098)
61
+ #
62
+ # * The times for some benchmarks depend on the order in which items
63
+ # are run. These differences are due to the cost of memory
64
+ # allocation and garbage collection. To avoid these discrepancies,
65
+ # the #bmbm method is provided. For example, to compare ways to
66
+ # sort an array of floats:
67
+ #
68
+ # require 'benchmark'
69
+ #
70
+ # array = (1..1000000).map { rand }
71
+ #
72
+ # Benchmark.bmbm do |x|
73
+ # x.report("sort!") { array.dup.sort! }
74
+ # x.report("sort") { array.dup.sort }
75
+ # end
76
+ #
77
+ # The result:
78
+ #
79
+ # Rehearsal -----------------------------------------
80
+ # sort! 1.490000 0.010000 1.500000 ( 1.490520)
81
+ # sort 1.460000 0.000000 1.460000 ( 1.463025)
82
+ # -------------------------------- total: 2.960000sec
83
+ #
84
+ # user system total real
85
+ # sort! 1.460000 0.000000 1.460000 ( 1.460465)
86
+ # sort 1.450000 0.010000 1.460000 ( 1.448327)
87
+ #
88
+ # * Report statistics of sequential experiments with unique labels,
89
+ # using the #benchmark method:
90
+ #
91
+ # require 'benchmark'
92
+ # include Benchmark # we need the CAPTION and FORMAT constants
93
+ #
94
+ # n = 5000000
95
+ # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
96
+ # tf = x.report("for:") { for i in 1..n; a = "1"; end }
97
+ # tt = x.report("times:") { n.times do ; a = "1"; end }
98
+ # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
99
+ # [tf+tt+tu, (tf+tt+tu)/3]
100
+ # end
101
+ #
102
+ # The result:
103
+ #
104
+ # user system total real
105
+ # for: 0.950000 0.000000 0.950000 ( 0.952039)
106
+ # times: 0.980000 0.000000 0.980000 ( 0.984938)
107
+ # upto: 0.950000 0.000000 0.950000 ( 0.946787)
108
+ # >total: 2.880000 0.000000 2.880000 ( 2.883764)
109
+ # >avg: 0.960000 0.000000 0.960000 ( 0.961255)
110
+ #
111
+ # source://benchmark//lib/benchmark.rb#122
112
+ module Benchmark
113
+ private
114
+
115
+ # Invokes the block with a Benchmark::Report object, which
116
+ # may be used to collect and report on the results of individual
117
+ # benchmark tests. Reserves +label_width+ leading spaces for
118
+ # labels on each line. Prints +caption+ at the top of the
119
+ # report, and uses +format+ to format each line.
120
+ # (Note: +caption+ must contain a terminating newline character,
121
+ # see the default Benchmark::Tms::CAPTION for an example.)
122
+ #
123
+ # Returns an array of Benchmark::Tms objects.
124
+ #
125
+ # If the block returns an array of
126
+ # Benchmark::Tms objects, these will be used to format
127
+ # additional lines of output. If +labels+ parameter are
128
+ # given, these are used to label these extra lines.
129
+ #
130
+ # _Note_: Other methods provide a simpler interface to this one, and are
131
+ # suitable for nearly all benchmarking requirements. See the examples in
132
+ # Benchmark, and the #bm and #bmbm methods.
133
+ #
134
+ # Example:
135
+ #
136
+ # require 'benchmark'
137
+ # include Benchmark # we need the CAPTION and FORMAT constants
138
+ #
139
+ # n = 5000000
140
+ # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
141
+ # tf = x.report("for:") { for i in 1..n; a = "1"; end }
142
+ # tt = x.report("times:") { n.times do ; a = "1"; end }
143
+ # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
144
+ # [tf+tt+tu, (tf+tt+tu)/3]
145
+ # end
146
+ #
147
+ # Generates:
148
+ #
149
+ # user system total real
150
+ # for: 0.970000 0.000000 0.970000 ( 0.970493)
151
+ # times: 0.990000 0.000000 0.990000 ( 0.989542)
152
+ # upto: 0.970000 0.000000 0.970000 ( 0.972854)
153
+ # >total: 2.930000 0.000000 2.930000 ( 2.932889)
154
+ # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
155
+ #
156
+ # source://benchmark//lib/benchmark.rb#170
157
+ def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
158
+
159
+ # A simple interface to the #benchmark method, #bm generates sequential
160
+ # reports with labels. +label_width+ and +labels+ parameters have the same
161
+ # meaning as for #benchmark.
162
+ #
163
+ # require 'benchmark'
164
+ #
165
+ # n = 5000000
166
+ # Benchmark.bm(7) do |x|
167
+ # x.report("for:") { for i in 1..n; a = "1"; end }
168
+ # x.report("times:") { n.times do ; a = "1"; end }
169
+ # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
170
+ # end
171
+ #
172
+ # Generates:
173
+ #
174
+ # user system total real
175
+ # for: 0.960000 0.000000 0.960000 ( 0.957966)
176
+ # times: 0.960000 0.000000 0.960000 ( 0.960423)
177
+ # upto: 0.950000 0.000000 0.950000 ( 0.954864)
178
+ #
179
+ # source://benchmark//lib/benchmark.rb#215
180
+ def bm(label_width = T.unsafe(nil), *labels, &blk); end
181
+
182
+ # Sometimes benchmark results are skewed because code executed
183
+ # earlier encounters different garbage collection overheads than
184
+ # that run later. #bmbm attempts to minimize this effect by running
185
+ # the tests twice, the first time as a rehearsal in order to get the
186
+ # runtime environment stable, the second time for
187
+ # real. GC.start is executed before the start of each of
188
+ # the real timings; the cost of this is not included in the
189
+ # timings. In reality, though, there's only so much that #bmbm can
190
+ # do, and the results are not guaranteed to be isolated from garbage
191
+ # collection and other effects.
192
+ #
193
+ # Because #bmbm takes two passes through the tests, it can
194
+ # calculate the required label width.
195
+ #
196
+ # require 'benchmark'
197
+ #
198
+ # array = (1..1000000).map { rand }
199
+ #
200
+ # Benchmark.bmbm do |x|
201
+ # x.report("sort!") { array.dup.sort! }
202
+ # x.report("sort") { array.dup.sort }
203
+ # end
204
+ #
205
+ # Generates:
206
+ #
207
+ # Rehearsal -----------------------------------------
208
+ # sort! 1.440000 0.010000 1.450000 ( 1.446833)
209
+ # sort 1.440000 0.000000 1.440000 ( 1.448257)
210
+ # -------------------------------- total: 2.890000sec
211
+ #
212
+ # user system total real
213
+ # sort! 1.460000 0.000000 1.460000 ( 1.458065)
214
+ # sort 1.450000 0.000000 1.450000 ( 1.455963)
215
+ #
216
+ # #bmbm yields a Benchmark::Job object and returns an array of
217
+ # Benchmark::Tms objects.
218
+ #
219
+ # source://benchmark//lib/benchmark.rb#257
220
+ def bmbm(width = T.unsafe(nil)); end
221
+
222
+ # Returns the time used to execute the given block as a
223
+ # Benchmark::Tms object. Takes +label+ option.
224
+ #
225
+ # require 'benchmark'
226
+ #
227
+ # n = 1000000
228
+ #
229
+ # time = Benchmark.measure do
230
+ # n.times { a = "1" }
231
+ # end
232
+ # puts time
233
+ #
234
+ # Generates:
235
+ #
236
+ # 0.220000 0.000000 0.220000 ( 0.227313)
237
+ #
238
+ # source://benchmark//lib/benchmark.rb#302
239
+ def measure(label = T.unsafe(nil)); end
240
+
241
+ # Returns the elapsed real time used to execute the given block.
242
+ # The unit of time is seconds.
243
+ #
244
+ # Benchmark.realtime { "a" * 1_000_000_000 }
245
+ # #=> 0.5098029999935534
246
+ #
247
+ # source://benchmark//lib/benchmark.rb#321
248
+ def realtime; end
249
+
250
+ class << self
251
+ # Invokes the block with a Benchmark::Report object, which
252
+ # may be used to collect and report on the results of individual
253
+ # benchmark tests. Reserves +label_width+ leading spaces for
254
+ # labels on each line. Prints +caption+ at the top of the
255
+ # report, and uses +format+ to format each line.
256
+ # (Note: +caption+ must contain a terminating newline character,
257
+ # see the default Benchmark::Tms::CAPTION for an example.)
258
+ #
259
+ # Returns an array of Benchmark::Tms objects.
260
+ #
261
+ # If the block returns an array of
262
+ # Benchmark::Tms objects, these will be used to format
263
+ # additional lines of output. If +labels+ parameter are
264
+ # given, these are used to label these extra lines.
265
+ #
266
+ # _Note_: Other methods provide a simpler interface to this one, and are
267
+ # suitable for nearly all benchmarking requirements. See the examples in
268
+ # Benchmark, and the #bm and #bmbm methods.
269
+ #
270
+ # Example:
271
+ #
272
+ # require 'benchmark'
273
+ # include Benchmark # we need the CAPTION and FORMAT constants
274
+ #
275
+ # n = 5000000
276
+ # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
277
+ # tf = x.report("for:") { for i in 1..n; a = "1"; end }
278
+ # tt = x.report("times:") { n.times do ; a = "1"; end }
279
+ # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
280
+ # [tf+tt+tu, (tf+tt+tu)/3]
281
+ # end
282
+ #
283
+ # Generates:
284
+ #
285
+ # user system total real
286
+ # for: 0.970000 0.000000 0.970000 ( 0.970493)
287
+ # times: 0.990000 0.000000 0.990000 ( 0.989542)
288
+ # upto: 0.970000 0.000000 0.970000 ( 0.972854)
289
+ # >total: 2.930000 0.000000 2.930000 ( 2.932889)
290
+ # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
291
+ #
292
+ # source://benchmark//lib/benchmark.rb#170
293
+ def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
294
+
295
+ # A simple interface to the #benchmark method, #bm generates sequential
296
+ # reports with labels. +label_width+ and +labels+ parameters have the same
297
+ # meaning as for #benchmark.
298
+ #
299
+ # require 'benchmark'
300
+ #
301
+ # n = 5000000
302
+ # Benchmark.bm(7) do |x|
303
+ # x.report("for:") { for i in 1..n; a = "1"; end }
304
+ # x.report("times:") { n.times do ; a = "1"; end }
305
+ # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
306
+ # end
307
+ #
308
+ # Generates:
309
+ #
310
+ # user system total real
311
+ # for: 0.960000 0.000000 0.960000 ( 0.957966)
312
+ # times: 0.960000 0.000000 0.960000 ( 0.960423)
313
+ # upto: 0.950000 0.000000 0.950000 ( 0.954864)
314
+ #
315
+ # source://benchmark//lib/benchmark.rb#215
316
+ def bm(label_width = T.unsafe(nil), *labels, &blk); end
317
+
318
+ # Sometimes benchmark results are skewed because code executed
319
+ # earlier encounters different garbage collection overheads than
320
+ # that run later. #bmbm attempts to minimize this effect by running
321
+ # the tests twice, the first time as a rehearsal in order to get the
322
+ # runtime environment stable, the second time for
323
+ # real. GC.start is executed before the start of each of
324
+ # the real timings; the cost of this is not included in the
325
+ # timings. In reality, though, there's only so much that #bmbm can
326
+ # do, and the results are not guaranteed to be isolated from garbage
327
+ # collection and other effects.
328
+ #
329
+ # Because #bmbm takes two passes through the tests, it can
330
+ # calculate the required label width.
331
+ #
332
+ # require 'benchmark'
333
+ #
334
+ # array = (1..1000000).map { rand }
335
+ #
336
+ # Benchmark.bmbm do |x|
337
+ # x.report("sort!") { array.dup.sort! }
338
+ # x.report("sort") { array.dup.sort }
339
+ # end
340
+ #
341
+ # Generates:
342
+ #
343
+ # Rehearsal -----------------------------------------
344
+ # sort! 1.440000 0.010000 1.450000 ( 1.446833)
345
+ # sort 1.440000 0.000000 1.440000 ( 1.448257)
346
+ # -------------------------------- total: 2.890000sec
347
+ #
348
+ # user system total real
349
+ # sort! 1.460000 0.000000 1.460000 ( 1.458065)
350
+ # sort 1.450000 0.000000 1.450000 ( 1.455963)
351
+ #
352
+ # #bmbm yields a Benchmark::Job object and returns an array of
353
+ # Benchmark::Tms objects.
354
+ #
355
+ # source://benchmark//lib/benchmark.rb#257
356
+ def bmbm(width = T.unsafe(nil)); end
357
+
358
+ # Returns the time used to execute the given block as a
359
+ # Benchmark::Tms object. Takes +label+ option.
360
+ #
361
+ # require 'benchmark'
362
+ #
363
+ # n = 1000000
364
+ #
365
+ # time = Benchmark.measure do
366
+ # n.times { a = "1" }
367
+ # end
368
+ # puts time
369
+ #
370
+ # Generates:
371
+ #
372
+ # 0.220000 0.000000 0.220000 ( 0.227313)
373
+ #
374
+ # source://benchmark//lib/benchmark.rb#302
375
+ def measure(label = T.unsafe(nil)); end
376
+
377
+ # Returns the elapsed real time used to execute the given block.
378
+ # The unit of time is seconds.
379
+ #
380
+ # Benchmark.realtime { "a" * 1_000_000_000 }
381
+ # #=> 0.5098029999935534
382
+ #
383
+ # source://benchmark//lib/benchmark.rb#321
384
+ def realtime; end
385
+ end
386
+ end
387
+
388
+ # A Job is a sequence of labelled blocks to be processed by the
389
+ # Benchmark.bmbm method. It is of little direct interest to the user.
390
+ #
391
+ # source://benchmark//lib/benchmark.rb#333
392
+ class Benchmark::Job
393
+ # Returns an initialized Job instance.
394
+ # Usually, one doesn't call this method directly, as new
395
+ # Job objects are created by the #bmbm method.
396
+ # +width+ is a initial value for the label offset used in formatting;
397
+ # the #bmbm method passes its +width+ argument to this constructor.
398
+ #
399
+ # @return [Job] a new instance of Job
400
+ #
401
+ # source://benchmark//lib/benchmark.rb#341
402
+ def initialize(width); end
403
+
404
+ # Registers the given label and block pair in the job list.
405
+ #
406
+ # @raise [ArgumentError]
407
+ #
408
+ # source://benchmark//lib/benchmark.rb#349
409
+ def item(label = T.unsafe(nil), &blk); end
410
+
411
+ # An array of 2-element arrays, consisting of label and block pairs.
412
+ #
413
+ # source://benchmark//lib/benchmark.rb#361
414
+ def list; end
415
+
416
+ # Registers the given label and block pair in the job list.
417
+ #
418
+ # @raise [ArgumentError]
419
+ #
420
+ # source://benchmark//lib/benchmark.rb#349
421
+ def report(label = T.unsafe(nil), &blk); end
422
+
423
+ # Length of the widest label in the #list.
424
+ #
425
+ # source://benchmark//lib/benchmark.rb#364
426
+ def width; end
427
+ end
428
+
429
+ # This class is used by the Benchmark.benchmark and Benchmark.bm methods.
430
+ # It is of little direct interest to the user.
431
+ #
432
+ # source://benchmark//lib/benchmark.rb#371
433
+ class Benchmark::Report
434
+ # Returns an initialized Report instance.
435
+ # Usually, one doesn't call this method directly, as new
436
+ # Report objects are created by the #benchmark and #bm methods.
437
+ # +width+ and +format+ are the label offset and
438
+ # format string used by Tms#format.
439
+ #
440
+ # @return [Report] a new instance of Report
441
+ #
442
+ # source://benchmark//lib/benchmark.rb#379
443
+ def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end
444
+
445
+ # An array of Benchmark::Tms objects representing each item.
446
+ #
447
+ # source://benchmark//lib/benchmark.rb#398
448
+ def format; end
449
+
450
+ # Prints the +label+ and measured time for the block,
451
+ # formatted by +format+. See Tms#format for the
452
+ # formatting rules.
453
+ #
454
+ # source://benchmark//lib/benchmark.rb#388
455
+ def item(label = T.unsafe(nil), *format, &blk); end
456
+
457
+ # An array of Benchmark::Tms objects representing each item.
458
+ #
459
+ # source://benchmark//lib/benchmark.rb#398
460
+ def list; end
461
+
462
+ # Prints the +label+ and measured time for the block,
463
+ # formatted by +format+. See Tms#format for the
464
+ # formatting rules.
465
+ #
466
+ # source://benchmark//lib/benchmark.rb#388
467
+ def report(label = T.unsafe(nil), *format, &blk); end
468
+
469
+ # An array of Benchmark::Tms objects representing each item.
470
+ #
471
+ # source://benchmark//lib/benchmark.rb#398
472
+ def width; end
473
+ end
474
+
475
+ # A data object, representing the times associated with a benchmark
476
+ # measurement.
477
+ #
478
+ # source://benchmark//lib/benchmark.rb#407
479
+ class Benchmark::Tms
480
+ # Returns an initialized Tms object which has
481
+ # +utime+ as the user CPU time, +stime+ as the system CPU time,
482
+ # +cutime+ as the children's user CPU time, +cstime+ as the children's
483
+ # system CPU time, +real+ as the elapsed real time and +label+ as the label.
484
+ #
485
+ # @return [Tms] a new instance of Tms
486
+ #
487
+ # source://benchmark//lib/benchmark.rb#442
488
+ def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end
489
+
490
+ # Returns a new Tms object obtained by memberwise multiplication
491
+ # of the individual times for this Tms object by +x+.
492
+ #
493
+ # source://benchmark//lib/benchmark.rb#490
494
+ def *(x); end
495
+
496
+ # Returns a new Tms object obtained by memberwise summation
497
+ # of the individual times for this Tms object with those of the +other+
498
+ # Tms object.
499
+ # This method and #/() are useful for taking statistics.
500
+ #
501
+ # source://benchmark//lib/benchmark.rb#477
502
+ def +(other); end
503
+
504
+ # Returns a new Tms object obtained by memberwise subtraction
505
+ # of the individual times for the +other+ Tms object from those of this
506
+ # Tms object.
507
+ #
508
+ # source://benchmark//lib/benchmark.rb#484
509
+ def -(other); end
510
+
511
+ # Returns a new Tms object obtained by memberwise division
512
+ # of the individual times for this Tms object by +x+.
513
+ # This method and #+() are useful for taking statistics.
514
+ #
515
+ # source://benchmark//lib/benchmark.rb#497
516
+ def /(x); end
517
+
518
+ # Returns a new Tms object whose times are the sum of the times for this
519
+ # Tms object, plus the time required to execute the code block (+blk+).
520
+ #
521
+ # source://benchmark//lib/benchmark.rb#451
522
+ def add(&blk); end
523
+
524
+ # An in-place version of #add.
525
+ # Changes the times of this Tms object by making it the sum of the times
526
+ # for this Tms object, plus the time required to execute
527
+ # the code block (+blk+).
528
+ #
529
+ # source://benchmark//lib/benchmark.rb#461
530
+ def add!(&blk); end
531
+
532
+ # System CPU time of children
533
+ #
534
+ # source://benchmark//lib/benchmark.rb#425
535
+ def cstime; end
536
+
537
+ # User CPU time of children
538
+ #
539
+ # source://benchmark//lib/benchmark.rb#422
540
+ def cutime; end
541
+
542
+ # Returns the contents of this Tms object as
543
+ # a formatted string, according to a +format+ string
544
+ # like that passed to Kernel.format. In addition, #format
545
+ # accepts the following extensions:
546
+ #
547
+ # <tt>%u</tt>:: Replaced by the user CPU time, as reported by Tms#utime.
548
+ # <tt>%y</tt>:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem")
549
+ # <tt>%U</tt>:: Replaced by the children's user CPU time, as reported by Tms#cutime
550
+ # <tt>%Y</tt>:: Replaced by the children's system CPU time, as reported by Tms#cstime
551
+ # <tt>%t</tt>:: Replaced by the total CPU time, as reported by Tms#total
552
+ # <tt>%r</tt>:: Replaced by the elapsed real time, as reported by Tms#real
553
+ # <tt>%n</tt>:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame")
554
+ #
555
+ # If +format+ is not given, FORMAT is used as default value, detailing the
556
+ # user, system and real elapsed time.
557
+ #
558
+ # source://benchmark//lib/benchmark.rb#516
559
+ def format(format = T.unsafe(nil), *args); end
560
+
561
+ # Label
562
+ #
563
+ # source://benchmark//lib/benchmark.rb#434
564
+ def label; end
565
+
566
+ # Elapsed real time
567
+ #
568
+ # source://benchmark//lib/benchmark.rb#428
569
+ def real; end
570
+
571
+ # System CPU time
572
+ #
573
+ # source://benchmark//lib/benchmark.rb#419
574
+ def stime; end
575
+
576
+ # Returns a new 6-element array, consisting of the
577
+ # label, user CPU time, system CPU time, children's
578
+ # user CPU time, children's system CPU time and elapsed
579
+ # real time.
580
+ #
581
+ # source://benchmark//lib/benchmark.rb#541
582
+ def to_a; end
583
+
584
+ # Returns a hash containing the same data as `to_a`.
585
+ #
586
+ # source://benchmark//lib/benchmark.rb#548
587
+ def to_h; end
588
+
589
+ # Same as #format.
590
+ #
591
+ # source://benchmark//lib/benchmark.rb#531
592
+ def to_s; end
593
+
594
+ # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+
595
+ #
596
+ # source://benchmark//lib/benchmark.rb#431
597
+ def total; end
598
+
599
+ # User CPU time
600
+ #
601
+ # source://benchmark//lib/benchmark.rb#416
602
+ def utime; end
603
+
604
+ protected
605
+
606
+ # Returns a new Tms object obtained by memberwise operation +op+
607
+ # of the individual times for this Tms object with those of the other
608
+ # Tms object (+x+).
609
+ #
610
+ # +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
611
+ # <tt>*</tt>, <tt>/</tt>
612
+ #
613
+ # source://benchmark//lib/benchmark.rb#569
614
+ def memberwise(op, x); end
615
+ end
616
+
617
+ # source://benchmark//lib/benchmark.rb#124
618
+ Benchmark::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,78 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `bigdecimal` gem.
5
+ # Please instead update this file by running `bin/tapioca gem bigdecimal`.
6
+
7
+
8
+ # source://bigdecimal//lib/bigdecimal/util.rb#78
9
+ class BigDecimal < ::Numeric
10
+ # call-seq:
11
+ # a.to_d -> bigdecimal
12
+ #
13
+ # Returns self.
14
+ #
15
+ # require 'bigdecimal/util'
16
+ #
17
+ # d = BigDecimal("3.14")
18
+ # d.to_d # => 0.314e1
19
+ #
20
+ # source://bigdecimal//lib/bigdecimal/util.rb#110
21
+ def to_d; end
22
+
23
+ # call-seq:
24
+ # a.to_digits -> string
25
+ #
26
+ # Converts a BigDecimal to a String of the form "nnnnnn.mmm".
27
+ # This method is deprecated; use BigDecimal#to_s("F") instead.
28
+ #
29
+ # require 'bigdecimal/util'
30
+ #
31
+ # d = BigDecimal("3.14")
32
+ # d.to_digits # => "3.14"
33
+ #
34
+ # source://bigdecimal//lib/bigdecimal/util.rb#90
35
+ def to_digits; end
36
+ end
37
+
38
+ BigDecimal::VERSION = T.let(T.unsafe(nil), String)
39
+
40
+ # source://bigdecimal//lib/bigdecimal/util.rb#138
41
+ class Complex < ::Numeric
42
+ # call-seq:
43
+ # cmp.to_d -> bigdecimal
44
+ # cmp.to_d(precision) -> bigdecimal
45
+ #
46
+ # Returns the value as a BigDecimal.
47
+ #
48
+ # The +precision+ parameter is required for a rational complex number.
49
+ # This parameter is used to determine the number of significant digits
50
+ # for the result.
51
+ #
52
+ # require 'bigdecimal'
53
+ # require 'bigdecimal/util'
54
+ #
55
+ # Complex(0.1234567, 0).to_d(4) # => 0.1235e0
56
+ # Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
57
+ #
58
+ # See also Kernel.BigDecimal.
59
+ #
60
+ # source://bigdecimal//lib/bigdecimal/util.rb#157
61
+ def to_d(*args); end
62
+ end
63
+
64
+ # source://bigdecimal//lib/bigdecimal/util.rb#171
65
+ class NilClass
66
+ # call-seq:
67
+ # nil.to_d -> bigdecimal
68
+ #
69
+ # Returns nil represented as a BigDecimal.
70
+ #
71
+ # require 'bigdecimal'
72
+ # require 'bigdecimal/util'
73
+ #
74
+ # nil.to_d # => 0.0
75
+ #
76
+ # source://bigdecimal//lib/bigdecimal/util.rb#182
77
+ def to_d; end
78
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `builder` gem.
5
+ # Please instead update this file by running `bin/tapioca gem builder`.
6
+
7
+
8
+ # THIS IS AN EMPTY RBI FILE.
9
+ # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem