alchemy-dragonfly-s3 3.6.5 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/app/models/alchemy/attachment/s3_url.rb +1 -1
- data/app/models/alchemy/picture/s3_url.rb +1 -1
- data/app/models/alchemy/picture_thumb.rb +1 -1
- data/app/models/alchemy/picture_thumb/create.rb +1 -1
- data/app/models/alchemy/picture_thumb/signature.rb +1 -1
- data/app/models/alchemy/picture_thumb/uid.rb +1 -1
- data/app/views/alchemy/admin/attachments/show.html.erb +7 -8
- data/app/views/alchemy/admin/pictures/_picture.html.erb +7 -7
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +5 -3
- data/app/views/alchemy/admin/pictures/show.html.erb +9 -9
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -0
- data/db/migrate/1_create_alchemy_picture_thumbs.rb +2 -3
- data/lib/alchemy/dragonfly/s3/version.rb +1 -1
- data/lib/alchemy/essence_picture_monkey_patch.rb +2 -2
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d80fac356bf2e699b152896713ac7731cb23f0a1e26b0b6eba79648c90236d
|
4
|
+
data.tar.gz: fbbe2ced0c05ff53e75df1cd39a3d7b754dad998c0230a896b9ceadae2e3864b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9af0f1daaeedc925e70fe185968e7ea02f93f10d8dce08a06c0360e30445bbefe0bdceade9c99e9f7c6c616cb83f5699fadce2a0214121a8f486c0c23031dbb
|
7
|
+
data.tar.gz: 4f2ffac175138c3f792615c20d14c32724c79f922f16bb993d94af2f441a2c17585716b89160d7ea2927c9afc319004e3dc79b976485f2d6e7ca3ac45293b85a
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://travis-ci.com/AlchemyCMS/alchemy-dragonfly-s3.svg?branch=alchemy-
|
1
|
+
[![Build Status](https://travis-ci.com/AlchemyCMS/alchemy-dragonfly-s3.svg?branch=alchemy-5)](https://travis-ci.com/AlchemyCMS/alchemy-dragonfly-s3)
|
2
2
|
|
3
3
|
# AlchemyCMS AWS S3
|
4
4
|
|
@@ -6,16 +6,18 @@ Adds support for file attachments and rendered Alchemy thumbnails stored on Amaz
|
|
6
6
|
|
7
7
|
## Alchemy Version
|
8
8
|
|
9
|
-
This branch works with Alchemy
|
9
|
+
This branch works with Alchemy 5.0 only.
|
10
10
|
|
11
|
-
- For a Alchemy 5 compatible version use the `master` branch.
|
11
|
+
- For a Alchemy 5.1 compatible version use the `master` branch.
|
12
|
+
- For a Alchemy 4 compatible version use the `alchemy-4` branch.
|
13
|
+
- For a Alchemy 3.6 compatible version use the `alchemy-3` branch.
|
12
14
|
|
13
15
|
## Installation
|
14
16
|
|
15
17
|
Add this line to your application's Gemfile:
|
16
18
|
|
17
19
|
```ruby
|
18
|
-
gem 'alchemy-dragonfly-s3', github: 'AlchemyCMS/alchemy-dragonfly-s3', branch: 'alchemy-
|
20
|
+
gem 'alchemy-dragonfly-s3', github: 'AlchemyCMS/alchemy-dragonfly-s3', branch: 'alchemy-5'
|
19
21
|
```
|
20
22
|
|
21
23
|
And then execute:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="resource_info">
|
2
2
|
<div class="value">
|
3
3
|
<label>
|
4
|
-
<%= render_icon @attachment.icon_css_class %>
|
4
|
+
<%= render_icon @attachment.icon_css_class, style: 'regular', size: 'lg' %>
|
5
5
|
</label>
|
6
6
|
<p><%= @attachment.file_name %></p>
|
7
7
|
</div>
|
@@ -9,33 +9,32 @@
|
|
9
9
|
<label><%= Alchemy::Attachment.human_attribute_name(:url) %></label>
|
10
10
|
<p><%= @attachment.url %></p>
|
11
11
|
<a data-clipboard-text="<%= @attachment.url %>" class="icon_button--right">
|
12
|
-
<%= render_icon(
|
12
|
+
<%= render_icon(:clipboard, style: 'regular') %>
|
13
13
|
</a>
|
14
14
|
</div>
|
15
15
|
<div class="value with-icon">
|
16
16
|
<label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
|
17
17
|
<p><%= @attachment.url %></p>
|
18
18
|
<a data-clipboard-text="<%= @attachment.url %>" class="icon_button--right">
|
19
|
-
<%= render_icon(
|
19
|
+
<%= render_icon(:clipboard, style: 'regular') %>
|
20
20
|
</a>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<% case @attachment.icon_css_class %>
|
25
|
-
<% when "image" %>
|
25
|
+
<% when "file-image" %>
|
26
26
|
<div class="attachment_preview_container image-preview">
|
27
27
|
<%= image_tag(@attachment.url, class: "full_width") %>
|
28
28
|
</div>
|
29
|
-
<% when "audio" %>
|
29
|
+
<% when "file-audio" %>
|
30
30
|
<div class="attachment_preview_container player-preview">
|
31
31
|
<%= audio_tag(@attachment.url, preload: "none", controls: true, class: "full_width") %>
|
32
32
|
</div>
|
33
|
-
<% when "video" %>
|
33
|
+
<% when "file-video" %>
|
34
34
|
<div class="attachment_preview_container player-preview">
|
35
35
|
<%= video_tag(@attachment.url, preload: "metadata", controls: true, class: "full_width") %>
|
36
36
|
</div>
|
37
|
-
<% when "
|
38
|
-
<% else %>
|
37
|
+
<% when "file-pdf" %>
|
39
38
|
<iframe src="<%= @attachment.url %>" frameborder=0 class="full-iframe">
|
40
39
|
Your browser does not support frames.
|
41
40
|
</iframe>
|
@@ -5,15 +5,15 @@
|
|
5
5
|
<% if picture.deletable? && can?(:destroy, picture) %>
|
6
6
|
<span class="picture_tool delete">
|
7
7
|
<%= link_to_confirm_dialog(
|
8
|
-
|
8
|
+
render_icon(:minus),
|
9
9
|
Alchemy.t(:confirm_to_delete_image_from_server),
|
10
10
|
alchemy.admin_picture_path(
|
11
11
|
id: picture,
|
12
|
-
q:
|
12
|
+
q: search_filter_params[:q],
|
13
13
|
page: params[:page],
|
14
|
-
tagged_with:
|
14
|
+
tagged_with: search_filter_params[:tagged_with],
|
15
15
|
size: params[:size],
|
16
|
-
filter:
|
16
|
+
filter: search_filter_params[:filter]
|
17
17
|
),
|
18
18
|
{
|
19
19
|
title: Alchemy.t('Delete image')
|
@@ -31,11 +31,11 @@
|
|
31
31
|
image,
|
32
32
|
alchemy.admin_picture_path(
|
33
33
|
id: picture,
|
34
|
-
q:
|
34
|
+
q: search_filter_params[:q],
|
35
35
|
page: params[:page],
|
36
|
-
tagged_with:
|
36
|
+
tagged_with: search_filter_params[:tagged_with],
|
37
37
|
size: params[:size],
|
38
|
-
filter:
|
38
|
+
filter: search_filter_params[:filter]
|
39
39
|
),
|
40
40
|
class: 'thumbnail_background'
|
41
41
|
) %>
|
@@ -1,14 +1,16 @@
|
|
1
1
|
<div class="picture_thumbnail assign_image_list_detail <%= size.blank? ? 'medium' : size %>" name="<%= picture_to_assign.name %>" id="picture_to_assign_<%= picture_to_assign.id %>">
|
2
|
-
<% action_url = create_or_assign_url(picture_to_assign, @options.to_json) %>
|
3
2
|
<%= link_to(
|
4
3
|
image_tag(
|
5
4
|
picture_to_assign.url(size: preview_size(size), flatten: true) || "alchemy/missing-image.svg",
|
6
5
|
alt: picture_to_assign.name
|
7
6
|
),
|
8
|
-
|
7
|
+
alchemy.assign_admin_essence_pictures_path(
|
8
|
+
picture_id: picture_to_assign.id,
|
9
|
+
content_id: @content
|
10
|
+
),
|
9
11
|
remote: true,
|
10
12
|
onclick: '$(self).attr("href", "#").off("click"); return false',
|
11
|
-
method:
|
13
|
+
method: 'put',
|
12
14
|
title: Alchemy.t(:assign_image),
|
13
15
|
class: 'thumbnail_background'
|
14
16
|
) %>
|
@@ -6,29 +6,29 @@
|
|
6
6
|
<% if @previous %>
|
7
7
|
<%= link_to alchemy.admin_picture_path(
|
8
8
|
id: @previous,
|
9
|
-
q:
|
9
|
+
q: search_filter_params[:q],
|
10
10
|
page: params[:page],
|
11
|
-
tagged_with:
|
11
|
+
tagged_with: search_filter_params[:tagged_with],
|
12
12
|
size: params[:size],
|
13
|
-
filter:
|
13
|
+
filter: search_filter_params[:filter]
|
14
14
|
),
|
15
15
|
class: "previous-picture",
|
16
16
|
remote: true do %>
|
17
|
-
<
|
17
|
+
<i class="icon fas fa-angle-left fa-fw"></i>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
20
20
|
<% if @next %>
|
21
21
|
<%= link_to alchemy.admin_picture_path(
|
22
22
|
id: @next,
|
23
|
-
q:
|
23
|
+
q: search_filter_params[:q],
|
24
24
|
page: params[:page],
|
25
|
-
tagged_with:
|
25
|
+
tagged_with: search_filter_params[:tagged_with],
|
26
26
|
size: params[:size],
|
27
|
-
filter:
|
27
|
+
filter: search_filter_params[:filter]
|
28
28
|
),
|
29
29
|
class: "next-picture",
|
30
30
|
remote: true do %>
|
31
|
-
<
|
31
|
+
<i class="icon fas fa-angle-right fa-fw"></i>
|
32
32
|
<% end %>
|
33
33
|
<% end %>
|
34
34
|
</div>
|
@@ -39,5 +39,5 @@
|
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div class="picture-overlay-handle">
|
42
|
-
<
|
42
|
+
<i class="icon fas fa-angle-double-right fa-fw"></i>
|
43
43
|
</div>
|
@@ -1,13 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class CreateAlchemyPictureThumbs < ActiveRecord::Migration
|
3
|
+
class CreateAlchemyPictureThumbs < ActiveRecord::Migration[5.0]
|
4
4
|
def change
|
5
5
|
create_table :alchemy_picture_thumbs do |t|
|
6
|
-
t.
|
6
|
+
t.references :picture, null: false, foreign_key: { to_table: :alchemy_pictures }
|
7
7
|
t.string :signature, null: false
|
8
8
|
t.text :uid, null: false
|
9
9
|
end
|
10
|
-
add_foreign_key :alchemy_picture_thumbs, :alchemy_pictures, column: :picture_id
|
11
10
|
add_index :alchemy_picture_thumbs, :signature, unique: true
|
12
11
|
end
|
13
12
|
end
|
@@ -6,11 +6,11 @@ module Alchemy
|
|
6
6
|
super || "missing-image.png"
|
7
7
|
end
|
8
8
|
|
9
|
-
def thumbnail_url
|
9
|
+
def thumbnail_url
|
10
10
|
super || "alchemy/missing-image.svg"
|
11
11
|
end
|
12
12
|
|
13
|
-
def allow_image_cropping?
|
13
|
+
def allow_image_cropping?
|
14
14
|
super && !!picture.image_file
|
15
15
|
end
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-dragonfly-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -14,16 +14,22 @@ dependencies:
|
|
14
14
|
name: alchemy_cms
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.0.0.beta1
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '5.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 5.0.0.beta1
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '5.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: dragonfly-s3_data_store
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +73,19 @@ dependencies:
|
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '4.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: factory_bot_rails
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
81
|
+
version: '5'
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
88
|
+
version: '5'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: simplecov
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
164
|
- !ruby/object:Gem::Version
|
159
165
|
version: '0'
|
160
166
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.0.3
|
162
168
|
signing_key:
|
163
169
|
specification_version: 4
|
164
170
|
summary: AlchemyCMS Dragonfly S3.
|