canzea 0.1.152 → 0.1.153

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
  SHA1:
3
- metadata.gz: 03d635811dcefa185678e069467383aa4c9c50dd
4
- data.tar.gz: 3725b023ad1df464f8c48dec3566ed0f5cf6c310
3
+ metadata.gz: 20dfc1000c8c0ba659443d74d95e98a350a5fe57
4
+ data.tar.gz: ff5b570572a173017777e74e37dd983a4b954e3c
5
5
  SHA512:
6
- metadata.gz: 2648f2015e0f827ee156fbda9626927813947c84b647e2e8e5e47172490d20f9d14a1f0a7975c4819e202c8b704a06a4e59d935bf73871d69fa19c6f969d3bb2
7
- data.tar.gz: 6c3910e3a816e6e27f20bd4102107d2d8eae528797e8378b4bd65358107f4f8db2e3c8095ade77f14f6b7187ced5e2c76f569da69ae101b9770d22862c526272
6
+ metadata.gz: 4e7cea3321528d03fc324086f0ca2110f5fa806b0efc1f3412ceed788c65962320958f669efb863a81d469f3248f7066eebb2e5290bf0a1fab4fbb8ccacf2091
7
+ data.tar.gz: 66da930f5c35ab468669821dc3ba5aa8928958343ff28dca587f8c14f2694227ee54313154a4b5f8976d0d6541f7fa0e9403e77221ea992e31d98a4c55c4de2b
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.152"
2
+ VERSION = "0.1.153"
3
3
  end
data/lib/registry.rb CHANGED
@@ -117,6 +117,23 @@ class Registry
117
117
  return JSON.parse(resp.body)['data']
118
118
  end
119
119
 
120
+ def setVaultRecord (key, value)
121
+
122
+ uri = URI.parse(ENV["VAULT_URL"] + "/v1/#{key}")
123
+ http = prepareHttpForVault(uri)
124
+
125
+ request = Net::HTTP::Put.new(uri.request_uri)
126
+ request['Content-Type'] = 'application/json'
127
+ request['X-Vault-Token'] = ENV["VAULT_TOKEN"]
128
+ request.body = "#{value}";
129
+ resp = http.request(request)
130
+
131
+ if Integer(resp.code) != 204
132
+ puts "-- VAULT RECORD NOT SAVED! #{key}"
133
+ abort("Problem adding to vault, response code #{resp.code}")
134
+ end
135
+ end
136
+
120
137
  def setSecret (key, value)
121
138
 
122
139
  uri = URI.parse(ENV["VAULT_URL"] + "/v1/secret/#{key}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.152
4
+ version: 0.1.153
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies