linked_rails 0.0.3 → 0.0.4.pre.g3e8f5731a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -674
  3. data/app/controllers/linked_rails/actions/objects_controller.rb +9 -0
  4. data/app/controllers/linked_rails/bulk_controller.rb +107 -22
  5. data/app/controllers/linked_rails/enum_values_controller.rb +0 -42
  6. data/app/models/linked_rails/actions/item.rb +64 -55
  7. data/app/models/linked_rails/actions/list.rb +6 -31
  8. data/app/models/linked_rails/actions/object.rb +38 -0
  9. data/app/models/linked_rails/collection/configuration.rb +55 -0
  10. data/app/models/linked_rails/collection/filter.rb +1 -1
  11. data/app/models/linked_rails/collection/filter_field.rb +19 -2
  12. data/app/models/linked_rails/collection/filter_option.rb +1 -1
  13. data/app/models/linked_rails/collection/filterable.rb +6 -9
  14. data/app/models/linked_rails/collection/infinite.rb +113 -0
  15. data/app/models/linked_rails/collection/infinite_view.rb +1 -90
  16. data/app/models/linked_rails/collection/iri.rb +47 -43
  17. data/app/models/linked_rails/collection/iri_mapping.rb +15 -7
  18. data/app/models/linked_rails/collection/paginated.rb +46 -0
  19. data/app/models/linked_rails/collection/paginated_view.rb +1 -33
  20. data/app/models/linked_rails/collection/sortable.rb +1 -9
  21. data/app/models/linked_rails/collection/sorting.rb +1 -1
  22. data/app/models/linked_rails/collection/view.rb +53 -15
  23. data/app/models/linked_rails/collection.rb +53 -85
  24. data/app/models/linked_rails/creative_work.rb +1 -1
  25. data/app/models/linked_rails/entry_point.rb +8 -5
  26. data/app/models/linked_rails/enum_value.rb +40 -2
  27. data/app/models/linked_rails/form/field/association_input.rb +7 -1
  28. data/app/models/linked_rails/form/field/file_input.rb +1 -0
  29. data/app/models/linked_rails/form/field/resource_field.rb +2 -0
  30. data/{lib/linked_rails/enhancements/indexable/model.rb → app/models/linked_rails/form/field/url_input.rb} +3 -3
  31. data/app/models/linked_rails/form/field.rb +37 -13
  32. data/app/models/linked_rails/form/field_factory.rb +48 -18
  33. data/app/models/linked_rails/form/group.rb +4 -6
  34. data/app/models/linked_rails/form/page.rb +8 -4
  35. data/app/models/linked_rails/form.rb +17 -21
  36. data/app/models/linked_rails/manifest.rb +102 -22
  37. data/app/models/linked_rails/menus/item.rb +10 -13
  38. data/app/models/linked_rails/menus/list.rb +16 -7
  39. data/app/models/linked_rails/ontology/base.rb +3 -1
  40. data/app/models/linked_rails/ontology/class.rb +3 -3
  41. data/app/models/linked_rails/ontology.rb +6 -5
  42. data/app/models/linked_rails/property_query.rb +2 -0
  43. data/app/models/linked_rails/sequence.rb +4 -13
  44. data/app/models/linked_rails/shacl/property_shape.rb +1 -1
  45. data/app/models/linked_rails/web_page.rb +0 -4
  46. data/app/models/linked_rails/web_site.rb +0 -4
  47. data/app/models/linked_rails/widget.rb +4 -11
  48. data/app/policies/linked_rails/actions/object_policy.rb +11 -0
  49. data/app/policies/linked_rails/collection_policy.rb +2 -2
  50. data/app/policies/linked_rails/form_policy.rb +13 -0
  51. data/app/policies/linked_rails/ontology_policy.rb +13 -0
  52. data/app/serializers/linked_rails/actions/item_serializer.rb +5 -5
  53. data/app/serializers/linked_rails/actions/object_serializer.rb +9 -0
  54. data/app/serializers/linked_rails/collection/filter_field_serializer.rb +3 -2
  55. data/app/serializers/linked_rails/collection/filter_option_serializer.rb +1 -1
  56. data/app/serializers/linked_rails/collection/filter_serializer.rb +1 -1
  57. data/app/serializers/linked_rails/collection/sorting_serializer.rb +1 -1
  58. data/app/serializers/linked_rails/collection/view_serializer.rb +3 -3
  59. data/app/serializers/linked_rails/collection_serializer.rb +8 -7
  60. data/app/serializers/linked_rails/condition_serializer.rb +3 -3
  61. data/app/serializers/linked_rails/entry_point_serializer.rb +3 -3
  62. data/app/serializers/linked_rails/enum_value_serializer.rb +1 -0
  63. data/app/serializers/linked_rails/form/field/association_input_serializer.rb +1 -0
  64. data/app/serializers/linked_rails/form/field/file_input_serializer.rb +11 -0
  65. data/app/serializers/linked_rails/form/field_serializer.rb +3 -1
  66. data/app/serializers/linked_rails/form/group_serializer.rb +1 -1
  67. data/app/serializers/linked_rails/form/page_serializer.rb +1 -1
  68. data/app/serializers/linked_rails/menus/item_serializer.rb +3 -3
  69. data/app/serializers/linked_rails/menus/list_serializer.rb +1 -1
  70. data/app/serializers/linked_rails/ontology_serializer.rb +2 -2
  71. data/app/serializers/linked_rails/property_query_serializer.rb +7 -0
  72. data/app/serializers/linked_rails/sequence_serializer.rb +2 -5
  73. data/app/serializers/linked_rails/shacl/node_shape_serializer.rb +1 -1
  74. data/app/serializers/linked_rails/shacl/property_shape_serializer.rb +1 -1
  75. data/app/serializers/linked_rails/shacl/shape_serializer.rb +5 -5
  76. data/app/serializers/linked_rails/web_page_serializer.rb +3 -3
  77. data/app/serializers/linked_rails/web_site_serializer.rb +1 -1
  78. data/app/serializers/linked_rails/widget_serializer.rb +3 -3
  79. data/app/workers/linked_rails/invalidation_stream_worker.rb +16 -0
  80. data/lib/generators/linked_rails/install/install_generator.rb +5 -8
  81. data/lib/generators/linked_rails/install/templates/README +2 -0
  82. data/lib/generators/linked_rails/install/templates/app_menu_list.rb +36 -7
  83. data/lib/generators/linked_rails/install/templates/application_menu_list.rb +40 -1
  84. data/lib/generators/linked_rails/install/templates/initializer.rb +1 -2
  85. data/lib/generators/linked_rails/install/templates/locales.yml +16 -0
  86. data/lib/generators/linked_rails/install/templates/rdf_serializers_initializer.rb +1 -1
  87. data/lib/generators/linked_rails/install/templates/vocab.rb +1 -0
  88. data/lib/generators/linked_rails/install/templates/vocab.yml +2 -2
  89. data/lib/generators/linked_rails/model/model_generator.rb +0 -1
  90. data/lib/generators/linked_rails/model/templates/controller.rb.tt +5 -1
  91. data/lib/generators/linked_rails/model/templates/form.rb.tt +3 -0
  92. data/lib/generators/linked_rails/model/templates/menu_list.rb.tt +15 -0
  93. data/lib/generators/linked_rails/model/templates/policy.rb.tt +13 -0
  94. data/lib/generators/linked_rails/model/templates/serializer.rb.tt +5 -1
  95. data/lib/linked_rails/active_response/controller/collections.rb +1 -1
  96. data/lib/linked_rails/active_response/controller/crud_defaults.rb +4 -4
  97. data/lib/linked_rails/active_response/controller/params.rb +10 -10
  98. data/lib/linked_rails/active_response/controller.rb +8 -18
  99. data/lib/linked_rails/active_response/responders/rdf.rb +19 -10
  100. data/lib/linked_rails/callable_variable.rb +1 -1
  101. data/lib/linked_rails/collection_params_parser.rb +93 -0
  102. data/lib/linked_rails/controller/actionable.rb +121 -0
  103. data/lib/linked_rails/controller/authorization.rb +6 -0
  104. data/lib/linked_rails/controller/default_actions/create.rb +52 -0
  105. data/lib/linked_rails/controller/default_actions/destroy.rb +42 -0
  106. data/lib/linked_rails/controller/default_actions/update.rb +43 -0
  107. data/lib/linked_rails/controller/delta.rb +58 -0
  108. data/lib/linked_rails/controller/error_handling.rb +12 -7
  109. data/lib/linked_rails/controller/rendering.rb +48 -0
  110. data/lib/linked_rails/controller.rb +24 -4
  111. data/lib/linked_rails/enhancements/creatable/controller.rb +1 -1
  112. data/lib/linked_rails/enhancements/destroyable/controller.rb +1 -1
  113. data/lib/linked_rails/enhancements/updatable/controller.rb +1 -1
  114. data/lib/linked_rails/enhancements.rb +0 -16
  115. data/lib/linked_rails/errors/forbidden.rb +37 -0
  116. data/lib/linked_rails/errors.rb +3 -0
  117. data/lib/linked_rails/helpers/delta_helper.rb +26 -57
  118. data/lib/linked_rails/helpers/ontola_actions_helper.rb +2 -2
  119. data/lib/linked_rails/helpers/resource_helper.rb +14 -2
  120. data/lib/linked_rails/iri_mapper.rb +18 -40
  121. data/lib/linked_rails/middleware/error_handling.rb +51 -0
  122. data/lib/linked_rails/middleware/linked_data_params.rb +30 -151
  123. data/lib/linked_rails/model/actionable.rb +68 -0
  124. data/lib/linked_rails/model/cacheable.rb +45 -0
  125. data/lib/linked_rails/model/collections.rb +201 -39
  126. data/lib/linked_rails/model/dirty.rb +6 -18
  127. data/lib/linked_rails/model/enhancements.rb +1 -6
  128. data/lib/linked_rails/model/filtering.rb +4 -6
  129. data/lib/linked_rails/model/indexable.rb +6 -16
  130. data/lib/linked_rails/model/iri.rb +29 -19
  131. data/lib/linked_rails/model/iri_mapping.rb +37 -8
  132. data/lib/linked_rails/model/menuable.rb +28 -0
  133. data/lib/linked_rails/model/serialization.rb +2 -15
  134. data/lib/linked_rails/model/singularable.rb +57 -0
  135. data/lib/linked_rails/model/sorting.rb +0 -5
  136. data/lib/linked_rails/model/tables.rb +26 -0
  137. data/lib/linked_rails/model.rb +18 -7
  138. data/lib/linked_rails/params_parser.rb +131 -54
  139. data/lib/linked_rails/policy/attribute_conditions.rb +2 -2
  140. data/lib/linked_rails/policy.rb +44 -46
  141. data/lib/linked_rails/railtie.rb +11 -0
  142. data/lib/linked_rails/rdf_error.rb +2 -2
  143. data/lib/linked_rails/renderers.rb +1 -0
  144. data/lib/linked_rails/routes.rb +38 -22
  145. data/lib/linked_rails/serializer/actionable.rb +27 -0
  146. data/lib/linked_rails/serializer/menuable.rb +31 -0
  147. data/lib/linked_rails/serializer/singularable.rb +26 -0
  148. data/lib/linked_rails/serializer.rb +28 -11
  149. data/lib/linked_rails/storage.rb +32 -0
  150. data/lib/linked_rails/test_methods.rb +114 -0
  151. data/lib/linked_rails/translate.rb +31 -9
  152. data/lib/linked_rails/types/iri_type.rb +37 -0
  153. data/lib/linked_rails/uri_template.rb +30 -0
  154. data/lib/linked_rails/url.rb +11 -0
  155. data/lib/linked_rails/version.rb +1 -1
  156. data/lib/linked_rails/vocab.rb +9 -0
  157. data/lib/linked_rails.rb +40 -14
  158. data/lib/rails/welcome_controller.rb +3 -3
  159. data/lib/rdf/list.rb +9 -0
  160. data/lib/rdf/query_fix.rb +15 -0
  161. metadata +79 -33
  162. data/app/models/linked_rails/actions/default_actions/create.rb +0 -60
  163. data/app/models/linked_rails/actions/default_actions/destroy.rb +0 -45
  164. data/app/models/linked_rails/actions/default_actions/update.rb +0 -50
  165. data/app/models/linked_rails/actions/default_actions.rb +0 -17
  166. data/lib/generators/linked_rails/install/templates/application_action_list.rb +0 -3
  167. data/lib/generators/linked_rails/model/templates/action_list.rb.tt +0 -6
  168. data/lib/linked_rails/enhancements/actionable/model.rb +0 -71
  169. data/lib/linked_rails/enhancements/actionable/serializer.rb +0 -25
  170. data/lib/linked_rails/enhancements/creatable/action.rb +0 -15
  171. data/lib/linked_rails/enhancements/destroyable/action.rb +0 -15
  172. data/lib/linked_rails/enhancements/destroyable/routing.rb +0 -19
  173. data/lib/linked_rails/enhancements/menuable/model.rb +0 -36
  174. data/lib/linked_rails/enhancements/menuable/serializer.rb +0 -33
  175. data/lib/linked_rails/enhancements/route_concerns.rb +0 -56
  176. data/lib/linked_rails/enhancements/singularable/controller.rb +0 -43
  177. data/lib/linked_rails/enhancements/singularable/model.rb +0 -47
  178. data/lib/linked_rails/enhancements/singularable/serializer.rb +0 -28
  179. data/lib/linked_rails/enhancements/tableable/model.rb +0 -28
  180. data/lib/linked_rails/enhancements/updatable/action.rb +0 -15
  181. data/lib/linked_rails/enhancements/updatable/routing.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6779d430183378aeebf11d84973275d9f95ba6be8d9d806c4488f9c5e0a7ca11
