pageflow 12.6.0 → 13.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +78 -16
  3. data/README.md +8 -1
  4. data/Rakefile +0 -4
  5. data/admins/pageflow/accounts.rb +6 -9
  6. data/admins/pageflow/entry.rb +1 -1
  7. data/admins/pageflow/folder.rb +1 -1
  8. data/admins/pageflow/user.rb +4 -4
  9. data/app/assets/javascripts/pageflow/asset_urls.js.erb +1 -1
  10. data/app/assets/javascripts/pageflow/audio/multi_player.js +0 -4
  11. data/app/assets/javascripts/pageflow/audio_player.js +1 -1
  12. data/app/assets/javascripts/pageflow/base.js +0 -2
  13. data/app/assets/javascripts/pageflow/browser/agent.js +78 -92
  14. data/app/assets/javascripts/pageflow/browser/autoplay_support.js +2 -2
  15. data/app/assets/javascripts/pageflow/browser/video.js +1 -6
  16. data/app/assets/javascripts/pageflow/dist/react.js +1100 -2209
  17. data/app/assets/javascripts/pageflow/editor/models/configuration.js +5 -5
  18. data/app/assets/javascripts/pageflow/editor/templates/background_positioning_sliders.jst.ejs +0 -8
  19. data/app/assets/javascripts/pageflow/editor/views/background_positioning_sliders_view.js +23 -37
  20. data/app/assets/javascripts/pageflow/editor/views/background_positioning_view.js +2 -2
  21. data/app/assets/javascripts/pageflow/editor/views/configuration_editors/video.js +1 -1
  22. data/app/assets/javascripts/pageflow/editor/views/edit_widget_view.js +0 -9
  23. data/app/assets/javascripts/pageflow/jquery_utils.js +0 -10
  24. data/app/assets/javascripts/pageflow/media_player.js +3 -7
  25. data/app/assets/javascripts/pageflow/media_player/catch_play_promise.js +23 -0
  26. data/app/assets/javascripts/pageflow/media_player/volume_binding.js +1 -2
  27. data/app/assets/javascripts/pageflow/media_player/volume_fading/web_audio.js +24 -73
  28. data/app/assets/javascripts/pageflow/ready.js +1 -2
  29. data/app/assets/javascripts/pageflow/seed_entry_data.js +3 -3
  30. data/app/assets/javascripts/pageflow/slideshow.js +9 -17
  31. data/app/assets/javascripts/pageflow/slideshow/adjacent_pages.js +4 -9
  32. data/app/assets/javascripts/pageflow/slideshow/{successor_preparer.js → adjacent_preparer.js} +11 -14
  33. data/app/assets/javascripts/pageflow/slideshow/atmo.js +12 -23
  34. data/app/assets/javascripts/pageflow/slideshow/lazy_page_widget.js +2 -2
  35. data/app/assets/javascripts/pageflow/slideshow/progressive_preload.js +42 -0
  36. data/app/assets/javascripts/pageflow/ui/views/configuration_editor_view.js +2 -2
  37. data/app/assets/javascripts/pageflow/video_player/filter_sources.js +2 -16
  38. data/app/assets/javascripts/pageflow/video_player/lazy.js +1 -1
  39. data/app/assets/javascripts/pageflow/visited.js +0 -2
  40. data/app/assets/javascripts/pageflow/widgets.js +0 -1
  41. data/app/assets/javascripts/pageflow/widgets/multimedia_alert.js +1 -2
  42. data/app/assets/javascripts/pageflow/widgets/navigation.js +0 -1
  43. data/app/assets/javascripts/pageflow/widgets/navigation_mobile.js +0 -1
  44. data/app/assets/javascripts/pageflow/widgets/overview.js +1 -3
  45. data/app/assets/stylesheets/pageflow/admin.scss +2 -0
  46. data/app/assets/stylesheets/pageflow/admin/status_tags.scss +13 -0
  47. data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +10 -34
  48. data/app/assets/stylesheets/pageflow/navigation_bar.scss +4 -0
  49. data/app/assets/stylesheets/pageflow/page_types/video.scss +4 -1
  50. data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +0 -5
  51. data/app/assets/stylesheets/pageflow/themes/default/base.scss +0 -2
  52. data/app/assets/stylesheets/pageflow/themes/default/overview/icons/icon_font.scss +1 -4
  53. data/app/assets/stylesheets/pageflow/themes/default/page.scss +0 -19
  54. data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +0 -4
  55. data/app/assets/stylesheets/pageflow/themes/default/slideshow.scss +0 -1
  56. data/app/controllers/concerns/pageflow/edit_locking.rb +2 -2
  57. data/app/controllers/concerns/pageflow/public_https_mode.rb +1 -5
  58. data/app/controllers/concerns/pageflow/quota_verification.rb +1 -1
  59. data/app/controllers/pageflow/application_controller.rb +2 -2
  60. data/app/controllers/pageflow/chapters_controller.rb +2 -2
  61. data/app/controllers/pageflow/edit_locks_controller.rb +1 -1
  62. data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -1
  63. data/app/controllers/pageflow/editor/entries_controller.rb +1 -1
  64. data/app/controllers/pageflow/editor/entry_publications_controller.rb +1 -1
  65. data/app/controllers/pageflow/editor/files_controller.rb +1 -1
  66. data/app/controllers/pageflow/entries_controller.rb +5 -11
  67. data/app/controllers/pageflow/files_controller.rb +1 -1
  68. data/app/controllers/pageflow/pages_controller.rb +2 -2
  69. data/app/controllers/pageflow/revisions_controller.rb +1 -1
  70. data/app/controllers/pageflow/storylines_controller.rb +2 -3
  71. data/app/helpers/pageflow/common_entry_seed_helper.rb +0 -1
  72. data/app/helpers/pageflow/entries_helper.rb +6 -31
  73. data/app/helpers/pageflow/entry_json_seed_helper.rb +1 -1
  74. data/app/helpers/pageflow/public_i18n_helper.rb +1 -6
  75. data/app/jobs/pageflow/application_job.rb +6 -0
  76. data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +2 -4
  77. data/app/jobs/pageflow/poll_zencoder_job.rb +8 -8
  78. data/app/jobs/pageflow/process_file_job.rb +4 -4
  79. data/app/jobs/pageflow/prune_auto_snapshots_job.rb +3 -3
  80. data/app/jobs/pageflow/request_meta_data_from_zencoder_job.rb +4 -4
  81. data/app/jobs/pageflow/submit_file_to_zencoder_job.rb +4 -4
  82. data/app/jobs/pageflow/upload_file_to_s3_job.rb +5 -5
  83. data/app/mailers/pageflow/user_mailer.rb +1 -15
  84. data/app/models/concerns/pageflow/uploaded_file.rb +3 -3
  85. data/app/models/pageflow/audio_file.rb +1 -1
  86. data/app/models/pageflow/chapter.rb +1 -1
  87. data/app/models/pageflow/entry.rb +1 -1
  88. data/app/models/pageflow/invited_user.rb +1 -1
  89. data/app/models/pageflow/membership.rb +4 -2
  90. data/app/models/pageflow/page.rb +1 -1
  91. data/app/models/pageflow/published_entry.rb +3 -4
  92. data/app/models/pageflow/revision.rb +5 -3
  93. data/app/models/pageflow/storyline.rb +5 -1
  94. data/app/models/pageflow/theming.rb +1 -2
  95. data/app/models/pageflow/used_file.rb +12 -0
  96. data/app/models/pageflow/video_file.rb +1 -1
  97. data/app/views/admin/accounts/_form.html.erb +0 -8
  98. data/app/views/admin/accounts/_theming_details.html.arb +0 -3
  99. data/app/views/pageflow/entries/_mobile_navigation.html.erb +3 -2
  100. data/app/views/pageflow/entries/navigation/_page.html.erb +1 -3
  101. data/app/views/pageflow/entries/overview/_page.html.erb +1 -1
  102. data/app/views/pageflow/entry_json_seed/_entry.json.jbuilder +1 -1
  103. data/app/views/pageflow/user_mailer/invitation.html.erb +2 -2
  104. data/app/views/pageflow/user_mailer/invitation.text.erb +1 -1
  105. data/config/locales/de.yml +6 -16
  106. data/config/locales/en.yml +8 -18
  107. data/config/routes.rb +0 -6
  108. data/db/migrate/20140418225525_setup_schema.rb +295 -203
  109. data/db/migrate/20140418240000_add_attributes_to_users.rb +3 -6
  110. data/lib/generators/pageflow/resque/resque_generator.rb +6 -3
  111. data/lib/pageflow.rb +1 -1
  112. data/lib/pageflow/ability_mixin.rb +0 -1
  113. data/lib/pageflow/active_admin_patches/views/attributes_table.rb +1 -1
  114. data/lib/pageflow/active_admin_patches/views/table_for.rb +1 -1
  115. data/lib/pageflow/built_in_widget_type.rb +0 -8
  116. data/lib/pageflow/built_in_widget_types_plugin.rb +0 -2
  117. data/lib/pageflow/configuration.rb +0 -10
  118. data/lib/pageflow/engine.rb +5 -9
  119. data/lib/pageflow/user_mixin.rb +5 -0
  120. data/lib/pageflow/version.rb +1 -1
  121. data/lib/tasks/pageflow_tasks.rake +1 -11
  122. data/spec/factories/accounts.rb +1 -1
  123. data/spec/factories/audio_files.rb +1 -1
  124. data/spec/factories/chapters.rb +1 -3
  125. data/spec/factories/edit_locks.rb +2 -4
  126. data/spec/factories/entries.rb +1 -1
  127. data/spec/factories/feature_targets.rb +1 -1
  128. data/spec/factories/file_usages.rb +1 -1
  129. data/spec/factories/folders.rb +1 -1
  130. data/spec/factories/hosted_files.rb +6 -6
  131. data/spec/factories/image_files.rb +1 -1
  132. data/spec/factories/invited_user.rb +1 -1
  133. data/spec/factories/memberships.rb +1 -1
  134. data/spec/factories/pages.rb +1 -1
  135. data/spec/factories/revisions.rb +1 -1
  136. data/spec/factories/storylines.rb +1 -1
  137. data/spec/factories/text_track_files.rb +1 -1
  138. data/spec/factories/themings.rb +1 -1
  139. data/spec/factories/users.rb +1 -1
  140. data/spec/factories/video_files.rb +1 -1
  141. data/spec/factories/widgets.rb +1 -1
  142. data/vendor/assets/javascripts/audio5.min.js +129 -280
  143. metadata +103 -219
  144. data/app/assets/audios/pageflow/unmute.mp3 +0 -0
  145. data/app/assets/javascripts/pageflow/background_media.js +0 -22
  146. data/app/assets/javascripts/pageflow/cookie_notice.js +0 -7
  147. data/app/assets/javascripts/pageflow/editor/views/info_box_view.js +0 -8
  148. data/app/assets/javascripts/pageflow/editor/views/widget_types/cookie_notice_bar.js +0 -15
  149. data/app/assets/javascripts/pageflow/media_player/handle_failed_play.js +0 -34
  150. data/app/assets/javascripts/pageflow/slideshow/adjacent_preloader.js +0 -26
  151. data/app/assets/stylesheets/pageflow/page_types/video/mobile_poster.scss +0 -15
  152. data/app/assets/stylesheets/pageflow/themes/default/background_media_unmute_button.scss +0 -77
  153. data/app/assets/stylesheets/pageflow/themes/default/cookie_notice_bar.scss +0 -57
  154. data/app/assets/stylesheets/pageflow/themes/default/page/hyphenate.scss +0 -24
  155. data/app/controllers/pageflow/admin/initial_passwords_controller.rb +0 -8
  156. data/app/views/pageflow/admin/initial_passwords/edit.html.erb +0 -16
  157. data/app/views/pageflow/entries/mobile_navigation/_page.html.erb +0 -5
  158. data/db/migrate/20140624135420_create_themings.rb +0 -15
  159. data/db/migrate/20140624135421_create_themings_for_existing_accounts.rb +0 -26
  160. data/db/migrate/20140624135422_change_theme_references_to_theming_references.rb +0 -45
  161. data/db/migrate/20140624135423_remove_attributes_from_themes.rb +0 -10
  162. data/db/migrate/20140624135424_create_accounts_themes_join_table.rb +0 -8
  163. data/db/migrate/20140624135425_move_cname_from_account_to_theming.rb +0 -21
  164. data/db/migrate/20140625184800_drop_themes.rb +0 -14
  165. data/db/migrate/20140704110631_add_confirmed_by_to_encoded_files.rb +0 -6
  166. data/db/migrate/20140819081454_add_home_url_attributes_to_themings_and_revisions.rb +0 -9
  167. data/db/migrate/20141027102310_create_widgets.rb +0 -11
  168. data/db/migrate/20141028125408_add_emphasize_chapter_beginning_to_revisions.rb +0 -5
  169. data/db/migrate/20141119164526_add_emphasize_new_pages_to_revisions.rb +0 -5
  170. data/db/migrate/20141119174032_add_sharing_image_to_revisions.rb +0 -7
  171. data/db/migrate/20141128150305_add_locale_to_users.rb +0 -5
  172. data/db/migrate/20141208161030_add_locale_to_revisions.rb +0 -5
  173. data/db/migrate/20141211110226_add_configuration_to_chapters.rb +0 -5
  174. data/db/migrate/20150115175116_add_features_configuration_to_accounts.rb +0 -5
  175. data/db/migrate/20150115175207_add_features_configuration_to_entries.rb +0 -5
  176. data/db/migrate/20150603091823_add_password_attributes_to_revisions.rb +0 -6
  177. data/db/migrate/20150825133449_update_audio_loop_pages_to_use_atmo.rb +0 -24
  178. data/db/migrate/20150826125417_create_pageflow_storylines.rb +0 -12
  179. data/db/migrate/20150826125744_add_storyline_id_to_chapters.rb +0 -6
  180. data/db/migrate/20150826125745_insert_main_storylines.rb +0 -28
  181. data/db/migrate/20150830105831_remove_revision_id_from_chapters.rb +0 -5
  182. data/db/migrate/20150830110006_remove_entry_id_from_chapters.rb +0 -5
  183. data/db/migrate/20151022080518_add_first_published_at_to_entries.rb +0 -14
  184. data/db/migrate/20160131222203_add_cache_counters.rb +0 -23
  185. data/db/migrate/20160201130118_add_additional_cnames_to_themings.rb +0 -5
  186. data/db/migrate/20160216130336_add_meta_fields_to_revision.rb +0 -7
  187. data/db/migrate/20160225075853_add_overview_button_enabled_to_revisions.rb +0 -5
  188. data/db/migrate/20160304072911_rename_membership_entry_and_make_polymorphic.rb +0 -19
  189. data/db/migrate/20160304151327_add_role_to_membership.rb +0 -19
  190. data/db/migrate/20160310080213_add_edited_at_to_entries.rb +0 -9
  191. data/db/migrate/20160425192648_add_index_for_revision_publication_timestamps.rb +0 -5
  192. data/db/migrate/20160504093145_replace_role_and_account_on_user.rb +0 -42
  193. data/db/migrate/20160531152500_update_users_count.rb +0 -27
  194. data/db/migrate/20160617123557_add_meta_fields_to_theming.rb +0 -7
  195. data/db/migrate/20160707125400_add_output_presences_to_video_files.rb +0 -5
  196. data/db/migrate/20160715105408_add_share_url_to_revisions.rb +0 -5
  197. data/db/migrate/20160824115000_add_parent_file_to_video_files.rb +0 -8
  198. data/db/migrate/20160824115100_add_parent_file_to_audio_files.rb +0 -8
  199. data/db/migrate/20160824115200_add_parent_file_to_image_files.rb +0 -8
  200. data/db/migrate/20160929102700_add_configuration_to_files.rb +0 -7
  201. data/db/migrate/20161007144500_add_text_track_files.rb +0 -31
  202. data/db/migrate/20161216175734_move_configuration_from_file_to_file_usage.rb +0 -27
  203. data/db/migrate/20161230144429_add_processed_attachment_to_text_track_files.rb +0 -8
  204. data/db/migrate/20170201074328_add_configuration_to_widgets.rb +0 -5
  205. data/db/migrate/20170222124848_update_video_file_output_presences.rb +0 -12
  206. data/db/migrate/20170315130000_add_theme_name_to_revisions.rb +0 -12
  207. data/db/migrate/20170421112300_turn_background_video_pages_into_background_image_pages.rb +0 -22
  208. data/db/migrate/20170912165050_reset_copied_snapshot_type.rb +0 -24
  209. data/db/migrate/20170913105048_fix_hls_output_presences_for_legacy_video_files.rb +0 -12
  210. data/db/migrate/20180528144334_add_privacy_link_url_to_themings.rb +0 -5
  211. data/db/migrate/20190109085744_add_default_locale_to_themings.rb +0 -6
  212. data/lib/generators/pageflow/resque/templates/devise_async.rb +0 -6
  213. data/lib/generators/pageflow/resque/templates/resque_logger.rb +0 -16
  214. data/lib/generators/pageflow/resque/templates/resque_mailer.rb +0 -4
  215. data/lib/pageflow/primary_domain_entry_redirect.rb +0 -25
@@ -1,5 +0,0 @@
1
- class AddShareUrlToRevisions < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_revisions, :share_url, :string, null: false, default: ''
4
- end
5
- end
@@ -1,8 +0,0 @@
1
- class AddParentFileToVideoFiles < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_video_files, :parent_file_id, :integer
4
- add_column :pageflow_video_files, :parent_file_model_type, :string
5
- add_index :pageflow_video_files, [:parent_file_id, :parent_file_model_type],
6
- name: 'index_video_files_on_parent_id_and_parent_model_type'
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- class AddParentFileToAudioFiles < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_audio_files, :parent_file_id, :integer
4
- add_column :pageflow_audio_files, :parent_file_model_type, :string
5
- add_index :pageflow_audio_files, [:parent_file_id, :parent_file_model_type],
6
- name: 'index_audio_files_on_parent_id_and_parent_model_type'
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- class AddParentFileToImageFiles < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_image_files, :parent_file_id, :integer
4
- add_column :pageflow_image_files, :parent_file_model_type, :string
5
- add_index :pageflow_image_files, [:parent_file_id, :parent_file_model_type],
6
- name: 'index_image_files_on_parent_id_and_parent_model_type'
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- class AddConfigurationToFiles < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_audio_files, :configuration, :text
4
- add_column :pageflow_image_files, :configuration, :text
5
- add_column :pageflow_video_files, :configuration, :text
6
- end
7
- end
@@ -1,31 +0,0 @@
1
- class AddTextTrackFiles < ActiveRecord::Migration
2
- def change
3
- create_table :pageflow_text_track_files do |t|
4
- t.belongs_to(:entry, index: true)
5
- t.belongs_to(:uploader, index: true)
6
-
7
- t.string(:state)
8
- t.string(:rights)
9
-
10
- t.string(:attachment_on_filesystem_file_name)
11
- t.string(:attachment_on_filesystem_content_type)
12
- t.integer(:attachment_on_filesystem_file_size, limit: 8)
13
- t.datetime(:attachment_on_filesystem_updated_at)
14
-
15
- t.string(:attachment_on_s3_file_name)
16
- t.string(:attachment_on_s3_content_type)
17
- t.integer(:attachment_on_s3_file_size, limit: 8)
18
- t.datetime(:attachment_on_s3_updated_at)
19
-
20
- t.timestamps
21
-
22
- t.integer(:parent_file_id)
23
- t.string(:parent_file_model_type)
24
-
25
- t.text(:configuration)
26
- end
27
-
28
- add_index :pageflow_text_track_files, [:parent_file_id, :parent_file_model_type],
29
- name: 'index_text_track_files_on_parent_id_and_parent_model_type'
30
- end
31
- end
@@ -1,27 +0,0 @@
1
- class MoveConfigurationFromFileToFileUsage < ActiveRecord::Migration
2
- def up
3
- add_column :pageflow_file_usages, :configuration, :text
4
-
5
- {
6
- pageflow_image_files: 'Pageflow::ImaegFile',
7
- pageflow_video_files: 'Pageflow::VideoFile',
8
- pageflow_audio_files: 'Pageflow::AudioFile'
9
- }.each do |table_name, type_name|
10
- execute(<<-SQL)
11
- UPDATE pageflow_file_usages
12
- INNER JOIN #{table_name} ON
13
- pageflow_file_usages.file_id = #{table_name}.id AND
14
- pageflow_file_usages.file_type = "#{type_name}"
15
- SET pageflow_file_usages.configuration = #{table_name}.configuration
16
- SQL
17
- end
18
-
19
- remove_column :pageflow_image_files, :configuration
20
- remove_column :pageflow_video_files, :configuration
21
- remove_column :pageflow_audio_files, :configuration
22
- end
23
-
24
- def down
25
- raise ActiveRecord::IrreversibleMigration
26
- end
27
- end
@@ -1,8 +0,0 @@
1
- class AddProcessedAttachmentToTextTrackFiles < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_text_track_files, :processed_attachment_file_name, :string
4
- add_column :pageflow_text_track_files, :processed_attachment_content_type, :string
5
- add_column :pageflow_text_track_files, :processed_attachment_file_size, :integer, limit: 8
6
- add_column :pageflow_text_track_files, :processed_attachment_updated_at, :datetime
7
- end
8
- end
@@ -1,5 +0,0 @@
1
- class AddConfigurationToWidgets < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_widgets, :configuration, :text
4
- end
5
- end
@@ -1,12 +0,0 @@
1
- class UpdateVideoFileOutputPresences < ActiveRecord::Migration
2
- def up
3
- execute(<<-SQL)
4
- UPDATE pageflow_video_files
5
- SET output_presences = '{"high":true,"medium":true,"low":true,"hls-playlist":true}'
6
- WHERE output_presences IS NULL;
7
- SQL
8
- end
9
-
10
- def down
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class AddThemeNameToRevisions < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_revisions, :theme_name, :string, null: false, default: 'default'
4
-
5
- execute(<<-SQL)
6
- UPDATE pageflow_revisions, pageflow_entries, pageflow_themings
7
- SET pageflow_revisions.theme_name = pageflow_themings.theme_name
8
- WHERE pageflow_revisions.entry_id = pageflow_entries.id
9
- AND pageflow_entries.theming_id = pageflow_themings.id
10
- SQL
11
- end
12
- end
@@ -1,22 +0,0 @@
1
- class TurnBackgroundVideoPagesIntoBackgroundImagePages < ActiveRecord::Migration
2
- # Pageflow::Page might have gotten out of sync with schema at this
3
- # point. Use local model instead.
4
- class MigratedPage < ActiveRecord::Base
5
- self.table_name = 'pageflow_pages'
6
-
7
- serialize :configuration, JSON
8
-
9
- def configuration
10
- super || {}
11
- end
12
- end
13
-
14
- def change
15
- MigratedPage.where(template: 'background_video').find_each do |page|
16
- page.template = 'background_image'
17
- page.configuration['background_type'] = 'video'
18
-
19
- page.save!
20
- end
21
- end
22
- end
@@ -1,24 +0,0 @@
1
- class ResetCopiedSnapshotType < ActiveRecord::Migration
2
- def up
3
- fix_restored_drafts
4
- fix_publications_created_from_restored_drafts
5
- end
6
-
7
- private
8
-
9
- def fix_restored_drafts
10
- execute(<<-SQL)
11
- UPDATE pageflow_revisions
12
- SET snapshot_type = NULL
13
- WHERE frozen_at IS NULL;
14
- SQL
15
- end
16
-
17
- def fix_publications_created_from_restored_drafts
18
- execute(<<-SQL)
19
- UPDATE pageflow_revisions
20
- SET snapshot_type = NULL
21
- WHERE published_at IS NOT NULL;
22
- SQL
23
- end
24
- end
@@ -1,12 +0,0 @@
1
- class FixHlsOutputPresencesForLegacyVideoFiles < ActiveRecord::Migration
2
- def up
3
- execute(<<-SQL)
4
- UPDATE pageflow_video_files
5
- SET output_presences = '{"high":true,"medium":true,"low":true,"hls-playlist":true}'
6
- WHERE output_presences = '{"high":true,"medium":true,"low":true}';
7
- SQL
8
- end
9
-
10
- def down
11
- end
12
- end
@@ -1,5 +0,0 @@
1
- class AddPrivacyLinkUrlToThemings < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_themings, :privacy_link_url, :string
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- class AddDefaultLocaleToThemings < ActiveRecord::Migration
2
- def change
3
- add_column :pageflow_themings, :default_locale, :string,
4
- after: 'default_publisher', default: 'de'
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- # Deliver devise mails inside resque jobs.
2
-
3
- require 'devise/async'
4
-
5
- Devise::Async.enabled = Rails.env.production?
6
- Devise::Async.backend = :resque
@@ -1,16 +0,0 @@
1
- # resque-logger is required by the state_machine_job gem to write
2
- # debug output to logs files. Each queue has its own log file in the
3
- # directory specified below.
4
-
5
- require 'fileutils'
6
-
7
- log_dir = Rails.root.join('log', 'jobs', Rails.env)
8
- FileUtils.mkdir_p(log_dir)
9
-
10
- Resque.logger_config = {
11
- folder: log_dir,
12
- class_name: Logger,
13
- class_args: [ 'daily', 1.kilobyte ],
14
- level: Logger::INFO,
15
- formatter: Logger::Formatter.new
16
- }
@@ -1,4 +0,0 @@
1
- # Used by pageflow's own mailers to perform mail delivery inside
2
- # resque jobs.
3
-
4
- Resque::Mailer.excluded_environments = [:development, :test]
@@ -1,25 +0,0 @@
1
- module Pageflow
2
- # Use as {Configuration#public_entry_redirect} to make sure entries
3
- # are accessed via their account's configured cname.
4
- #
5
- # @since 12.4
6
- class PrimaryDomainEntryRedirect
7
- def call(entry, request)
8
- theming = entry.theming
9
-
10
- if theming.cname.present? &&
11
- !known_domains(theming).include?(request.host)
12
- [request.protocol, theming.cname, request.fullpath].join
13
- end
14
- end
15
-
16
- private
17
-
18
- def known_domains(theming)
19
- [
20
- theming.cname,
21
- (theming.additional_cnames || '').split(',').map(&:strip)
22
- ].flatten
23
- end
24
- end
25
- end