iron_admin 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +66 -30
  3. data/app/assets/config/iron_admin_manifest.js +12 -0
  4. data/app/components/iron_admin/dashboards/metric_card_component.html.haml +8 -3
  5. data/app/components/iron_admin/dashboards/metric_card_component.rb +21 -1
  6. data/app/components/iron_admin/form/belongs_to_component.rb +60 -6
  7. data/app/components/iron_admin/form/nested_form_component.html.haml +28 -0
  8. data/app/components/iron_admin/form/nested_form_component.rb +81 -0
  9. data/app/components/iron_admin/resources/data_table_component.html.haml +1 -1
  10. data/app/components/iron_admin/resources/data_table_component.rb +6 -0
  11. data/app/components/iron_admin/resources/show_field_component.rb +2 -0
  12. data/app/controllers/iron_admin/application_controller.rb +32 -1
  13. data/app/controllers/iron_admin/concerns/action_executable.rb +44 -0
  14. data/app/controllers/iron_admin/concerns/filterable.rb +84 -0
  15. data/app/controllers/iron_admin/concerns/json_params_coercion.rb +67 -0
  16. data/app/controllers/iron_admin/concerns/nested_permittable.rb +36 -0
  17. data/app/controllers/iron_admin/concerns/scopeable.rb +84 -0
  18. data/app/controllers/iron_admin/concerns/searchable.rb +13 -16
  19. data/app/controllers/iron_admin/exports_controller.rb +15 -11
  20. data/app/controllers/iron_admin/imports_controller.rb +83 -0
  21. data/app/controllers/iron_admin/live_controller.rb +12 -0
  22. data/app/controllers/iron_admin/resources_controller.rb +118 -117
  23. data/app/controllers/iron_admin/search_controller.rb +5 -5
  24. data/app/controllers/iron_admin/tools_controller.rb +63 -4
  25. data/app/helpers/iron_admin/application_helper.rb +33 -14
  26. data/app/helpers/iron_admin/field_display_helper.rb +160 -1
  27. data/app/javascript/iron_admin/controllers/cp_nested_form_controller.js +113 -0
  28. data/app/javascript/iron_admin/controllers/filter_operator_controller.js +10 -0
  29. data/app/javascript/iron_admin/index.js +4 -0
  30. data/app/views/iron_admin/dashboard/index.html.haml +7 -2
  31. data/app/views/iron_admin/form/_nested_row.html.haml +70 -0
  32. data/app/views/iron_admin/imports/new.html.haml +27 -0
  33. data/app/views/iron_admin/imports/preview.html.haml +31 -0
  34. data/app/views/iron_admin/resources/_form.html.haml +81 -5
  35. data/app/views/iron_admin/resources/action_form.html.haml +62 -0
  36. data/app/views/iron_admin/resources/bulk_action_form.html.haml +62 -0
  37. data/app/views/iron_admin/resources/index.html.haml +60 -18
  38. data/app/views/iron_admin/tools/action_form.html.haml +57 -0
  39. data/app/views/iron_admin/tools/show.html.haml +20 -1
  40. data/config/importmap.rb +2 -0
  41. data/config/locales/en.yml +36 -0
  42. data/config/routes.rb +7 -0
  43. data/docs/components/filter-components.md +60 -0
  44. data/docs/getting-started/installation.md +113 -27
  45. data/docs/getting-started/quick-start.md +17 -1
  46. data/docs/guides/authentication.md +7 -6
  47. data/docs/guides/custom-adapters.md +628 -0
  48. data/docs/guides/extending.md +132 -3
  49. data/docs/guides/fields.md +1 -1
  50. data/docs/guides/resources.md +78 -2
  51. data/docs/guides/troubleshooting.md +68 -10
  52. data/docs/reference/routes.md +10 -0
  53. data/lib/generators/iron_admin/install/install_generator.rb +49 -4
  54. data/lib/generators/iron_admin/install/templates/dashboard.rb.tt +5 -1
  55. data/lib/generators/iron_admin/install_audit/install_audit_generator.rb +26 -10
  56. data/lib/generators/iron_admin/resource/resource_generator.rb +1 -1
  57. data/lib/generators/iron_admin/resource/templates/resource.rb.tt +6 -2
  58. data/lib/iron_admin/action_field.rb +56 -0
  59. data/lib/iron_admin/adapters/active_record.rb +237 -0
  60. data/lib/iron_admin/adapters/base.rb +340 -0
  61. data/lib/iron_admin/adapters/http/column_descriptor.rb +10 -0
  62. data/lib/iron_admin/adapters/http/configuration.rb +27 -0
  63. data/lib/iron_admin/adapters/http/connection.rb +117 -0
  64. data/lib/iron_admin/adapters/http/model_proxy.rb +75 -0
  65. data/lib/iron_admin/adapters/http/query.rb +111 -0
  66. data/lib/iron_admin/adapters/http/record.rb +83 -0
  67. data/lib/iron_admin/adapters/http/type_inferrer.rb +51 -0
  68. data/lib/iron_admin/adapters/http.rb +241 -0
  69. data/lib/iron_admin/adapters/mongoid/association_wrapper.rb +74 -0
  70. data/lib/iron_admin/adapters/mongoid/column_descriptor.rb +10 -0
  71. data/lib/iron_admin/adapters/mongoid.rb +284 -0
  72. data/lib/iron_admin/adapters/registry.rb +44 -0
  73. data/lib/iron_admin/concerns/importable.rb +81 -0
  74. data/lib/iron_admin/concerns/live_updatable.rb +38 -0
  75. data/lib/iron_admin/concerns/nestable.rb +69 -0
  76. data/lib/iron_admin/concerns/soft_deletable.rb +61 -0
  77. data/lib/iron_admin/configuration.rb +20 -0
  78. data/lib/iron_admin/dashboard.rb +15 -20
  79. data/lib/iron_admin/engine.rb +35 -22
  80. data/lib/iron_admin/errors.rb +29 -0
  81. data/lib/iron_admin/field_inferrer.rb +61 -22
  82. data/lib/iron_admin/filters/active_record_query_builder.rb +63 -0
  83. data/lib/iron_admin/filters/base_query_builder.rb +55 -0
  84. data/lib/iron_admin/filters/http_query_builder.rb +39 -0
  85. data/lib/iron_admin/filters/mongoid_query_builder.rb +58 -0
  86. data/lib/iron_admin/filters/query_builder.rb +12 -0
  87. data/lib/iron_admin/import/column_mapper.rb +42 -0
  88. data/lib/iron_admin/import/import_preview.rb +10 -0
  89. data/lib/iron_admin/import/import_result.rb +10 -0
  90. data/lib/iron_admin/import/importer.rb +231 -0
  91. data/lib/iron_admin/import/parser/csv.rb +34 -0
  92. data/lib/iron_admin/import/parser/json.rb +36 -0
  93. data/lib/iron_admin/import/type_caster.rb +47 -0
  94. data/lib/iron_admin/live/broadcaster.rb +43 -0
  95. data/lib/iron_admin/live/poll_cache.rb +28 -0
  96. data/lib/iron_admin/live.rb +29 -0
  97. data/lib/iron_admin/nested_association.rb +15 -0
  98. data/lib/iron_admin/nested_attributes_validator.rb +25 -0
  99. data/lib/iron_admin/policy.rb +72 -13
  100. data/lib/iron_admin/resource.rb +149 -91
  101. data/lib/iron_admin/resource_registry.rb +77 -4
  102. data/lib/iron_admin/tool.rb +50 -0
  103. data/lib/iron_admin/tool_action.rb +73 -0
  104. data/lib/iron_admin/tool_context.rb +49 -0
  105. data/lib/iron_admin/version.rb +1 -1
  106. data/lib/iron_admin.rb +46 -10
  107. data/vendor/bundle/ruby/3.2.0/cache/addressable-2.9.0.gem +0 -0
  108. data/vendor/bundle/ruby/3.2.0/cache/crack-1.0.1.gem +0 -0
  109. data/vendor/bundle/ruby/3.2.0/cache/faraday-2.14.1.gem +0 -0
  110. data/vendor/bundle/ruby/3.2.0/cache/faraday-net_http-3.4.2.gem +0 -0
  111. data/vendor/bundle/ruby/3.2.0/cache/hashdiff-1.2.1.gem +0 -0
  112. data/vendor/bundle/ruby/3.2.0/cache/net-http-0.9.1.gem +0 -0
  113. data/vendor/bundle/ruby/3.2.0/cache/public_suffix-7.0.5.gem +0 -0
  114. data/vendor/bundle/ruby/3.2.0/cache/rexml-3.4.4.gem +0 -0
  115. data/vendor/bundle/ruby/3.2.0/cache/webmock-3.26.2.gem +0 -0
  116. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/bigdecimal.so +0 -0
  117. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/gem_make.out +6 -6
  118. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/bigdecimal-4.0.1/mkmf.log +25 -25
  119. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/date_core.so +0 -0
  120. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +6 -6
  121. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/mkmf.log +4 -4
  122. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/erb/escape.so +0 -0
  123. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/gem_make.out +6 -6
  124. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/erb-6.0.1/mkmf.log +2 -2
  125. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +6 -6
  126. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
  127. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +22 -22
  128. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/gem_make.out +6 -6
  129. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/generator.so +0 -0
  130. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/json/ext/parser.so +0 -0
  131. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/json-2.18.1/mkmf.log +9 -9
  132. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/gem_make.out +6 -6
  133. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/mkmf.log +12 -12
  134. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/nio4r-2.7.5/nio4r_ext.so +0 -0
  135. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/gem_make.out +6 -6
  136. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/mkmf.log +6 -6
  137. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/prism-1.9.0/prism/prism.so +0 -0
  138. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +6 -6
  139. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/mkmf.log +7 -7
  140. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/psych.so +0 -0
  141. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +6 -6
  142. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/racc/cparse.so +0 -0
  143. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/gem_make.out +6 -6
  144. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/redcarpet-3.6.1/redcarpet.so +0 -0
  145. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +6 -6
  146. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/mkmf.log +2 -2
  147. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/stringio.so +0 -0
  148. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/gem_make.out +6 -6
  149. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/websocket-driver-0.8.0/websocket_mask.so +0 -0
  150. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/CHANGELOG.md +326 -0
  151. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/LICENSE.txt +202 -0
  152. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/README.md +121 -0
  153. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/native.rb +66 -0
  154. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna/pure.rb +4710 -0
  155. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/idna.rb +26 -0
  156. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/template.rb +1040 -0
  157. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/uri.rb +2602 -0
  158. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable/version.rb +31 -0
  159. data/vendor/bundle/ruby/3.2.0/gems/addressable-2.9.0/lib/addressable.rb +4 -0
  160. data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/ext/bigdecimal/Makefile +3 -3
  161. data/vendor/bundle/ruby/3.2.0/gems/bigdecimal-4.0.1/lib/bigdecimal.so +0 -0
  162. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/History +58 -0
  163. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/LICENSE +20 -0
  164. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/README.md +43 -0
  165. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/json.rb +113 -0
  166. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/util.rb +17 -0
  167. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/version.rb +3 -0
  168. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack/xml.rb +240 -0
  169. data/vendor/bundle/ruby/3.2.0/gems/crack-1.0.1/lib/crack.rb +8 -0
  170. data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date/Makefile +3 -3
  171. data/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/lib/date_core.so +0 -0
  172. data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/ext/erb/escape/Makefile +3 -3
  173. data/vendor/bundle/ruby/3.2.0/gems/erb-6.0.1/lib/erb/escape.so +0 -0
  174. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/CHANGELOG.md +574 -0
  175. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/LICENSE.md +20 -0
  176. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/README.md +67 -0
  177. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/Rakefile +12 -0
  178. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_spec.rb +119 -0
  179. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/examples/client_test.rb +144 -0
  180. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter/test.rb +311 -0
  181. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter.rb +101 -0
  182. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/adapter_registry.rb +30 -0
  183. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/connection.rb +565 -0
  184. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/flat_params_encoder.rb +105 -0
  185. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/encoders/nested_params_encoder.rb +183 -0
  186. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/error.rb +202 -0
  187. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/logging/formatter.rb +118 -0
  188. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/methods.rb +6 -0
  189. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware.rb +72 -0
  190. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/middleware_registry.rb +83 -0
  191. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/connection_options.rb +23 -0
  192. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/env.rb +204 -0
  193. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/proxy_options.rb +38 -0
  194. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/request_options.rb +23 -0
  195. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options/ssl_options.rb +76 -0
  196. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/options.rb +219 -0
  197. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/parameters.rb +5 -0
  198. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/rack_builder.rb +248 -0
  199. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/authorization.rb +54 -0
  200. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/instrumentation.rb +58 -0
  201. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/json.rb +70 -0
  202. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request/url_encoded.rb +60 -0
  203. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/request.rb +139 -0
  204. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/json.rb +74 -0
  205. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/logger.rb +39 -0
  206. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response/raise_error.rb +83 -0
  207. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/response.rb +95 -0
  208. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/headers.rb +150 -0
  209. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils/params_hash.rb +61 -0
  210. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/utils.rb +121 -0
  211. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday/version.rb +5 -0
  212. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/lib/faraday.rb +158 -0
  213. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/external_adapters/faraday_specs_setup.rb +14 -0
  214. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter/test_spec.rb +442 -0
  215. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_registry_spec.rb +28 -0
  216. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/adapter_spec.rb +55 -0
  217. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/connection_spec.rb +841 -0
  218. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/error_spec.rb +175 -0
  219. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_registry_spec.rb +31 -0
  220. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/middleware_spec.rb +213 -0
  221. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/env_spec.rb +76 -0
  222. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/options_spec.rb +297 -0
  223. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/proxy_options_spec.rb +79 -0
  224. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/options/request_options_spec.rb +19 -0
  225. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/flat_spec.rb +42 -0
  226. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/params_encoders/nested_spec.rb +151 -0
  227. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/rack_builder_spec.rb +317 -0
  228. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/authorization_spec.rb +118 -0
  229. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/instrumentation_spec.rb +74 -0
  230. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/json_spec.rb +199 -0
  231. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request/url_encoded_spec.rb +93 -0
  232. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/request_spec.rb +110 -0
  233. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/json_spec.rb +206 -0
  234. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/logger_spec.rb +299 -0
  235. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response/raise_error_spec.rb +286 -0
  236. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/response_spec.rb +84 -0
  237. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils/headers_spec.rb +109 -0
  238. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday/utils_spec.rb +120 -0
  239. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/faraday_spec.rb +43 -0
  240. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/spec_helper.rb +133 -0
  241. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/disabling_stub.rb +14 -0
  242. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/fake_safe_buffer.rb +15 -0
  243. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/faraday_middleware_subclasses.rb +18 -0
  244. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/helper_methods.rb +96 -0
  245. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/adapter.rb +105 -0
  246. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/params_encoder.rb +18 -0
  247. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/shared_examples/request_method.rb +263 -0
  248. data/vendor/bundle/ruby/3.2.0/gems/faraday-2.14.1/spec/support/streaming_response_checker.rb +35 -0
  249. data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/LICENSE.md +21 -0
  250. data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/README.md +57 -0
  251. data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/adapter/net_http.rb +206 -0
  252. data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http/version.rb +7 -0
  253. data/vendor/bundle/ruby/3.2.0/gems/faraday-net_http-3.4.2/lib/faraday/net_http.rb +10 -0
  254. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Gemfile +8 -0
  255. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/LICENSE +19 -0
  256. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/README.md +323 -0
  257. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/Rakefile +18 -0
  258. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/changelog.md +127 -0
  259. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/hashdiff.gemspec +39 -0
  260. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/compare_hashes.rb +101 -0
  261. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/diff.rb +185 -0
  262. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs.rb +66 -0
  263. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
  264. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/linear_compare_array.rb +159 -0
  265. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/patch.rb +88 -0
  266. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/util.rb +155 -0
  267. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff/version.rb +5 -0
  268. data/vendor/bundle/ruby/3.2.0/gems/hashdiff-1.2.1/lib/hashdiff.rb +10 -0
  269. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/ext/io/console/Makefile +3 -3
  270. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
  271. data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/generator/Makefile +3 -3
  272. data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/ext/json/ext/parser/Makefile +3 -3
  273. data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/generator.so +0 -0
  274. data/vendor/bundle/ruby/3.2.0/gems/json-2.18.1/lib/json/ext/parser.so +0 -0
  275. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/BSDL +22 -0
  276. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/COPYING +56 -0
  277. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/README.md +93 -0
  278. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/examples.rdoc +31 -0
  279. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/doc/net-http/included_getters.rdoc +3 -0
  280. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/exceptions.rb +35 -0
  281. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/generic_request.rb +429 -0
  282. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/header.rb +985 -0
  283. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/proxy_delta.rb +17 -0
  284. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/request.rb +88 -0
  285. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/requests.rb +444 -0
  286. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/response.rb +739 -0
  287. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/responses.rb +1242 -0
  288. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http/status.rb +84 -0
  289. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/http.rb +2608 -0
  290. data/vendor/bundle/ruby/3.2.0/gems/net-http-0.9.1/lib/net/https.rb +23 -0
  291. data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/ext/nio4r/Makefile +3 -3
  292. data/vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.5/lib/nio4r_ext.so +0 -0
  293. data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/ext/prism/Makefile +3 -3
  294. data/vendor/bundle/ruby/3.2.0/gems/prism-1.9.0/lib/prism/prism.so +0 -0
  295. data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/ext/psych/Makefile +3 -3
  296. data/vendor/bundle/ruby/3.2.0/gems/psych-5.3.1/lib/psych.so +0 -0
  297. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/CHANGELOG.md +649 -0
  298. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/Gemfile +16 -0
  299. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/LICENSE.txt +22 -0
  300. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/README.md +231 -0
  301. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/SECURITY.md +24 -0
  302. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/data/list.txt +16298 -0
  303. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/domain.rb +235 -0
  304. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/errors.rb +41 -0
  305. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/list.rb +247 -0
  306. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/rule.rb +350 -0
  307. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix/version.rb +14 -0
  308. data/vendor/bundle/ruby/3.2.0/gems/public_suffix-7.0.5/lib/public_suffix.rb +177 -0
  309. data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
  310. data/vendor/bundle/ruby/3.2.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
  311. data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/ext/redcarpet/Makefile +3 -3
  312. data/vendor/bundle/ruby/3.2.0/gems/redcarpet-3.6.1/lib/redcarpet.so +0 -0
  313. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
  314. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/NEWS.md +843 -0
  315. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/README.md +57 -0
  316. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/context.rdoc +143 -0
  317. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/child.rdoc +87 -0
  318. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/document.rdoc +276 -0
  319. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/element.rdoc +602 -0
  320. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/node.rdoc +97 -0
  321. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
  322. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
  323. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
  324. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
  325. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
  326. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
  327. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
  328. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/doc/rexml/tutorial.rdoc +1358 -0
  329. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attlistdecl.rb +63 -0
  330. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
  331. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
  332. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
  333. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
  334. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
  335. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
  336. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/attlistdecl.rb +11 -0
  337. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/dtd.rb +47 -0
  338. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/elementdecl.rb +18 -0
  339. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/entitydecl.rb +57 -0
  340. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/dtd/notationdecl.rb +40 -0
  341. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
  342. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
  343. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
  344. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/default.rb +116 -0
  345. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
  346. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/formatters/transitive.rb +58 -0
  347. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
  348. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
  349. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/light/node.rb +188 -0
  350. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
  351. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
  352. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/output.rb +30 -0
  353. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parent.rb +166 -0
  354. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
  355. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
  356. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/lightparser.rb +59 -0
  357. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
  358. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
  359. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
  360. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
  361. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/ultralightparser.rb +57 -0
  362. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
  363. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
  364. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
  365. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/sax2listener.rb +98 -0
  366. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
  367. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
  368. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/streamlistener.rb +93 -0
  369. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
  370. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/undefinednamespaceexception.rb +9 -0
  371. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
  372. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
  373. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/validation/validationexception.rb +10 -0
  374. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmldecl.rb +130 -0
  375. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xmltokens.rb +85 -0
  376. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
  377. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
  378. data/vendor/bundle/ruby/3.2.0/gems/rexml-3.4.4/lib/rexml.rb +3 -0
  379. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/ext/stringio/Makefile +3 -3
  380. data/vendor/bundle/ruby/3.2.0/gems/stringio-3.2.0/lib/stringio.so +0 -0
  381. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/CHANGELOG.md +2148 -0
  382. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/LICENSE +20 -0
  383. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/README.md +1229 -0
  384. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/api.rb +111 -0
  385. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/assertion_failure.rb +13 -0
  386. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/callback_registry.rb +37 -0
  387. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/config.rb +20 -0
  388. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/cucumber.rb +12 -0
  389. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/deprecation.rb +11 -0
  390. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/errors.rb +19 -0
  391. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +228 -0
  392. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/curb_adapter.rb +354 -0
  393. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +239 -0
  394. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/excon_adapter.rb +167 -0
  395. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter.rb +9 -0
  396. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +21 -0
  397. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
  398. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/request.rb +28 -0
  399. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/response.rb +95 -0
  400. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/streamer.rb +44 -0
  401. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb +77 -0
  402. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/http_rb_adapter.rb +39 -0
  403. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/httpclient_adapter.rb +260 -0
  404. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/manticore_adapter.rb +147 -0
  405. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http.rb +310 -0
  406. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/net_http_response.rb +36 -0
  407. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/patron_adapter.rb +132 -0
  408. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +190 -0
  409. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/any_arg_matcher.rb +15 -0
  410. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_argument_matcher.rb +23 -0
  411. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_excluding_matcher.rb +17 -0
  412. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/matchers/hash_including_matcher.rb +19 -0
  413. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/minitest.rb +43 -0
  414. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rack_response.rb +73 -0
  415. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_body_diff.rb +66 -0
  416. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_execution_verifier.rb +79 -0
  417. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_pattern.rb +428 -0
  418. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_registry.rb +37 -0
  419. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature.rb +56 -0
  420. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_signature_snippet.rb +63 -0
  421. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/request_stub.rb +134 -0
  422. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/response.rb +161 -0
  423. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/responses_sequence.rb +42 -0
  424. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/request_pattern_matcher.rb +80 -0
  425. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers/webmock_matcher.rb +69 -0
  426. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec/matchers.rb +29 -0
  427. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/rspec.rb +44 -0
  428. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_registry.rb +84 -0
  429. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/stub_request_snippet.rb +40 -0
  430. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/test_unit.rb +22 -0
  431. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_counter.rb +45 -0
  432. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_keys_stringifier.rb +27 -0
  433. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/hash_validator.rb +19 -0
  434. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/headers.rb +77 -0
  435. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/json.rb +72 -0
  436. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/parse_error.rb +7 -0
  437. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/parsers/xml.rb +16 -0
  438. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/query_mapper.rb +283 -0
  439. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/uri.rb +113 -0
  440. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/values_stringifier.rb +22 -0
  441. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/util/version_checker.rb +113 -0
  442. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/version.rb +5 -0
  443. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock/webmock.rb +175 -0
  444. data/vendor/bundle/ruby/3.2.0/gems/webmock-3.26.2/lib/webmock.rb +61 -0
  445. data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/ext/websocket-driver/Makefile +3 -3
  446. data/vendor/bundle/ruby/3.2.0/gems/websocket-driver-0.8.0/lib/websocket_mask.so +0 -0
  447. data/vendor/bundle/ruby/3.2.0/specifications/addressable-2.9.0.gemspec +29 -0
  448. data/vendor/bundle/ruby/3.2.0/specifications/crack-1.0.1.gemspec +27 -0
  449. data/vendor/bundle/ruby/3.2.0/specifications/faraday-2.14.1.gemspec +0 -0
  450. data/vendor/bundle/ruby/3.2.0/specifications/faraday-net_http-3.4.2.gemspec +26 -0
  451. data/vendor/bundle/ruby/3.2.0/specifications/hashdiff-1.2.1.gemspec +30 -0
  452. data/vendor/bundle/ruby/3.2.0/specifications/net-http-0.9.1.gemspec +27 -0
  453. data/vendor/bundle/ruby/3.2.0/specifications/public_suffix-7.0.5.gemspec +24 -0
  454. data/vendor/bundle/ruby/3.2.0/specifications/rexml-3.4.4.gemspec +25 -0
  455. data/vendor/bundle/ruby/3.2.0/specifications/webmock-3.26.2.gemspec +44 -0
  456. metadata +377 -2
@@ -0,0 +1,62 @@
1
+ = turbo_frame_tag "action-form-modal" do
2
+ .p-8.max-w-lg.mx-auto{ class: t.font_family }
3
+ %h2.text-xl.mb-6{ class: cp_heading }= @action[:name].to_s.humanize
4
+
5
+ = form_tag @form_url, method: :post, class: "space-y-4" do
6
+ - @form_fields.each do |field|
7
+ .space-y-1
8
+ %label.block.text-sm.font-medium{ class: cp_label_text, for: "action_form_#{field.name}" }
9
+ = field.label
10
+ - if field.required
11
+ %span.text-red-500 *
12
+
13
+ - case field.type
14
+ - when :text
15
+ = text_field_tag "action_form[#{field.name}]", field.default,
16
+ id: "action_form_#{field.name}",
17
+ class: cp_filter_input_class,
18
+ placeholder: field.placeholder,
19
+ required: field.required
20
+ - when :textarea
21
+ = text_area_tag "action_form[#{field.name}]", field.default,
22
+ id: "action_form_#{field.name}",
23
+ class: "#{cp_filter_input_class} h-24",
24
+ placeholder: field.placeholder,
25
+ required: field.required
26
+ - when :number
27
+ = number_field_tag "action_form[#{field.name}]", field.default,
28
+ id: "action_form_#{field.name}",
29
+ class: cp_filter_input_class,
30
+ placeholder: field.placeholder,
31
+ step: "any",
32
+ required: field.required
33
+ - when :boolean
34
+ .flex.items-center.gap-2
35
+ = check_box_tag "action_form[#{field.name}]", "1", field.default,
36
+ id: "action_form_#{field.name}",
37
+ class: "rounded border-gray-300"
38
+ %span.text-sm{ class: cp_body_text }= field.label
39
+ - when :date
40
+ = date_field_tag "action_form[#{field.name}]", field.default,
41
+ id: "action_form_#{field.name}",
42
+ class: cp_filter_input_class,
43
+ required: field.required
44
+ - when :datetime
45
+ = datetime_field_tag "action_form[#{field.name}]", field.default,
46
+ id: "action_form_#{field.name}",
47
+ class: cp_filter_input_class,
48
+ required: field.required
49
+ - when :select
50
+ %select{ name: "action_form[#{field.name}]", id: "action_form_#{field.name}",
51
+ class: cp_filter_input_class, required: field.required }
52
+ %option{ value: "" }= field.placeholder || "Select..."
53
+ - (field.options || []).each do |opt|
54
+ %option{ value: opt, selected: field.default == opt }= opt.to_s.humanize
55
+
56
+ - if params[:ids].present?
57
+ - Array(params[:ids]).each do |id|
58
+ = hidden_field_tag "ids[]", id
59
+
60
+ .flex.items-center.gap-3.pt-3.border-t.border-gray-100
61
+ %button{ type: "submit", class: cp_btn_primary }= I18n.t("iron_admin.resources.action_form.submit", default: "Execute")
62
+ = link_to I18n.t("iron_admin.form.cancel_button"), "javascript:history.back()", class: "text-sm #{cp_link_muted}"
@@ -1,10 +1,18 @@
1
+ - filters = iron_admin_visible_filters
2
+
1
3
  .p-8.max-w-7xl.mx-auto{ class: t.font_family }
2
4
  .flex.items-center.justify-between.mb-6
3
5
  %h1.text-2xl{ class: cp_heading }= @resource_class.label
4
- - if @resource_class.action_allowed?(:create)
5
- = link_to I18n.t("iron_admin.resources.index.new_button", model: @resource_class.model.model_name.human),
6
- new_resource_path(@resource_class.resource_name),
7
- class: cp_btn_primary
6
+ .flex.items-center.gap-2
7
+ - if @resource_class.import_enabled? && @resource_class.action_allowed?(:create)
8
+ = link_to resource_import_path(@resource_class.resource_name),
9
+ class: cp_btn_secondary do
10
+ = heroicon "arrow-up-tray", variant: :mini, options: { class: "h-4 w-4" }
11
+ %span= I18n.t("iron_admin.resources.index.import_button")
12
+ - if @resource_class.action_allowed?(:create)
13
+ = link_to I18n.t("iron_admin.resources.index.new_button", model: @resource_class.model.model_name.human),
14
+ new_resource_path(@resource_class.resource_name),
15
+ class: cp_btn_primary
8
16
 
9
17
  - if @resource_class.all_scopes.any? || @resource_class.searchable_columns.any?
10
18
  .flex.items-center.justify-between.mb-4
@@ -19,10 +27,18 @@
19
27
  - if @resource_class.searchable_columns.any?
20
28
  = form_tag resources_path(@resource_class.resource_name), method: :get, class: "flex ml-auto" do
21
29
  = hidden_field_tag :scope, @current_scope
22
- - @resource_class.defined_filters.each do |filter|
23
- - value = params.dig(:filters, filter[:name])
24
- - if value.present?
25
- = hidden_field_tag "filters[#{filter[:name]}]", value
30
+ - filters.each do |filter|
31
+ - if filter[:type].in?(%i[string number])
32
+ - sub = iron_admin_filter_param(filter[:name].to_s)
33
+ - if sub.is_a?(ActionController::Parameters) && sub["value"].present?
34
+ = hidden_field_tag "filters[#{filter[:name]}][op]", sub["op"]
35
+ = hidden_field_tag "filters[#{filter[:name]}][value]", sub["value"]
36
+ - if sub["value_2"].present?
37
+ = hidden_field_tag "filters[#{filter[:name]}][value_2]", sub["value_2"]
38
+ - else
39
+ - value = iron_admin_filter_param(filter[:name])
40
+ - if value.present?
41
+ = hidden_field_tag "filters[#{filter[:name]}]", value
26
42
  .relative
27
43
  .pointer-events-none.absolute.inset-y-0.left-0.flex.items-center{ class: "pl-3.5" }