4
- data.tar.gz: e98856daaf5f8698922faeec141b6f24c3e72856076955bd2892b067e37609d2
3
+ metadata.gz: 76bfec9b29631dc8cd719c82274bddb1d60ef3c5e1f8bf7cecdf5083399a0b60
4
+ data.tar.gz: 02a6fc22c0f6e5d208ad069d8e6d0aad21ad7b3f7c1a037d3b96173178a03861
5
5
  SHA512:
6
- metadata.gz: 17934ce95f375a4b36a63b56285f1db4e2171d6d1c5bc2747dc0132548b77c36a484be64aeacb47ec89fe15ba77fd39a9f44ee25096759438aea8882b8ec8dbf
7
- data.tar.gz: 30fff5ebacf094fcaada45caab3d15537ba5806692f9dd887f509155420880b07283ec41aa6282e2d572e15fcb7cdce508bd55d102bd790eb1b7be5cc1d353dd
6
+ metadata.gz: d542dd3f7417f97d421359f29cfdee8a7e85e8f2f2214181ff704b2fa1bf019fb89d45d4f451c7a6291dd218b4ae78b74274c76e31bcb84c6ccfa830d304a59b
7
+ data.tar.gz: 25a745a273273cd82e449e899cb29c930bc2fbc1f7a4f65e4ef6f3ec9e1b3afe7f8cb0ce86f2b524fe3627dd5f36bdfaca484818e81a319703560f537955d6fb