istox 0.1.51 → 0.1.52

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: 2b443db6acb5652b36b349df9d1bd5870bcd41792bc6bca8ae47a9e855408d06
4
- data.tar.gz: dceb6ee8c97249e18f490c20bcb55a568e3d33424d868b7ef5c08112bb4c0382
3
+ metadata.gz: 20a01bdb4f2f5e00d64d08ee3e21d273120a7f1853cdcc5c64b217fd5556d3ad
4
+ data.tar.gz: 5171117303a86e5a7eb35e75f98e73bd8297ca3fcf665c0bb82fc4ce18640b50
5
5
  SHA512:
6
- metadata.gz: d404b0b09c40a4f4e0db288df0917bc78463e288eb7286afdf065cab25c75ee5a97d93254287d9c8451cf1ff101f2011e7343838b1301d9f0e25f157f7fc33a5
7
- data.tar.gz: 50ef6f116e322903aa9d99c13ef2818f9694abcf055be83b7653be142d83c1040df9c0bf569dd94e75834a3ac4be5635a6699d39a4b15dd46052629109af2238
6
+ metadata.gz: 1ebe641bcc52615263588bdd0a73df01cc91a712e2aacd894f88376c0cec693e0df9689b800ea7404b74fd609839d687a5871e96de350bf703606d19381adcf2
7
+ data.tar.gz: d53e5342148add4f0748e31dedf1d267bda5f3d21703b3c67afbe920ef88015f5bd842ce66bcb108b157a1f9159d7f83801174a86fd0b5276a595b1145f17fc2
data/README.md CHANGED
@@ -2,8 +2,8 @@ to publish new version
2
2
 
3
3
  1. Change version number in version.rb
4
4
 
5
- 2. gem build istox
5
+ 2. `gem build istox`
6
6
 
7
- 3. gem push istox-<VERSION>.gem
7
+ 3. `gem push istox-<VERSION>.gem`
8
8
 
9
- 4. in local repo: bundle install istox@<VERSION> --full-index
9
+ 4. in local repo: `bundle install istox --full-index`
@@ -1,7 +1,7 @@
1
1
  require 'vault'
2
2
 
3
3
  module Istox
4
- module Vault
4
+ module IVault
5
5
  module TOTP
6
6
  class << self
7
7
 
@@ -37,11 +37,11 @@ module Istox
37
37
  private
38
38
 
39
39
  def read_data(key)
40
- vault.read(key)
40
+ ::Vault.logical.read(key)
41
41
  end
42
42
 
43
43
  def write_data(key, params)
44
- Vault.logical.write(key, params)
44
+ ::Vault.logical.write(key, params)
45
45
  end
46
46
 
47
47
  def totp_key(sid)
@@ -56,7 +56,7 @@ module Istox
56
56
 
57
57
  class << self
58
58
  def initialize(secret_key, file_location)
59
- Vault.configure do |config|
59
+ ::Vault.configure do |config|
60
60
  config.address = secret_key
61
61
 
62
62
  if File.exist?(file_location)
@@ -72,8 +72,8 @@ module Istox
72
72
  end
73
73
 
74
74
  def get_otp(sid)
75
- Vault::TOTP.create(sid)
76
- otp = Vault::TOTP.generate_code(sid)
75
+ TOTP.create(sid)
76
+ otp = TOTP.generate_code(sid)
77
77
 
78
78
  return otp
79
79
  end
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.51"
2
+ VERSION = "0.1.52"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.51
4
+ version: 0.1.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng