card-mod-carrierwave 0.11.5 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/carrier_wave/card_mount.rb +4 -0
- data/set/type/file.rb +8 -6
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e33948e10b7a7a16ccd926afd3f94e1b6bacd563bb88fef502d0ba5c34a046
|
4
|
+
data.tar.gz: df78b143eccdecd3c7a00b01235e56734836ccb5eece651082acf689dc3d8d98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 367bee377e243312b0563caa24a2ef081f3784103d89a5d1cbe97c4e12e0099f81c7184c44067d634ccb212334248c1596003e269e4b2f65d64608103e62b918
|
7
|
+
data.tar.gz: 48c03131cccd1f0bec31129a8d0be33e2ee1830592d91d2786c9c58311488f578f4f24a4a3ed798f02614f37d16affac79fd92ce34c89677892294f1516de73b
|
@@ -28,14 +28,17 @@ module CarrierWave
|
|
28
28
|
on: :delete, when: proc { |c| !c.history? } do
|
29
29
|
remove_#{column}!
|
30
30
|
end
|
31
|
+
|
31
32
|
event :mark_remove_#{column}_false_event, :finalize,
|
32
33
|
on: :update do
|
33
34
|
mark_remove_#{column}_false
|
34
35
|
end
|
36
|
+
|
35
37
|
event :store_previous_changes_for_#{column}_event, :store,
|
36
38
|
on: :update, when: proc { |c| !c.history? } do
|
37
39
|
store_previous_changes_for_#{column}
|
38
40
|
end
|
41
|
+
|
39
42
|
event :remove_previously_stored_#{column}_event, :finalize,
|
40
43
|
on: :update, when: proc { |c| !c.history?} do
|
41
44
|
remove_previously_stored_#{column}
|
@@ -68,6 +71,7 @@ module CarrierWave
|
|
68
71
|
|
69
72
|
def #{column}=(new_file)
|
70
73
|
return if new_file.blank?
|
74
|
+
self.selected_action_id = Time.now.to_i unless history?
|
71
75
|
assign_file(new_file) { super }
|
72
76
|
end
|
73
77
|
|
data/set/type/file.rb
CHANGED
@@ -19,9 +19,7 @@ include SelectedAction
|
|
19
19
|
format do
|
20
20
|
view :source do
|
21
21
|
file = card.attachment
|
22
|
-
|
23
|
-
|
24
|
-
contextualize_path file.url
|
22
|
+
file.valid? ? contextualize_path(file.url) : ""
|
25
23
|
end
|
26
24
|
|
27
25
|
view :core do
|
@@ -37,9 +35,13 @@ format do
|
|
37
35
|
def handle_source
|
38
36
|
rescuing_file_source_error do
|
39
37
|
source = _render_source
|
40
|
-
|
41
|
-
|
42
|
-
block_given?
|
38
|
+
if source.blank?
|
39
|
+
""
|
40
|
+
elsif block_given?
|
41
|
+
yield source
|
42
|
+
else
|
43
|
+
source
|
44
|
+
end
|
43
45
|
end
|
44
46
|
end
|
45
47
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-carrierwave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-05-
|
13
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.101.
|
28
|
+
version: 1.101.6
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: carrierwave
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,28 +60,28 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.11.
|
63
|
+
version: 0.11.6
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.11.
|
70
|
+
version: 0.11.6
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: card-mod-permissions
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - '='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.11.
|
77
|
+
version: 0.11.6
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - '='
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.11.
|
84
|
+
version: 0.11.6
|
85
85
|
description: ''
|
86
86
|
email:
|
87
87
|
- info@decko.org
|