renote_dac 0.0.146 → 0.0.147
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 +4 -4
- data/README.md +26 -3
- data/app/workers/service_queue_worker.rb +10 -1
- data/lib/renote_dac/mailer.rb +1 -4
- data/lib/renote_dac/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 250a34203a19ff80df6d1ec5c5fa216f3a6e7cb53968adc5633a09261ca7411b
|
4
|
+
data.tar.gz: 1e96658c980ec5cc5eb0a339572dc452fc64f39034d858322980e99f8526707b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ba216c612832119e544071508b6f0d13664cbc3c2a99d158bd5073285f2ba59016db9ab88e2ef49fb10eaf1ab24252f265ecf2daf7e6cde901d40ee2690adc9
|
7
|
+
data.tar.gz: 7c6b921ddedd3d8e3265eb1e28c0cd7d362722907e6fe9dd77815ab01655e149381f650b7e9e0e26e6394eab5c4e7e968595f44196248d2d01adf3a0abaaac22
|
data/README.md
CHANGED
@@ -77,11 +77,34 @@ run the following rake task to
|
|
77
77
|
|
78
78
|
### Postmark
|
79
79
|
|
80
|
-
add the
|
80
|
+
add the 'config' gem to your application. Add the following line to your gemfile
|
81
81
|
|
82
82
|
```bash
|
83
|
-
config
|
84
|
-
|
83
|
+
gme 'config'
|
84
|
+
```
|
85
|
+
|
86
|
+
run `rails g config:install` to generate the proper file structure in ./config folder to hold your application settings.
|
87
|
+
|
88
|
+
add the following to the production.yml and development.yml files inside the ./config/settings folder
|
89
|
+
|
90
|
+
development.yml
|
91
|
+
|
92
|
+
```
|
93
|
+
postmark:
|
94
|
+
api_token: 'dev-api-key-here'
|
95
|
+
```
|
96
|
+
|
97
|
+
production.yml
|
98
|
+
|
99
|
+
```
|
100
|
+
postmark:
|
101
|
+
api_token: ENV['POSTMARK_API_TOKEN']
|
102
|
+
```
|
103
|
+
|
104
|
+
Add your api token to your renote_dac initializer.
|
105
|
+
|
106
|
+
```
|
107
|
+
c.postmark_api_key = Settings.postmark.api_token
|
85
108
|
```
|
86
109
|
|
87
110
|
## Contributing
|
@@ -13,8 +13,17 @@ class ServiceQueueWorker
|
|
13
13
|
# changes
|
14
14
|
def work(message)
|
15
15
|
# invoke service object to save message to database
|
16
|
-
RenoteDac::Mailer.enqueue(
|
16
|
+
# RenoteDac::Mailer.enqueue()
|
17
|
+
message_params(message)
|
17
18
|
# let queue know message was received
|
18
19
|
ack!
|
19
20
|
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def message_params(message)
|
25
|
+
binding.pry
|
26
|
+
end
|
27
|
+
|
28
|
+
|
20
29
|
end
|
data/lib/renote_dac/mailer.rb
CHANGED
@@ -5,10 +5,7 @@ module RenoteDac
|
|
5
5
|
InvalidTemplate = Class.new(StandardError)
|
6
6
|
|
7
7
|
TEMPLATES = {
|
8
|
-
|
9
|
-
upcoming_class: { priority: 15, template_id: 5879081 }, # event_name, event_time, event_url
|
10
|
-
order_receipt: { priority: 30, template_id: 5878761 }, # reminder_time, order_id, order_date, items[{description, amount}], total
|
11
|
-
welcome: { priority: 40, template_id: 5720622 } # reminder_time
|
8
|
+
winning_bid: { priority: 40, template_id: 7335422 } # product_name, product_url, user_name, winning_bid, action_url
|
12
9
|
}.freeze
|
13
10
|
|
14
11
|
BATCH_ID = 0
|
data/lib/renote_dac/version.rb
CHANGED