28
44
  = heroicon "magnifying-glass", variant: :mini, options: { class: "h-4 w-4 #{cp_muted_text}" }
@@ -30,8 +46,8 @@
30
46
  placeholder: I18n.t("iron_admin.resources.index.search_placeholder"),
31
47
  class: cp_search_class
32
48
 
33
- - if @resource_class.defined_filters.any?
34
- - has_active_filters = @resource_class.defined_filters.any? { |f| params.dig(:filters, f[:name]).present? || params.dig(:filters, "#{f[:name]}_from").present? || params.dig(:filters, "#{f[:name]}_to").present? }
49
+ - if filters.any?
50
+ - has_active_filters = filters.any? { |f| iron_admin_active_filter?(f) }
35
51
  - select_chevron_style = "background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem;"
36
52
  .flex.justify-end.mb-4
37
53
  %details.relative.group{ open: has_active_filters || nil }
@@ -39,7 +55,7 @@
39
55
  = heroicon "funnel", variant: :mini, options: { class: "h-4 w-4 #{cp_muted_text}" }
40
56
  %span= I18n.t("iron_admin.resources.index.filters_label")
41
57
  - if has_active_filters
42
- - active_count = @resource_class.defined_filters.count { |f| params.dig(:filters, f[:name]).present? || params.dig(:filters, "#{f[:name]}_from").present? || params.dig(:filters, "#{f[:name]}_to").present? }
58
+ - active_count = filters.count { |f| iron_admin_active_filter?(f) }
43
59
  %span{ class: cp_badge_count }
44
60
  = active_count
45
61
  = heroicon "chevron-down", variant: :mini, options: { class: "h-4 w-4 text-gray-400 transition-transform group-open:rotate-180" }
@@ -48,7 +64,7 @@
48
64
  = hidden_field_tag :scope, @current_scope
49
65
  = hidden_field_tag :q, params[:q]
50
66
  .space-y-3
51
- - @resource_class.defined_filters.each do |filter|
67
+ - filters.each do |filter|
52
68
  .space-y-1
53
69
  %label.block.text-xs.font-semibold.uppercase.tracking-wider{ class: cp_muted_text }
54
70
  = filter[:name].to_s.humanize
@@ -57,20 +73,47 @@
57
73
  %select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
58
74
  %option{ value: "" }= I18n.t("iron_admin.resources.index.all_option")
59
75
  - filter_options_for(@resource_class, filter).each do |label, value|
60
- %option{ value: value, selected: params.dig(:filters, filter[:name]) == value.to_s }= label
76
+ %option{ value: value, selected: iron_admin_filter_param(filter[:name]) == value.to_s }= label
61
77
  - when :boolean
62
78
  %select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
63
79
  %option{ value: "" }= I18n.t("iron_admin.resources.index.all_option")
64
80
  - filter_options_for(@resource_class, filter).each do |label, value|
65
- %option{ value: value, selected: params.dig(:filters, filter[:name]) == value.to_s }= label
81
+ %option{ value: value, selected: iron_admin_filter_param(filter[:name]) == value.to_s }= label
66
82
  - when :date_range
67
83
  .space-y-2
68
- = date_field_tag "filters[#{filter[:name]}_from]", params.dig(:filters, "#{filter[:name]}_from"),
84
+ = date_field_tag "filters[#{filter[:name]}_from]", iron_admin_filter_param("#{filter[:name]}_from"),
69
85
  class: cp_filter_input_class,
70
86
  placeholder: I18n.t("iron_admin.filters.from")
71
- = date_field_tag "filters[#{filter[:name]}_to]", params.dig(:filters, "#{filter[:name]}_to"),
87
+ = date_field_tag "filters[#{filter[:name]}_to]", iron_admin_filter_param("#{filter[:name]}_to"),
72
88
  class: cp_filter_input_class,
73
89
  placeholder: I18n.t("iron_admin.filters.to")
90
+ - when :string
91
+ - string_ops = %w[contains equals starts_with ends_with]
92
+ - current_op = iron_admin_filter_param(filter[:name].to_s, "op") || "contains"
93
+ - current_val = iron_admin_filter_param(filter[:name].to_s, "value") || ""
94
+ .space-y-2
95
+ %select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}][op]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style }
96
+ - string_ops.each do |op|
97
+ %option{ value: op, selected: current_op == op }= I18n.t("iron_admin.filters.operators.#{op}")
98
+ = text_field_tag "filters[#{filter[:name]}][value]", current_val,
99
+ class: cp_filter_input_class,
100
+ placeholder: filter[:label] || filter[:name].to_s.humanize
101
+ - when :number
102
+ - number_ops = %w[equals greater_than less_than between]
103
+ - current_op = iron_admin_filter_param(filter[:name].to_s, "op") || "equals"
104
+ - current_val = iron_admin_filter_param(filter[:name].to_s, "value") || ""
105
+ - current_val_upper = iron_admin_filter_param(filter[:name].to_s, "value_2") || ""
106
+ .space-y-2{ data: { controller: "filter-operator" } }
107
+ %select.block.w-full.appearance-none.border.px-3.py-2.text-sm.shadow-sm.outline-none.transition.duration-150.ease-in-out{ name: "filters[#{filter[:name]}][op]", class: "#{t.border_radius} #{t.input_border} #{t.card_bg} #{cp_body_text} #{cp_focus}", style: select_chevron_style, data: { action: "change->filter-operator#toggle", filter_operator_target: "opSelect" } }
108
+ - number_ops.each do |op|
109
+ %option{ value: op, selected: current_op == op }= I18n.t("iron_admin.filters.operators.#{op}")
110
+ = number_field_tag "filters[#{filter[:name]}][value]", current_val,
111
+ class: cp_filter_input_class, step: "any",
112
+ placeholder: filter[:label] || filter[:name].to_s.humanize
113
+ .flex.items-center.gap-2{ data: { filter_operator_target: "betweenRow" }, class: current_op == "between" ? "" : "hidden" }
114
+ %span.text-xs{ class: cp_muted_text }= I18n.t("iron_admin.filters.between_separator")
115
+ = number_field_tag "filters[#{filter[:name]}][value_2]", current_val_upper,
116
+ class: cp_filter_input_class, step: "any"
74
117
  .flex.items-center.gap-3.mt-4.pt-3.border-t.border-gray-100
