pageflow 15.0.0.beta2 → 15.0.0.beta3

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +105 -2
  3. data/README.md +5 -1
  4. data/app/assets/javascripts/pageflow/dist/react-client.js +176 -56
  5. data/app/assets/javascripts/pageflow/dist/react-server.js +176 -56
  6. data/app/assets/javascripts/pageflow/editor/api/widget_type.js +0 -1
  7. data/app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js +18 -0
  8. data/app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js +3 -0
  9. data/app/assets/javascripts/pageflow/ui/views/tabs_view.js +2 -1
  10. data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
  11. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +37 -1
  12. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss +56 -0
  13. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss +10 -50
  14. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +10 -1
  15. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +5 -0
  16. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +4 -0
  17. data/app/controllers/pageflow/editor/files_controller.rb +6 -3
  18. data/app/helpers/pageflow/meta_tags_helper.rb +3 -3
  19. data/app/helpers/pageflow/social_share_links_helper.rb +1 -1
  20. data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +41 -0
  21. data/app/models/concerns/pageflow/reusable_file.rb +6 -0
  22. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  23. data/app/models/pageflow/draft_entry.rb +26 -2
  24. data/app/models/pageflow/membership.rb +3 -4
  25. data/app/models/pageflow/revision.rb +20 -4
  26. data/app/models/pageflow/widget.rb +12 -6
  27. data/config/locales/de.yml +24 -0
  28. data/config/locales/en.yml +24 -0
  29. data/db/migrate/20140418225525_setup_schema.rb +18 -18
  30. data/db/migrate/20190820152900_drop_accounts_themes.rb +8 -0
  31. data/lib/pageflow/built_in_page_type.rb +3 -0
  32. data/lib/pageflow/built_in_widget_type.rb +7 -0
  33. data/lib/pageflow/built_in_widget_types_plugin.rb +6 -0
  34. data/lib/pageflow/entry_export_import.rb +43 -0
  35. data/lib/pageflow/entry_export_import/attachment_files.rb +65 -0
  36. data/lib/pageflow/entry_export_import/entry_serialization.rb +68 -0
  37. data/lib/pageflow/entry_export_import/file_mappings.rb +32 -0
  38. data/lib/pageflow/entry_export_import/page_type_versions.rb +29 -0
  39. data/lib/pageflow/entry_export_import/revision_serialization.rb +58 -0
  40. data/lib/pageflow/entry_export_import/revision_serialization/import.rb +158 -0
  41. data/lib/pageflow/entry_export_import/zip_archive.rb +36 -0
  42. data/lib/pageflow/file_type.rb +17 -4
  43. data/lib/pageflow/page_type.rb +20 -0
  44. data/lib/pageflow/page_types.rb +8 -0
  45. data/lib/pageflow/react/page_type.rb +10 -0
  46. data/lib/pageflow/version.rb +1 -1
  47. data/lib/pageflow/widget_types.rb +9 -1
  48. data/lib/tasks/entry_export_import.rake +27 -0
  49. data/spec/factories/revisions.rb +6 -0
  50. data/spec/factories/test_multi_attachment_files.rb +16 -0
  51. data/spec/factories/test_revision_components.rb +7 -0
  52. metadata +46 -3
@@ -0,0 +1,27 @@
1
+ require 'fileutils'
2
+
3
+ namespace :pageflow do
4
+ namespace :entries do
5
+ desc 'Export a single entry specified by its ID.'
6
+ task :export, [:entry_id] => :environment do |_t, args|
7
+ current_timestamp = Time.now.strftime('%Y%m%d%H%M%S')
8
+ entry = Pageflow::Entry.includes(:draft, :published_revision).find(args[:entry_id])
9
+ archive_file_name = Rails.root.join(
10
+ "tmp/entries_export_#{current_timestamp}/entry_#{entry.id}.zip"
11
+ )
12
+
13
+ FileUtils.mkdir_p(File.dirname(archive_file_name))
14
+ Pageflow::EntryExportImport.export(entry, archive_file_name)
15
+ end
16
+
17
+ desc 'Import entries from file containing one or multiple lines of JSON describing an entry.'
18
+ task :import, [:archive_file_path, :user_id] => :environment do |_t, args|
19
+ archive_file_path = args[:archive_file_path]
20
+ raise 'Could not find JSON file for import' unless File.exist?(archive_file_path)
21
+
22
+ user = User.find(args[:user_id])
23
+
24
+ Pageflow::EntryExportImport.import(archive_file_path, creator: user)
25
+ end
26
+ end
27
+ end
@@ -50,6 +50,12 @@ module Pageflow
50
50
  trait :without_overview_button do
51
51
  overview_button_enabled { false }
52
52
  end
53
+
54
+ trait :with_meta_data do
55
+ author { 'Some author' }
56
+ publisher { 'Some publisher' }
57
+ keywords { 'Some keywords' }
58
+ end
53
59
  end
54
60
  end
55
61
  end
@@ -0,0 +1,16 @@
1
+ module Pageflow
2
+ FactoryBot.define do
3
+ factory :test_multi_attachment_file, class: 'Pageflow::TestMultiAttachmentFile' do
4
+ first_attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.png')) }
5
+ second_attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.jpg')) }
6
+
7
+ transient do
8
+ used_in { nil }
9
+ end
10
+
11
+ after(:create) do |file, evaluator|
12
+ create(:file_usage, file: file, revision: evaluator.used_in) if evaluator.used_in
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ module Pageflow
2
+ FactoryBot.define do
3
+ factory :test_revision_component, class: 'Pageflow::TestRevisionComponent' do
4
+ text { 'Some text' }
5
+ end
6
+ end
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.0.0.beta2
4
+ version: 15.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-01 00:00:00.000000000 Z
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -464,6 +464,20 @@ dependencies:
464
464
  - - "~>"
465
465
  - !ruby/object:Gem::Version
466
466
  version: 3.1.7
467
+ - !ruby/object:Gem::Dependency
468
+ name: rubyzip
469
+ requirement: !ruby/object:Gem::Requirement
470
+ requirements:
471
+ - - "~>"
472
+ - !ruby/object:Gem::Version
473
+ version: '1.2'
474
+ type: :runtime
475
+ prerelease: false
476
+ version_requirements: !ruby/object:Gem::Requirement
477
+ requirements:
478
+ - - "~>"
479
+ - !ruby/object:Gem::Version
480
+ version: '1.2'
467
481
  - !ruby/object:Gem::Dependency
468
482
  name: mysql2
469
483
  requirement: !ruby/object:Gem::Requirement
@@ -548,6 +562,20 @@ dependencies:
548
562
  - - "~>"
549
563
  - !ruby/object:Gem::Version
550
564
  version: '1.5'
565
+ - !ruby/object:Gem::Dependency
566
+ name: sprockets
567
+ requirement: !ruby/object:Gem::Requirement
568
+ requirements:
569
+ - - "<"
570
+ - !ruby/object:Gem::Version
571
+ version: '4'
572
+ type: :development
573
+ prerelease: false
574
+ version_requirements: !ruby/object:Gem::Requirement
575
+ requirements:
576
+ - - "<"
577
+ - !ruby/object:Gem::Version
578
+ version: '4'
551
579
  - !ruby/object:Gem::Dependency
552
580
  name: sassc-rails
553
581
  requirement: !ruby/object:Gem::Requirement
@@ -1250,6 +1278,7 @@ files:
1250
1278
  - app/assets/javascripts/pageflow/editor/views/widget_item_view.js
1251
1279
  - app/assets/javascripts/pageflow/editor/views/widget_types/classic_loading_spinner.js
1252
1280
  - app/assets/javascripts/pageflow/editor/views/widget_types/cookie_notice_bar.js
1281
+ - app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js
1253
1282
  - app/assets/javascripts/pageflow/editor/views/widget_types/phone_horizontal_slideshow_mode.js
1254
1283
  - app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js
1255
1284
  - app/assets/javascripts/pageflow/entry_data.js
@@ -1540,6 +1569,7 @@ files:
1540
1569
  - app/assets/stylesheets/pageflow/themes/default/indicators/typography.scss
1541
1570
  - app/assets/stylesheets/pageflow/themes/default/indicators/widget_margins.scss
1542
1571
  - app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss
1572
+ - app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss
1543
1573
  - app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss
1544
1574
  - app/assets/stylesheets/pageflow/themes/default/logo.scss
1545
1575
  - app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss
@@ -1693,6 +1723,7 @@ files:
1693
1723
  - app/helpers/pageflow/video_files_helper.rb
1694
1724
  - app/helpers/pageflow/widgets_helper.rb
1695
1725
  - app/jobs/pageflow/application_job.rb
1726
+ - app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb
1696
1727
  - app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb
1697
1728
  - app/jobs/pageflow/poll_zencoder_job.rb
1698
1729
  - app/jobs/pageflow/process_image_or_text_track_job.rb
@@ -1937,6 +1968,7 @@ files:
1937
1968
  - db/migrate/20190408144136_add_default_share_providers_to_themings.rb
1938
1969
  - db/migrate/20190408161315_add_share_providers_to_revisions.rb
1939
1970
  - db/migrate/20190523151140_add_perma_id_to_file_usages.rb
1971
+ - db/migrate/20190820152900_drop_accounts_themes.rb
1940
1972
  - lib/generators/pageflow/active_admin_initializer/active_admin_initializer_generator.rb
1941
1973
  - lib/generators/pageflow/assets/assets_generator.rb
1942
1974
  - lib/generators/pageflow/assets/templates/application.js
@@ -1996,6 +2028,14 @@ files:
1996
2028
  - lib/pageflow/configuration/defaults.rb
1997
2029
  - lib/pageflow/configuration/permissions.rb
1998
2030
  - lib/pageflow/engine.rb
2031
+ - lib/pageflow/entry_export_import.rb
2032
+ - lib/pageflow/entry_export_import/attachment_files.rb
2033
+ - lib/pageflow/entry_export_import/entry_serialization.rb
2034
+ - lib/pageflow/entry_export_import/file_mappings.rb
2035
+ - lib/pageflow/entry_export_import/page_type_versions.rb
2036
+ - lib/pageflow/entry_export_import/revision_serialization.rb
2037
+ - lib/pageflow/entry_export_import/revision_serialization/import.rb
2038
+ - lib/pageflow/entry_export_import/zip_archive.rb
1999
2039
  - lib/pageflow/feature.rb
2000
2040
  - lib/pageflow/features.rb
2001
2041
  - lib/pageflow/file_type.rb
@@ -2031,6 +2071,7 @@ files:
2031
2071
  - lib/pageflow/zencoder_meta_data_output_definition.rb
2032
2072
  - lib/pageflow/zencoder_output_definition.rb
2033
2073
  - lib/pageflow/zencoder_video_output_definition.rb
2074
+ - lib/tasks/entry_export_import.rake
2034
2075
  - lib/tasks/pageflow_tasks.rake
2035
2076
  - spec/factories/accounts.rb
2036
2077
  - spec/factories/audio_files.rb
@@ -2046,6 +2087,8 @@ files:
2046
2087
  - spec/factories/pages.rb
2047
2088
  - spec/factories/revisions.rb
2048
2089
  - spec/factories/storylines.rb
2090
+ - spec/factories/test_multi_attachment_files.rb
2091
+ - spec/factories/test_revision_components.rb
2049
2092
  - spec/factories/text_track_files.rb
2050
2093
  - spec/factories/themings.rb
2051
2094
  - spec/factories/uploadable_files.rb
@@ -2096,7 +2139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2096
2139
  version: 1.3.1
2097
2140
  requirements: []
2098
2141
  rubyforge_project:
2099
- rubygems_version: 2.7.10
2142
+ rubygems_version: 2.7.5
2100
2143
  signing_key:
2101
2144
  specification_version: 4
2102
2145
  summary: Multimedia story telling for the web.