acmesmith-google-cloud-storage 0.1.3 → 0.1.5

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: '09e2aad4b44d09822220d161e0bac77e44a81bceb0c08ca4081c8a572fce83d6'
4
- data.tar.gz: 044263a42c85cef68b4ddbb38c5a3237161b6f7fa55465f0f29b4c5e8918a684
3
+ metadata.gz: 24508a0aeea8be42257cca1230c49da3fd6d7f38a12ef18b12bb3ded8b9fe59b
4
+ data.tar.gz: e3e07811bd7cb07b33403ac84cd77b3c73c3b1e0e23ced23c7667c5150573089
5
5
  SHA512:
6
- metadata.gz: 034ff4da38bf8ce6039df3b7ab5f551feb5d657d709b2a7f781d70e31025c25ca9f11478e667a72e273b5e8aa73ed388f1915222f3d8adcf31bf63ae18032c62
7
- data.tar.gz: 1531b5cf8449d25f92ef318b1248f70884f09e5692dc638dfa5088e1704a5dce7ff5ec1d69a1ad92181e807f3db1e26b7d93e73a2c59351155eb77172246446c
6
+ metadata.gz: 110bce64521a18fbe10aba30c54023094ae105324787e8e467d4c0ea2666bb2e500a0a7f54e5a48e5aa21e1bd3b3587f83e8696cb5bab6ca69d9bda24707995d
7
+ data.tar.gz: e5c1e8aa73ae74813bb482d797edadc224553a101bf61ba47de6313af67663a06cb4a101b9e9dc72e8b59aeb81a8910d4cb0d2cfd5ecd8b89cd95181a7ecdfba
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency "acmesmith"
23
23
  spec.add_dependency "google-api-client"
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.11"
26
- spec.add_development_dependency "rake", "~> 10.0"
27
- spec.add_development_dependency "rspec", "~> 3.0"
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "rake"
27
+ spec.add_development_dependency "rspec"
28
28
  end
@@ -39,8 +39,7 @@ module Acmesmith
39
39
  end
40
40
 
41
41
  def get_account_key
42
- @api.get_object(bucket, account_key_key)
43
- AccountKey.new @api.get_object(bucket, account_key_key, download_dest: StringIO.new).string
42
+ AccountKey.new get_object_content(bucket, account_key_key)
44
43
  rescue Google::Apis::ClientError => e
45
44
  if e.status_code == 404
46
45
  raise NotExist.new("Account key doesn't exist")
@@ -108,7 +107,7 @@ module Acmesmith
108
107
  version = certificate_current(common_name) if version == 'current'
109
108
 
110
109
  get = ->(key) do
111
- @api.get_object(bucket, key, download_dest: StringIO.new).string
110
+ get_object_content(bucket, key)
112
111
  end
113
112
 
114
113
  certificate = get.call(certificate_key(common_name, version))
@@ -174,8 +173,7 @@ module Acmesmith
174
173
  end
175
174
 
176
175
  def certificate_current(cn)
177
- @api.get_object(bucket, certificate_current_key(cn))
178
- @api.get_object(bucket, certificate_current_key(cn), download_dest: StringIO.new).string.chomp
176
+ get_object_content(bucket, certificate_current_key(cn)).chomp
179
177
  rescue Google::Apis::ClientError => e
180
178
  if e.status_code == 404
181
179
  raise NotExist.new("Certificate for #{cn.inspect} of current version doesn't exist")
@@ -207,6 +205,12 @@ module Acmesmith
207
205
  private_key: OpenSSL::PKey.read(obj["private_key"]),
208
206
  }
209
207
  end
208
+
209
+ def get_object_content(bucket, key)
210
+ output = StringIO.new
211
+ @api.get_object(bucket, key, download_dest: output)
212
+ output.string
213
+ end
210
214
  end
211
215
  end
212
216
  end
@@ -1,3 +1,3 @@
1
1
  module AcmesmithGoogleCloudStorage
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acmesmith-google-cloud-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - YAMADA Tsuyoshi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-13 00:00:00.000000000 Z
11
+ date: 2022-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acmesmith
@@ -42,44 +42,44 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.11'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.11'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '0'
83
83
  description: acmesmith plugin implementing google_cloud_storage storage
84
84
  email:
85
85
  - tyamada@minimum2scp.org
@@ -103,7 +103,7 @@ homepage: https://github.com/minimum2scp/acmesmith-google-cloud-storage
103
103
  licenses:
104
104
  - MIT
105
105
  metadata: {}
106
- post_install_message:
106
+ post_install_message:
107
107
  rdoc_options: []
108
108
  require_paths:
109
109
  - lib
@@ -118,9 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubyforge_project:
122
- rubygems_version: 2.7.6
123
- signing_key:
121
+ rubygems_version: 3.3.22
122
+ signing_key:
124
123
  specification_version: 4
125
124
  summary: acmesmith plugin implementing google_cloud_storage storage
126
125
  test_files: []