active_cached_resource 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (316) 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. metadata +2 -308
  10. data/.rspec +0 -3
  11. data/.rubocop.yml +0 -23
  12. data/.standard.yml +0 -2
  13. data/Rakefile +0 -29
  14. data/example/consumer/.dockerignore +0 -41
  15. data/example/consumer/.gitattributes +0 -9
  16. data/example/consumer/.gitignore +0 -36
  17. data/example/consumer/.kamal/hooks/docker-setup.sample +0 -3
  18. data/example/consumer/.kamal/hooks/post-deploy.sample +0 -14
  19. data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +0 -3
  20. data/example/consumer/.kamal/hooks/pre-build.sample +0 -51
  21. data/example/consumer/.kamal/hooks/pre-connect.sample +0 -47
  22. data/example/consumer/.kamal/hooks/pre-deploy.sample +0 -109
  23. data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  24. data/example/consumer/.kamal/secrets +0 -17
  25. data/example/consumer/Dockerfile +0 -65
  26. data/example/consumer/Gemfile +0 -17
  27. data/example/consumer/Rakefile +0 -6
  28. data/example/consumer/app/controllers/application_controller.rb +0 -2
  29. data/example/consumer/app/controllers/concerns/.keep +0 -0
  30. data/example/consumer/app/jobs/application_job.rb +0 -7
  31. data/example/consumer/app/mailers/application_mailer.rb +0 -4
  32. data/example/consumer/app/models/application_record.rb +0 -3
  33. data/example/consumer/app/models/concerns/.keep +0 -0
  34. data/example/consumer/app/models/person.rb +0 -9
  35. data/example/consumer/app/views/layouts/mailer.html.erb +0 -13
  36. data/example/consumer/app/views/layouts/mailer.text.erb +0 -1
  37. data/example/consumer/bin/brakeman +0 -7
  38. data/example/consumer/bin/bundle +0 -109
  39. data/example/consumer/bin/dev +0 -2
  40. data/example/consumer/bin/docker-entrypoint +0 -14
  41. data/example/consumer/bin/jobs +0 -6
  42. data/example/consumer/bin/kamal +0 -27
  43. data/example/consumer/bin/rails +0 -4
  44. data/example/consumer/bin/rake +0 -4
  45. data/example/consumer/bin/rubocop +0 -8
  46. data/example/consumer/bin/setup +0 -34
  47. data/example/consumer/bin/thrust +0 -5
  48. data/example/consumer/config/application.rb +0 -20
  49. data/example/consumer/config/boot.rb +0 -3
  50. data/example/consumer/config/cache.yml +0 -16
  51. data/example/consumer/config/credentials.yml.enc +0 -1
  52. data/example/consumer/config/database.yml +0 -14
  53. data/example/consumer/config/deploy.yml +0 -116
  54. data/example/consumer/config/environment.rb +0 -5
  55. data/example/consumer/config/environments/development.rb +0 -64
  56. data/example/consumer/config/environments/production.rb +0 -85
  57. data/example/consumer/config/environments/test.rb +0 -50
  58. data/example/consumer/config/initializers/cors.rb +0 -16
  59. data/example/consumer/config/initializers/filter_parameter_logging.rb +0 -8
  60. data/example/consumer/config/initializers/inflections.rb +0 -16
  61. data/example/consumer/config/locales/en.yml +0 -31
  62. data/example/consumer/config/puma.rb +0 -41
  63. data/example/consumer/config/queue.yml +0 -18
  64. data/example/consumer/config/recurring.yml +0 -10
  65. data/example/consumer/config/routes.rb +0 -10
  66. data/example/consumer/config.ru +0 -6
  67. data/example/consumer/db/cache_schema.rb +0 -14
  68. data/example/consumer/db/queue_schema.rb +0 -129
  69. data/example/consumer/db/seeds.rb +0 -0
  70. data/example/consumer/lib/tasks/.keep +0 -0
  71. data/example/consumer/log/.keep +0 -0
  72. data/example/consumer/public/robots.txt +0 -1
  73. data/example/consumer/script/.keep +0 -0
  74. data/example/consumer/storage/.keep +0 -0
  75. data/example/consumer/tmp/.keep +0 -0
  76. data/example/consumer/tmp/cache/.keep +0 -0
  77. data/example/consumer/tmp/pids/.keep +0 -0
  78. data/example/consumer/tmp/storage/.keep +0 -0
  79. data/example/consumer/vendor/.keep +0 -0
  80. data/example/provider/.dockerignore +0 -41
  81. data/example/provider/.gitattributes +0 -9
  82. data/example/provider/.gitignore +0 -32
  83. data/example/provider/.kamal/hooks/docker-setup.sample +0 -3
  84. data/example/provider/.kamal/hooks/post-deploy.sample +0 -14
  85. data/example/provider/.kamal/hooks/post-proxy-reboot.sample +0 -3
  86. data/example/provider/.kamal/hooks/pre-build.sample +0 -51
  87. data/example/provider/.kamal/hooks/pre-connect.sample +0 -47
  88. data/example/provider/.kamal/hooks/pre-deploy.sample +0 -109
  89. data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +0 -3
  90. data/example/provider/.kamal/secrets +0 -17
  91. data/example/provider/Dockerfile +0 -65
  92. data/example/provider/Gemfile +0 -14
  93. data/example/provider/Rakefile +0 -6
  94. data/example/provider/app/controllers/application_controller.rb +0 -2
  95. data/example/provider/app/controllers/concerns/.keep +0 -0
  96. data/example/provider/app/controllers/people_controller.rb +0 -68
  97. data/example/provider/app/jobs/application_job.rb +0 -7
  98. data/example/provider/app/mailers/application_mailer.rb +0 -4
  99. data/example/provider/app/models/address.rb +0 -3
  100. data/example/provider/app/models/application_record.rb +0 -3
  101. data/example/provider/app/models/company.rb +0 -3
  102. data/example/provider/app/models/concerns/.keep +0 -0
  103. data/example/provider/app/models/person.rb +0 -6
  104. data/example/provider/app/views/layouts/mailer.html.erb +0 -13
  105. data/example/provider/app/views/layouts/mailer.text.erb +0 -1
  106. data/example/provider/bin/brakeman +0 -7
  107. data/example/provider/bin/bundle +0 -109
  108. data/example/provider/bin/dev +0 -2
  109. data/example/provider/bin/docker-entrypoint +0 -14
  110. data/example/provider/bin/jobs +0 -6
  111. data/example/provider/bin/kamal +0 -27
  112. data/example/provider/bin/rails +0 -4
  113. data/example/provider/bin/rake +0 -4
  114. data/example/provider/bin/rubocop +0 -8
  115. data/example/provider/bin/setup +0 -34
  116. data/example/provider/bin/thrust +0 -5
  117. data/example/provider/config/application.rb +0 -44
  118. data/example/provider/config/boot.rb +0 -3
  119. data/example/provider/config/cache.yml +0 -16
  120. data/example/provider/config/credentials.yml.enc +0 -1
  121. data/example/provider/config/database.yml +0 -20
  122. data/example/provider/config/deploy.yml +0 -116
  123. data/example/provider/config/environment.rb +0 -5
  124. data/example/provider/config/environments/development.rb +0 -64
  125. data/example/provider/config/environments/production.rb +0 -85
  126. data/example/provider/config/environments/test.rb +0 -50
  127. data/example/provider/config/initializers/cors.rb +0 -16
  128. data/example/provider/config/initializers/filter_parameter_logging.rb +0 -8
  129. data/example/provider/config/initializers/inflections.rb +0 -16
  130. data/example/provider/config/locales/en.yml +0 -31
  131. data/example/provider/config/puma.rb +0 -41
  132. data/example/provider/config/queue.yml +0 -18
  133. data/example/provider/config/recurring.yml +0 -10
  134. data/example/provider/config/routes.rb +0 -4
  135. data/example/provider/config.ru +0 -6
  136. data/example/provider/db/cache_schema.rb +0 -14
  137. data/example/provider/db/migrate/20241202183937_create_people.rb +0 -11
  138. data/example/provider/db/migrate/20241202183955_create_addresses.rb +0 -13
  139. data/example/provider/db/migrate/20241202184017_create_companies.rb +0 -14
  140. data/example/provider/db/queue_schema.rb +0 -129
  141. data/example/provider/db/schema.rb +0 -47
  142. data/example/provider/db/seeds.rb +0 -18
  143. data/example/provider/lib/tasks/.keep +0 -0
  144. data/example/provider/log/.keep +0 -0
  145. data/example/provider/public/robots.txt +0 -1
  146. data/example/provider/script/.keep +0 -0
  147. data/example/provider/storage/.keep +0 -0
  148. data/example/provider/tmp/.keep +0 -0
  149. data/example/provider/tmp/pids/.keep +0 -0
  150. data/example/provider/tmp/storage/.keep +0 -0
  151. data/example/provider/vendor/.keep +0 -0
  152. data/lib/activeresource/.gitignore +0 -15
  153. data/lib/activeresource/examples/performance.rb +0 -72
  154. data/lib/activeresource/test/abstract_unit.rb +0 -154
  155. data/lib/activeresource/test/cases/active_job_serializer_test.rb +0 -53
  156. data/lib/activeresource/test/cases/association_test.rb +0 -104
  157. data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +0 -42
  158. data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +0 -28
  159. data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +0 -28
  160. data/lib/activeresource/test/cases/authorization_test.rb +0 -276
  161. data/lib/activeresource/test/cases/base/custom_methods_test.rb +0 -155
  162. data/lib/activeresource/test/cases/base/equality_test.rb +0 -53
  163. data/lib/activeresource/test/cases/base/load_test.rb +0 -249
  164. data/lib/activeresource/test/cases/base/schema_test.rb +0 -428
  165. data/lib/activeresource/test/cases/base_errors_test.rb +0 -129
  166. data/lib/activeresource/test/cases/base_test.rb +0 -1622
  167. data/lib/activeresource/test/cases/callbacks_test.rb +0 -155
  168. data/lib/activeresource/test/cases/collection_test.rb +0 -196
  169. data/lib/activeresource/test/cases/connection_test.rb +0 -357
  170. data/lib/activeresource/test/cases/finder_test.rb +0 -217
  171. data/lib/activeresource/test/cases/format_test.rb +0 -137
  172. data/lib/activeresource/test/cases/http_mock_test.rb +0 -213
  173. data/lib/activeresource/test/cases/inheritence_test.rb +0 -19
  174. data/lib/activeresource/test/cases/inheriting_hash_test.rb +0 -25
  175. data/lib/activeresource/test/cases/log_subscriber_test.rb +0 -64
  176. data/lib/activeresource/test/cases/reflection_test.rb +0 -65
  177. data/lib/activeresource/test/cases/validations_test.rb +0 -78
  178. data/lib/activeresource/test/fixtures/address.rb +0 -20
  179. data/lib/activeresource/test/fixtures/beast.rb +0 -16
  180. data/lib/activeresource/test/fixtures/comment.rb +0 -5
  181. data/lib/activeresource/test/fixtures/customer.rb +0 -5
  182. data/lib/activeresource/test/fixtures/fixtures.rbi +0 -46
  183. data/lib/activeresource/test/fixtures/inventory.rb +0 -14
  184. data/lib/activeresource/test/fixtures/person.rb +0 -15
  185. data/lib/activeresource/test/fixtures/pet.rb +0 -6
  186. data/lib/activeresource/test/fixtures/post.rb +0 -5
  187. data/lib/activeresource/test/fixtures/product.rb +0 -11
  188. data/lib/activeresource/test/fixtures/project.rb +0 -19
  189. data/lib/activeresource/test/fixtures/proxy.rb +0 -6
  190. data/lib/activeresource/test/fixtures/sound.rb +0 -11
  191. data/lib/activeresource/test/fixtures/street_address.rb +0 -6
  192. data/lib/activeresource/test/fixtures/subscription_plan.rb +0 -7
  193. data/lib/activeresource/test/fixtures/weather.rb +0 -21
  194. data/lib/activeresource/test/setter_trap.rb +0 -28
  195. data/lib/activeresource/test/singleton_test.rb +0 -138
  196. data/lib/activeresource/test/threadsafe_attributes_test.rb +0 -91
  197. data/sorbet/config +0 -6
  198. data/sorbet/rbi/annotations/.gitattributes +0 -1
  199. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  200. data/sorbet/rbi/annotations/activesupport.rbi +0 -457
  201. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  202. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  203. data/sorbet/rbi/dsl/.gitattributes +0 -1
  204. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -21
  205. data/sorbet/rbi/gems/.gitattributes +0 -1
  206. data/sorbet/rbi/gems/actioncable@8.0.1.rbi +0 -252
  207. data/sorbet/rbi/gems/actionmailbox@8.0.1.rbi +0 -9
  208. data/sorbet/rbi/gems/actionmailer@8.0.1.rbi +0 -9
  209. data/sorbet/rbi/gems/actionpack@8.0.1.rbi +0 -21111
  210. data/sorbet/rbi/gems/actiontext@8.0.1.rbi +0 -9
  211. data/sorbet/rbi/gems/actionview@8.0.1.rbi +0 -16409
  212. data/sorbet/rbi/gems/activejob@8.0.1.rbi +0 -90
  213. data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +0 -166
  214. data/sorbet/rbi/gems/activemodel@8.0.1.rbi +0 -6865
  215. data/sorbet/rbi/gems/activerecord@8.0.1.rbi +0 -43277
  216. data/sorbet/rbi/gems/activestorage@8.0.1.rbi +0 -9
  217. data/sorbet/rbi/gems/activesupport@8.0.1.rbi +0 -21426
  218. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  219. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  220. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  221. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
  222. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  223. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  224. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3607
  225. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  226. data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +0 -11645
  227. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  228. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  229. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  230. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -1131
  231. data/sorbet/rbi/gems/docile@1.4.1.rbi +0 -377
  232. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  233. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -150
  234. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  235. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  236. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  237. data/sorbet/rbi/gems/json@2.9.0.rbi +0 -1944
  238. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  239. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +0 -240
  240. data/sorbet/rbi/gems/logger@1.6.3.rbi +0 -940
  241. data/sorbet/rbi/gems/loofah@2.23.1.rbi +0 -1081
  242. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  243. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  244. data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -304
  245. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  246. data/sorbet/rbi/gems/minitest@5.25.4.rbi +0 -1547
  247. data/sorbet/rbi/gems/mocha@2.7.1.rbi +0 -12
  248. data/sorbet/rbi/gems/msgpack@1.7.5.rbi +0 -320
  249. data/sorbet/rbi/gems/net-imap@0.5.2.rbi +0 -9
  250. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  251. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  252. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +0 -9
  253. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  254. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  255. data/sorbet/rbi/gems/nokogiri@1.17.2.rbi +0 -8201
  256. data/sorbet/rbi/gems/parallel@1.26.3.rbi +0 -291
  257. data/sorbet/rbi/gems/parser@3.3.6.0.rbi +0 -5519
  258. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  259. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1151
  260. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10076
  261. data/sorbet/rbi/gems/psych@5.2.1.rbi +0 -1785
  262. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  263. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +0 -727
  264. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +0 -747
  265. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4905
  266. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  267. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -758
  268. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  269. data/sorbet/rbi/gems/rails@8.0.1.rbi +0 -9
  270. data/sorbet/rbi/gems/railties@8.0.1.rbi +0 -6347
  271. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  272. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3028
  273. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  274. data/sorbet/rbi/gems/rdoc@6.9.1.rbi +0 -12593
  275. data/sorbet/rbi/gems/regexp_parser@2.9.3.rbi +0 -3772
  276. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2454
  277. data/sorbet/rbi/gems/rexml@3.4.0.rbi +0 -4871
  278. data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +0 -11284
  279. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +0 -8183
  280. data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +0 -5341
  281. data/sorbet/rbi/gems/rspec-support@3.13.2.rbi +0 -1630
  282. data/sorbet/rbi/gems/rspec@3.13.0.rbi +0 -83
  283. data/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +0 -7713
  284. data/sorbet/rbi/gems/rubocop-md@1.2.4.rbi +0 -123
  285. data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +0 -2613
  286. data/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +0 -388
  287. data/sorbet/rbi/gems/rubocop-performance@1.23.0.rbi +0 -9
  288. data/sorbet/rbi/gems/rubocop-rails@2.27.0.rbi +0 -9535
  289. data/sorbet/rbi/gems/rubocop@1.69.2.rbi +0 -59600
  290. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  291. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  292. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -78
  293. data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +0 -225
  294. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  295. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  296. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  297. data/sorbet/rbi/gems/sqlite3@2.3.1.rbi +0 -1824
  298. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +0 -9
  299. data/sorbet/rbi/gems/standard-performance@1.6.0.rbi +0 -9
  300. data/sorbet/rbi/gems/standard@1.43.0.rbi +0 -926
  301. data/sorbet/rbi/gems/stringio@3.1.2.rbi +0 -9
  302. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +0 -3597
  303. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  304. data/sorbet/rbi/gems/timeout@0.4.2.rbi +0 -151
  305. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  306. data/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi +0 -130
  307. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +0 -251
  308. data/sorbet/rbi/gems/uri@1.0.2.rbi +0 -2377
  309. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  310. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +0 -9
  311. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  312. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  313. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18504
  314. data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +0 -9
  315. data/sorbet/tapioca/config.yml +0 -13
  316. data/sorbet/tapioca/require.rb +0 -13
