publisher_renote_dac 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -0
- data/app/services/publisher_renote_dac/publisher.rb +15 -9
- data/lib/publisher_renote_dac/version.rb +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: 6c9e6840d31e3a7dda2e2456abad952a5175773d206549a263328926457c4a7e
|
4
|
+
data.tar.gz: d1666983bd4d5382d9fc123fa9b4dc23c7ae841cdcfe98c6c69e1e3427bd938b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ed05597a4e5aafc4d9b050e40db1410f2e0b806e2ccfe5f3619c06a97400daf9b63cdd49cb575e295677c3cafb815da6041a4b65af532386b36e1a4f597ce0
|
7
|
+
data.tar.gz: 48bb3119c7e1f263e40f3881d611e77d3358ded8777d41634f9b0334a8326d346bff26d86662855f14c42af723ddd2870dd0ce6adb3c3244b0e487d43335388a
|
data/README.md
CHANGED
@@ -60,6 +60,36 @@ To setup exchange and bind to quees run...
|
|
60
60
|
rake publisher_renote_dac:rabbitmq:setup
|
61
61
|
```
|
62
62
|
|
63
|
+
## Production
|
64
|
+
|
65
|
+
### Heroku Deploy
|
66
|
+
|
67
|
+
You can attach RabbitMQ Bigwig to a Heroku application via the CLI
|
68
|
+
|
69
|
+
```bash
|
70
|
+
heroku addons:create rabbitmq-bigwig
|
71
|
+
$=> Adding rabbitmq-bigwig to sharp-mountain-4005... done, v18 (free)
|
72
|
+
```
|
73
|
+
|
74
|
+
Once you have added RabbitMQ Bigwig you will find `RABBITMQ_BIGWIG_TX_URL` and `RABBITMQ_BIGWIG_RX_URL` settings in the app configuration. These contain the canonical URLs used to access the newly provisioned RabbitMQ Bigwig service instance. You can confirm this using the `heroku config:get` command.
|
75
|
+
|
76
|
+
```bash
|
77
|
+
heroku config:get RABBITMQ_BIGWIG_RX_URL
|
78
|
+
$=> amqp://user:pass@instance.ip/resourceid
|
79
|
+
```
|
80
|
+
```bash
|
81
|
+
heroku config:get RABBITMQ_BIGWIG_TX_URL
|
82
|
+
$=> amqp://user:pass@instance.ip/resourceid2
|
83
|
+
```
|
84
|
+
|
85
|
+
make sure to set postmark's `api_token` env variable on heroku settings tab of the consumer application
|
86
|
+
|
87
|
+
`POSTMARK_API_TOKEN`
|
88
|
+
|
89
|
+
rake task for heroku
|
90
|
+
|
91
|
+
copy over `RABBITMQ_BIGWIG_TX_URL` env variable from whatever app you have heroku rabbitmq add-on installed on.
|
92
|
+
|
63
93
|
## Contributing
|
64
94
|
Contribution directions go here.
|
65
95
|
|
@@ -10,18 +10,24 @@ module PublisherRenoteDac
|
|
10
10
|
@channel ||= connection.create_channel
|
11
11
|
end
|
12
12
|
|
13
|
-
# We are using default settings here
|
14
|
-
# The `Bunny.new(...)` is a place to
|
15
|
-
# put any specific RabbitMQ settings
|
16
|
-
# like host or port
|
17
13
|
def self.connection
|
18
|
-
@connection ||= Bunny.new(
|
19
|
-
:vhost => PublisherRenoteDac.configuration.vhost,
|
20
|
-
:user => PublisherRenoteDac.configuration.username,
|
21
|
-
:password => PublisherRenoteDac.configuration.password
|
22
|
-
).tap do |c|
|
14
|
+
@connection ||= Bunny.new(conn_params).tap do |c|
|
23
15
|
c.start
|
24
16
|
end
|
25
17
|
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def conn_params
|
22
|
+
if Rails.env.production?
|
23
|
+
ENV['RABBITMQ_BIGWIG_TX_URL']
|
24
|
+
else
|
25
|
+
{
|
26
|
+
:vhost => PublisherRenoteDac.configuration.vhost,
|
27
|
+
:user => PublisherRenoteDac.configuration.username,
|
28
|
+
:password => PublisherRenoteDac.configuration.password
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publisher_renote_dac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidney Leatherwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|