kkt_shoppe-notification 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/app/mailers/kkt_shoppe/notification_mailer.rb +11 -0
- data/app/views/kkt_shoppe/notification_mailer/order_received.text.erb +14 -0
- data/kkt_shoppe-notification.gemspec +29 -0
- data/lib/kkt_shoppe/notification/engine.rb +11 -0
- data/lib/kkt_shoppe/notification/version.rb +5 -0
- data/lib/kkt_shoppe/notification.rb +14 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eb96989a185ab2039fd6515c1e31d52ecc8ded1f
|
4
|
+
data.tar.gz: fbd9565208d41028835b4db14b8144c64b3a1372
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8569ab72a8a2fa32e138eb6fd68aab50ba1382fc06582f0f8c576ccd5730807f65cd24e628316496f9fe33fb6595c3a895dd9239ec3d8eab68832a67f29b8057
|
7
|
+
data.tar.gz: e9cc9f563fa728dc7c2d3ee015a938db90ea344f67a69c696b2cfef75287d87ca497848b5e1f394efc53ad1a3e05171e9a8ef0fa11d8af80ff6b5a7570186d40
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Kyle Thompson
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# KktShoppe::Notification
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'kkt_shoppe-notification'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install kkt_shoppe-notification
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/kkt_shoppe-notification/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
module KktShoppe
|
2
|
+
class NotificationMailer < ActionMailer::Base
|
3
|
+
|
4
|
+
def order_received(order)
|
5
|
+
@order = order
|
6
|
+
staff = KktShoppe::User.all.map(&:email_address)
|
7
|
+
mail from: KktShoppe.settings.outbound_email_address, to: staff, subject: "New Order Received"
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
Hello Team!
|
2
|
+
|
3
|
+
Re: Order #<%=@order.number%>
|
4
|
+
|
5
|
+
This is just a quick email to let you know that <%= @order.first_name %> <%= @order.last_name %> has purchased the following:
|
6
|
+
<% order.order_items.each do |item| %>
|
7
|
+
<%= item.quantity %> x <%= item.ordered_item.full_name %>
|
8
|
+
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
The total price paid was: <%= number_to_currency @order.total %>
|
12
|
+
|
13
|
+
Stay focused to reach those goals,
|
14
|
+
COHN CrossFit Management
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'kkt_shoppe/notification/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "kkt_shoppe-notification"
|
8
|
+
spec.version = KktShoppe::Notification::VERSION
|
9
|
+
spec.authors = ["Kyle Thompson", "Dean Perry"]
|
10
|
+
spec.email = ["kyle@kylekthompson.com", "dean@voupe.com"]
|
11
|
+
spec.summary = "TODO: Write a short summary. Required."
|
12
|
+
spec.description = "TODO: Write a longer description. Optional."
|
13
|
+
spec.homepage = "http://www.kylekthompson.com/"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.summary = "A Shoppe module which emails staff on new orders"
|
17
|
+
spec.description = "A Shoppe module which emails staff on new orders"
|
18
|
+
spec.homepage = "http://tryshoppe.com"
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_dependency "kkt_shoppe"
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
29
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "kkt_shoppe/notification/version"
|
2
|
+
require "kkt_shoppe/notification/engine"
|
3
|
+
|
4
|
+
module KktShoppe
|
5
|
+
module Notification
|
6
|
+
|
7
|
+
def self.setup
|
8
|
+
KktShoppe::Order.before_confirmation do
|
9
|
+
KktShoppe::NotificationMailer.order_received(self).deliver_now
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kkt_shoppe-notification
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kyle Thompson
|
8
|
+
- Dean Perry
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: kkt_shoppe
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.8'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.8'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '10.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '10.0'
|
56
|
+
description: A Shoppe module which emails staff on new orders
|
57
|
+
email:
|
58
|
+
- kyle@kylekthompson.com
|
59
|
+
- dean@voupe.com
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- app/mailers/kkt_shoppe/notification_mailer.rb
|
70
|
+
- app/views/kkt_shoppe/notification_mailer/order_received.text.erb
|
71
|
+
- kkt_shoppe-notification.gemspec
|
72
|
+
- lib/kkt_shoppe/notification.rb
|
73
|
+
- lib/kkt_shoppe/notification/engine.rb
|
74
|
+
- lib/kkt_shoppe/notification/version.rb
|
75
|
+
homepage: http://tryshoppe.com
|
76
|
+
licenses:
|
77
|
+
- MIT
|
78
|
+
metadata: {}
|
79
|
+
post_install_message:
|
80
|
+
rdoc_options: []
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
requirements: []
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 2.4.3
|
96
|
+
signing_key:
|
97
|
+
specification_version: 4
|
98
|
+
summary: A Shoppe module which emails staff on new orders
|
99
|
+
test_files: []
|
100
|
+
has_rdoc:
|