card 1.98.1 → 1.98.2

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
  SHA1:
3
- metadata.gz: ff978d04e30fcde0b78bc07120e29d88129598b5
4
- data.tar.gz: 69d3bdd7fef52579cf346519e21bafc83276bc9a
3
+ metadata.gz: 386e1ef385810519910b21aaa3cbc57b7da75dd6
4
+ data.tar.gz: 88edcd64fde3e3e416557826671ce526dbabe410
5
5
  SHA512:
6
- metadata.gz: 2d953145ad131cf9fca1fa5d981b52cd78f2be3309ccef00f9e9fe1cd213b7cb1b2be7bc03a0545d4ca6b36930ca8e17a63297ce4becfd77a0eccd8c3aea1055
7
- data.tar.gz: '08e3e5ff1f4a0a15385debef7d3a79f641fecd48109530a4f354e2e9b4438218d260732f10c35b86964ce703583831bfba5ff4665bb75d476e1fc73487ca596b'
6
+ metadata.gz: d5d4982608fc630b6c3d5e6543fe357789f6689caa865bb6c255896f1725903b3d0668b7a5a9f84aa220087b7bc18b2c559e57bfbfe45e777077cc6401d3821b
7
+ data.tar.gz: cdd231febca1a0c86de1907e00b85bea6999a0234b202252c66f1658bb9759a47ff18f32a5f7bd8482da460113a238839cf681438aef213f82481efc9dff6fc1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
@@ -60,8 +60,9 @@ class Card
60
60
  class UserError < Error
61
61
  cattr_accessor :user_error_classes
62
62
  self.user_error_classes = [self,
63
- ActiveRecord::RecordNotFound,
63
+ ActionController::BadRequest,
64
64
  ActionController::MissingFile,
65
+ ActiveRecord::RecordNotFound,
65
66
  ActiveRecord::RecordInvalid]
66
67
  end
67
68
 
@@ -59,7 +59,8 @@ class Card
59
59
 
60
60
  def quiet_error e, view
61
61
  # TODO: unify with Card::Error#report
62
- Rails.logger.info "#{e.message}\n" + (e.backtrace * "\n")
62
+ Rails.logger.info e.message
63
+ Rails.logger.debug e.backtrace.join("\n")
63
64
  rendering_error e, view
64
65
  end
65
66
 
@@ -94,8 +94,8 @@ class Card
94
94
  def id_from_val val
95
95
  case val
96
96
  when Integer then val
97
- when String then Card.fetch_id(val)
98
- when Symbol then Card::Codename.id(val)
97
+ when String then Card.fetch_id(val) || -999
98
+ when Symbol then Card::Codename.id(val) || -999
99
99
  end
100
100
  end
101
101
  end
@@ -12,8 +12,7 @@ end
12
12
 
13
13
  # we need a card id for the path so we have to update db_content when we have
14
14
  # an id
15
- event :correct_identifier, :finalize,
16
- on: :create, when: proc { |c| !c.web? } do
15
+ event :correct_identifier, :finalize, on: :create, when: proc { |c| !c.web? } do
17
16
  update_column(:db_content, attachment.db_content)
18
17
  expire
19
18
  end
@@ -1,7 +1,6 @@
1
1
  attr_writer :bucket, :storage_type
2
2
 
3
- event :storage_type_change, :store,
4
- on: :update, when: :storage_type_changed? do
3
+ event :storage_type_change, :store, on: :update, when: :storage_type_changed? do
5
4
  # carrierwave stores file if @cache_id is not nil
6
5
  attachment.cache_stored_file!
7
6
  # attachment.retrieve_from_cache!(attachment.cache_name)
@@ -54,8 +54,7 @@ end
54
54
 
55
55
  # at some point uploaded files of canceled file card creation
56
56
  # should be deleted. We do this when ever an new file is created.
57
- event :clear_draft_files, :integrate_with_delay,
58
- on: :create do
57
+ event :clear_draft_files, :integrate_with_delay, on: :create do
59
58
  Card.delete_tmp_files_of_cached_uploads
60
59
  end
61
60
 
@@ -1,7 +1,7 @@
1
1
  $.extend decko,
2
2
  upload_file: (fileupload) ->
3
3
  # for file as a subcard in a form,
4
- # excess parameters are inlcuded in the request which cause errors.
4
+ # excess parameters are included in the request which cause errors.
5
5
  # only the file, type_id and attachment_card_name are needed
6
6
  # attachment_card_name is the original card name,
7
7
  # ex: card[subcards][+logo][image], card[file]
@@ -7,6 +7,7 @@ event :add_comment, :prepare_to_store, on: :save, when: :comment do
7
7
  return unless comment.present?
8
8
  self.content =
9
9
  [content, format.comment_with_signature].compact.join "\n<hr\>\n"
10
+ self.comment = nil
10
11
  end
11
12
 
12
13
  attr_writer :comment_author
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.98.1
4
+ version: 1.98.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-08-01 00:00:00.000000000 Z
14
+ date: 2019-08-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cardname
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.8.1
22
+ version: 0.8.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.8.1
29
+ version: 0.8.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: haml
32
32
  requirement: !ruby/object:Gem::Requirement