cloudrunpdf 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c8765a2e71265ad504fe4ebb22f24c8d89a657713a14be7cec9a30086f484ec
4
- data.tar.gz: 2ca2e90a46caebcd28c101ec0bdb73071414db6e2701721dee83685b23c8d955
3
+ metadata.gz: 0416344727b2c549ff8a32536aefb3e39f70341dec9b16a861c52f933df4d811
4
+ data.tar.gz: 55a7630963703a097e6a544b6d9ad272f0bc5131c148477fc79b9b2bcee98724
5
5
  SHA512:
6
- metadata.gz: ceea27573623960a24d8f8260cbd2fd29c7e0c6c096295543255c6a9dbe3be414ee89be428526df38946f13445e7463e0f60c92f97c9494f404b475c2ed0e749
7
- data.tar.gz: a29114a6573c3d62c1f43b326f6223a5caacf00f03803db3c759110047b21ab528ed8b21a4f5d755a3759546739fedf097d82c06449c3995048e445df50c84eb
6
+ metadata.gz: bb6001a0a02843686d7dcf8b4461e1e193030120d1642d00637e535ab103ebdb5dcfc75c50c4acb747907487674fcb3fef35d39672e51989e98738c6f30f3b96
7
+ data.tar.gz: 3333ae2c6f29b916f7e4cd0cc8b68dc0bc01b147c320003b7351af69bd88664401eeb95da5ba8c9716cce7515fd72339ff3c54b6366f63270e40985d8ecb4043
@@ -12,7 +12,7 @@ module Cloudrunpdf
12
12
  def print(data)
13
13
  threads = []
14
14
 
15
- data.map.each do |entry|
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.token_base_url +
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, :token_base_url
6
+ attr_accessor :cloud_function_url
7
7
 
8
8
  def initialize
9
- @cloud_function_url = 'https://neo-htmlpdf-7zhay37huq-ew.a.run.app'
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cloudrunpdf
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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.33
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: []