zuora_connect 1.3.1.2 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/zuora_connect/app_instance_base.rb +11 -10
- data/lib/zuora_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c46b24f33368a80465464a3502caae7dfa3aed
|
4
|
+
data.tar.gz: 35fde6ce89acdd31c8dd828c3a72f277dd1e1635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea1686e5ec6aeeb3e2d999c9c26f2d481299fbf889330ad313de00236be2d1683221119578983e1f14e87845c38670e3207a247b2a910815452d53c444d4706
|
7
|
+
data.tar.gz: 2d95e2d5447fb38a8b3505c07014e3ca673cde8379534aed7472c4a4c1b178772de0229c7b065e7c61e460ce84ffb4dbc08d10b2e74e5de9c57afcf740c525c5
|
@@ -7,13 +7,6 @@ module ZuoraConnect
|
|
7
7
|
def init
|
8
8
|
@options = Hash.new
|
9
9
|
@logins = Hash.new
|
10
|
-
if ZuoraConnect.configuration.use_s3
|
11
|
-
if ZuoraConnect.configuration.mode == "Development"
|
12
|
-
@s3_client = Aws::S3::Resource.new(region: ZuoraConnect.configuration.aws_region,access_key_id: ZuoraConnect.configuration.dev_mode_access_key_id,secret_access_key: ZuoraConnect.configuration.dev_mode_secret_access_key)
|
13
|
-
else
|
14
|
-
@s3_client = Aws::S3::Resource.new(region: ZuoraConnect.configuration.aws_region)
|
15
|
-
end
|
16
|
-
end
|
17
10
|
@valid = false
|
18
11
|
self.attr_builder("timezone", ZuoraConnect.configuration.default_time_zone)
|
19
12
|
self.attr_builder("locale", ZuoraConnect.configuration.default_locale)
|
@@ -145,13 +138,21 @@ module ZuoraConnect
|
|
145
138
|
|
146
139
|
def upload_to_s3(local_file,s3_path = nil)
|
147
140
|
s3_path = local_file.split("/").last if s3_path.nil?
|
148
|
-
obj =
|
141
|
+
obj = self.s3_client.bucket(ZuoraConnect.configuration.s3_bucket_name).object("#{ZuoraConnect.configuration.s3_folder_name}/#{self.id.to_s}/#{s3_path}}")
|
149
142
|
obj.upload_file(local_file)
|
150
143
|
end
|
151
144
|
|
152
145
|
def get_s3_file_url(key)
|
153
|
-
signer = Aws::S3::Presigner.new(client:
|
154
|
-
url = signer.presigned_url(:get_object, bucket: ZuoraConnect.configuration.s3_bucket_name, key: "#{ZuoraConnect.configuration.s3_folder_name}/#{key}")
|
146
|
+
signer = Aws::S3::Presigner.new(client: self.s3_client)
|
147
|
+
url = signer.presigned_url(:get_object, bucket: ZuoraConnect.configuration.s3_bucket_name, key: "#{ZuoraConnect.configuration.s3_folder_name}/#{self.id.to_s}/#{key}")
|
148
|
+
end
|
149
|
+
|
150
|
+
def s3_client
|
151
|
+
if ZuoraConnect.configuration.mode == "Development"
|
152
|
+
@s3_client ||= Aws::S3::Resource.new(region: ZuoraConnect.configuration.aws_region,access_key_id: ZuoraConnect.configuration.dev_mode_access_key_id,secret_access_key: ZuoraConnect.configuration.dev_mode_secret_access_key)
|
153
|
+
else
|
154
|
+
@s3_client ||= Aws::S3::Resource.new(region: ZuoraConnect.configuration.aws_region)
|
155
|
+
end
|
155
156
|
end
|
156
157
|
|
157
158
|
def self.decrypt_response(resp)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuora_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Connect Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-session_store
|