Sha256: 359291d3a0982a8475f448cc17d5f94e27f7e1c2f3f7d7174883656573b60c29
Contents?: true
Size: 632 Bytes
Versions: 24
Compression:
Stored size: 632 Bytes
Contents
# frozen_string_literal: true namespace :knapsack_pro do task :salt, [:size] do |_, args| default_size = 32 size = (args[:size] || default_size).to_i if size >= default_size salt = SecureRandom.hex(size) puts 'Set environment variable on your CI server:' puts "KNAPSACK_PRO_SALT=#{salt}" puts puts "If you need longer salt you can provide the size:" puts "$ bundle exec rake knapsack_pro:salt[32]" puts "Default size 32 generates 64 chars." else puts "Salt must have at least 64 chars! You provided size #{size} which generates #{size*2} chars." end end end
Version data entries
24 entries across 24 versions & 1 rubygems