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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c4f747be65d4b58339a5ebfe51d6316924e8abfa458eae8f9c6934fc49a7290
4
- data.tar.gz: 9aa40ece9df79179928951eb2b0147cf8179dbfc0c9b749b03102fab82bc6bf4
3
+ metadata.gz: 6c9e6840d31e3a7dda2e2456abad952a5175773d206549a263328926457c4a7e
4
+ data.tar.gz: d1666983bd4d5382d9fc123fa9b4dc23c7ae841cdcfe98c6c69e1e3427bd938b
5
5
  SHA512:
6
- metadata.gz: aebbc1ef0715e52497d3ca5ff081bf39501b50a89eaa55700823cb804d96a95e64f43c876b2a76617917a29d0dca5a5c037de67090ddafb8a928c27fff76e0f9
7
- data.tar.gz: 57d425cf338120642b47ee84d8b9d73ca89b06bb4bf0d65399560b1e23fc2e662dd675f3982cf431a2b59deb1faeda326b4a81a8015f6e9221f41c8cce5db21e
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
@@ -1,3 +1,3 @@
1
1
  module PublisherRenoteDac
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  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.13
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-02 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails