passlock 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3be22e9ce2d359eac877906854898a3da32931a7
4
- data.tar.gz: 516497ac478c00bba91ec2f3f53755d1672e5c64
3
+ metadata.gz: f850563e737ffa8e9ec1ee225757cbd75eb5d528
4
+ data.tar.gz: ad812a50d9562b000022f993a22462b76f1c92e6
5
5
  SHA512:
6
- metadata.gz: c8cb9c08df6d6b0eb37e059c4294c4422b5d621448275e86911451ed118d0f510266556317b2007df931ca8b2383f45bfe1b7563890b1ea778ab5de83ebb69f2
7
- data.tar.gz: 27ee12e6ee15957dbdd6f32a1f48c49389dd3819cd70be70f77884948274aab54e6c1649e1b69073777ba8b77f15af7a2ef3f9432394da3f9f2b298790b414e5
6
+ metadata.gz: 381e9e683da4a2d0071cf1c597da37e21a835c45c2d5489cb523224e83f545c2d2dd56898f5cc9afbfaf2a440e20b2bc6b124c132326cca65a8b471750964a6a
7
+ data.tar.gz: d1c8db6a94649b71639ade81070afd4063e0013710b176b875388605010b5968ce04ff5a379826179566976067acfbd7678a746d1180176e3635359399a08a62
@@ -12,7 +12,7 @@ module PassLock
12
12
  'number' => '1234567890',
13
13
  'upletter' => 'qwertyuiopasdfghjklzxcvbnm'.upcase,
14
14
  'downletter' => 'qwertyuiopasdfghjklzxcvbnm',
15
- 'symbols' => %q{`~!@#$%^&*()_+-=[]{}\|;':",.<>/?}
15
+ 'symbols' => %q(`~!@#$%^&*()_+-=[]{}\|;':",.<>/?)
16
16
  }
17
17
 
18
18
  # A randomly generated passord.
@@ -20,12 +20,12 @@ module PassLock
20
20
  # @param length [Integer] How long the password will be
21
21
  # @return [String] Returns the Base64-encoded version of the password.
22
22
  def self.cpass(options, length)
23
- options = options != Array || options.empty? ? options : %w{number upletter downletter symbol}
24
- length = length.is_a(Integer) && length > 0 ? length : 10
23
+ options = options != Array || options.empty? ? options : %w(number upletter downletter symbol)
24
+ length = length.is_a?(Integer) && length > 0 ? length : 10
25
25
  chars = []
26
- result = ""
26
+ result = ''
27
27
  options.each do |flag|
28
- chars.concat(@opts[flag].scan(/./)) unless !@opts[flag].nil?
28
+ chars.concat(@opts[flag].scan(/./)) unless @opts[flag].nil?
29
29
  end
30
30
  length.to_i.times do
31
31
  result += chars.sample
@@ -105,8 +105,8 @@ module PassLock
105
105
  pass
106
106
  end
107
107
 
108
+ # Decode module
108
109
  class Decode
109
-
110
110
  # Decodes password in Base64.
111
111
  # @param base [String] The Base64-encoded of the original password
112
112
  # @return [String] Returns the decoded password
@@ -1,4 +1,4 @@
1
1
  module PassLock
2
2
  # The version of the gem installed.
3
- VERSION = '0.0.7'.freeze
3
+ VERSION = '0.0.8'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Snazzah