discourse_subscription_client 0.1.9 → 0.1.10

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: 1218e0a9a0104a489d0826df19f6b172255498c2c25a1121d58601e309aae75a
4
- data.tar.gz: 52aa2da46e87234a9fa82ad84012af96743d69834a3e924bcb2356d30b2c5e58
3
+ metadata.gz: cfa8eae85ceafc3eed01ca40cddaa4569bd0c93bc2293823351c42fa66df5bad
4
+ data.tar.gz: 66dde7bd6855900991d24869c2a3c75147f3995621cbfb82b49f532ec2c0b9fc
5
5
  SHA512:
6
- metadata.gz: 14b107b2b4a8d781ce2d8370063c787490480dc30cd36050a569cd39425b9d3ada799c1fbc4c381c97cdfb9e5726b5b302f283b69f8f89b8ff2fadc0a8b452be
7
- data.tar.gz: 96257387b32cbe0820ac3dcbee7a40e053adc8229c7b39ea686abcae595b91cda0aebf303881cb43190720ca95b20bbe8bbc77be7a0528956fea21506e21e757
6
+ metadata.gz: 37fdeaff464660bc50bc01488817df7ebc26152ec03af6439c3b71eb37c7c2506d8aa7c0ba5ce0fa2f8e913b2f2ed05b6466c590a5d36d0e3afb9877e4bbb87b
7
+ data.tar.gz: 65da8d91da25b4f43f3233d6740fb2bf1c284741db0c3dfc2b3810622b8de68b5f70b4fc578d27b2aa890ec152fd5d8d24ccba9f1ae1ba320b6531c7027f7ead
@@ -7,13 +7,6 @@ class SubscriptionClientResource < ActiveRecord::Base
7
7
  has_many :notices, class_name: "SubscriptionClientNotice", as: :notice_subject, dependent: :destroy
8
8
  has_many :subscriptions, foreign_key: "resource_id", class_name: "SubscriptionClientSubscription", dependent: :destroy
9
9
 
10
- def get_source_url(bucket)
11
- return nil unless access_key_id && secret_access_key && s3_client
12
- return nil unless can_access_bucket?(bucket)
13
-
14
- "s3://#{CGI.escapeURIComponent(access_key_id)}:#{CGI.escapeURIComponent(secret_access_key)}@#{bucket}"
15
- end
16
-
17
10
  def can_access_bucket?(bucket)
18
11
  s3_client.head_bucket(bucket: bucket)
19
12
  true
@@ -28,12 +21,16 @@ class SubscriptionClientResource < ActiveRecord::Base
28
21
  return nil unless access_key_id && secret_access_key
29
22
 
30
23
  Aws::S3::Client.new(
31
- region: "us-east-1",
24
+ region: region,
32
25
  access_key_id: access_key_id,
33
26
  secret_access_key: secret_access_key
34
27
  )
35
28
  end
36
29
  end
30
+
31
+ def region
32
+ "us-east-1"
33
+ end
37
34
  end
38
35
 
39
36
  # == Schema Information
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscourseSubscriptionClient
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_subscription_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod