random_password 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -0
- data/lib/random_password/base.rb +7 -7
- data/lib/random_password/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0b4536097be0bf9a13101083786ce18063b7c2f91b84f0d2851e443237797cf
|
4
|
+
data.tar.gz: 1f836461c2bf116985ab5e2f26339f264f7d28d0bd19427d5dbf48acb30af121
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc5a3ed654248b9e57b67b12f981761720bf9489a3008c90fd68bccabf851c2a9ceebb8e2df2d0ce606de7a9fb2e4c23df13c7fb12b3e5ccfd5e35e91effda96
|
7
|
+
data.tar.gz: 29685c909a676f7905f066230124525ea296a7280b70d4d05be19ff50564cc61f75dd5e028874bcdba948946df15cdbfcd72e613110a86ac6e0e5b2c7d0508c7
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
random_password (0.1.
|
4
|
+
random_password (0.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -44,8 +44,8 @@ PLATFORMS
|
|
44
44
|
|
45
45
|
DEPENDENCIES
|
46
46
|
bundler (~> 1.16)
|
47
|
-
random_password!
|
48
47
|
rake (~> 10.0)
|
48
|
+
random_password!
|
49
49
|
rspec (~> 3.0)
|
50
50
|
rubocop (~> 0.52.1)
|
51
51
|
rubocop-rspec (~> 1.22.2)
|
data/README.md
CHANGED
data/lib/random_password/base.rb
CHANGED
@@ -11,7 +11,7 @@ module RandomPassword
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def generate
|
14
|
-
password_letters.shuffle(random: Random.new).join[0
|
14
|
+
password_letters.shuffle(random: Random.new).join[0, @length]
|
15
15
|
end
|
16
16
|
|
17
17
|
def update(**options)
|
@@ -25,21 +25,21 @@ module RandomPassword
|
|
25
25
|
|
26
26
|
def password_letters
|
27
27
|
passwords = []
|
28
|
-
passwords.concat(
|
29
|
-
passwords.concat(
|
30
|
-
passwords.concat((
|
28
|
+
passwords.concat(@digits.times.map { random_digit })
|
29
|
+
passwords.concat(@symbols.times.map { random_symbol })
|
30
|
+
passwords.concat((@length - @digits - @symbols).times.map { random_letter })
|
31
31
|
end
|
32
32
|
|
33
33
|
def random_letter
|
34
|
-
LETTERS
|
34
|
+
LETTERS.sample
|
35
35
|
end
|
36
36
|
|
37
37
|
def random_digit
|
38
|
-
DIGITS
|
38
|
+
DIGITS.sample
|
39
39
|
end
|
40
40
|
|
41
41
|
def random_symbol
|
42
|
-
SYMBOLS
|
42
|
+
SYMBOLS.sample
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: random_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akinrt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- ".rubocop.yml"
|
94
94
|
- ".rubocop_todo.yml"
|
95
95
|
- ".travis.yml"
|
96
|
+
- CHANGELOG.md
|
96
97
|
- CODE_OF_CONDUCT.md
|
97
98
|
- Gemfile
|
98
99
|
- Gemfile.lock
|