snails 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snails/app.rb +5 -4
- data/lib/snails/mailer.rb +1 -1
- data/snails.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4dea5ffee5850e36c01a2eb6ea7816a7f9939c80b434f19d141914826a309de
|
4
|
+
data.tar.gz: 8515507cbd3caab1aa59f7eaf9e2cb18e45540eb1598f400a05c137369984022
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014b50854e970f640543d67c0fcb061f1b319db1d248057b03f197a05de2adcc9fa06b9612cd01a74a0c2a780096a436d628941eaddafb9c05ed743fd38f9dfe
|
7
|
+
data.tar.gz: 7c32661693186daae08b75b47b643350623bdf2741ef8d2537da4dcb6178668e672a024c7040cb5d2bb0f0ce06f957dd23931c12338ba27992545689a46777fa
|
data/lib/snails/app.rb
CHANGED
@@ -222,7 +222,7 @@ module Snails
|
|
222
222
|
value = options[:value] ? "value=\"#{options[:value]}\"" : (type == :password ? '' : "value=\"#{object.send(field)}\"")
|
223
223
|
|
224
224
|
classes = object.errors[field].any? ? 'has-errors' : ''
|
225
|
-
label + raw_input(index, type, id, name, value, options[:placeholder], classes, options[:required])
|
225
|
+
label + raw_input(index, type, id, name, value, placeholder: options[:placeholder], classes: classes, required: options[:required], disabled: options[:disabled])
|
226
226
|
end
|
227
227
|
|
228
228
|
def form_password(object, field, options = {})
|
@@ -243,7 +243,7 @@ module Snails
|
|
243
243
|
value += checked ? " checked='true'" : ''
|
244
244
|
end
|
245
245
|
|
246
|
-
label + raw_input(index, type, id, name, options[:placeholder],
|
246
|
+
label + raw_input(index, type, id, name, value, options[:placeholder], classes: classes, disabled: options[:disabled])
|
247
247
|
end
|
248
248
|
|
249
249
|
def form_textarea(object, field, options = {})
|
@@ -316,9 +316,10 @@ module Snails
|
|
316
316
|
return id, name, @tabindex, label
|
317
317
|
end
|
318
318
|
|
319
|
-
def raw_input(index, type, id, name, value, placeholder
|
319
|
+
def raw_input(index, type, id, name, value, placeholder: '', classes: '', required: false, disabled: false)
|
320
320
|
req = required ? "required" : ''
|
321
|
-
|
321
|
+
dis = disabled ? "disabled" : ''
|
322
|
+
"<input #{req} #{dis} class='#{classes}' tabindex='#{index}' type='#{type}' id='#{id}' name='#{name}' placeholder='#{placeholder}' #{value} />"
|
322
323
|
end
|
323
324
|
|
324
325
|
def get_model_name(obj)
|
data/lib/snails/mailer.rb
CHANGED
@@ -187,7 +187,7 @@ A <%= @exception.class %> occurred in <%= @url %>:
|
|
187
187
|
resp, email = Tuktuk.deliver(email, debug: debug)
|
188
188
|
|
189
189
|
if resp.is_a?(Tuktuk::Bounce)
|
190
|
-
|
190
|
+
puts "[#{to}] Email bounced! [#{resp.code}] #{resp.message}"
|
191
191
|
end
|
192
192
|
|
193
193
|
return resp, email
|
data/snails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|