75
118
  %button{ type: "submit", class: cp_btn_filter_apply }= I18n.t("iron_admin.resources.index.apply_button")
76
119
  = link_to I18n.t("iron_admin.resources.index.clear_button"), resources_path(@resource_class.resource_name, scope: @current_scope, q: params[:q]),
@@ -122,7 +165,7 @@
122
165
  %td.px-6.py-8.text-center.text-sm{ colspan: (@fields.count { |f| f.visible?(iron_admin_current_user) }) + (has_bulk_actions ? 2 : 1), class: cp_muted_text }
123
166
  = I18n.t("iron_admin.resources.index.empty_state")
124
167
  - @records.each do |record|
125
- %tr{ class: cp_table_row_hover }
168
+ %tr{ id: ("iron_admin_#{@resource_class.resource_name}_row_#{record.id}" if @resource_class.live_index_enabled?), class: cp_table_row_hover }
126
169
  - if has_bulk_actions
127
170
  %td.px-6.py-4.w-4
128
171
  %input{ type: "checkbox", name: "ids[]", value: record.id, class: "rounded border-gray-300",
@@ -137,4 +180,3 @@
137
180
 
138
181
  .mt-4
139
182
  = render "iron_admin/shared/pagination", pagy: @pagy
140
-
@@ -0,0 +1,57 @@
1
+ .p-8.max-w-lg.mx-auto{ class: t.font_family }
2
+ %h2.text-xl.mb-6{ class: cp_heading }= @declared_action.label
3
+
4
+ = form_tag @form_url, method: :post, class: "space-y-4" do
5
+ - @form_fields.each do |field|
6
+ .space-y-1
7
+ %label.block.text-sm.font-medium{ class: cp_label_text, for: "tool_action_#{field.name}" }
8
+ = field.label
9
+ - if field.required
10
+ %span.text-red-500 *
11
+
12
+ - case field.type
13
+ - when :text
14
+ = text_field_tag "tool_action[#{field.name}]", field.default,
15
+ id: "tool_action_#{field.name}",
16
+ class: cp_filter_input_class,
17
+ placeholder: field.placeholder,
18
+ required: field.required
19
+ - when :textarea
20
+ = text_area_tag "tool_action[#{field.name}]", field.default,
21
+ id: "tool_action_#{field.name}",
22
+ class: "#{cp_filter_input_class} h-24",
23
+ placeholder: field.placeholder,
24
+ required: field.required
25
+ - when :number
26
+ = number_field_tag "tool_action[#{field.name}]", field.default,
27
+ id: "tool_action_#{field.name}",
28
+ class: cp_filter_input_class,
29
+ placeholder: field.placeholder,
30
+ step: "any",
31
+ required: field.required
32
+ - when :boolean
33
+ .flex.items-center.gap-2
34
+ = check_box_tag "tool_action[#{field.name}]", "1", field.default,
35
+ id: "tool_action_#{field.name}",
36
+ class: "rounded border-gray-300"
37
+ %span.text-sm{ class: cp_body_text }= field.label
38
+ - when :date
39
+ = date_field_tag "tool_action[#{field.name}]", field.default,
40
+ id: "tool_action_#{field.name}",
41
+ class: cp_filter_input_class,
42
+ required: field.required
43
+ - when :datetime
44
+ = datetime_field_tag "tool_action[#{field.name}]", field.default,
45
+ id: "tool_action_#{field.name}",
46
+ class: cp_filter_input_class,
47
+ required: field.required
48
+ - when :select
49
+ %select{ name: "tool_action[#{field.name}]", id: "tool_action_#{field.name}",
50
+ class: cp_filter_input_class, required: field.required }
51
+ %option{ value: "" }= field.placeholder || "Select..."
52
+ - (field.options || []).each do |opt|
53
+ %option{ value: opt, selected: field.default == opt }= opt.to_s.humanize
54
+
55
+ .flex.items-center.gap-3.pt-3.border-t.border-gray-100
56
+ %button{ type: "submit", class: cp_btn_primary }= I18n.t("iron_admin.tools.action_form.submit", default: "Execute")
57
+ = link_to I18n.t("iron_admin.form.cancel_button"), tool_path(@tool_class.tool_name), class: "text-sm #{cp_link_muted}"
@@ -3,5 +3,24 @@
3
3
  %h1.text-2xl{ class: cp_heading }= @tool_class.label
4
4
  .overflow-hidden{ class: cp_card }
5
5
  .p-6
6
- %p.text-sm{ class: cp_muted_text }
6
+ %p.text-sm.mb-6{ class: cp_muted_text }
7
7
  = @tool_class.label
8
+
9
+ - if @tool_class.defined_tool_actions.any?
10
+ .space-y-3
11
+ - @tool_class.defined_tool_actions.each do |action|
12
+ - next unless action.allowed?(iron_admin_current_user)
13
+ - if action.has_form?
14
+ = link_to tool_action_form_path(@tool_class.tool_name, action.name),
15
+ class: "#{t.btn_secondary} px-4 py-2 text-sm font-medium rounded-lg inline-flex items-center gap-2" do
16
+ - if action.icon
17
+ = heroicon action.icon, variant: :mini, options: { class: "h-4 w-4" }
18
+ = action.label
19
+ - else
20
+ = button_to tool_action_path(@tool_class.tool_name, action.name),
21
+ method: :post,
22
+ class: "#{t.btn_secondary} px-4 py-2 text-sm font-medium rounded-lg inline-flex items-center gap-2",
23
+ data: action.confirm ? { turbo_confirm: action.confirm_message || I18n.t("iron_admin.tools.confirm_default", default: "Are you sure?") } : {} do
24
+ - if action.icon
25
+ = heroicon action.icon, variant: :mini, options: { class: "h-4 w-4" }
26
+ = action.label
data/config/importmap.rb CHANGED
@@ -9,3 +9,5 @@ pin "@rails/actiontext", to: "actiontext.esm.js"
9
9
  pin "iron_admin", to: "iron_admin/index.js"
10
10
  pin "iron_admin/controllers/cp_bulk_select_controller", to: "iron_admin/controllers/cp_bulk_select_controller.js"
11
11
  pin "iron_admin/controllers/cp_chart_controller", to: "iron_admin/controllers/cp_chart_controller.js"
12
+ pin "iron_admin/controllers/cp_nested_form_controller", to: "iron_admin/controllers/cp_nested_form_controller.js"
13
+ pin "iron_admin/controllers/filter_operator_controller", to: "iron_admin/controllers/filter_operator_controller.js"
@@ -17,6 +17,7 @@ en:
17
17
  inaccessible: "Some records are not accessible"
18
18
  index:
19
19
  new_button: "New %{model}"
20
+ import_button: "Import"
20
21
  search_placeholder: "Search..."
21
22
  filters_label: "Filters"
22
23
  apply_button: "Apply"
@@ -36,6 +37,25 @@ en:
36
37
  view_link: "View"
37
38
  view_all: "View all"
38
39
  actions_label: "Actions"
40
+ imports:
41
+ new:
42
+ title: "Import %{model}"
43
+ subtitle: "Upload CSV or JSON data and preview mapped rows before importing."
44
+ file_label: "File"
45
+ format_label: "Format"
46
+ fields_label: "Importable fields"
47
+ preview_button: "Preview"
48
+ preview:
49
+ title: "Preview %{model} Import"
50
+ summary: "%{count} rows detected."
51
+ mapping_title: "Column mapping"
52
+ status_column: "Status"
53
+ valid_status: "Valid"
54
+ back_button: "Back"
55
+ create:
56
+ success: "Import finished: %{created} created, %{updated} updated, %{failed} failed."
57
+ errors:
58
+ missing_file: "Choose a file to import."
39
59
  fields:
40
60
  select_placeholder: "Select..."
41
61
  boolean_enable: "Enable %{field}"
@@ -47,12 +67,28 @@ en:
47
67
  color_placeholder: "#000000"
48
68
  number_placeholder: "0"
49
69
  currency_placeholder: "0.00"
70
+ radio_placeholder: "Select an option"
71
+ code_placeholder: "Enter code..."
72
+ key_value_placeholder: '{"key": "value"}'
73
+ progress_placeholder: "0"
50
74
  form:
51
75
  cancel_button: "Cancel"
52
76
  navigation:
53
77
  dashboard: "Dashboard"
78
+ nested_form:
79
+ add_button: "Add row"
80
+ remove_button: "Remove"
54
81
  filters:
55
82
  "true": "Yes"
56
83
  "false": "No"
57
84
  from: "From"
58
85
  to: "To"
86
+ operators:
87
+ contains: "Contains"
88
+ equals: "Equals"
89
+ starts_with: "Starts with"
90
+ ends_with: "Ends with"
91
+ greater_than: "Greater than"
92
+ less_than: "Less than"
93
+ between: "Between"
94
+ between_separator: "and"
data/config/routes.rb CHANGED
@@ -3,16 +3,23 @@ IronAdmin::Engine.routes.draw do
3
3
 
4
4
  get "search", to: "search#index", as: :search
5
5
  get "audit", to: "audit#index", as: :audit
6
+ get "live/:stream", to: "live#show", as: :live
6
7
  get "autocomplete/:resource_name", to: "resources#autocomplete", as: :autocomplete
7
8
  get ":resource_name/export", to: "exports#show", as: :export
9
+ get ":resource_name/import", to: "imports#new", as: :resource_import
10
+ post ":resource_name/import/preview", to: "imports#preview", as: :resource_import_preview
11
+ post ":resource_name/import", to: "imports#create"
8
12
 
9
13
  get "tools/:tool_name", to: "tools#show", as: :tool
14
+ get "tools/:tool_name/:action_name/form", to: "tools#action_form", as: :tool_action_form
10
15
  post "tools/:tool_name/:action_name", to: "tools#execute", as: :tool_action
11
16
 
17
+ get ":resource_name/bulk_actions/:action_name/form", to: "resources#bulk_action_form", as: :resource_bulk_action_form
12
18
  get ":resource_name", to: "resources#index", as: :resources
13
19
  get ":resource_name/new", to: "resources#new", as: :new_resource
14
20
  get ":resource_name/:id", to: "resources#show", as: :resource
15
21
  get ":resource_name/:id/edit", to: "resources#edit", as: :edit_resource
22
+ get ":resource_name/:id/actions/:action_name/form", to: "resources#action_form", as: :resource_action_form
16
23
  post ":resource_name", to: "resources#create"
17
24
  patch ":resource_name/:id", to: "resources#update"
18
25
  delete ":resource_name/:id", to: "resources#destroy"
@@ -80,6 +80,66 @@ IronAdmin::Filters::DateRangeComponent.new(
80
80
 
81
81
  ---
82
82
 
83
+ ## StringFilterComponent
84
+
85
+ Text input with an operator dropdown for string matching.
86
+
87
+ ```ruby
88
+ IronAdmin::Filters::StringFilterComponent.new(
89
+ name: :name, # Required: filter parameter name
90
+ label: nil, # Optional: label text (auto-generated from name)
91
+ value: nil, # Optional: current filter value
92
+ operator: "contains" # Optional: current operator (default: "contains")
93
+ )
94
+ ```
95
+
96
+ **Operators:** `contains`, `equals`, `starts_with`, `ends_with`
97
+
98
+ **Example:**
99
+
100
+ ```haml
101
+ = render IronAdmin::Filters::StringFilterComponent.new(
102
+ name: :name,
103
+ label: "Customer Name",
104
+ value: params.dig(:filters, :name),
105
+ operator: params.dig(:filters, :name_operator) || "contains"
106
+ )
107
+ ```
108
+
109
+ ---
110
+
111
+ ## NumberFilterComponent
112
+
113
+ Number input with an operator dropdown for numeric comparisons.
114
+
115
+ ```ruby
116
+ IronAdmin::Filters::NumberFilterComponent.new(
117
+ name: :price, # Required: filter parameter name
118
+ label: nil, # Optional: label text (auto-generated from name)
119
+ value: nil, # Optional: current filter value
120
+ max_value: nil, # Optional: upper bound for "between" operator
121
+ operator: "equals" # Optional: current operator (default: "equals")
122
+ )
123
+ ```
124
+
125
+ **Operators:** `equals`, `greater_than`, `less_than`, `between`
126
+
127
+ When the `between` operator is selected, a second input for the upper bound is displayed.
128
+
129
+ **Example:**
130
+
131
+ ```haml
132
+ = render IronAdmin::Filters::NumberFilterComponent.new(
133
+ name: :price,
134
+ label: "Price",
135
+ value: params.dig(:filters, :price),
136
+ max_value: params.dig(:filters, :price_max),
137
+ operator: params.dig(:filters, :price_operator) || "equals"
138
+ )
139
+ ```
140
+
141
+ ---
142
+
83
143
  ## BarComponent
84
144
 
85
145
  Container for filter controls with dropdown behavior.
@@ -4,18 +4,15 @@
4
4
 
5
5
  - Ruby >= 3.2
6
6
  - Rails >= 7.1
7
- - Tailwind CSS (for default theme classes)
7
+ - [tailwindcss-rails](https://github.com/rails/tailwindcss-rails) >= 4.0
8
8
 
9
- ## Step 1: Add the Gem
9
+ ## Step 1: Add the Gems
10
10
 
11
- Add IronAdmin to your `Gemfile`:
11
+ Add IronAdmin and `tailwindcss-rails` to your `Gemfile`:
12
12
 
13
13
  ```ruby
14
- # From a local path:
15
- gem "iron_admin", path: "/path/to/iron_admin"
16
-
17
- # Or if published to a gem server:
18
14
  gem "iron_admin"
15
+ gem "tailwindcss-rails"
19
16
  ```
20
17
 
21
18
  Then run:
@@ -35,11 +32,13 @@ This creates:
35
32
  | File | Purpose |
36
33
  |------|---------|
37
34
  | `config/initializers/iron_admin.rb` | Main configuration (title, auth, theme) |
38
- | `app/iron_admin/dashboards/` | Directory for dashboard definitions |
39
35
  | `app/iron_admin/resources/` | Directory for resource definitions |
40
- | `app/iron_admin/dashboard.rb` | Default dashboard class |
36
+ | `app/iron_admin/dashboards/` | Directory for dashboard definitions |
37
+ | `app/iron_admin/dashboards/admin_dashboard.rb` | Default dashboard class |
41
38
 
42
- It also mounts the engine in `config/routes.rb`.
39
+ It also:
40
+ - Mounts the engine at `/admin` in `config/routes.rb`
41
+ - Adds the IronAdmin CSS import to `app/assets/tailwind/application.css`
43
42
 
44
43
  ## Step 3: Mount the Engine (if not auto-mounted)
45
44
 
@@ -79,9 +78,107 @@ rails generate iron_admin:resource User
79
78
 
80
79
  This creates `app/iron_admin/resources/user_resource.rb`. IronAdmin automatically infers fields from your model's database schema.
81
80
 
82
- ## Step 6: Visit the Admin Panel
81
+ ## Step 6: Build CSS and Start the Server
82
+
83
+ ```bash
84
+ rails tailwindcss:build
85
+ bin/rails server
86
+ ```
87
+
88
+ Visit `/admin` and your admin panel is ready.
89
+
90
+ For development with live CSS recompilation, use `bin/dev` (which runs
91
+ `tailwindcss:watch` alongside the Rails server via foreman).
92
+
93
+ > **Note:** There is a [known issue](https://github.com/rails/tailwindcss-rails/issues/602)
94
+ > in `tailwindcss-rails` v4 where `bin/dev` exits immediately after
95
+ > starting. If this happens, edit `Procfile.dev` and change the CSS line
96
+ > to `css: bin/rails tailwindcss:watch[always]`. See
97
+ > [Troubleshooting](../guides/troubleshooting.md#bindev-exits-immediately-after-starting)
98
+ > for details.
99
+
100
+ ## Tailwind CSS Setup
101
+
102
+ IronAdmin uses Tailwind CSS v4 for all styling via the `tailwindcss-rails` gem.
103
+ Understanding how the CSS pipeline works will help you troubleshoot any styling issues.
104
+
105
+ ### How it works
106
+
107
+ 1. IronAdmin ships with `@source` directives at `app/assets/tailwind/iron_admin/engine.css`
108
+ inside the gem. These tell the Tailwind compiler where to scan for CSS utility classes
109
+ used by the engine's views, components, and helpers.
110
+
111
+ 2. When `tailwindcss:build` runs, it first executes `tailwindcss:engines`. This task
112
+ detects IronAdmin's engine CSS and creates a bridge file at
113
+ `app/assets/builds/tailwind/iron_admin.css` containing an `@import` that points
114
+ to the engine's CSS.
115
+
116
+ 3. Your `app/assets/tailwind/application.css` must import this bridge file:
117
+
118
+ ```css
119
+ @import "tailwindcss";
120
+ @import "../builds/tailwind/iron_admin";
121
+ ```
122
+
123
+ 4. The Tailwind compiler processes `application.css`, follows the imports, scans all
124
+ the engine's source files via the `@source` directives, and generates the final
125
+ `app/assets/builds/tailwind.css` with all necessary utility classes.
126
+
127
+ 5. The engine's layout references `stylesheet_link_tag "tailwind"`, which serves
128
+ this compiled CSS file.
129
+
130
+ ### Manual setup (without the generator)
131
+
132
+ If you didn't use the install generator, or the import line is missing:
83
133
 
84
- Start your server and navigate to `/admin`.
134
+ 1. Verify `tailwindcss-rails` is in your Gemfile and installed
135
+ 2. Add the import to `app/assets/tailwind/application.css`:
136
+
137
+ ```css
138
+ @import "tailwindcss";
139
+ @import "../builds/tailwind/iron_admin";
140
+ ```
141
+
142
+ 3. Build the CSS:
143
+
144
+ ```bash
145
+ rails tailwindcss:build
146
+ ```
147
+
148
+ 4. Verify the build output:
149
+
150
+ ```bash
151
+ ls -la app/assets/builds/tailwind.css
152
+ # Should be ~30KB+ (not ~6KB which indicates no utility classes)
153
+ ```
154
+
155
+ ### Troubleshooting
156
+
157
+ **Styles not loading (unstyled admin panel)**
158
+
159
+ This almost always means the Tailwind compiler didn't scan IronAdmin's source files.
160
+ Check:
161
+
162
+ 1. The `@import "../builds/tailwind/iron_admin"` line exists in
163
+ `app/assets/tailwind/application.css`
164
+ 2. The bridge file exists at `app/assets/builds/tailwind/iron_admin.css`
165
+ (run `rails tailwindcss:build` to regenerate it)
166
+ 3. The compiled CSS at `app/assets/builds/tailwind.css` is large enough
167
+ (~30KB+, not ~6KB)
168
+
169
+ **Bridge file not generated**
170
+
171
+ If `app/assets/builds/tailwind/iron_admin.css` doesn't exist after running
172
+ `rails tailwindcss:build`:
173
+
174
+ - Ensure `tailwindcss-rails` >= 4.0 is installed (`bundle info tailwindcss-rails`)
175
+ - Ensure `iron_admin` is properly loaded (check `bundle info iron_admin`)
176
+ - Try running `rails tailwindcss:engines` directly
177
+
178
+ **Styles disappear after bundle update**
179
+
180
+ The bridge file uses an absolute path to the gem's CSS. After updating the gem
181
+ (which changes the gem path), run `rails tailwindcss:build` to regenerate it.
85
182
 
86
183
  ## Dependencies
87
184
 
@@ -97,19 +194,8 @@ IronAdmin depends on the following gems (installed automatically):
97
194
  | `haml-rails` | >= 2.0 | Template engine |
98
195
  | `heroicon` | >= 1.0 | SVG icons |
99
196
 
100
- ## Tailwind CSS Setup
101
-
102
- IronAdmin uses Tailwind CSS classes for all styling. Ensure your Tailwind configuration includes the engine's view paths in the `content` array so that all CSS classes are properly compiled.
197
+ **Peer dependency** (must be added to your Gemfile manually):
103
198
 
104
- Add the path to the engine's app directory in your `tailwind.config.js`:
105
-
106
- ```js
107
- module.exports = {
108
- content: [
109
- // ... your app paths
110
- "./path/to/iron_admin/app/**/*.{rb,haml}",
111
- ],
112
- }
113
- ```
114
-
115
- If installed as a gem, use `bundle show iron_admin` to find the installed path and add it to your Tailwind content paths.
199
+ | Gem | Version | Purpose |
200
+ |-----|---------|---------|
201
+ | `tailwindcss-rails` | >= 4.0 | Tailwind CSS compilation |
@@ -1,6 +1,15 @@
1
1
  # Quick Start
2
2
 
3
- Get a full admin panel running in 5 steps.
3
+ Get a full admin panel running in 6 steps.
4
+
5
+ ## Prerequisites
6
+
7
+ IronAdmin uses [Tailwind CSS](https://tailwindcss.com/) for all styling and requires `tailwindcss-rails` >= 4.0. Ensure your application has a supported version installed:
8
+
9
+ ```bash
10
+ bundle add tailwindcss-rails --version ">= 4.0"
11
+ rails tailwindcss:install
12
+ ```
4
13
 
5
14
  ## 1. Install
6
15
 
@@ -81,4 +90,11 @@ class AdminDashboard < IronAdmin::Dashboard
81
90
  end
82
91
  ```
83
92
 
93
+ ## 6. Build CSS and Start
94
+
95
+ ```bash
96
+ rails tailwindcss:build
97
+ bin/rails server
98
+ ```
99
+
84
100
  Visit `/admin` and your admin panel is ready.