@@ -1,758 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `rails-dom-testing` gem.
5
- # Please instead update this file by running `bin/tapioca gem rails-dom-testing`.
6
-
7
-
8
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3
9
- module Rails
10
- class << self
11
- # source://railties/8.0.1/lib/rails.rb#44
12
- def app_class; end
13
-
14
- # source://railties/8.0.1/lib/rails.rb#44
15
- def app_class=(_arg0); end
16
-
17
- # source://railties/8.0.1/lib/rails.rb#45
18
- def application; end
19
-
20
- # source://railties/8.0.1/lib/rails.rb#43
21
- def application=(_arg0); end
22
-
23
- # source://railties/8.0.1/lib/rails.rb#126
24
- def autoloaders; end
25
-
26
- # source://railties/8.0.1/lib/rails.rb#56
27
- def backtrace_cleaner; end
28
-
29
- # source://railties/8.0.1/lib/rails.rb#44
30
- def cache; end
31
-
32
- # source://railties/8.0.1/lib/rails.rb#44
33
- def cache=(_arg0); end
34
-
35
- # source://railties/8.0.1/lib/rails.rb#52
36
- def configuration; end
37
-
38
- # source://railties/8.0.1/lib/rails/deprecator.rb#4
39
- def deprecator; end
40
-
41
- # source://railties/8.0.1/lib/rails.rb#75
42
- def env; end
43
-
44
- # source://railties/8.0.1/lib/rails.rb#82
45
- def env=(environment); end
46
-
47
- # source://railties/8.0.1/lib/rails.rb#93
48
- def error; end
49
-
50
- # source://railties/8.0.1/lib/rails/gem_version.rb#5
51
- def gem_version; end
52
-
53
- # source://railties/8.0.1/lib/rails.rb#106
54
- def groups(*groups); end
55
-
56
- # source://railties/8.0.1/lib/rails.rb#49
57
- def initialize!(*_arg0, **_arg1, &_arg2); end
58
-
59
- # source://railties/8.0.1/lib/rails.rb#49
60
- def initialized?(*_arg0, **_arg1, &_arg2); end
61
-
62
- # source://railties/8.0.1/lib/rails.rb#44
63
- def logger; end
64
-
65
- # source://railties/8.0.1/lib/rails.rb#44
66
- def logger=(_arg0); end
67
-
68
- # source://railties/8.0.1/lib/rails.rb#122
69
- def public_path; end
70
-
71
- # source://railties/8.0.1/lib/rails.rb#65
72
- def root; end
73
-
74
- # source://railties/8.0.1/lib/rails/version.rb#7
75
- def version; end
76
- end
77
- end
78
-
79
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4
80
- module Rails::Dom; end
81
-
82
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5
83
- module Rails::Dom::Testing
84
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
85
- def default_html_version; end
86
-
87
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
88
- def default_html_version=(val); end
89
-
90
- class << self
91
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
92
- def default_html_version; end
93
-
94
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
95
- def default_html_version=(val); end
96
-
97
- # @return [Boolean]
98
- #
99
- # source://rails-dom-testing//lib/rails/dom/testing.rb#15
100
- def html5_support?; end
101
-
102
- # source://rails-dom-testing//lib/rails/dom/testing.rb#19
103
- def html_document(html_version: T.unsafe(nil)); end
104
-
105
- # source://rails-dom-testing//lib/rails/dom/testing.rb#26
106
- def html_document_fragment(html_version: T.unsafe(nil)); end
107
-
108
- private
109
-
110
- # source://rails-dom-testing//lib/rails/dom/testing.rb#34
111
- def choose_html_parser(parser_classes, html_version: T.unsafe(nil)); end
112
- end
113
- end
114
-
115
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#6
116
- module Rails::Dom::Testing::Assertions
117
- include ::Rails::Dom::Testing::Assertions::DomAssertions
118
- include ::Rails::Dom::Testing::Assertions::SelectorAssertions
119
- end
120
-
121
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#7
122
- module Rails::Dom::Testing::Assertions::DomAssertions
123
- # \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order)
124
- #
125
- # # assert that the referenced method generates the appropriate HTML string
126
- # assert_dom_equal(
127
- # '<a href="http://www.example.com">Apples</a>',
128
- # link_to("Apples", "http://www.example.com"),
129
- # )
130
- #
131
- # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces
132
- # and newlines). If you want stricter matching with exact matching for whitespace, pass
133
- # <tt>strict: true</tt>:
134
- #
135
- # # these assertions will both pass
136
- # assert_dom_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: false
137
- # assert_dom_not_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: true
138
- #
139
- # The DOMs are created using an HTML parser specified by
140
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
141
- #
142
- # When testing in a Rails application, the parser default can also be set by setting
143
- # +Rails.application.config.dom_testing_default_html_version+.
144
- #
145
- # If you want to specify the HTML parser just for a particular assertion, pass
146
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
147
- #
148
- # assert_dom_equal expected, actual, html_version: :html5
149
- #
150
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#35
151
- def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end
152
-
153
- # The negated form of +assert_dom_equal+.
154
- #
155
- # # assert that the referenced method does not generate the specified HTML string
156
- # assert_dom_not_equal(
157
- # '<a href="http://www.example.com">Apples</a>',
158
- # link_to("Oranges", "http://www.example.com"),
159
- # )
160
- #
161
- # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces
162
- # and newlines). If you want stricter matching with exact matching for whitespace, pass
163
- # <tt>strict: true</tt>:
164
- #
165
- # # these assertions will both pass
166
- # assert_dom_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: false
167
- # assert_dom_not_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: true
168
- #
169
- # The DOMs are created using an HTML parser specified by
170
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
171
- #
172
- # When testing in a Rails application, the parser default can also be set by setting
173
- # +Rails.application.config.dom_testing_default_html_version+.
174
- #
175
- # If you want to specify the HTML parser just for a particular assertion, pass
176
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
177
- #
178
- # assert_dom_not_equal expected, actual, html_version: :html5
179
- #
180
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68
181
- def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end
182
-
183
- protected
184
-
185
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#75
186
- def compare_doms(expected, actual, strict); end
187
-
188
- # @return [Boolean]
189
- #
190
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#128
191
- def equal_attribute?(attr, other_attr); end
192
-
193
- # @return [Boolean]
194
- #
195
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#115
196
- def equal_attribute_nodes?(nodes, other_nodes); end
197
-
198
- # @return [Boolean]
199
- #
200
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#107
201
- def equal_child?(child, other_child, strict); end
202
-
203
- # @return [Boolean]
204
- #
205
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#95
206
- def equal_children?(child, other_child, strict); end
207
-
208
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#87
209
- def extract_children(node, strict); end
210
-
211
- private
212
-
213
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#133
214
- def fragment(text, html_version: T.unsafe(nil)); end
215
- end
216
-
217
- # Adds the +assert_dom+ method for use in Rails functional
218
- # test cases, which can be used to make assertions on the response HTML of a controller
219
- # action. You can also call +assert_dom+ within another +assert_dom+ to
220
- # make assertions on elements selected by the enclosing assertion.
221
- #
222
- # Use +css_select+ to select elements without making an assertions, either
223
- # from the response HTML or elements selected by the enclosing assertion.
224
- #
225
- # In addition to HTML responses, you can make the following assertions:
226
- #
227
- # * +assert_dom_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions.
228
- # * +assert_dom_email+ - Assertions on the HTML body of an e-mail.
229
- #
230
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#7
231
- module Rails::Dom::Testing::Assertions::SelectorAssertions
232
- # An assertion that selects elements and makes one or more equality tests.
233
- #
234
- # If the first argument is an element, selects all matching elements
235
- # starting from (and including) that element and all its children in
236
- # depth-first order.
237
- #
238
- # If no element is specified +assert_dom+ selects from
239
- # the element returned in +document_root_element+
240
- # unless +assert_dom+ is called from within an +assert_dom+ block.
241
- # Override +document_root_element+ to tell +assert_dom+ what to select from.
242
- # The default implementation raises an exception explaining this.
243
- #
244
- # When called with a block +assert_dom+ passes an array of selected elements
245
- # to the block. Calling +assert_dom+ from the block, with no element specified,
246
- # runs the assertion on the complete set of elements selected by the enclosing assertion.
247
- # Alternatively the array may be iterated through so that +assert_dom+ can be called
248
- # separately for each element.
249
- #
250
- #
251
- # ==== Example
252
- # If the response contains two ordered lists, each with four list elements then:
253
- # assert_dom "ol" do |elements|
254
- # elements.each do |element|
255
- # assert_dom element, "li", 4
256
- # end
257
- # end
258
- #
259
- # will pass, as will:
260
- # assert_dom "ol" do
261
- # assert_dom "li", 8
262
- # end
263
- #
264
- # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression
265
- # with substitution values (Array).
266
- # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution.
267
- # assert_dom returns nil if called with an invalid css selector.
268
- #
269
- # assert_dom "div:match('id', ?)", "id_string"
270
- # assert_dom "div:match('id', ?)", :id_string
271
- # assert_dom "div:match('id', ?)", 1
272
- # assert_dom "div:match('id', ?)", /\d+/
273
- #
274
- # === Equality Tests
275
- #
276
- # The equality test may be one of the following:
277
- # * <tt>true</tt> - Assertion is true if at least one element selected.
278
- # * <tt>false</tt> - Assertion is true if no element selected.
279
- # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
280
- # one element matches the string or regular expression.
281
- # * <tt>Integer</tt> - Assertion is true if exactly that number of
282
- # elements are selected.
283
- # * <tt>Range</tt> - Assertion is true if the number of selected
284
- # elements fit the range.
285
- # If no equality test specified, the assertion is true if at least one
286
- # element selected.
287
- #
288
- # To perform more than one equality tests, use a hash with the following keys:
289
- # * <tt>:text</tt> - Narrow the selection to elements that have this text
290
- # value (string or regexp).
291
- # * <tt>:html</tt> - Narrow the selection to elements that have this HTML
292
- # content (string or regexp).
293
- # * <tt>:count</tt> - Assertion is true if the number of selected elements
294
- # is equal to this value.
295
- # * <tt>:minimum</tt> - Assertion is true if the number of selected
296
- # elements is at least this value.
297
- # * <tt>:maximum</tt> - Assertion is true if the number of selected
298
- # elements is at most this value.
299
- #
300
- # If the method is called with a block, once all equality tests are
301
- # evaluated the block is called with an array of all matched elements.
302
- #
303
- # # At least one form element
304
- # assert_dom "form"
305
- #
306
- # # Form element includes four input fields
307
- # assert_dom "form input", 4
308
- #
309
- # # Page title is "Welcome"
310
- # assert_dom "title", "Welcome"
311
- #
312
- # # Page title is "Welcome" and there is only one title element
313
- # assert_dom "title", {count: 1, text: "Welcome"},
314
- # "Wrong title or more than one title element"
315
- #
316
- # # Page contains no forms
317
- # assert_dom "form", false, "This page must contain no forms"
318
- #
319
- # # Test the content and style
320
- # assert_dom "body div.header ul.menu"
321
- #
322
- # # Use substitution values
323
- # assert_dom "ol>li:match('id', ?)", /item-\d+/
324
- #
325
- # # All input fields in the form have a name
326
- # assert_dom "form input" do
327
- # assert_dom ":match('name', ?)", /.+/ # Not empty
328
- # end
329
- #
330
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163
331
- def assert_dom(*args, &block); end
332
-
333
- # Extracts the body of an email and runs nested assertions on it.
334
- #
335
- # You must enable deliveries for this assertion to work, use:
336
- # ActionMailer::Base.perform_deliveries = true
337
- #
338
- # Example usage:
339
- #
340
- # assert_dom_email do
341
- # assert_dom "h1", "Email alert"
342
- # end
343
- #
344
- # assert_dom_email do
345
- # items = assert_dom "ol>li"
346
- # items.each do
347
- # # Work with items here...
348
- # end
349
- # end
350
- #
351
- # The DOM is created using an HTML parser specified by
352
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
353
- #
354
- # When testing in a Rails application, the parser default can also be set by setting
355
- # +Rails.application.config.dom_testing_default_html_version+.
356
- #
357
- # If you want to specify the HTML parser just for a particular assertion, pass
358
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
359
- #
360
- # assert_dom_email(html_version: :html5) do
361
- # assert_dom "h1", "Email alert"
362
- # end
363
- #
364
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285
365
- def assert_dom_email(html_version: T.unsafe(nil), &block); end
366
-
367
- # Extracts the content of an element, treats it as encoded HTML and runs
368
- # nested assertion on it.
369
- #
370
- # You typically call this method within another assertion to operate on
371
- # all currently selected elements. You can also pass an element or array
372
- # of elements.
373
- #
374
- # The content of each element is un-encoded, and wrapped in the root
375
- # element +encoded+. It then calls the block with all un-encoded elements.
376
- #
377
- # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
378
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
379
- # # Select each entry item and then the title item
380
- # assert_dom "entry>title" do
381
- # # Run assertions on the encoded title elements
382
- # assert_dom_encoded do
383
- # assert_dom "b"
384
- # end
385
- # end
386
- # end
387
- #
388
- #
389
- # # Selects all paragraph tags from within the description of an RSS feed
390
- # assert_dom "rss[version=2.0]" do
391
- # # Select description element of each feed item.
392
- # assert_dom "channel>item>description" do
393
- # # Run assertions on the encoded elements.
394
- # assert_dom_encoded do
395
- # assert_dom "p"
396
- # end
397
- # end
398
- # end
399
- #
400
- # The DOM is created using an HTML parser specified by
401
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
402
- #
403
- # When testing in a Rails application, the parser default can also be set by setting
404
- # +Rails.application.config.dom_testing_default_html_version+.
405
- #
406
- # If you want to specify the HTML parser just for a particular assertion, pass
407
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
408
- #
409
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
410
- # assert_dom "entry>title" do
411
- # assert_dom_encoded(html_version: :html5) do
412
- # assert_dom "b"
413
- # end
414
- # end
415
- # end
416
- #
417
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232
418
- def assert_dom_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end
419
-
420
- # An assertion that selects elements and makes one or more equality tests.
421
- #
422
- # If the first argument is an element, selects all matching elements
423
- # starting from (and including) that element and all its children in
424
- # depth-first order.
425
- #
426
- # If no element is specified +assert_dom+ selects from
427
- # the element returned in +document_root_element+
428
- # unless +assert_dom+ is called from within an +assert_dom+ block.
429
- # Override +document_root_element+ to tell +assert_dom+ what to select from.
430
- # The default implementation raises an exception explaining this.
431
- #
432
- # When called with a block +assert_dom+ passes an array of selected elements
433
- # to the block. Calling +assert_dom+ from the block, with no element specified,
434
- # runs the assertion on the complete set of elements selected by the enclosing assertion.
435
- # Alternatively the array may be iterated through so that +assert_dom+ can be called
436
- # separately for each element.
437
- #
438
- #
439
- # ==== Example
440
- # If the response contains two ordered lists, each with four list elements then:
441
- # assert_dom "ol" do |elements|
442
- # elements.each do |element|
443
- # assert_dom element, "li", 4
444
- # end
445
- # end
446
- #
447
- # will pass, as will:
448
- # assert_dom "ol" do
449
- # assert_dom "li", 8
450
- # end
451
- #
452
- # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression
453
- # with substitution values (Array).
454
- # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution.
455
- # assert_dom returns nil if called with an invalid css selector.
456
- #
457
- # assert_dom "div:match('id', ?)", "id_string"
458
- # assert_dom "div:match('id', ?)", :id_string
459
- # assert_dom "div:match('id', ?)", 1
460
- # assert_dom "div:match('id', ?)", /\d+/
461
- #
462
- # === Equality Tests
463
- #
464
- # The equality test may be one of the following:
465
- # * <tt>true</tt> - Assertion is true if at least one element selected.
466
- # * <tt>false</tt> - Assertion is true if no element selected.
467
- # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
468
- # one element matches the string or regular expression.
469
- # * <tt>Integer</tt> - Assertion is true if exactly that number of
470
- # elements are selected.
471
- # * <tt>Range</tt> - Assertion is true if the number of selected
472
- # elements fit the range.
473
- # If no equality test specified, the assertion is true if at least one
474
- # element selected.
475
- #
476
- # To perform more than one equality tests, use a hash with the following keys:
477
- # * <tt>:text</tt> - Narrow the selection to elements that have this text
478
- # value (string or regexp).
479
- # * <tt>:html</tt> - Narrow the selection to elements that have this HTML
480
- # content (string or regexp).
481
- # * <tt>:count</tt> - Assertion is true if the number of selected elements
482
- # is equal to this value.
483
- # * <tt>:minimum</tt> - Assertion is true if the number of selected
484
- # elements is at least this value.
485
- # * <tt>:maximum</tt> - Assertion is true if the number of selected
486
- # elements is at most this value.
487
- #
488
- # If the method is called with a block, once all equality tests are
489
- # evaluated the block is called with an array of all matched elements.
490
- #
491
- # # At least one form element
492
- # assert_dom "form"
493
- #
494
- # # Form element includes four input fields
495
- # assert_dom "form input", 4
496
- #
497
- # # Page title is "Welcome"
498
- # assert_dom "title", "Welcome"
499
- #
500
- # # Page title is "Welcome" and there is only one title element
501
- # assert_dom "title", {count: 1, text: "Welcome"},
502
- # "Wrong title or more than one title element"
503
- #
504
- # # Page contains no forms
505
- # assert_dom "form", false, "This page must contain no forms"
506
- #
507
- # # Test the content and style
508
- # assert_dom "body div.header ul.menu"
509
- #
510
- # # Use substitution values
511
- # assert_dom "ol>li:match('id', ?)", /item-\d+/
512
- #
513
- # # All input fields in the form have a name
514
- # assert_dom "form input" do
515
- # assert_dom ":match('name', ?)", /.+/ # Not empty
516
- # end
517
- #
518
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163
519
- def assert_select(*args, &block); end
520
-
521
- # Extracts the body of an email and runs nested assertions on it.
522
- #
523
- # You must enable deliveries for this assertion to work, use:
524
- # ActionMailer::Base.perform_deliveries = true
525
- #
526
- # Example usage:
527
- #
528
- # assert_dom_email do
529
- # assert_dom "h1", "Email alert"
530
- # end
531
- #
532
- # assert_dom_email do
533
- # items = assert_dom "ol>li"
534
- # items.each do
535
- # # Work with items here...
536
- # end
537
- # end
538
- #
539
- # The DOM is created using an HTML parser specified by
540
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
541
- #
542
- # When testing in a Rails application, the parser default can also be set by setting
543
- # +Rails.application.config.dom_testing_default_html_version+.
544
- #
545
- # If you want to specify the HTML parser just for a particular assertion, pass
546
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
547
- #
548
- # assert_dom_email(html_version: :html5) do
549
- # assert_dom "h1", "Email alert"
550
- # end
551
- #
552
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#285
553
- def assert_select_email(html_version: T.unsafe(nil), &block); end
554
-
555
- # Extracts the content of an element, treats it as encoded HTML and runs
556
- # nested assertion on it.
557
- #
558
- # You typically call this method within another assertion to operate on
559
- # all currently selected elements. You can also pass an element or array
560
- # of elements.
561
- #
562
- # The content of each element is un-encoded, and wrapped in the root
563
- # element +encoded+. It then calls the block with all un-encoded elements.
564
- #
565
- # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
566
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
567
- # # Select each entry item and then the title item
568
- # assert_dom "entry>title" do
569
- # # Run assertions on the encoded title elements
570
- # assert_dom_encoded do
571
- # assert_dom "b"
572
- # end
573
- # end
574
- # end
575
- #
576
- #
577
- # # Selects all paragraph tags from within the description of an RSS feed
578
- # assert_dom "rss[version=2.0]" do
579
- # # Select description element of each feed item.
580
- # assert_dom "channel>item>description" do
581
- # # Run assertions on the encoded elements.
582
- # assert_dom_encoded do
583
- # assert_dom "p"
584
- # end
585
- # end
586
- # end
587
- #
588
- # The DOM is created using an HTML parser specified by
589
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
590
- #
591
- # When testing in a Rails application, the parser default can also be set by setting
592
- # +Rails.application.config.dom_testing_default_html_version+.
593
- #
594
- # If you want to specify the HTML parser just for a particular assertion, pass
595
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
596
- #
597
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
598
- # assert_dom "entry>title" do
599
- # assert_dom_encoded(html_version: :html5) do
600
- # assert_dom "b"
601
- # end
602
- # end
603
- # end
604
- #
605
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#232
606
- def assert_select_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end
607
-
608
- # Select and return all matching elements.
609
- #
610
- # If called with a single argument, uses that argument as a selector.
611
- # Called without an element +css_select+ selects from
612
- # the element returned in +document_root_element+
613
- #
614
- # The default implementation of +document_root_element+ raises an exception explaining this.
615
- #
616
- # Returns an empty Nokogiri::XML::NodeSet if no match is found.
617
- #
618
- # If called with two arguments, uses the first argument as the root
619
- # element and the second argument as the selector. Attempts to match the
620
- # root element and any of its children.
621
- # Returns an empty Nokogiri::XML::NodeSet if no match is found.
622
- #
623
- # The selector may be a CSS selector expression (String).
624
- # css_select returns nil if called with an invalid css selector.
625
- #
626
- # # Selects all div tags
627
- # divs = css_select("div")
628
- #
629
- # # Selects all paragraph tags and does something interesting
630
- # pars = css_select("p")
631
- # pars.each do |par|
632
- # # Do something fun with paragraphs here...
633
- # end
634
- #
635
- # # Selects all list items in unordered lists
636
- # items = css_select("ul>li")
637
- #
638
- # # Selects all form tags and then all inputs inside the form
639
- # forms = css_select("form")
640
- # forms.each do |form|
641
- # inputs = css_select(form, "input")
642
- # ...
643
- # end
644
- #
645
- # @raise [ArgumentError]
646
- #
647
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#58
648
- def css_select(*args); end
649
-
650
- private
651
-
652
- # +equals+ must contain :minimum, :maximum and :count keys
653
- #
654
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#307
655
- def assert_size_match!(size, equals, css_selector, message = T.unsafe(nil)); end
656
-
657
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#319
658
- def count_description(min, max, count); end
659
-
660
- # @raise [NotImplementedError]
661
- #
662
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#301
663
- def document_root_element; end
664
-
665
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#335
666
- def nest_selection(selection); end
667
-
668
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#344
669
- def nodeset(node); end
670
-
671
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#331
672
- def pluralize_element(quantity); end
673
- end
674
-
675
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#12
676
- class Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector
677
- include ::Minitest::Assertions
678
-
679
- # @return [HTMLSelector] a new instance of HTMLSelector
680
- #
681
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#17
682
- def initialize(values, previous_selection = T.unsafe(nil), &root_fallback); end
683
-
684
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46
685
- def context; end
686
-
687
- # Returns the value of attribute css_selector.
688
- #
689
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
690
- def css_selector; end
691
-
692
- # Returns the value of attribute message.
693
- #
694
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
695
- def message; end
696
-
697
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39
698
- def select; end
699
-
700
- # @return [Boolean]
701
- #
702
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33
703
- def selecting_no_body?; end
704
-
705
- # Returns the value of attribute tests.
706
- #
707
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
708
- def tests; end
709
-
710
- private
711
-
712
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#100
713
- def extract_equality_tests; end
714
-
715
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#72
716
- def extract_root(previous_selection, root_fallback); end
717
-
718
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#89
719
- def extract_selectors; end
720
-
721
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#48
722
- def filter(matches); end
723
-
724
- class << self
725
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46
726
- def context; end
727
- end
728
- end
729
-
730
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#44
731
- Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array)
732
-
733
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#8
734
- class Rails::Dom::Testing::Assertions::SelectorAssertions::SubstitutionContext
735
- # @return [SubstitutionContext] a new instance of SubstitutionContext
736
- #
737
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#9
738
- def initialize; end
739
-
740
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#20
741
- def match(matches, attribute, matcher); end
742
-
743
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13
744
- def substitute!(selector, values, format_for_presentation = T.unsafe(nil)); end
745
-
746
- private
747
-
748
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#25
749
- def matcher_for(value, format_for_presentation); end
750
-
751
- # @return [Boolean]
752
- #
753
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#36
754
- def substitutable?(value); end
755
- end
756
-
757
- # source://rails-dom-testing//lib/rails/dom/testing/railtie.rb#6
758
- class Rails::Dom::Testing::Railtie < ::Rails::Railtie; end