chore(rubocop): giganto rubocop commit.

muahahahah
This commit is contained in:
Joseph Mastey
2017-12-05 18:46:21 -06:00
parent 284cd8811c
commit 9902345291
120 changed files with 743 additions and 635 deletions
+5 -4
View File
@@ -1,16 +1,17 @@
# frozen_string_literal: true
module Encryption
# Added a re-usable encryption routine, shouldn't be an issue!
def self.encrypt_sensitive_value(val="")
def self.encrypt_sensitive_value(val = "")
aes = OpenSSL::Cipher.new(cipher_type)
aes.encrypt
aes.key = key[0..31]
aes.iv = iv[0..15] if iv != nil
new_val = aes.update("#{val}") + aes.final
Base64.strict_encode64(new_val).encode('utf-8')
Base64.strict_encode64(new_val).encode("utf-8")
end
def self.decrypt_sensitive_value(val="")
def self.decrypt_sensitive_value(val = "")
aes = OpenSSL::Cipher.new(cipher_type)
aes.decrypt
aes.key = key[0..31]
@@ -30,7 +31,7 @@ module Encryption
end
def self.cipher_type
'aes-256-cbc'
"aes-256-cbc"
end
end
+5 -4
View File
@@ -1,19 +1,20 @@
# frozen_string_literal: true
namespace :server do
desc "Start Rails"
task :start do
pid_file = "tmp/pids/server.pid"
if !(File.exists?(pid_file))
if !(File.exist?(pid_file))
sh("rails s -d")
else
puts "[+] Server is already running"
end
end
desc "Stop Rails"
task :stop do
pid_file = "tmp/pids/server.pid"
if File.exists?(pid_file)
if File.exist?(pid_file)
Process.kill("INT", File.read(pid_file).to_i)
else
puts "[-] Server isn't running"
+3 -2
View File
@@ -1,4 +1,5 @@
desc 'run training tests'
# frozen_string_literal: true
desc "run training tests"
task :training do
Rake::Task["spec:vulnerabilities"].invoke
end
end