From 75510eb427258001cadbd7f9f85e49d667351b92 Mon Sep 17 00:00:00 2001 From: Allam Marcos Campanini Matsubara Date: Fri, 26 May 2017 10:32:57 -0300 Subject: [PATCH 1/2] Updating gitignore to not track rbenv and rvm files. --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0e9c6266f..73b709a15f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,8 @@ pkg/* .DS_Store -.idea/* \ No newline at end of file +.idea/* + +# Ignore rvm and rbenv files +.ruby-version +.ruby-gemset From fd6835ee12f8024eb83246667c92e9eff8d9ee9e Mon Sep 17 00:00:00 2001 From: Allam Marcos Campanini Matsubara Date: Fri, 26 May 2017 12:12:17 -0300 Subject: [PATCH 2/2] Fixing zero value in rand for special chars in Internet.password method. --- lib/faker/internet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/faker/internet.rb b/lib/faker/internet.rb index fe25533120..71200b471f 100644 --- a/lib/faker/internet.rb +++ b/lib/faker/internet.rb @@ -61,7 +61,7 @@ def password(min_length = 8, max_length = 16, mix_case = true, special_chars = f if special_chars chars = %w(! @ # $ % ^ & *) - rand(min_length).times do |i| + rand(1..min_length).times do |i| temp[i] = chars[rand(chars.length)] end end