discourse_subscription_client 0.1.8 → 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: f18845628b38637a55730279c38b6eb79a781ee92397249f87f59535273c1223
4
- data.tar.gz: 0d5ee97121224e465853bca566e636feab9e9f11bbfb7f0c55ddcf7133639919
3
+ metadata.gz: cfa8eae85ceafc3eed01ca40cddaa4569bd0c93bc2293823351c42fa66df5bad
4
+ data.tar.gz: 66dde7bd6855900991d24869c2a3c75147f3995621cbfb82b49f532ec2c0b9fc
5
5
  SHA512:
6
- metadata.gz: 4925d0d4fa305be65af680a5b4e6d59ff4edcd1625308642f2ee76bf5a0e9fbeffb90781ff9d4742e47730bfadde65137cc4584c0136575d2b4ccde34860bbb4
7
- data.tar.gz: 1b9219ddd8859ed418547d1f723b357cdcef1a552be53b3db9e9b7c0b57d1f7990bf9c9efc1940c0c8de0fe1423e066ec09bacb75af9611c616ef2d8b7423d7d
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://#{access_key_id}:#{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.8"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_subscription_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers