card-mod-carrierwave 0.11.5 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c8f20cc9a7b83ae10932e555f5826a53de1aa4732775b5ccd5625e44efadff1
|
4
|
+
data.tar.gz: 8d657cbdc291433776002029114f1408383848b4410367b1bea1c58a12e65fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f949fbdd2be70ff51e834b23b86575fb0bf4bd8363316b23a8c9aa93b7c605913e9e7860d46402e850e6629459db8fedda22510cc5631f4b90eccd4911405d40
|
7
|
+
data.tar.gz: 8753dd281fdbd9c0c013a27d1f4281a53c806617f33bda390f00264ec8537c9104f128af16ffe4549685665818e1762c7af596efb9bcd71098f4b8e0a142a8f7
|
@@ -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.
|
4
|
+
version: 0.13.0
|
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-
|
13
|
+
date: 2021-08-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.103.0
|
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.
|
28
|
+
version: 1.103.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: carrierwave
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 2.2
|
35
|
+
version: '2.2'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 2.2
|
42
|
+
version: '2.2'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: mini_magick
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,28 +60,28 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.13.0
|
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.
|
70
|
+
version: 0.13.0
|
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.
|
77
|
+
version: 0.13.0
|
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.
|
84
|
+
version: 0.13.0
|
85
85
|
description: ''
|
86
86
|
email:
|
87
87
|
- info@decko.org
|
@@ -89,7 +89,6 @@ executables: []
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
|
-
- config/core_initializers/carrierwave.rb
|
93
92
|
- lib/carrier_wave/card_mount.rb
|
94
93
|
- lib/carrier_wave/file_card_uploader.rb
|
95
94
|
- lib/carrier_wave/file_card_uploader/path.rb
|
@@ -138,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
137
|
- !ruby/object:Gem::Version
|
139
138
|
version: '0'
|
140
139
|
requirements: []
|
141
|
-
rubygems_version: 3.1.
|
140
|
+
rubygems_version: 3.1.6
|
142
141
|
signing_key:
|
143
142
|
specification_version: 4
|
144
143
|
summary: File and Image handling
|