messaging_client 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 4a6095e023eea8a1bb198db0ecd2e22e00831556
4
- data.tar.gz: f38c3a4b6d57b980693c534c016aff99d5694124
3
+ metadata.gz: a4b03ed1272c559e375e6db2d3bf73baec70798f
4
+ data.tar.gz: 96109976ad4ea33eeeb42a33a2b9510d60ac6be9
5
5
  SHA512:
6
- metadata.gz: 7d46c084915db238ff3660e30ad64e31e17dea283110b334515b980f3591515f263875b41d5ae8d01647fb9bf9edd96c9eacec15f092fab15bea91bb7a2a72f7
7
- data.tar.gz: 283ad834b2bcf7eb2d7e5d389b637b7c499e17b7d8ab5ab033e90abcbfcfff550cf476a677bd8f130e63418a08e1b1b4882833c744c6cf738440d61414938a78
6
+ metadata.gz: 2676f5ee361657958573f74b7fc028fef6985c6381f90c646fc767d4b08ceee221f58441515df2119e29f499521f4aa2175e8d679061bf13687c7008fc246143
7
+ data.tar.gz: dde9b5d7ad4551b4ee572749c21c06a2fff7c6142ae8c0140877a1449d2377e9bae79a6e0f902a7b8de354f10ee1582ccceb01d92cdc781f746857d3d3119b7f
@@ -25,7 +25,11 @@ module Messaging
25
25
  end
26
26
 
27
27
  def self.publish_to_sns(key,data)
28
- sns = Aws::SNS::Resource.new(region: 'us-east-1')
28
+ sns = Aws::SNS::Resource.new(
29
+ region: 'us-east-1',
30
+ access_key_id: SNS_KEY_ID,
31
+ secret_access_key: SNS_SECRET_ACCESS_KEY
32
+ )
29
33
  topic_arn = sns.topics.select{|t| t.arn.match(/([^:]*)$/)[0] == key.to_s }.first
30
34
  topic = sns.topic(topic_arn)
31
35
  topic.publish({ message: data.to_json })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messaging_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwayne Macgowan
@@ -61,7 +61,6 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - app/models/messaging/message.rb
63
63
  - app/models/messaging/notify_me.rb
64
- - config/initializers/aws_sdk.rb
65
64
  - config/initializers/messaging_client.rb
66
65
  - lib/messaging/client.rb
67
66
  - lib/messaging/railties.rb
@@ -1,6 +0,0 @@
1
- Aws.config.update({
2
- credentials: Aws::Credentials.new(
3
- Messaging::SNS_KEY_ID,
4
- Messaging::SNS_SECRET_ACCESS_KEY
5
- )
6
- })