scrivito_sdk 0.50.1 → 0.60.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/scrivito/objs_controller.rb +25 -21
  3. data/app/controllers/scrivito/ui_controller.rb +1 -1
  4. data/app/controllers/scrivito/webservice_controller.rb +1 -1
  5. data/app/models/scrivito/content_widget.rb +1 -3
  6. data/app/views/cms/index.html.erb +3 -0
  7. data/app/views/scrivito/objs/destroy.json.jbuilder +1 -0
  8. data/app/views/scrivito/objs/show.json.jbuilder +2 -0
  9. data/app/views/scrivito/objs/update.json.jbuilder +1 -1
  10. data/app/views/scrivito/objs/{widget_modification.json.jbuilder → widget.json.jbuilder} +0 -0
  11. data/config/ca-bundle.crt +24 -219
  12. data/config/precedence_routes.rb +60 -0
  13. data/config/routes.rb +13 -46
  14. data/lib/assets/javascripts/scrivito_ui.js +360 -202
  15. data/lib/assets/stylesheets/scrivito_sdk.css +1 -1
  16. data/lib/assets/stylesheets/scrivito_ui.css +1 -1
  17. data/lib/generators/scrivito/install/templates/app/models/download.rb +1 -3
  18. data/lib/generators/scrivito/install/templates/app/models/headline_widget.rb +1 -5
  19. data/lib/generators/scrivito/install/templates/app/models/image.rb +1 -3
  20. data/lib/generators/scrivito/install/templates/app/models/image_widget.rb +1 -5
  21. data/lib/generators/scrivito/install/templates/app/models/page.rb +3 -6
  22. data/lib/generators/scrivito/install/templates/app/models/text_widget.rb +1 -5
  23. data/lib/generators/scrivito/install/templates/scrivito/migrate/install_scrivito_migration.rb +1 -25
  24. data/lib/generators/scrivito/migration/templates/migration.erb +2 -26
  25. data/lib/generators/scrivito/page/page_generator.rb +0 -11
  26. data/lib/generators/scrivito/page/templates/model.erb +3 -7
  27. data/lib/generators/scrivito/widget/widget_generator.rb +0 -11
  28. data/lib/scrivito/attribute.rb +10 -16
  29. data/lib/scrivito/attribute_collection.rb +4 -0
  30. data/lib/scrivito/attribute_content.rb +239 -161
  31. data/lib/scrivito/attribute_definition.rb +16 -10
  32. data/lib/scrivito/attribute_definition_collection.rb +7 -4
  33. data/lib/scrivito/attribute_definition_migrator.rb +1 -3
  34. data/lib/scrivito/attribute_deserializer.rb +111 -0
  35. data/lib/scrivito/attribute_serializer.rb +189 -0
  36. data/lib/scrivito/basic_obj.rb +113 -78
  37. data/lib/scrivito/basic_widget.rb +103 -37
  38. data/lib/scrivito/binary.rb +3 -3
  39. data/lib/scrivito/cache/chainable.rb +10 -4
  40. data/lib/scrivito/cache/file_store.rb +7 -4
  41. data/lib/scrivito/cache/ram_store.rb +1 -1
  42. data/lib/scrivito/class_collection.rb +2 -2
  43. data/lib/scrivito/client_config.rb +7 -6
  44. data/lib/scrivito/cms_backend.rb +2 -2
  45. data/lib/scrivito/cms_field_tag.rb +33 -25
  46. data/lib/scrivito/cms_rest_api/{attribute_serializer.rb → legacy_attribute_serializer.rb} +1 -1
  47. data/lib/scrivito/cms_routing.rb +20 -14
  48. data/lib/scrivito/configuration.rb +1 -1
  49. data/lib/scrivito/controller_actions.rb +12 -4
  50. data/lib/scrivito/date_attribute.rb +8 -0
  51. data/lib/scrivito/diff.rb +1 -1
  52. data/lib/scrivito/editing_context.rb +1 -1
  53. data/lib/scrivito/editing_context_middleware.rb +1 -1
  54. data/lib/scrivito/errors.rb +4 -0
  55. data/lib/scrivito/link_parser.rb +6 -1
  56. data/lib/scrivito/migrations/cms_backend.rb +17 -60
  57. data/lib/scrivito/migrations/migration_store.rb +0 -1
  58. data/lib/scrivito/model_library.rb +6 -6
  59. data/lib/scrivito/obj_class.rb +34 -48
  60. data/lib/scrivito/obj_class_collection.rb +21 -3
  61. data/lib/scrivito/obj_create_params_parser.rb +2 -1
  62. data/lib/scrivito/obj_data.rb +9 -103
  63. data/lib/scrivito/obj_data_from_hash.rb +19 -21
  64. data/lib/scrivito/obj_data_from_service.rb +28 -48
  65. data/lib/scrivito/obj_params_parser.rb +14 -14
  66. data/lib/scrivito/obj_search_enumerator.rb +1 -1
  67. data/lib/scrivito/obj_update_params_parser.rb +2 -2
  68. data/lib/scrivito/restriction_set.rb +1 -1
  69. data/lib/scrivito/sdk_engine.rb +2 -2
  70. data/lib/scrivito/test_request.rb +10 -0
  71. data/lib/scrivito/type_computer.rb +5 -1
  72. data/lib/scrivito/widget_collection.rb +15 -0
  73. data/lib/scrivito/widget_garbage_collection.rb +1 -1
  74. data/lib/scrivito/widget_tag.rb +2 -0
  75. data/lib/scrivito/workspace.rb +2 -1
  76. data/lib/scrivito/workspace_data_from_service.rb +1 -0
  77. data/lib/scrivito_sdk.rb +17 -1
  78. metadata +36 -34
  79. data/app/views/scrivito/objs/modification.json.jbuilder +0 -1
  80. data/config/cms_routes.rb +0 -22
  81. data/lib/generators/scrivito/page/templates/migration.erb +0 -9
  82. data/lib/generators/scrivito/widget/templates/migration.erb +0 -7
@@ -1,9 +0,0 @@
1
- class Create<%= class_name %>Migration < Scrivito::Migration
2
- def up
3
- Scrivito::ObjClass.create(name: '<%= class_name %>', attributes: [
4
- {name: 'title', type: :string},
5
- {name: 'body', type: :widget},
6
- {name: 'child_order', type: :referencelist},
7
- ])
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- class Create<%= class_name %>Migration < Scrivito::Migration
2
- def up
3
- Scrivito::ObjClass.create(name: '<%= class_name %>', attributes: [
4
- # {name: 'example', type: :string},
5
- ])
6
- end
7
- end