effective_polls 0.1.0 → 0.1.1

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: 6a33a47c986c2f82da08218e53437b46481c94bfe71e725857e718be7bdccb1e
4
- data.tar.gz: 48ca1df31f1cda3895a080e80b2b055b1adffca83bbb203868ee5d5b90d28d89
3
+ metadata.gz: 564dabc8a5490be5d5ebf050a0b4e718b69781dcc9b7d585e8644546f54288cd
4
+ data.tar.gz: 1503bc14d59cc2e1b1d7a9938065b5ac687eb8b81defcc594fc95b74b7284009
5
5
  SHA512:
6
- metadata.gz: 4cd220d1b2967235d42c9dbfd25b8ba4fb004e1f65e71eb4351e4cb483ca7f7f3f11972868a4a33d783f5b0243e42a02e3c90881f1f2d8b769d3daa1a8ce8cdb
7
- data.tar.gz: 12a61a54e03a10160cfd379934441406c39f360b8c76e88073778e9f695850fa86e4102e2fa13fc948e6970c5e63671e3f151203f96d10d3e30c582be37261d4
6
+ metadata.gz: 811446095aa021a4eed57a83047f79debbdab3c931184ff748c6c36181202691d7a5c845b4b5c364a984b5785d9f661d8ca56268eec807c5c6cf95905d250e2d
7
+ data.tar.gz: 8e5e682feb705f6a4891b734610fac4c6e5a90ae897119f04c63c28bf32ea2479fb041ca8653bf32876974bb52dd8c72cdebf7e8d29fe47ba1230572ebef9cbd
@@ -11,11 +11,11 @@ module Effective
11
11
  CATEGORIES = [
12
12
  'Choose one', # Radios
13
13
  'Select all that apply', # Checks
14
- 'Select upto 1',
15
- 'Select upto 2',
16
- 'Select upto 3',
17
- 'Select upto 4',
18
- 'Select upto 5',
14
+ 'Select up to 1',
15
+ 'Select up to 2',
16
+ 'Select up to 3',
17
+ 'Select up to 4',
18
+ 'Select up to 5',
19
19
  'Date', # Date Field
20
20
  'Email', # Email Field
21
21
  'Number', # Numeric Field
@@ -27,11 +27,11 @@ module Effective
27
27
  WITH_OPTIONS_CATEGORIES = [
28
28
  'Choose one', # Radios
29
29
  'Select all that apply', # Checks
30
- 'Select upto 1',
31
- 'Select upto 2',
32
- 'Select upto 3',
33
- 'Select upto 4',
34
- 'Select upto 5'
30
+ 'Select up to 1',
31
+ 'Select up to 2',
32
+ 'Select up to 3',
33
+ 'Select up to 4',
34
+ 'Select up to 5'
35
35
  ]
36
36
 
37
37
  effective_resource do
@@ -22,35 +22,35 @@
22
22
  %h5 Select all that apply
23
23
  %p Display checkboxes to select all options that apply
24
24
 
25
- = f.show_if :category, 'Select upto 1' do
25
+ = f.show_if :category, 'Select up to 1' do
26
26
  .card
27
27
  .card-body
28
- %h5 Select upto 1 (one)
29
- %p Display checkboxes to select upto 1 option
28
+ %h5 Select up to 1 (one)
29
+ %p Display checkboxes to select up to 1 option
30
30
 
31
- = f.show_if :category, 'Select upto 2' do
31
+ = f.show_if :category, 'Select up to 2' do
32
32
  .card
33
33
  .card-body
34
- %h5 Select upto 2 (two)
35
- %p Display checkboxes to select upto 2 options
34
+ %h5 Select up to 2 (two)
35
+ %p Display checkboxes to select up to 2 options
36
36
 
37
- = f.show_if :category, 'Select upto 3' do
37
+ = f.show_if :category, 'Select up to 3' do
38
38
  .card
39
39
  .card-body
40
- %h5 Select upto 3 (three)
41
- %p Display checkboxes to select upto 3 options
40
+ %h5 Select up to 3 (three)
41
+ %p Display checkboxes to select up to 3 options
42
42
 
43
- = f.show_if :category, 'Select upto 4' do
43
+ = f.show_if :category, 'Select up to 4' do
44
44
  .card
45
45
  .card-body
46
- %h5 Select upto 4 (four)
47
- %p Display checkboxes to select upto 4 options
46
+ %h5 Select up to 4 (four)
47
+ %p Display checkboxes to select up to 4 options
48
48
 
49
- = f.show_if :category, 'Select upto 5' do
49
+ = f.show_if :category, 'Select up to 5' do
50
50
  .card
51
51
  .card-body
52
- %h5 Select upto 5 (five)
53
- %p Display checkboxes to select upto 5 options
52
+ %h5 Select up to 5 (five)
53
+ %p Display checkboxes to select up to 5 options
54
54
 
55
55
  = f.show_if :category, 'Short Answer' do
56
56
  .card
@@ -1,3 +1,3 @@
1
1
  module EffectivePolls
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -4,28 +4,36 @@ class EffectivePollsMailerPreview < ActionMailer::Preview
4
4
 
5
5
  def poll_upcoming_reminder
6
6
  poll_notification = build_poll_notification('The poll will start soon')
7
- Effective::PollsMailer.poll_upcoming_reminder(poll_notification, bccs)
7
+ Effective::PollsMailer.poll_upcoming_reminder(poll_notification, build_user)
8
8
  end
9
9
 
10
10
  def poll_start
11
11
  poll_notification = build_poll_notification('The poll has started')
12
- Effective::PollsMailer.poll_start(poll_notification, bccs)
12
+ Effective::PollsMailer.poll_start(poll_notification, build_user)
13
13
  end
14
14
 
15
15
  def poll_reminder
16
16
  poll_notification = build_poll_notification('The poll started already and you have not participated')
17
- Effective::PollsMailer.poll_reminder(poll_notification, bccs)
17
+ Effective::PollsMailer.poll_reminder(poll_notification, build_user)
18
18
  end
19
19
 
20
20
  def poll_end
21
21
  poll_notification = build_poll_notification('The poll has ended')
22
- Effective::PollsMailer.poll_end(poll_notification, bccs)
22
+ Effective::PollsMailer.poll_end(poll_notification, build_user)
23
23
  end
24
24
 
25
25
  protected
26
26
 
27
- def bccs
28
- ['one@example.com', 'two@example.com', 'three@example.com', 'two-hundred-fifty@example.com']
27
+ def build_user
28
+ User.new(email: 'buyer@website.com').tap do |user|
29
+ user.name = 'Valued Customer' if user.respond_to?(:name=)
30
+ user.full_name = 'Valued Customer' if user.respond_to?(:full_name=)
31
+
32
+ if user.respond_to?(:first_name=) && user.respond_to?(:last_name=)
33
+ user.first_name = 'Valued'
34
+ user.last_name = 'Customer'
35
+ end
36
+ end
29
37
  end
30
38
 
31
39
  def build_poll_notification(text)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_polls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-29 00:00:00.000000000 Z
11
+ date: 2021-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails