neon_secrets 0.0.1 → 0.0.2

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: df260eeb955f5de70d0527f19139de2a63f1719531cbd7108fca78759a145e79
4
- data.tar.gz: 1161dd945b93c5a58aef3acf26bd39a51b5ad58b378773bbfcb55a8b787ac56d
3
+ metadata.gz: e8e0738e96ef206cfffa6b27aadd0b6e290291d3e89cf7a80a1f64439a571fe9
4
+ data.tar.gz: 7ffb6b9c68c1dd8c84ad4af8e037e2857f39ed5a63b6aff71f60dcfbc526f1aa
5
5
  SHA512:
6
- metadata.gz: c0cfef9dc53275dd8445030905c2eea8d802517a8523486d8c1ffd43ced4107c23c0ad64e690ce2cfc8e7a2c4b174600f2f73d19281c015f984844ec037c509d
7
- data.tar.gz: 180cd5558f3c3ce0652bbf2fbef4adb601e332dfd81ccd6e9bbe661bf72e838e6ab15304ad85363259fb36e95dfe97a4da40a91d41eb35222f9cc9082f5b9266
6
+ metadata.gz: d12a8bf19ac2ae5013e559344a47aec3f664879dd45aca7687c310911d7ffb9c55fc380bfaec5ddd168de2527544c02d89b0027337abe7aee09850a818a9a2e6
7
+ data.tar.gz: e31c590e2c4f4ffd2576f1a3ec637261ae21e2b5428cc120b9b1730440cb8c1151c13488e14255fbd0af8c91dd5e2eef80c58173b1f72dc84cf7e8e66ec0f35c
data/Gemfile.lock CHANGED
@@ -1,33 +1,37 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neon_secrets (0.0.1)
4
+ neon_secrets (0.0.2)
5
5
  google-cloud-secret_manager (~> 1.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.7.0)
10
+ addressable (2.8.0)
11
11
  public_suffix (>= 2.0.2, < 5.0)
12
12
  ast (2.4.2)
13
13
  coderay (1.1.3)
14
- concurrent-ruby (1.1.8)
14
+ concurrent-ruby (1.1.9)
15
15
  diff-lcs (1.4.4)
16
- faker (2.17.0)
16
+ faker (2.18.0)
17
17
  i18n (>= 1.6, < 2)
18
- faraday (1.4.2)
18
+ faraday (1.5.0)
19
19
  faraday-em_http (~> 1.0)
20
20
  faraday-em_synchrony (~> 1.0)
21
21
  faraday-excon (~> 1.1)
22
+ faraday-httpclient (~> 1.0.1)
22
23
  faraday-net_http (~> 1.0)
23
24
  faraday-net_http_persistent (~> 1.1)
25
+ faraday-patron (~> 1.0)
24
26
  multipart-post (>= 1.2, < 3)
25
27
  ruby2_keywords (>= 0.0.4)
26
28
  faraday-em_http (1.0.0)
27
29
  faraday-em_synchrony (1.0.0)
28
30
  faraday-excon (1.1.0)
31
+ faraday-httpclient (1.0.1)
29
32
  faraday-net_http (1.0.1)
30
33
  faraday-net_http_persistent (1.1.0)
34
+ faraday-patron (1.0.0)
31
35
  gapic-common (0.5.0)
32
36
  faraday (~> 1.3)
33
37
  google-protobuf (~> 3.14)
@@ -41,18 +45,18 @@ GEM
41
45
  google-cloud-env (1.5.0)
42
46
  faraday (>= 0.17.3, < 2.0)
43
47
  google-cloud-errors (1.1.0)
44
- google-cloud-secret_manager (1.1.0)
45
- google-cloud-core (~> 1.5)
46
- google-cloud-secret_manager-v1 (~> 0.1)
47
- google-cloud-secret_manager-v1beta1 (~> 0.3)
48
- google-cloud-secret_manager-v1 (0.10.0)
49
- gapic-common (~> 0.4)
48
+ google-cloud-secret_manager (1.1.1)
49
+ google-cloud-core (~> 1.6)
50
+ google-cloud-secret_manager-v1 (>= 0.1, < 2.a)
51
+ google-cloud-secret_manager-v1beta1 (>= 0.3, < 2.a)
52
+ google-cloud-secret_manager-v1 (0.10.1)
53
+ gapic-common (>= 0.5, < 2.a)
50
54
  google-cloud-errors (~> 1.0)
