pageflow 13.0.0.beta5 → 13.0.0.beta6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +4 -0
- data/admins/pageflow/accounts.rb +1 -0
- data/app/assets/javascripts/pageflow/base.js +1 -0
- data/app/assets/javascripts/pageflow/cookie_notice.js +7 -0
- data/app/assets/javascripts/pageflow/dist/react.js +505 -74
- data/app/assets/javascripts/pageflow/editor/models/configuration.js +5 -5
- data/app/assets/javascripts/pageflow/editor/templates/background_positioning_sliders.jst.ejs +8 -0
- data/app/assets/javascripts/pageflow/editor/views/background_positioning_sliders_view.js +37 -23
- data/app/assets/javascripts/pageflow/editor/views/background_positioning_view.js +2 -2
- data/app/assets/javascripts/pageflow/editor/views/configuration_editors/video.js +1 -1
- data/app/assets/javascripts/pageflow/editor/views/edit_widget_view.js +9 -0
- data/app/assets/javascripts/pageflow/editor/views/info_box_view.js +8 -0
- data/app/assets/javascripts/pageflow/editor/views/widget_types/cookie_notice_bar.js +15 -0
- data/app/assets/javascripts/pageflow/seed_entry_data.js +3 -3
- data/app/assets/javascripts/pageflow/slideshow/adjacent_preparer.js +11 -4
- data/app/assets/javascripts/pageflow/ui/views/configuration_editor_view.js +2 -2
- data/app/assets/javascripts/pageflow/visited.js +2 -0
- data/app/assets/stylesheets/pageflow/admin.scss +5 -22
- data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +21 -0
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +34 -10
- data/app/assets/stylesheets/pageflow/page_types/video.scss +1 -4
- data/app/assets/stylesheets/pageflow/page_types/video/mobile_poster.scss +15 -0
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -0
- data/app/assets/stylesheets/pageflow/themes/default/cookie_notice_bar.scss +57 -0
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +1 -0
- data/app/assets/stylesheets/pageflow/themes/default/page/hyphenate.scss +24 -0
- data/app/assets/stylesheets/pageflow/themes/default/slideshow.scss +1 -0
- data/app/controllers/pageflow/admin/initial_passwords_controller.rb +8 -0
- data/app/helpers/pageflow/common_entry_seed_helper.rb +1 -0
- data/app/helpers/pageflow/entries_helper.rb +20 -2
- data/app/helpers/pageflow/entry_json_seed_helper.rb +1 -1
- data/app/helpers/pageflow/public_i18n_helper.rb +6 -1
- data/app/models/pageflow/published_entry.rb +14 -1
- data/app/views/admin/accounts/_form.html.erb +1 -0
- data/app/views/pageflow/admin/initial_passwords/edit.html.erb +16 -0
- data/app/views/pageflow/entry_json_seed/_entry.json.jbuilder +1 -1
- data/app/views/pageflow/user_mailer/invitation.html.erb +2 -2
- data/app/views/pageflow/user_mailer/invitation.text.erb +1 -1
- data/config/locales/de.yml +11 -1
- data/config/locales/en.yml +10 -0
- data/config/routes.rb +6 -0
- data/db/migrate/20180528144334_add_privacy_link_url_to_themings.rb +5 -0
- data/lib/pageflow/built_in_widget_type.rb +4 -0
- data/lib/pageflow/built_in_widget_types_plugin.rb +1 -0
- data/lib/pageflow/version.rb +1 -1
- data/spec/factories/accounts.rb +7 -7
- data/spec/factories/audio_files.rb +11 -11
- data/spec/factories/chapters.rb +2 -2
- data/spec/factories/entries.rb +7 -7
- data/spec/factories/file_usages.rb +2 -2
- data/spec/factories/folders.rb +1 -1
- data/spec/factories/hosted_files.rb +8 -8
- data/spec/factories/image_files.rb +10 -10
- data/spec/factories/invited_user.rb +2 -2
- data/spec/factories/memberships.rb +3 -3
- data/spec/factories/pages.rb +4 -4
- data/spec/factories/revisions.rb +8 -8
- data/spec/factories/text_track_files.rb +9 -9
- data/spec/factories/themings.rb +1 -1
- data/spec/factories/users.rb +7 -7
- data/spec/factories/video_files.rb +12 -12
- data/spec/factories/widgets.rb +2 -2
- metadata +16 -6
data/spec/factories/accounts.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :account, class: Pageflow::Account do
|
3
|
-
name 'Account Name'
|
3
|
+
name { 'Account Name' }
|
4
4
|
|
5
5
|
after(:build) do |account|
|
6
6
|
account.default_theming ||= build(:theming, account: account)
|
7
7
|
end
|
8
8
|
|
9
9
|
transient do
|
10
|
-
with_member nil
|
11
|
-
with_previewer nil
|
12
|
-
with_editor nil
|
13
|
-
with_publisher nil
|
14
|
-
with_manager nil
|
10
|
+
with_member { nil }
|
11
|
+
with_previewer { nil }
|
12
|
+
with_editor { nil }
|
13
|
+
with_publisher { nil }
|
14
|
+
with_manager { nil }
|
15
15
|
|
16
|
-
with_feature nil
|
16
|
+
with_feature { nil }
|
17
17
|
end
|
18
18
|
|
19
19
|
after(:create) do |account, evaluator|
|
@@ -4,10 +4,10 @@ module Pageflow
|
|
4
4
|
entry
|
5
5
|
uploader { create(:user) }
|
6
6
|
|
7
|
-
attachment_on_s3 File.open(Engine.root.join('spec', 'fixtures', 'et.ogg'))
|
7
|
+
attachment_on_s3 { File.open(Engine.root.join('spec', 'fixtures', 'et.ogg')) }
|
8
8
|
|
9
9
|
transient do
|
10
|
-
used_in nil
|
10
|
+
used_in { nil }
|
11
11
|
end
|
12
12
|
|
13
13
|
before(:create) do |file, evaluator|
|
@@ -19,27 +19,27 @@ module Pageflow
|
|
19
19
|
end
|
20
20
|
|
21
21
|
trait :on_filesystem do
|
22
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'et.ogg'))
|
23
|
-
attachment_on_s3 nil
|
24
|
-
state 'not_uploaded_to_s3'
|
22
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'et.ogg')) }
|
23
|
+
attachment_on_s3 { nil }
|
24
|
+
state { 'not_uploaded_to_s3' }
|
25
25
|
end
|
26
26
|
|
27
27
|
trait :uploading_to_s3_failed do
|
28
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'et.ogg'))
|
29
|
-
attachment_on_s3 nil
|
30
|
-
state 'uploading_to_s3_failed'
|
28
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'et.ogg')) }
|
29
|
+
attachment_on_s3 { nil }
|
30
|
+
state { 'uploading_to_s3_failed' }
|
31
31
|
end
|
32
32
|
|
33
33
|
trait :waiting_for_confirmation do
|
34
|
-
state 'waiting_for_confirmation'
|
34
|
+
state { 'waiting_for_confirmation' }
|
35
35
|
end
|
36
36
|
|
37
37
|
trait :encoding_failed do
|
38
|
-
state 'encoding_failed'
|
38
|
+
state { 'encoding_failed' }
|
39
39
|
end
|
40
40
|
|
41
41
|
trait :encoded do
|
42
|
-
state 'encoded'
|
42
|
+
state { 'encoded' }
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
data/spec/factories/chapters.rb
CHANGED
@@ -4,7 +4,7 @@ module Pageflow
|
|
4
4
|
storyline
|
5
5
|
|
6
6
|
transient do
|
7
|
-
in_main_storyline_of nil
|
7
|
+
in_main_storyline_of { nil }
|
8
8
|
end
|
9
9
|
|
10
10
|
before(:create) do |chapter, evaluator|
|
@@ -16,7 +16,7 @@ module Pageflow
|
|
16
16
|
end
|
17
17
|
|
18
18
|
factory :valid_chapter, :class => Chapter do
|
19
|
-
title
|
19
|
+
title { 'Introduction' }
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/spec/factories/entries.rb
CHANGED
@@ -14,12 +14,12 @@ module Pageflow
|
|
14
14
|
end
|
15
15
|
|
16
16
|
transient do
|
17
|
-
with_previewer nil
|
18
|
-
with_editor nil
|
19
|
-
with_publisher nil
|
20
|
-
with_manager nil
|
17
|
+
with_previewer { nil }
|
18
|
+
with_editor { nil }
|
19
|
+
with_publisher { nil }
|
20
|
+
with_manager { nil }
|
21
21
|
|
22
|
-
with_feature nil
|
22
|
+
with_feature { nil }
|
23
23
|
end
|
24
24
|
|
25
25
|
after(:create) do |entry, evaluator|
|
@@ -48,7 +48,7 @@ module Pageflow
|
|
48
48
|
|
49
49
|
trait :published do
|
50
50
|
transient do
|
51
|
-
published_revision_attributes
|
51
|
+
published_revision_attributes { {} }
|
52
52
|
end
|
53
53
|
|
54
54
|
after(:create) do |entry, evaluator|
|
@@ -63,7 +63,7 @@ module Pageflow
|
|
63
63
|
end
|
64
64
|
|
65
65
|
trait :with_highdef_video_encoding do
|
66
|
-
feature_states
|
66
|
+
feature_states { {'highdef_video_encoding' => true} }
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/spec/factories/folders.rb
CHANGED
@@ -7,20 +7,20 @@ module Pageflow
|
|
7
7
|
FactoryBot.define do
|
8
8
|
factory :hosted_file, class: TestHostedFile do
|
9
9
|
trait :on_filesystem do
|
10
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'image.png'))
|
11
|
-
attachment_on_s3 nil
|
12
|
-
state 'not_uploaded_to_s3'
|
10
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'image.png')) }
|
11
|
+
attachment_on_s3 { nil }
|
12
|
+
state { 'not_uploaded_to_s3' }
|
13
13
|
end
|
14
14
|
|
15
15
|
trait :uploading_to_s3_failed do
|
16
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'image.png'))
|
17
|
-
attachment_on_s3 nil
|
18
|
-
state 'uploading_to_s3_failed'
|
16
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'image.png')) }
|
17
|
+
attachment_on_s3 { nil }
|
18
|
+
state { 'uploading_to_s3_failed' }
|
19
19
|
end
|
20
20
|
|
21
21
|
trait :uploaded_to_s3 do
|
22
|
-
attachment_on_s3 File.open(Engine.root.join('spec', 'fixtures', 'image.png'))
|
23
|
-
state 'uploaded_to_s3'
|
22
|
+
attachment_on_s3 { File.open(Engine.root.join('spec', 'fixtures', 'image.png')) }
|
23
|
+
state { 'uploaded_to_s3' }
|
24
24
|
end
|
25
25
|
|
26
26
|
trait :with_overridden_keep_on_filesystem do
|
@@ -4,11 +4,11 @@ module Pageflow
|
|
4
4
|
entry
|
5
5
|
uploader { create(:user) }
|
6
6
|
|
7
|
-
attachment File.open(Engine.root.join('spec', 'fixtures', 'image.jpg'))
|
8
|
-
state 'processed'
|
7
|
+
attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.jpg')) }
|
8
|
+
state { 'processed' }
|
9
9
|
|
10
10
|
transient do
|
11
|
-
used_in nil
|
11
|
+
used_in { nil }
|
12
12
|
end
|
13
13
|
|
14
14
|
before(:create) do |file, evaluator|
|
@@ -20,19 +20,19 @@ module Pageflow
|
|
20
20
|
end
|
21
21
|
|
22
22
|
trait :processed do
|
23
|
-
processed_attachment File.open(Engine.root.join('spec', 'fixtures', 'image.jpg'))
|
23
|
+
processed_attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.jpg')) }
|
24
24
|
end
|
25
25
|
|
26
26
|
trait :unprocessed do
|
27
|
-
unprocessed_attachment File.open(Engine.root.join('spec', 'fixtures', 'image.jpg'))
|
28
|
-
processed_attachment nil
|
29
|
-
state 'not_processed'
|
27
|
+
unprocessed_attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.jpg')) }
|
28
|
+
processed_attachment { nil }
|
29
|
+
state { 'not_processed' }
|
30
30
|
end
|
31
31
|
|
32
32
|
trait :failed do
|
33
|
-
unprocessed_attachment File.open(Engine.root.join('spec', 'fixtures', 'image.jpg'))
|
34
|
-
processed_attachment nil
|
35
|
-
state 'processing_failed'
|
33
|
+
unprocessed_attachment { File.open(Engine.root.join('spec', 'fixtures', 'image.jpg')) }
|
34
|
+
processed_attachment { nil }
|
35
|
+
state { 'processing_failed' }
|
36
36
|
end
|
37
37
|
|
38
38
|
trait :encoded do
|
@@ -3,7 +3,7 @@ module Pageflow
|
|
3
3
|
factory :membership, class: Membership do
|
4
4
|
user
|
5
5
|
association :entity, factory: :entry
|
6
|
-
role :previewer
|
6
|
+
role { :previewer }
|
7
7
|
before(:create) do |membership|
|
8
8
|
if membership.entity_type != 'Pageflow::Account' &&
|
9
9
|
!membership.user.accounts.include?(membership.entity.account) &&
|
@@ -19,7 +19,7 @@ module Pageflow
|
|
19
19
|
factory :entry_membership, class: Membership do
|
20
20
|
user
|
21
21
|
association :entity, factory: :entry
|
22
|
-
role :previewer
|
22
|
+
role { :previewer }
|
23
23
|
before(:create) do |membership|
|
24
24
|
if !membership.user.accounts.include?(membership.entity.account) &&
|
25
25
|
!membership.entity.account.nil?
|
@@ -34,7 +34,7 @@ module Pageflow
|
|
34
34
|
factory :account_membership, class: Membership do
|
35
35
|
user
|
36
36
|
association :entity, factory: :account
|
37
|
-
role :member
|
37
|
+
role { :member }
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
data/spec/factories/pages.rb
CHANGED
@@ -2,13 +2,13 @@ module Pageflow
|
|
2
2
|
FactoryBot.define do
|
3
3
|
factory :page, :class => Page do
|
4
4
|
chapter
|
5
|
-
template
|
6
|
-
configuration
|
5
|
+
template { 'background_image' }
|
6
|
+
configuration { {} }
|
7
7
|
end
|
8
8
|
|
9
9
|
factory :valid_page, :class => Page do
|
10
|
-
template
|
11
|
-
configuration
|
10
|
+
template { 'background_image' }
|
11
|
+
configuration { {} }
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/spec/factories/revisions.rb
CHANGED
@@ -20,30 +20,30 @@ module Pageflow
|
|
20
20
|
|
21
21
|
trait :user_snapshot do
|
22
22
|
frozen
|
23
|
-
snapshot_type 'user'
|
23
|
+
snapshot_type { 'user' }
|
24
24
|
end
|
25
25
|
|
26
26
|
trait :auto_snapshot do
|
27
27
|
frozen
|
28
|
-
snapshot_type 'auto'
|
28
|
+
snapshot_type { 'auto' }
|
29
29
|
end
|
30
30
|
|
31
31
|
trait :with_home_button do
|
32
|
-
home_button_enabled true
|
33
|
-
home_url 'http://example.com'
|
32
|
+
home_button_enabled { true }
|
33
|
+
home_url { 'http://example.com' }
|
34
34
|
end
|
35
35
|
|
36
36
|
trait :without_home_button do
|
37
|
-
home_button_enabled false
|
38
|
-
home_url 'http://example.com'
|
37
|
+
home_button_enabled { false }
|
38
|
+
home_url { 'http://example.com' }
|
39
39
|
end
|
40
40
|
|
41
41
|
trait :with_overview_button do
|
42
|
-
overview_button_enabled true
|
42
|
+
overview_button_enabled { true }
|
43
43
|
end
|
44
44
|
|
45
45
|
trait :without_overview_button do
|
46
|
-
overview_button_enabled false
|
46
|
+
overview_button_enabled { false }
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -5,10 +5,10 @@ module Pageflow
|
|
5
5
|
uploader { create(:user) }
|
6
6
|
parent_file { nil }
|
7
7
|
|
8
|
-
attachment_on_s3 File.open(Engine.root.join('spec', 'fixtures', 'sample.vtt'))
|
8
|
+
attachment_on_s3 { File.open(Engine.root.join('spec', 'fixtures', 'sample.vtt')) }
|
9
9
|
|
10
10
|
transient do
|
11
|
-
used_in nil
|
11
|
+
used_in { nil }
|
12
12
|
end
|
13
13
|
|
14
14
|
before(:create) do |file, evaluator|
|
@@ -21,19 +21,19 @@ module Pageflow
|
|
21
21
|
end
|
22
22
|
|
23
23
|
trait :from_srt_file do
|
24
|
-
attachment_on_s3 File.open(Engine.root.join('spec', 'fixtures', 'sample.srt'))
|
24
|
+
attachment_on_s3 { File.open(Engine.root.join('spec', 'fixtures', 'sample.srt')) }
|
25
25
|
end
|
26
26
|
|
27
27
|
trait :on_filesystem do
|
28
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'et.ogg'))
|
29
|
-
attachment_on_s3 nil
|
30
|
-
state 'not_uploaded_to_s3'
|
28
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'et.ogg')) }
|
29
|
+
attachment_on_s3 { nil }
|
30
|
+
state { 'not_uploaded_to_s3' }
|
31
31
|
end
|
32
32
|
|
33
33
|
trait :uploading_to_s3_failed do
|
34
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'et.ogg'))
|
35
|
-
attachment_on_s3 nil
|
36
|
-
state 'uploading_to_s3_failed'
|
34
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'et.ogg')) }
|
35
|
+
attachment_on_s3 { nil }
|
36
|
+
state { 'uploading_to_s3_failed' }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
data/spec/factories/themings.rb
CHANGED
data/spec/factories/users.rb
CHANGED
@@ -6,14 +6,14 @@ module Pageflow
|
|
6
6
|
|
7
7
|
factory :user do
|
8
8
|
transient do
|
9
|
-
on nil
|
9
|
+
on { nil }
|
10
10
|
end
|
11
11
|
|
12
12
|
email
|
13
|
-
first_name 'John'
|
14
|
-
last_name 'Doe'
|
13
|
+
first_name { 'John' }
|
14
|
+
last_name { 'Doe' }
|
15
15
|
|
16
|
-
password '@qwert12345'
|
16
|
+
password { '@qwert12345' }
|
17
17
|
password_confirmation { password }
|
18
18
|
|
19
19
|
trait :member do
|
@@ -47,7 +47,7 @@ module Pageflow
|
|
47
47
|
end
|
48
48
|
|
49
49
|
trait :admin do
|
50
|
-
admin true
|
50
|
+
admin { true }
|
51
51
|
after(:create) do |user, evaluator|
|
52
52
|
create(:membership,
|
53
53
|
user: user,
|
@@ -63,8 +63,8 @@ module Pageflow
|
|
63
63
|
|
64
64
|
factory :valid_user, class: User do
|
65
65
|
email
|
66
|
-
first_name 'Edison'
|
67
|
-
last_name 'Editor'
|
66
|
+
first_name { 'Edison' }
|
67
|
+
last_name { 'Editor' }
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -4,12 +4,12 @@ module Pageflow
|
|
4
4
|
entry
|
5
5
|
uploader { create(:user) }
|
6
6
|
|
7
|
-
attachment_on_s3 File.open(Engine.root.join('spec', 'fixtures', 'video.mp4'))
|
8
|
-
state 'encoded'
|
7
|
+
attachment_on_s3 { File.open(Engine.root.join('spec', 'fixtures', 'video.mp4')) }
|
8
|
+
state { 'encoded' }
|
9
9
|
|
10
10
|
transient do
|
11
|
-
used_in nil
|
12
|
-
with_configuration nil
|
11
|
+
used_in { nil }
|
12
|
+
with_configuration { nil }
|
13
13
|
end
|
14
14
|
|
15
15
|
before(:create) do |file, evaluator|
|
@@ -26,23 +26,23 @@ module Pageflow
|
|
26
26
|
end
|
27
27
|
|
28
28
|
trait :on_filesystem do
|
29
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'video.mp4'))
|
30
|
-
attachment_on_s3 nil
|
31
|
-
state 'not_uploaded_to_s3'
|
29
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'video.mp4')) }
|
30
|
+
attachment_on_s3 { nil }
|
31
|
+
state { 'not_uploaded_to_s3' }
|
32
32
|
end
|
33
33
|
|
34
34
|
trait :uploading_to_s3_failed do
|
35
|
-
attachment_on_filesystem File.open(Engine.root.join('spec', 'fixtures', 'video.mp4'))
|
36
|
-
attachment_on_s3 nil
|
37
|
-
state 'uploading_to_s3_failed'
|
35
|
+
attachment_on_filesystem { File.open(Engine.root.join('spec', 'fixtures', 'video.mp4')) }
|
36
|
+
attachment_on_s3 { nil }
|
37
|
+
state { 'uploading_to_s3_failed' }
|
38
38
|
end
|
39
39
|
|
40
40
|
trait :waiting_for_confirmation do
|
41
|
-
state 'waiting_for_confirmation'
|
41
|
+
state { 'waiting_for_confirmation' }
|
42
42
|
end
|
43
43
|
|
44
44
|
trait :encoding_failed do
|
45
|
-
state 'encoding_failed'
|
45
|
+
state { 'encoding_failed' }
|
46
46
|
end
|
47
47
|
|
48
48
|
trait :encoded do
|