pulitzer 0.15.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/interactions/pulitzer/create_free_form_section_partials.rb +2 -2
  3. data/app/interactions/pulitzer/post_types_controller/create_singleton_post.rb +1 -1
  4. data/app/interactions/pulitzer/post_types_controller/create_template_version.rb +1 -1
  5. data/app/models/pulitzer/partial.rb +4 -4
  6. data/app/models/pulitzer/partial_type.rb +1 -1
  7. data/app/models/pulitzer/post_type.rb +0 -6
  8. data/app/models/pulitzer/version.rb +2 -2
  9. data/app/views/pulitzer/partial_types/_new.html.erb +2 -2
  10. data/app/views/pulitzer/partial_types/_show.html.erb +1 -1
  11. data/db/migrate/20170515230633_create_post_type_version.rb +2 -2
  12. data/db/migrate/20170515232938_reconnect_post_type_to_post.rb +40 -1
  13. data/lib/pulitzer/version.rb +1 -1
  14. data/spec/controllers/pages_controller_spec.rb +4 -2
  15. data/spec/controllers/pulitzer/arrangement_styles_controller_spec.rb +4 -3
  16. data/spec/controllers/pulitzer/background_styles_controller_spec.rb +4 -3
  17. data/spec/controllers/pulitzer/free_form_section_types_controller_spec.rb +5 -4
  18. data/spec/controllers/pulitzer/justification_styles_controller_spec.rb +4 -3
  19. data/spec/controllers/pulitzer/partials_controller_spec.rb +12 -10
  20. data/spec/controllers/pulitzer/post_type_content_element_types_controller_spec.rb +10 -9
  21. data/spec/controllers/pulitzer/post_types_controller_spec.rb +7 -4
  22. data/spec/controllers/pulitzer/sequence_flow_styles_controller_spec.rb +4 -3
  23. data/spec/controllers/pulitzer/versions_controller_spec.rb +4 -3
  24. data/spec/dummy/app/controllers/pages_controller.rb +2 -1
  25. data/spec/dummy/config/application.rb +3 -0
  26. data/spec/dummy/db/development.sqlite3 +0 -0
  27. data/spec/dummy/db/schema.rb +20 -12
  28. data/spec/dummy/db/seeds/pulitzer_post_types.rb +10 -6
  29. data/spec/dummy/db/test.sqlite3 +0 -0
  30. data/spec/dummy/lib/state_machine/model.rb +23 -0
  31. data/spec/dummy/lib/state_machine/transition.rb +65 -0
  32. data/spec/dummy/log/development.log +275 -0
  33. data/spec/dummy/log/test.log +104454 -0
  34. data/spec/dummy/public/uploads/pulitzer/content_element/image/199/cms_sam_and_snow.jpg +0 -0
  35. data/spec/dummy/public/uploads/pulitzer/content_element/image/199/sam_and_snow.jpg +0 -0
  36. data/spec/dummy/public/uploads/pulitzer/content_element/image/199/thumb_sam_and_snow.jpg +0 -0
  37. data/spec/dummy/public/uploads/pulitzer/content_element/image/221/cms_sam_and_snow.jpg +0 -0
  38. data/spec/dummy/public/uploads/pulitzer/content_element/image/221/sam_and_snow.jpg +0 -0
  39. data/spec/dummy/public/uploads/pulitzer/content_element/image/221/thumb_sam_and_snow.jpg +0 -0
  40. data/spec/dummy/public/uploads/pulitzer/content_element/image/243/cms_sam_and_snow.jpg +0 -0
  41. data/spec/dummy/public/uploads/pulitzer/content_element/image/243/sam_and_snow.jpg +0 -0
  42. data/spec/dummy/public/uploads/pulitzer/content_element/image/243/thumb_sam_and_snow.jpg +0 -0
  43. data/spec/dummy/public/uploads/pulitzer/content_element/image/265/cms_sam_and_snow.jpg +0 -0
  44. data/spec/dummy/public/uploads/pulitzer/content_element/image/265/sam_and_snow.jpg +0 -0
  45. data/spec/dummy/public/uploads/pulitzer/content_element/image/265/thumb_sam_and_snow.jpg +0 -0
  46. data/spec/dummy/public/uploads/pulitzer/content_element/image/287/cms_sam_and_snow.jpg +0 -0
  47. data/spec/dummy/public/uploads/pulitzer/content_element/image/287/sam_and_snow.jpg +0 -0
  48. data/spec/dummy/public/uploads/pulitzer/content_element/image/287/thumb_sam_and_snow.jpg +0 -0
  49. data/spec/dummy/public/uploads/pulitzer/content_element/image/309/cms_sam_and_snow.jpg +0 -0
  50. data/spec/dummy/public/uploads/pulitzer/content_element/image/309/sam_and_snow.jpg +0 -0
  51. data/spec/dummy/public/uploads/pulitzer/content_element/image/309/thumb_sam_and_snow.jpg +0 -0
  52. data/spec/dummy/public/uploads/pulitzer/content_element/image/331/cms_sam_and_snow.jpg +0 -0
  53. data/spec/dummy/public/uploads/pulitzer/content_element/image/331/sam_and_snow.jpg +0 -0
  54. data/spec/dummy/public/uploads/pulitzer/content_element/image/331/thumb_sam_and_snow.jpg +0 -0
  55. data/spec/dummy/public/uploads/pulitzer/content_element/image/353/cms_sam_and_snow.jpg +0 -0
  56. data/spec/dummy/public/uploads/pulitzer/content_element/image/353/sam_and_snow.jpg +0 -0
  57. data/spec/dummy/public/uploads/pulitzer/content_element/image/353/thumb_sam_and_snow.jpg +0 -0
  58. data/spec/dummy/public/uploads/pulitzer/content_element/image/375/cms_sam_and_snow.jpg +0 -0
  59. data/spec/dummy/public/uploads/pulitzer/content_element/image/375/sam_and_snow.jpg +0 -0
  60. data/spec/dummy/public/uploads/pulitzer/content_element/image/375/thumb_sam_and_snow.jpg +0 -0
  61. data/spec/dummy/public/uploads/pulitzer/content_element/image/397/cms_sam_and_snow.jpg +0 -0
  62. data/spec/dummy/public/uploads/pulitzer/content_element/image/397/sam_and_snow.jpg +0 -0
  63. data/spec/dummy/public/uploads/pulitzer/content_element/image/397/thumb_sam_and_snow.jpg +0 -0
  64. data/spec/dummy/public/uploads/pulitzer/content_element/image/419/cms_sam_and_snow.jpg +0 -0
  65. data/spec/dummy/public/uploads/pulitzer/content_element/image/419/sam_and_snow.jpg +0 -0
  66. data/spec/dummy/public/uploads/pulitzer/content_element/image/419/thumb_sam_and_snow.jpg +0 -0
  67. data/spec/dummy/public/uploads/pulitzer/content_element/image/441/cms_sam_and_snow.jpg +0 -0
  68. data/spec/dummy/public/uploads/pulitzer/content_element/image/441/sam_and_snow.jpg +0 -0
  69. data/spec/dummy/public/uploads/pulitzer/content_element/image/441/thumb_sam_and_snow.jpg +0 -0
  70. data/spec/dummy/public/uploads/pulitzer/content_element/image/463/cms_sam_and_snow.jpg +0 -0
  71. data/spec/dummy/public/uploads/pulitzer/content_element/image/463/sam_and_snow.jpg +0 -0
  72. data/spec/dummy/public/uploads/pulitzer/content_element/image/463/thumb_sam_and_snow.jpg +0 -0
  73. data/spec/dummy/public/uploads/pulitzer/content_element/image/485/cms_sam_and_snow.jpg +0 -0
  74. data/spec/dummy/public/uploads/pulitzer/content_element/image/485/sam_and_snow.jpg +0 -0
  75. data/spec/dummy/public/uploads/pulitzer/content_element/image/485/thumb_sam_and_snow.jpg +0 -0
  76. data/spec/dummy/public/uploads/pulitzer/content_element/image/507/cms_sam_and_snow.jpg +0 -0
  77. data/spec/dummy/public/uploads/pulitzer/content_element/image/507/sam_and_snow.jpg +0 -0
  78. data/spec/dummy/public/uploads/pulitzer/content_element/image/507/thumb_sam_and_snow.jpg +0 -0
  79. data/spec/dummy/public/uploads/pulitzer/content_element/image/529/cms_sam_and_snow.jpg +0 -0
  80. data/spec/dummy/public/uploads/pulitzer/content_element/image/529/sam_and_snow.jpg +0 -0
  81. data/spec/dummy/public/uploads/pulitzer/content_element/image/529/thumb_sam_and_snow.jpg +0 -0
  82. data/spec/dummy/public/uploads/pulitzer/content_element/image/551/cms_sam_and_snow.jpg +0 -0
  83. data/spec/dummy/public/uploads/pulitzer/content_element/image/551/sam_and_snow.jpg +0 -0
  84. data/spec/dummy/public/uploads/pulitzer/content_element/image/551/thumb_sam_and_snow.jpg +0 -0
  85. data/spec/dummy/public/uploads/pulitzer/content_element/image/595/cms_sam_and_snow.jpg +0 -0
  86. data/spec/dummy/public/uploads/pulitzer/content_element/image/595/sam_and_snow.jpg +0 -0
  87. data/spec/dummy/public/uploads/pulitzer/content_element/image/595/thumb_sam_and_snow.jpg +0 -0
  88. data/spec/dummy/public/uploads/pulitzer/content_element/image/617/cms_sam_and_snow.jpg +0 -0
  89. data/spec/dummy/public/uploads/pulitzer/content_element/image/617/sam_and_snow.jpg +0 -0
  90. data/spec/dummy/public/uploads/pulitzer/content_element/image/617/thumb_sam_and_snow.jpg +0 -0
  91. data/spec/dummy/public/uploads/pulitzer/content_element/image/639/cms_sam_and_snow.jpg +0 -0
  92. data/spec/dummy/public/uploads/pulitzer/content_element/image/639/sam_and_snow.jpg +0 -0
  93. data/spec/dummy/public/uploads/pulitzer/content_element/image/639/thumb_sam_and_snow.jpg +0 -0
  94. data/spec/dummy/public/uploads/pulitzer/content_element/image/661/cms_sam_and_snow.jpg +0 -0
  95. data/spec/dummy/public/uploads/pulitzer/content_element/image/661/sam_and_snow.jpg +0 -0
  96. data/spec/dummy/public/uploads/pulitzer/content_element/image/661/thumb_sam_and_snow.jpg +0 -0
  97. data/spec/dummy/public/uploads/pulitzer/content_element/image/683/cms_sam_and_snow.jpg +0 -0
  98. data/spec/dummy/public/uploads/pulitzer/content_element/image/683/sam_and_snow.jpg +0 -0
  99. data/spec/dummy/public/uploads/pulitzer/content_element/image/683/thumb_sam_and_snow.jpg +0 -0
  100. data/spec/dummy/public/uploads/pulitzer/content_element/image/705/cms_sam_and_snow.jpg +0 -0
  101. data/spec/dummy/public/uploads/pulitzer/content_element/image/705/sam_and_snow.jpg +0 -0
  102. data/spec/dummy/public/uploads/pulitzer/content_element/image/705/thumb_sam_and_snow.jpg +0 -0
  103. data/spec/dummy/public/uploads/pulitzer/content_element/image/727/cms_sam_and_snow.jpg +0 -0
  104. data/spec/dummy/public/uploads/pulitzer/content_element/image/727/sam_and_snow.jpg +0 -0
  105. data/spec/dummy/public/uploads/pulitzer/content_element/image/727/thumb_sam_and_snow.jpg +0 -0
  106. data/spec/dummy/public/uploads/pulitzer/content_element/image/749/cms_sam_and_snow.jpg +0 -0
  107. data/spec/dummy/public/uploads/pulitzer/content_element/image/749/sam_and_snow.jpg +0 -0
  108. data/spec/dummy/public/uploads/pulitzer/content_element/image/749/thumb_sam_and_snow.jpg +0 -0
  109. data/spec/dummy/public/uploads/pulitzer/content_element/image/771/cms_sam_and_snow.jpg +0 -0
  110. data/spec/dummy/public/uploads/pulitzer/content_element/image/771/sam_and_snow.jpg +0 -0
  111. data/spec/dummy/public/uploads/pulitzer/content_element/image/771/thumb_sam_and_snow.jpg +0 -0
  112. data/spec/dummy/public/uploads/pulitzer/content_element/image/793/cms_sam_and_snow.jpg +0 -0
  113. data/spec/dummy/public/uploads/pulitzer/content_element/image/793/sam_and_snow.jpg +0 -0
  114. data/spec/dummy/public/uploads/pulitzer/content_element/image/793/thumb_sam_and_snow.jpg +0 -0
  115. data/spec/factories/free_form_section_types.rb +1 -1
  116. data/spec/factories/partial_type.rb +1 -1
  117. data/spec/factories/post.rb +1 -1
  118. data/spec/factories/post_type.rb +2 -12
  119. data/spec/factories/post_type_content_element_type.rb +1 -1
  120. data/spec/factories/post_type_version.rb +19 -0
  121. data/spec/interactions/clone_version_spec.rb +2 -1
  122. data/spec/interactions/create_free_form_section_partials_spec.rb +3 -3
  123. data/spec/interactions/create_partial_content_elements_spec.rb +4 -4
  124. data/spec/interactions/create_post_content_elements_spec.rb +4 -4
  125. data/spec/interactions/update_post_type_content_elements_spec.rb +3 -2
  126. data/spec/models/post_spec.rb +1 -1
  127. data/spec/models/post_type_content_element_type_spec.rb +4 -3
  128. data/spec/models/post_type_spec.rb +0 -6
  129. data/spec/models/version_spec.rb +2 -2
  130. metadata +184 -4
  131. data/spec/interactions/destroy_free_form_partials_spec.rb +0 -18
@@ -1,18 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe Pulitzer::DestroyFreeFormSectionPartials do
4
- let!(:partial_type) { create(:partial_type) }
5
- let(:post_type) { free_form_section_type.post_type }
6
- let!(:post) { create(:post, post_type: post_type) }
7
- let(:preview_version) { post.preview_version }
8
- let(:free_form_section_type) { partial_type.free_form_section_type }
9
-
10
- it 'Creates partial to post type posts' do
11
- Pulitzer::CreatePostTypeFreeFormSections.new(free_form_section_type).call
12
- expect(preview_version.free_form_sections.first.partials).to eq []
13
- Pulitzer::CreateFreeFormSectionPartials.new(partial_type).call
14
- expect(preview_version.free_form_sections.first.partials.count).to eq 1
15
- Pulitzer::DestroyFreeFormSectionPartials.new(partial_type).call
16
- expect(preview_version.free_form_sections.first.partials.count).to eq 0
17
- end
18
- end