51
- grpc-google-iam-v1 (>= 0.6.10, < 2.0)
52
- google-cloud-secret_manager-v1beta1 (0.8.0)
53
- gapic-common (~> 0.3)
55
+ grpc-google-iam-v1 (>= 0.6.10, < 2.a)
56
+ google-cloud-secret_manager-v1beta1 (0.8.1)
57
+ gapic-common (>= 0.5, < 2.a)
54
58
  google-cloud-errors (~> 1.0)
55
- grpc-google-iam-v1 (>= 0.6.10, < 2.0)
59
+ grpc-google-iam-v1 (>= 0.6.10, < 2.a)
56
60
  google-protobuf (3.17.3)
57
61
  googleapis-common-protos (1.3.11)
58
62
  google-protobuf (~> 3.14)
@@ -83,7 +87,7 @@ GEM
83
87
  multipart-post (2.1.1)
84
88
  os (1.1.1)
85
89
  parallel (1.20.1)
86
- parser (3.0.1.0)
90
+ parser (3.0.1.1)
87
91
  ast (~> 2.4.1)
88
92
  pry (0.14.1)
89
93
  coderay (~> 1.1)
@@ -106,19 +110,19 @@ GEM
106
110
  diff-lcs (>= 1.2.0, < 2.0)
107
111
  rspec-support (~> 3.10.0)
108
112
  rspec-support (3.10.2)
109
- rubocop (1.12.1)
113
+ rubocop (1.18.2)
110
114
  parallel (~> 1.10)
111
115
  parser (>= 3.0.0.0)
112
116
  rainbow (>= 2.2.2, < 4.0)
113
117
  regexp_parser (>= 1.8, < 3.0)
114
118
  rexml
115
- rubocop-ast (>= 1.2.0, < 2.0)
119
+ rubocop-ast (>= 1.7.0, < 2.0)
116
120
  ruby-progressbar (~> 1.7)
117
121
  unicode-display_width (>= 1.4.0, < 3.0)
118
- rubocop-ast (1.4.1)
119
- parser (>= 2.7.1.5)
120
- rubocop-performance (1.10.1)
121
- rubocop (>= 0.90.0, < 2.0)
122
+ rubocop-ast (1.7.0)
123
+ parser (>= 3.0.1.1)
124
+ rubocop-performance (1.11.3)
125
+ rubocop (>= 1.7.0, < 2.0)
122
126
  rubocop-ast (>= 0.4.0)
123
127
  ruby-progressbar (1.11.0)
124
128
  ruby2_keywords (0.0.4)
@@ -127,9 +131,9 @@ GEM
127
131
  faraday (>= 0.17.3, < 2.0)
128
132
  jwt (>= 1.5, < 3.0)
129
133
  multi_json (~> 1.10)
130
- standard (1.0.5)
131
- rubocop (= 1.12.1)
132
- rubocop-performance (= 1.10.1)
134
+ standard (1.1.4)
135
+ rubocop (= 1.18.2)
136
+ rubocop-performance (= 1.11.3)
133
137
  unicode-display_width (2.0.0)
134
138
 
135
139
  PLATFORMS
data/lib/neon_secrets.rb CHANGED
@@ -24,9 +24,15 @@ module NeonSecrets
24
24
  client = Google::Cloud::SecretManager.secret_manager_service
25
25
  secret_name = "#{gcp_secret_name}.latest"
26
26
 
27
- secrets = client.access_secret_version name: secret_name
27
+ version_path = client.secret_version_path(
28
+ project: "neon-law-#{neon_env.downcase}",
29
+ secret: gcp_secret_name,
30
+ secret_version: "latest"
31
+ )
28
32
 
29
- JSON.parse(secrets).fetch(secret_name)
33
+ secret_values = client.access_secret_version name: version_path
34
+
35
+ JSON.parse(secret_values.payload.data).fetch(secret_name)
30
36
  end
31
37
  end
32
38
 
@@ -1,3 +1,3 @@
1
1
  module NeonSecrets
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_secrets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neon Law
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-secret_manager