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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3189d4e4979c66b05d69e7b09a602098410d5df3faa5cdd19a96b7b026a69bb
4
- data.tar.gz: 774a0049c1c77d4373d5769a965734b797e916606f8ebd959ed97c39315f5646
3
+ metadata.gz: 91e33948e10b7a7a16ccd926afd3f94e1b6bacd563bb88fef502d0ba5c34a046
4
+ data.tar.gz: df78b143eccdecd3c7a00b01235e56734836ccb5eece651082acf689dc3d8d98
5
5
  SHA512:
6
- metadata.gz: 2091526b0eb3da1d50ec833d7d990848a4bd6968b4595a235debccd6b5d802dcb5b32bf20a2abe6b2d0ba2679ad1d8564c755ea2d06f435563cdb08bf76e46e1
7
- data.tar.gz: d10af461b8cc1ef9d0eaf8147274ab8e40f9a0106f87e8f153ccd2b4884ff73667fc53c6dfab8391f541dd3e80a552b06fc1d3eb03fd42d3174fdbd150653632
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
- return "" unless file.valid?
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
- return "" if source.blank?
41
-
42
- block_given? ? yield(source) : source
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.5
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-10 00:00:00.000000000 Z
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.5
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.5
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.5
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.5
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.5
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.5
84
+ version: 0.11.6
85
85
  description: ''
86
86
  email:
87
87
  - info@decko.org