cloudrunpdf 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudrunpdf/builder.rb +2 -3
- data/lib/cloudrunpdf/configuration.rb +2 -3
- data/lib/cloudrunpdf/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0416344727b2c549ff8a32536aefb3e39f70341dec9b16a861c52f933df4d811
|
4
|
+
data.tar.gz: 55a7630963703a097e6a544b6d9ad272f0bc5131c148477fc79b9b2bcee98724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb6001a0a02843686d7dcf8b4461e1e193030120d1642d00637e535ab103ebdb5dcfc75c50c4acb747907487674fcb3fef35d39672e51989e98738c6f30f3b96
|
7
|
+
data.tar.gz: 3333ae2c6f29b916f7e4cd0cc8b68dc0bc01b147c320003b7351af69bd88664401eeb95da5ba8c9716cce7515fd72339ff3c54b6366f63270e40985d8ecb4043
|
data/lib/cloudrunpdf/builder.rb
CHANGED
@@ -12,7 +12,7 @@ module Cloudrunpdf
|
|
12
12
|
def print(data)
|
13
13
|
threads = []
|
14
14
|
|
15
|
-
data.
|
15
|
+
Array.wrap(data).each do |entry|
|
16
16
|
threads.append(
|
17
17
|
Thread.new { Thread.current[:pdf] = generate_pdf(entry) }
|
18
18
|
)
|
@@ -42,8 +42,7 @@ module Cloudrunpdf
|
|
42
42
|
@token ||= `gcloud auth print-identity-token`.strip
|
43
43
|
else
|
44
44
|
@token ||= Faraday.get(
|
45
|
-
@configuration.
|
46
|
-
"/identity?audience=#{PdfService::FUNCTION}&format=full",
|
45
|
+
"http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=#{@configuration.cloud_function_url}&format=full",
|
47
46
|
{},
|
48
47
|
{ metadata_flavor: 'Google' }
|
49
48
|
).body
|
@@ -3,11 +3,10 @@
|
|
3
3
|
module Cloudrunpdf
|
4
4
|
# Configuration options for gem
|
5
5
|
class Configuration
|
6
|
-
attr_accessor :cloud_function_url
|
6
|
+
attr_accessor :cloud_function_url
|
7
7
|
|
8
8
|
def initialize
|
9
|
-
@cloud_function_url = 'https://
|
10
|
-
@token_base_url = "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default"
|
9
|
+
@cloud_function_url = 'https://htmlpdf-newer-7zhay37huq-ew.a.run.app'.freeze
|
11
10
|
end
|
12
11
|
end
|
13
12
|
end
|
data/lib/cloudrunpdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudrunpdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bas Schoenmakers
|
8
8
|
- Jasper vd Berg
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
12
|
date: 2022-06-10 00:00:00.000000000 Z
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
|
-
description:
|
28
|
+
description:
|
29
29
|
email:
|
30
30
|
- bas.schoenmakers@remarkgroup.com
|
31
31
|
- jasper.vandenberg@remarkgroup.com
|
@@ -51,7 +51,7 @@ licenses:
|
|
51
51
|
metadata:
|
52
52
|
homepage_uri: https://remarkgroup.com
|
53
53
|
rubygems_mfa_required: 'true'
|
54
|
-
post_install_message:
|
54
|
+
post_install_message:
|
55
55
|
rdoc_options: []
|
56
56
|
require_paths:
|
57
57
|
- lib
|
@@ -66,8 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
|
-
rubygems_version: 3.2.
|
70
|
-
signing_key:
|
69
|
+
rubygems_version: 3.2.32
|
70
|
+
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Generate PDF with Google Cloud Function.
|
73
73
|
test_files: []
|