Skip to content

Commit

Permalink
Removed passgen (it's been yanked) and replaced with SecureRandom (bu…
Browse files Browse the repository at this point in the history
…ilt-in).

Signed-off-by: Ryan Davis <zenspider@chef.io>
  • Loading branch information
zenspider committed Jul 1, 2019
1 parent 8bcbaf6 commit b462eb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -28,7 +28,6 @@ group :test do
gem "mocha", "~> 1.1"
gem "ruby-progressbar", "~> 1.8"
gem "webmock", "~> 3.0"
gem "passgen"
gem "m"
gem "pry", "~> 0.10"
gem "pry-byebug"
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -3,7 +3,6 @@
require "bundler"
require "bundler/gem_helper"
require "rake/testtask"
require "passgen"
require "train"
require_relative "tasks/maintainers"
require_relative "tasks/spdx"
Expand Down Expand Up @@ -252,8 +251,9 @@ namespace :test do
creds = connection.options

# Determine the storage account name and the admin password
sa_name = (0...15).map { (65 + rand(26)).chr }.join.downcase
admin_password = Passgen.generate(length: 12, uppercase: true, lowercase: true, symbols: true, digits: true)
require "securerandom"
sa_name = ("a".."z").to_a.sample(15).join
admin_password = SecureRandom.alphanumeric 72

# Use the first 4 characters of the storage account to create a suffix
suffix = sa_name[0..3]
Expand Down

0 comments on commit b462eb1

Please sign in to comment.