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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7a9ec0648822851e7c4e0d555d8bd34e8976e85936ca5c59bdb065d055dc801
4
- data.tar.gz: 536dbfb80537fbcf90c7d137fe4b02ade45952948314cf88d1a58e4ceb9d6bf1
3
+ metadata.gz: 5b6985a1f5f2effe4bda0411263b904e1b32520a788f76f9533b16f0d5ce5ce0
4
+ data.tar.gz: f6bb3eaa7927bb4504522cd55b0cd084e272ee662d3fe90490307b0df7d772a8
5
5
  SHA512:
6
- metadata.gz: 0fa76e57beef1df910bdc0c602eb419aaf85dec2799987a8186b1d226d773a99407966ffdf4964e43a42adfbcfc7af50164abb5a814b74d29b84b3fc0eb56d30
7
- data.tar.gz: db1e5b3d5be88c54dc47de4a34537db50aaaa115a7c1793bd06e7579727f427a3c5a9bb574cdf1247f3cac18ade4e7b04eb08b63cf966b2d46561ff30d1f619b
6
+ metadata.gz: 24145fa9c1179167a1f5c71ae979c1bd53f8efd96659e3a86df77ec5314cfbd176bed252124e51a5b4dc29cab0f3d43177c72a39475836ce83efcc87e6ae4bcd
7
+ data.tar.gz: 2224cb2c9bc7eb9a06b07bdfc57711207585633f6da242510b885dcd97e69c39d9e13bb6a9dd6ba7fecda398ebc687a8f969f8885e6ba432d8d6fcdbb6b2dff3
data/CHANGELOG.md CHANGED
@@ -1,24 +1,86 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 12.6.0
3
+ ### Version 13.0.0.beta1
4
4
 
5
- 2019-01-28
5
+ 2018-07-30
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow/compare/12-5-stable...v12.6.0)
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/12-x-stable...v13.0.0.beta1)
8
8
 
9
- - Do not use asset_host in entry stylesheet link tags
10
- ([#1110](https://github.com/codevise/pageflow/pull/1110))
11
- - Add theme vars for phone typography of tagline and subtitle
12
- ([#1109](https://github.com/codevise/pageflow/pull/1109))
13
-
14
- ##### Internal:
15
- - Also release pageflow-support when running release task
16
- ([#1116](https://github.com/codevise/pageflow/pull/1116))
17
- - Run npm ci on Travis and release:prepare task
18
- ([#1114](https://github.com/codevise/pageflow/pull/1114))
19
- - Add package-lock.json to version control
20
- ([#1111](https://github.com/codevise/pageflow/pull/1111))
9
+ #### Breaking Changes
10
+
11
+ - All of the migrations of earlier versions have been consolidated
12
+ into a single migration to speed up setup of new applications.
13
+ ([#975](https://github.com/codevise/pageflow/pull/975))
14
+
15
+ Make sure to update your application to Pageflow 12.2 before
16
+ updating to 13.0 to make sure the host application contains all
17
+ migrations.
18
+
19
+ - Upgraded to Rails 5.2 and Active Admin 1.3
20
+ ([#938](https://github.com/codevise/pageflow/pull/938))
21
+
22
+ Follow the Rails upgrade guide and review the Active Admin changelog
23
+ to update the host application.
24
+
25
+ - Migrated from Resque to Active Job
26
+ ([#976](https://github.com/codevise/pageflow/pull/976))
27
+
28
+ Pageflow no longer depends on Resque, but can work with different
29
+ Active Job backends instead. The install generator still sets up
30
+ Resque as backend. To coninute using Resque in an existing
31
+ application, you need to add the following dependencies to the host
32
+ application's `Gemfile`:
33
+
34
+ gem 'resque', '~> 1.25'
35
+ gem 'resque-scheduler', '~> 2.5'
36
+ gem 'ar_after_transaction', '~> 0.4.0'
37
+ gem 'redis', '~> 3.0'
38
+ gem 'redis-namespace', '~> 1.5'
39
+
40
+ The `resque-logger` and `resque_mailer` gems are no longer
41
+ used. Their initializers need to be removed from the host
42
+ application:
43
+
44
+ $ rm config/initializers/resque_logger.rb
45
+ $ rm config/initializers/resque_mailer.rb
46
+
47
+ The following unused line has been removed from
48
+ `Pageflow::AbilityMixin`:
49
+
50
+ can(:manage, Resque) if user.admin?
51
+
52
+ If the host application depends on this permission, you need to add
53
+ it to the `Ability` yourself.
54
+
55
+ - Upgraded to Devise 4.4.0
56
+ ([#932](https://github.com/codevise/pageflow/pull/932))
57
+
58
+ Consider re-running the Devise intall generator to update the Devise
59
+ initializer:
60
+
61
+ $ bin/rails generate devise:install
62
+
63
+ - Devise Async has been removed
64
+ ([#932](https://github.com/codevise/pageflow/pull/932))
65
+
66
+ We now use Active Job to allow sending Devise mails in background
67
+ jobs. The Device Async initializer (which was originally created by
68
+ the `pageflow:install` generator) needs to be removed:
69
+
70
+ $ rm config/initializers/device_async.rb
71
+
72
+ - The deprecated Factory Girl gem has been replaced with its successor
73
+ Factory Bot. To continue using factories defined by Pageflow, you
74
+ need to switch as well.
75
+ ([#943](https://github.com/codevise/pageflow/pull/943))
76
+
77
+ #### Internals
78
+
79
+ - Fix building of nested associations
80
+ ([#977](https://github.com/codevise/pageflow/pull/977))
81
+ - Upgrade Rubocop and remove imported Hound config
82
+ ([#973](https://github.com/codevise/pageflow/pull/973))
21
83
 
22
84
  See
23
- [12-5-stable branch](https://github.com/codevise/pageflow/blob/12-5-stable/CHANGELOG.md)
85
+ [12-x-stable branch](https://github.com/codevise/pageflow/blob/12-x-stable/CHANGELOG.md)
24
86
  for previous changes.
data/README.md CHANGED
@@ -40,7 +40,7 @@ Pageflow assumes the following choice of libraries:
40
40
  * [Devise](https://github.com/plataformatec/devise) for authentication
41
41
  * [CanCanCan](https://github.com/CanCanCommunity/cancancan) for authorization
42
42
  * [ActiveAdmin](http://activeadmin.info/) for administration
43
- * [Resque](https://github.com/resque/resque) for background jobs
43
+ * [Resque](https://github.com/resque/resque) for as default for background jobs
44
44
  * [FriendlyId](https://github.com/norman/friendly_id) for pretty URLs
45
45
  * [Paperclip](https://github.com/thoughtbot/paperclip) for attachment handling
46
46
  * [Backbone](http://backbonejs.org/) [Marionette](http://marionettejs.com/) for the editor
@@ -95,6 +95,13 @@ for details.
95
95
  # Required for Rails 4.2 compatibility
96
96
  gem 'state_machine', git: 'https://github.com/codevise/state_machine.git'
97
97
 
98
+ # The install generator sets up Resque as Active Job backend
99
+ gem 'resque', '~> 1.25'
100
+ gem 'resque-scheduler', '~> 2.5'
101
+ gem 'ar_after_transaction', '~> 0.4.0'
102
+ gem 'redis', '~> 3.0'
103
+ gem 'redis-namespace', '~> 1.5'
104
+
98
105
  Run bundler to install dependencies:
99
106
 
100
107
  $ bundle install
data/Rakefile CHANGED
@@ -14,10 +14,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
- task 'release' do
18
- Rake.application['pageflow:release:pageflow_support'].invoke
19
- end
20
-
21
17
  require 'semmy'
22
18
  Semmy::Tasks.install do |config|
23
19
  config.github_repository = 'codevise/pageflow'
@@ -72,27 +72,26 @@ module Pageflow
72
72
 
73
73
  controller do
74
74
  helper Pageflow::Admin::FeaturesHelper
75
+ helper Pageflow::Admin::WidgetsHelper
75
76
  helper Pageflow::Admin::FormHelper
76
- helper Pageflow::Admin::LocalesHelper
77
77
  helper Pageflow::Admin::MembershipsHelper
78
- helper Pageflow::Admin::WidgetsHelper
79
78
  helper ThemesHelper
80
79
 
81
80
  def new
82
81
  @account = Account.new
83
- @account.build_default_theming(default_locale: current_user.locale)
82
+ @account.build_default_theming
84
83
  end
85
84
 
86
85
  def create
87
86
  @account = Account.new(permitted_params[:account])
88
- @account.build_default_theming(permitted_params[:account][:default_theming_attributes])
87
+ @account.build_default_theming(permitted_params.fetch(:account, {})[:default_theming_attributes])
89
88
  super
90
89
  update_widgets
91
90
  end
92
91
 
93
92
  def update
94
93
  update! do |success, failure|
95
- success.html { redirect_to(admin_account_path(resource, params.slice(:tab))) }
94
+ success.html { redirect_to(admin_account_path(resource, params.permit(:tab))) }
96
95
  end
97
96
  update_widgets
98
97
  end
@@ -102,7 +101,7 @@ module Pageflow
102
101
  end
103
102
 
104
103
  def widgets_params
105
- params.fetch(:widgets, {}).map do |role, type_name|
104
+ (params[:widgets].try(:permit!).to_h || {}).map do |role, type_name|
106
105
  {role: role, type_name: type_name}
107
106
  end
108
107
  end
@@ -141,13 +140,11 @@ module Pageflow
141
140
  :imprint_link_label,
142
141
  :copyright_link_url,
143
142
  :copyright_link_label,
144
- :privacy_link_url,
145
143
  :home_url,
146
144
  :home_button_enabled_by_default,
147
145
  :default_author,
148
146
  :default_publisher,
149
- :default_keywords,
150
- :default_locale
147
+ :default_keywords
151
148
  ] +
152
149
  permitted_attributes_for(:theming)
153
150
  end
@@ -221,7 +221,7 @@ module Pageflow
221
221
 
222
222
  def update
223
223
  update! do |success, _|
224
- success.html { redirect_to(admin_entry_path(resource, params.slice(:tab))) }
224
+ success.html { redirect_to(admin_entry_path(resource, params.permit(:tab))) }
225
225
  end
226
226
  end
227
227
 
@@ -43,7 +43,7 @@ module Pageflow
43
43
  end
44
44
 
45
45
  def permitted_params
46
- result = params.permit(folder: [:name, :account_id])
46
+ result = params.permit(folder: [:name, :account_id]).to_h
47
47
  restrict_attributes(result[:folder]) if result[:folder]
48
48
  result
49
49
  end
@@ -132,7 +132,7 @@ module Pageflow
132
132
 
133
133
  if request.patch?
134
134
  if @user.update_with_password(user_profile_params)
135
- sign_in @user, bypass: true
135
+ bypass_sign_in @user, scope: :user
136
136
  redirect_to admin_root_path, notice: I18n.t('pageflow.admin.users.me.updated')
137
137
  end
138
138
  end
@@ -152,21 +152,21 @@ module Pageflow
152
152
  user = InvitedUser.find(params[:id])
153
153
  authorize!(:read, user)
154
154
  user.send_invitation!
155
- redirect_to :back, notice: I18n.t('pageflow.admin.users.resent_invitation')
155
+ redirect_back fallback_location: admin_user_path(user), notice: I18n.t('pageflow.admin.users.resent_invitation')
156
156
  end
157
157
 
158
158
  member_action :suspend, method: :post do
159
159
  user = User.find(params[:id])
160
160
  authorize!(:suspend, user)
161
161
  user.suspend!
162
- redirect_to :back, notice: I18n.t('pageflow.admin.users.suspended')
162
+ redirect_back fallback_location: admin_user_path(user), notice: I18n.t('pageflow.admin.users.suspended')
163
163
  end
164
164
 
165
165
  member_action :unsuspend, method: :post do
166
166
  user = User.find(params[:id])
167
167
  authorize!(:suspend, user)
168
168
  user.unsuspend!
169
- redirect_to :back, notice: I18n.t('pageflow.admin.users.unsuspended')
169
+ redirect_back fallback_location: admin_user_path(user), notice: I18n.t('pageflow.admin.users.unsuspended')
170
170
  end
171
171
 
172
172
  controller do
@@ -1,7 +1,7 @@
1
1
  pageflow.assetUrls = {
2
- unmuteSound: '<%= asset_path("pageflow/unmute.mp3") %>',
3
2
  largeBandwidthProbe: '<%= Rails.env.test? ? asset_path("bandwidth_probe_large.png") : "//#{File.join(Pageflow.config.zencoder_options[:s3_host_alias], "bandwidth_probe_large.png")}" %>',
4
3
  smallBandwidthProbe: '<%= Rails.env.test? ? asset_path("bandwidth_probe_small.png") : "//#{File.join(Pageflow.config.zencoder_options[:s3_host_alias], "bandwidth_probe_small.png")}" %>',
4
+ audioSwf: '<%= asset_path "pageflow/audio5js.swf" %>',
5
5
  emptyMp4: '<%= asset_path "pageflow/empty.mp4" %>',
6
6
  emptyWebm: '<%= asset_path "pageflow/empty.webm" %>'
7
7
  };
@@ -128,10 +128,6 @@ pageflow.Audio.MultiPlayer = function(pool, options) {
128
128
  that.listenTo(player, 'ended', function() {
129
129
  that.trigger('ended', {audioFileId: id});
130
130
  });
131
-
132
- that.listenTo(player, 'playfailed', function() {
133
- that.trigger('playfailed', {audioFileId: id});
134
- });
135
131
  }
136
132
 
137
133
  function stopEventPropagation(player) {
@@ -40,7 +40,7 @@ pageflow.AudioPlayer = function(sources, options) {
40
40
  swf_path: pageflow.assetUrls.audioSwf,
41
41
  throw_errors: false,
42
42
  format_time: false,
43
- codecs: options.codecs || ['vorbis', 'mp4', 'mp3'],
43
+ codecs: ['vorbis', 'mp4', 'mp3'],
44
44
  ready: ready.resolve,
45
45
  loop: options.loop
46
46
  });
@@ -10,11 +10,9 @@
10
10
  //= require_self
11
11
 
12
12
  //= require ./object
13
- //= require ./background_media
14
13
  //= require ./entry_data
15
14
  //= require ./seed_entry_data
16
15
  //= require ./cookies
17
- //= require ./cookie_notice
18
16
  //= require ./events
19
17
  //= require ./page_type
20
18
  //= require ./page_transitions
@@ -2,97 +2,83 @@
2
2
  * Detect browser via user agent. Use only if feature detection is not
3
3
  * an option.
4
4
  */
5
- pageflow.browser.Agent = function(userAgent) {
6
- return {
7
- matchesSilk: function() {
8
- return matches(/\bSilk\b/);
9
- },
10
-
11
- matchesDesktopSafari9: function() {
12
- return this.matchesSafari9() && !this.matchesMobilePlatform();
13
- },
14
-
15
- matchesDesktopSafari10: function() {
16
- return this.matchesSafari10() && !this.matchesMobilePlatform();
17
- },
18
-
19
- matchesSafari9: function() {
20
- return this.matchesSafari() &&
21
- matches(/Version\/9/i);
22
- },
23
-
24
- matchesSafari10: function() {
25
- return this.matchesSafari() &&
26
- matches(/Version\/10/i);
27
- },
28
-
29
- matchesSafari11: function() {
30
- return this.matchesSafari() &&
31
- matches(/Version\/11/i);
32
- },
33
-
34
- matchesSafari11AndAbove: function() {
35
- return this.matchesSafari() &&
36
- captureGroupGreaterOrEqual(/Version\/(\d+)/i, 11);
37
- },
38
-
39
- matchesSafari: function() {
40
- // - Chrome also reports to be a Safari
41
- // - Safari does not report to be a Chrome
42
- // - Edge also reports to be a Safari, but also reports to be Chrome
43
- return matches(/Safari\//i) &&
44
- !matches(/Chrome/i);
45
- },
46
-
47
- /**
48
- * Returns true on iOS Safari.
49
- * @return {boolean}
50
- */
51
- matchesMobileSafari: function() {
52
- var matchers = [/iPod/i, /iPad/i, /iPhone/i];
53
-
54
- return _.any(matchers, function(matcher) {
55
- return userAgent.match(matcher);
56
- });
57
- },
58
-
59
- /**
60
- * Returns true on iOS or Android.
61
- * @return {boolean}
62
- */
63
- matchesMobilePlatform: function() {
64
- var matchers = [/iPod/i, /iPad/i, /iPhone/i, /Android/i, /Silk/i, /IEMobile/i];
65
-
66
- return _.any(matchers, function(matcher) {
67
- return userAgent.match(matcher);
68
- });
69
- },
70
-
71
- /**
72
- * Returns true on Internet Explorser version 9, 10 and 11.
73
- * @return {boolean}
74
- */
75
- matchesIEUpTo11: function() {
76
- return userAgent.match(/Trident\//);
77
- },
78
-
79
- /**
80
- * Returns true in InApp browser of Facebook app.
81
- * @return {boolean}
82
- */
83
- matchesFacebookInAppBrowser: function() {
84
- return userAgent.match(/FBAN/) && userAgent.match(/FBAV/);
85
- }
86
- };
87
-
88
- function matches(exp) {
89
- return !!userAgent.match(exp);
90
- }
91
-
92
- function captureGroupGreaterOrEqual(exp, version) {
93
- var match = userAgent.match(exp);
94
- return match && match[1] && parseInt(match[1], 10) >= version;
5
+ pageflow.browser.agent = {
6
+ matchesSilk: function() {
7
+ return navigator.userAgent.match(/\bSilk\b/);
8
+ },
9
+
10
+ matchesDesktopSafari9: function() {
11
+ return this.matchesSafari9() && !this.matchesMobilePlatform();
12
+ },
13
+
14
+ matchesDesktopSafari10: function() {
15
+ return this.matchesSafari10() && !this.matchesMobilePlatform();
16
+ },
17
+
18
+ matchesSafari9: function() {
19
+ return this.matchesSafari() &&
20
+ this._matches(/Version\/9/i);
21
+ },
22
+
23
+ matchesSafari10: function() {
24
+ return this.matchesSafari() &&
25
+ this._matches(/Version\/10/i);
26
+ },
27
+
28
+ matchesSafari11: function() {
29
+ return this.matchesSafari() &&
30
+ this._matches(/Version\/11/i);
31
+ },
32
+
33
+ matchesSafari: function() {
34
+ // - Chrome also reports to be a Safari
35
+ // - Safari does not report to be a Chrome
36
+ // - Edge also reports to be a Safari, but also reports to be Chrome
37
+ return this._matches(/Safari\//i) &&
38
+ !this._matches(/Chrome/i);
39
+ },
40
+
41
+ /**
42
+ * Returns true on iOS Safari.
43
+ * @return {boolean}
44
+ */
45
+ matchesMobileSafari: function() {
46
+ var matchers = [/iPod/i, /iPad/i, /iPhone/i];
47
+
48
+ return _.any(matchers, function(matcher) {
49
+ return navigator.userAgent.match(matcher);
50
+ });
51
+ },
52
+
53
+ /**
54
+ * Returns true on iOS or Android.
55
+ * @return {boolean}
56
+ */
57
+ matchesMobilePlatform: function() {
58
+ var matchers = [/iPod/i, /iPad/i, /iPhone/i, /Android/i, /Silk/i, /IEMobile/i];
59
+
60
+ return _.any(matchers, function(matcher) {
61
+ return navigator.userAgent.match(matcher);
62
+ });
63
+ },
64
+
65
+ /**
66
+ * Returns true on Internet Explorser version 9, 10 and 11.
67
+ * @return {boolean}
68
+ */
69
+ matchesIEUpTo11: function() {
70
+ return navigator.userAgent.match(/Trident\//);
71
+ },
72
+
73
+ /**
74
+ * Returns true in InApp browser of Facebook app.
75
+ * @return {boolean}
76
+ */
77
+ matchesFacebookInAppBrowser: function() {
78
+ return navigator.userAgent.match(/FBAN/) && navigator.userAgent.match(/FBAV/);
79
+ },
80
+
81
+ _matches: function(exp) {
82
+ return navigator.userAgent.match(exp);
95
83
  }
96
84
  };
97
-
98
- pageflow.browser.agent = new pageflow.browser.Agent(navigator.userAgent);