card-mod-comment 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/set/all/comment.rb +4 -1
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08da0818b2331442d86b1504d30bf524f38e78d020321a69ac1701a2468461a5'
4
- data.tar.gz: f0509b6c6918f9acee54eae5b96935dd53f6997fae3bc0fc6c049f677ca7f01e
3
+ metadata.gz: a3453e8624fe36eab6d730a0d11f21dcc75654a1fa989d32160bc545905d7842
4
+ data.tar.gz: bc35df2fdd3f6ddfbe17bde99b94ba47a17e7111dddbfa8496e66a2c96adc4ad
5
5
  SHA512:
6
- metadata.gz: adf9718283671cc956cf04a7aecf67e47a052e59f9785450906669246bada88142d8e9cb6f40e4afff2ad8f491cb094af7fbad4ca26c86ca28745bdf6e3495df
7
- data.tar.gz: cae7f245786902237c1111d6da8e0a82179a41582b7388b2ba9772aa31db795825d0283edd06762abffe38c27c80305fa613f950750d7973a0ba35f49da9663b
6
+ metadata.gz: cfb8e44112bd8d596c4c5d054da0eb7c8791b00bf253a298a9e4564de294cf8751b69ea3a3e939ed0cef3f7ff532599204e583bf65e8344d643e7eb15ddc958f
7
+ data.tar.gz: 30fae59e1b1956635b66d0a23da748d5aed5ea017015bba5383556af151d3e6d39a10e8ee455102478e8d78f3d3e24f038d5fa441906ab53e70013d7bba8c2f2
data/set/all/comment.rb CHANGED
@@ -5,6 +5,7 @@ end
5
5
  event :add_comment, :prepare_to_store, on: :save, when: :comment do
6
6
  Env.session[:comment_author] = comment_author if Env.session
7
7
  return unless comment.present?
8
+
8
9
  self.content =
9
10
  [content, format.comment_with_signature].compact.join "\n<hr\>\n"
10
11
  self.comment = nil
@@ -25,7 +26,7 @@ end
25
26
 
26
27
  format do
27
28
  def comment_with_signature
28
- card.clean_comment + "\n" + comment_signature
29
+ "#{card.clean_comment}\n#{comment_signature}"
29
30
  end
30
31
 
31
32
  def comment_signature
@@ -53,6 +54,7 @@ format do
53
54
 
54
55
  def hidden_comment_fields
55
56
  return unless card.new_card?
57
+
56
58
  hidden_field_tag "card[name]", card.name
57
59
  # FIXME: wish we had more generalized solution for names.
58
60
  # without this, nonexistent cards will often take left's linkname.
@@ -71,6 +73,7 @@ format do
71
73
 
72
74
  def comment_author_label
73
75
  return if Auth.signed_in?
76
+
74
77
  %(<label>My Name is:</label> #{text_field :comment_author})
75
78
  end
76
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-comment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.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-03-15 00:00:00.000000000 Z
13
+ date: 2021-07-05 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.101.2
21
+ version: 1.102.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.101.2
28
+ version: 1.102.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-permissions
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.11.2
35
+ version: 0.12.0
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: 0.11.2
42
+ version: 0.12.0
43
43
  description: ''
44
44
  email:
45
45
  - info@decko.org
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.0.3
78
+ rubygems_version: 3.2.15
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: card comments