cryptophysh 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +2 -2
- data/lib/cryptophysh/password_generator.rb +4 -0
- data/lib/cryptophysh/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89e6345b45e72bedead67f267fb4e91de869c612d279bd6109a2c492d96b31b3
|
4
|
+
data.tar.gz: fbfc2428b41cbf14758a1296a235242d038be6649319d26a8f24bd7f831a64d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f980abb1543ec8c4743dc02d4800058495ed36d9946c43cdc13da5d7378001e0207f7868fa3fca0f97f117a24c96f912068d5dc7aefcb4fe60a184f6cd9f45eb
|
7
|
+
data.tar.gz: 6cc97e8e7822e63dd3233129bdc91c9958d964df47bf27a069a54f6941b7e60e82b9749917e5f9766c1431a39e58a967611ad6c26875733ca77363dab455db40
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
My attempt to produce a solution to the requirements listed [here](https://github.com/krystal/code-tasks/blob/main/password-generator.md). Essentially, a library/gem you can include in to your own code to add a `::generate_password` class method on a class.
|
4
4
|
|
5
|
-
|
5
|
+
I've pushed the built gem up to RubyGems for completeness' sake.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -36,7 +36,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
36
36
|
|
37
37
|
## Contributing
|
38
38
|
|
39
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cryptophysh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
39
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cryptophysh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kryptykphysh/cryptophysh/blob/master/CODE_OF_CONDUCT.md).
|
40
40
|
|
41
41
|
## License
|
42
42
|
|
@@ -11,6 +11,8 @@ module Cryptophysh
|
|
11
11
|
DEFAULT_SPECIAL_COUNT = 3
|
12
12
|
SPECIAL_CHARACTERS = %w[@ % ! ? * ^ &].freeze
|
13
13
|
|
14
|
+
# Instantiatates a new PasswordGenerator instance.
|
15
|
+
#
|
14
16
|
# @param length [Integer] the total length of any password generated with the #generate_password method
|
15
17
|
# @param uppercase [true, false] include one or more uppercase `A-Z` characters
|
16
18
|
# @param lowercase [true, false] include one or more lowercase `a-z` characters
|
@@ -53,6 +55,8 @@ module Cryptophysh
|
|
53
55
|
end
|
54
56
|
|
55
57
|
def character_string(size)
|
58
|
+
return "" unless size&.positive?
|
59
|
+
|
56
60
|
chars = ("a".."z").to_a
|
57
61
|
result = ""
|
58
62
|
size.times { result += chars.sample }
|
data/lib/cryptophysh/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptophysh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kryptyk Physh
|
@@ -43,7 +43,7 @@ description: |
|
|
43
43
|
|
44
44
|
My attempt to produce a solution to the requirements listed [here](https://github.com/krystal/code-tasks/blob/main/password-generator.md). Essentially, a library/gem you can include in to your own code to add a `::generate_password` class method on a class.
|
45
45
|
|
46
|
-
|
46
|
+
I've pushed the built gem up to RubyGems for completeness' sake.
|
47
47
|
|
48
48
|
## Installation
|
49
49
|
|
@@ -77,7 +77,7 @@ description: |
|
|
77
77
|
|
78
78
|
## Contributing
|
79
79
|
|
80
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cryptophysh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
80
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cryptophysh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/kryptykphysh/cryptophysh/blob/master/CODE_OF_CONDUCT.md).
|
81
81
|
|
82
82
|
## License
|
83
83
|
|