love_monster 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecddd53a7cfad408093c80a6b20946122642360f
4
- data.tar.gz: f780bfea48a37cfaa2c74df04d7d8d914ab5b6f1
3
+ metadata.gz: a144a3520525dc139284c3f6ad1dfbba50ca90a8
4
+ data.tar.gz: 0b91802eb551b9b58835ed78d18e095416432fd6
5
5
  SHA512:
6
- metadata.gz: 91a6c74f6bad199454f842872cb1c915da754508ecfa095e4ad8608cfef3075fad30221ec2108fc6c38e185469e904dc6c0bc62d16f7b976c4e51c191b3b54d5
7
- data.tar.gz: e3ee0216fd2dc9d2b11f71ba63a411ae7a3704a068de2e529fa90b73323ca7a541486dd6fb33f901197c3235ad6c31730da948e282adfcbd372fa3ab3063cf61
6
+ metadata.gz: e2a9a7abb490410be273e7f4686ad4b3b741d66fc86128964753c352d2a816d8ece3986755fef8a42b1314c465e166b36bd1592c6aaf77db5eddf36e845cbfa9
7
+ data.tar.gz: dd7f20290dbf3fbfef83a264ef8a5e02acca6c891b538a94665515d8429af735a4e609a6fe5f0b6b11b0e3597c800eb92e7f03bc8a7c2a02b01f3c5056729d6d
@@ -30,6 +30,8 @@ module LoveMonster
30
30
 
31
31
  loves.compact.each do |love|
32
32
  love.save
33
+
34
+ LovesMailer.new_love(love).deliver
33
35
  end
34
36
 
35
37
  redirect_to action: "index"
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ::ActionMailer::Base
2
+ default from: "from@example.com"
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,13 @@
1
+ module LoveMonster
2
+ class LovesMailer < ApplicationMailer
3
+ def new_love(love)
4
+ @love = love
5
+
6
+ attachments.inline['header.jpg'] = File.read(Engine.root.join 'app/assets/images/love_monster/header.jpg')
7
+ attachments.inline['footer.jpg'] = File.read(Engine.root.join 'app/assets/images/love_monster/footer.jpg')
8
+
9
+ mail(:to => love.person_to.email,
10
+ :subject => love.person_from.name_or_email + ' sent you love!')
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,71 @@
1
+ <HTML xmlns="http://www.w3.org/1999/xhtml">
2
+ <HEAD><TITLE>valentine's day</TITLE>
3
+ <META content="text/html; charset=utf-8" http-equiv=Content-Type>
4
+ <META name=HandheldFriendly content=True>
5
+ <META name=viewport content="width=device-width, initial-scale=1.0">
6
+ <STYLE type=text/css>
7
+ .ReadMsgBody {
8
+ width: 100%;
9
+ background-color: #ffffff;
10
+ }
11
+ .ExternalClass {
12
+ width: 100%;
13
+ background-color: #ffffff;
14
+ }
15
+ body {
16
+ width: 100%;
17
+ background-color: #ffffff;
18
+ margin:0;
19
+ padding:0;
20
+ -webkit-font-smoothing: antialiased;
21
+ }
22
+ html {
23
+ width: 100%;
24
+ }
25
+ table {
26
+ border-collapse: collapse;
27
+ }
28
+ @media only screen and (max-width: 640px) {
29
+ body[yahoo] .deviceWidth {
30
+ margin: 0 auto;
31
+ }
32
+ body[yahoo] .center {
33
+ text-align: center!important;
34
+ }
35
+ body[yahoo] .footerLinks {
36
+ margin: 0 auto;
37
+ margin-bottom:40px
38
+ }
39
+ }
40
+ @media only screen and (max-width: 479px) {
41
+ body[yahoo] .deviceWidth {
42
+ margin: 0 auto;
43
+ }
44
+ body[yahoo] .center {
45
+ text-align: center!important;
46
+ }
47
+ body[yahoo] .footerLinks {
48
+ margin: 0 auto;
49
+ margin-bottom:40px
50
+ }
51
+ }
52
+ @media only screen and (-webkit-min-device-pixel-ratio: 2) {
53
+ body[yahoo] .deviceWidth {
54
+ margin: 0 auto;
55
+ }
56
+ body[yahoo] .center {
57
+ text-align: center!important;
58
+ }
59
+ body[yahoo] .footerLinks {
60
+ margin: 0 auto;
61
+ margin-bottom:40px
62
+ }
63
+ }
64
+ </STYLE>
65
+
66
+ <META name=GENERATOR content="MSHTML 11.00.9600.16476">
67
+ </HEAD>
68
+ <BODY leftMargin=0 topMargin=0 bgColor=#ffffff yahoo="fix" marginheight="0" marginwidth="0">
69
+ <%= yield %>
70
+ </BODY>
71
+ </HTML>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,46 @@
1
+ <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center bgColor=#ffffff border=0>
2
+ <TR>
3
+ <TD style="PADDING-TOP: 20px" vAlign=top width="100%">
4
+ <TABLE class=deviceWidth style="PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" cellSpacing=0 cellPadding=0 width=600 align=center border=0>
5
+ <TR>
6
+ <TD style="PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 0px; LINE-HEIGHT: 0; PADDING-RIGHT: 0px" vAlign=top>
7
+ <%= image_tag attachments['header.jpg'].url, style: 'display: block', alt: 'img' %>
8
+ </TD>
9
+ </TR>
10
+ </TABLE>
11
+ <TABLE class=deviceWidth style="PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" cellSpacing=0 cellPadding=0 width=600 align=center bgColor=#ffd9d8>
12
+ <TR>
13
+ <TD style="FONT-SIZE: 13px; FONT-FAMILY: Helvetica, Arial, sans-serif; VERTICAL-ALIGN: top; FONT-WEIGHT: normal; COLOR: #5b5b5b; PADDING-BOTTOM: 10px; TEXT-ALIGN: center; PADDING-TOP: 10px; PADDING-LEFT: 10px; LINE-HEIGHT: 24px; PADDING-RIGHT: 10px" height=92>
14
+ <P style="FONT-SIZE: 13px; FONT-FAMILY: Helvetica, Arial, sans-serif; VERTICAL-ALIGN: top; FONT-WEIGHT: normal; COLOR: #333333; PADDING-BOTTOM: 0px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 75px; MARGIN: 0px; LINE-HEIGHT: 24px; PADDING-RIGHT: 75px">
15
+ <strong>From:</strong> <%= @love.person_from.name_or_email %>
16
+ </P>
17
+ <P style="FONT-SIZE: 13px; FONT-FAMILY: Helvetica, Arial, sans-serif; VERTICAL-ALIGN: top; FONT-WEIGHT: normal; COLOR: #333333; PADDING-BOTTOM: 0px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 75px; MARGIN: 0px; LINE-HEIGHT: 24px; PADDING-RIGHT: 75px">
18
+ <strong>Reason:</strong> <%= @love.reason %>
19
+ </P>
20
+
21
+ <% unless @love.message.nil? %>
22
+ <P style="FONT-SIZE: 13px; FONT-FAMILY: Helvetica, Arial, sans-serif; VERTICAL-ALIGN: top; FONT-WEIGHT: normal; COLOR: #333333; PADDING-BOTTOM: 0px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 75px; MARGIN: 0px; LINE-HEIGHT: 24px; PADDING-RIGHT: 75px">
23
+ <strong>Message:</strong> <br/>
24
+ <%= @love.message %>
25
+ </P>
26
+ <% end %>
27
+ </TD>
28
+ </TR>
29
+ </TABLE>
30
+ <TABLE class=deviceWidth cellSpacing=0 cellPadding=0 width=600 align=center bgColor=#fcfffa border=0>
31
+ <TR>
32
+ <TD style="PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" vAlign=top>
33
+ <%= image_tag attachments['footer.jpg'].url, style: 'display: block', alt: 'img' %>
34
+ </TD>
35
+ </TR>
36
+ </TABLE>
37
+ <TABLE class=deviceWidth cellSpacing=0 cellPadding=0 width=600 align=center bgColor=#fcfffa border=0 style="margin-bottom: 20px">
38
+ <TR>
39
+ <TD style="text-align: center; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px" vAlign=top>
40
+ <a style="color: #333" href="#">send love to someone</a>
41
+ </TD>
42
+ </TR>
43
+ </TABLE>
44
+ </TD>
45
+ </TR>
46
+ </TABLE>
@@ -0,0 +1,11 @@
1
+ Lorem ipsum dolor sit amet, et dolore magna aliqua.
2
+ ===================================================
3
+  
4
+ Lorem ipsum dolor sit amet, consectetur adipisicing Aliquam ligula erat,
5
+ cursus et laoreet a, mattis ac sapien. Mauris eget enim mi. Aliquam
6
+ ligula erat, cursus et laoreet a, mattis. Nullam sodales neque ultricies
7
+ urna tincidunt porttitor a mattis metus. Donec velit ligula, ultricies
8
+ quis auctor a, pretium et massa=3F, sed do eiusmod tempor incididunt ut
9
+ labore et dolore magna aliqua.
10
+  
11
+ All you need is love.
@@ -1,3 +1,3 @@
1
1
  module LoveMonster
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module LoveMonster
4
+ class LoveTest < ActionMailer::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module LoveMonster
4
+ class LovesMailerTest < ActionMailer::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module LoveMonster
4
+ class LovesTest < ActionMailer::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ module LoveMonster
2
+ # Preview all emails at http://localhost:3000/rails/mailers/love
3
+ class LovePreview < ActionMailer::Preview
4
+
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module LoveMonster
2
+ # Preview all emails at http://localhost:3000/rails/mailers/loves_mailer
3
+ class LovesMailerPreview < ActionMailer::Preview
4
+
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module LoveMonster
2
+ # Preview all emails at http://localhost:3000/rails/mailers/loves
3
+ class LovesPreview < ActionMailer::Preview
4
+
5
+ end
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: love_monster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dusty Burwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -955,6 +955,8 @@ files:
955
955
  - app/assets/images/love_monster/emoji/zap.png
956
956
  - app/assets/images/love_monster/emoji/zero.png
957
957
  - app/assets/images/love_monster/emoji/zzz.png
958
+ - app/assets/images/love_monster/footer.jpg
959
+ - app/assets/images/love_monster/header.jpg
958
960
  - app/assets/javascripts/love_monster/application.js
959
961
  - app/assets/javascripts/love_monster/bootstrap.js
960
962
  - app/assets/javascripts/love_monster/chosen.js
@@ -978,6 +980,8 @@ files:
978
980
  - app/controllers/love_monster/people_controller.rb
979
981
  - app/helpers/love_monster/application_helper.rb
980
982
  - app/helpers/love_monster/loves_helper.rb
983
+ - app/mailers/application_mailer.rb
984
+ - app/mailers/love_monster/loves_mailer.rb
981
985
  - app/models/love_monster/like.rb
982
986
  - app/models/love_monster/love.rb
983
987
  - app/models/love_monster/person.rb
@@ -988,10 +992,14 @@ files:
988
992
  - app/views/kaminari/_page.html.erb
989
993
  - app/views/kaminari/_paginator.html.erb
990
994
  - app/views/kaminari/_prev_page.html.erb
995
+ - app/views/layouts/mailer.html.erb
996
+ - app/views/layouts/mailer.text.erb
991
997
  - app/views/love_monster/loves/_form.html.erb
992
998
  - app/views/love_monster/loves/_like_button.html.erb
993
999
  - app/views/love_monster/loves/_table.html.erb
994
1000
  - app/views/love_monster/loves/index.html.erb
1001
+ - app/views/love_monster/loves_mailer/new_love.html.erb
1002
+ - app/views/love_monster/loves_mailer/new_love.text.erb
995
1003
  - app/views/love_monster/people/show.html.erb
996
1004
  - config/routes.rb
997
1005
  - db/migrate/20150722155657_create_love_monster_people.rb
@@ -1044,6 +1052,12 @@ files:
1044
1052
  - test/fixtures/love_monster/users.yml
1045
1053
  - test/integration/navigation_test.rb
1046
1054
  - test/love_monster_test.rb
1055
+ - test/mailers/love_monster/love_test.rb
1056
+ - test/mailers/love_monster/loves_mailer_test.rb
1057
+ - test/mailers/love_monster/loves_test.rb
1058
+ - test/mailers/previews/love_monster/love_preview.rb
1059
+ - test/mailers/previews/love_monster/loves_mailer_preview.rb
1060
+ - test/mailers/previews/love_monster/loves_preview.rb
1047
1061
  - test/models/love_monster/like_test.rb
1048
1062
  - test/models/love_monster/love_test.rb
1049
1063
  - test/models/love_monster/user_test.rb
@@ -1116,6 +1130,12 @@ test_files:
1116
1130
  - test/fixtures/love_monster/users.yml
1117
1131
  - test/integration/navigation_test.rb
1118
1132
  - test/love_monster_test.rb
1133
+ - test/mailers/love_monster/love_test.rb
1134
+ - test/mailers/love_monster/loves_mailer_test.rb
1135
+ - test/mailers/love_monster/loves_test.rb
1136
+ - test/mailers/previews/love_monster/love_preview.rb
1137
+ - test/mailers/previews/love_monster/loves_mailer_preview.rb
1138
+ - test/mailers/previews/love_monster/loves_preview.rb
1119
1139
  - test/models/love_monster/like_test.rb
1120
1140
  - test/models/love_monster/love_test.rb
1121
1141
  - test/models/love_monster/user_test.rb