sixarm_ruby_password_text 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/.gemtest ADDED
File without changes
data/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # SixArm.com » Ruby » <br> PasswordText class to generate secure user-friendly passwords
2
+
3
+ * Docs: <http://sixarm.com/sixarm_ruby_password_text/doc>
4
+ * Repo: <http://github.com/sixarm/sixarm_ruby_password_text>
5
+ * Email: Joel Parker Henderson, <joel@sixarm.com>
6
+
7
+
8
+ ## Introduction
9
+
10
+ Generates strong yet user-friendly passwords using Ruby's secure random cryptographic functions.
11
+
12
+ You can change how passwords are created using the optional parameters and the return value is a string, so you can do string methods on it.
13
+
14
+ For docs go to <http://sixarm.com/sixarm_ruby_password_text/doc>
15
+
16
+ Want to help? We're happy to get pull requests.
17
+
18
+
19
+ ## Quickstart
20
+
21
+ Install:
22
+
23
+ gem install sixarm_ruby_password_text
24
+
25
+ Bundler:
26
+
27
+ gem "sixarm_ruby_password_text", "=1.3.0"
28
+
29
+ Require:
30
+
31
+ require "sixarm_ruby_password_text"
32
+
33
+
34
+ ## High Security (Optional)
35
+
36
+ To enable high security for all our gems:
37
+
38
+ wget http://sixarm.com/sixarm.pem
39
+ gem cert --add sixarm.pem
40
+ gem sources --add http://sixarm.com
41
+
42
+ To install with high security:
43
+
44
+ gem install sixarm_ruby_password_text --test --trust-policy HighSecurity
45
+
46
+
47
+ ## Details
48
+
49
+ The default length is 12 characters, which is sufficiently strong for most web applications. You can make this stronger as needed.
50
+
51
+ The default character array is optimized for usability and accessibility, to help mobile phone users and people with disabilities: all letters are lowercase and letters that look like numbers (specifically, "i", "l", "o") are not used.
52
+
53
+
54
+ ## Examples
55
+
56
+ require "sixarm_ruby_password_text"
57
+ password = PasswordText.new => "avzwbnxremcd"
58
+ password = PasswordText.new(:length => 4) => "avzw"
59
+ password = PasswordText.new(:length => 4, :chars => ['x','y','z']) => "yzyx"
60
+
61
+
62
+ ## SecureRandom
63
+
64
+ Ruby 1.8.6 and older does not include a secure random number method so this gem checks to see if the SecureRandom class is defined and, if not, requires the sixarm_ruby_secure_random gem (http://github.com/sixarm/sixarm_ruby_secure_random).
65
+
66
+
67
+ ## Changes
68
+
69
+ * 2012-03-16 1.3.1 Upgrade for Ruby 1.9.3, minitest/spec, and improved docs.
70
+
71
+
72
+ ## License
73
+
74
+ You may choose any of these open source licenses:
75
+
76
+ * Apache License
77
+ * BSD License
78
+ * CreativeCommons License, Non-commercial Share Alike
79
+ * GNU General Public License Version 2 (GPL 2)
80
+ * GNU Lesser General Public License (LGPL)
81
+ * MIT License
82
+ * Perl Artistic License
83
+ * Ruby License
84
+
85
+ The software is provided "as is", without warranty of any kind,
86
+ express or implied, including but not limited to the warranties of
87
+ merchantability, fitness for a particular purpose and noninfringement.
88
+
89
+ In no event shall the authors or copyright holders be liable for any
90
+ claim, damages or other liability, whether in an action of contract,
91
+ tort or otherwise, arising from, out of or in connection with the
92
+ software or the use or other dealings in the software.
93
+
94
+ This license is for the included software that is created by SixArm;
95
+ some of the included software may have its own licenses, copyrights,
96
+ authors, etc. and these do take precedence over the SixArm license.
97
+
98
+ Copyright (c) 2005-2013 Joel Parker Henderson
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << 'lib' << 'test'
7
+ t.pattern = 'test/*.rb'
8
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.3.0
@@ -1,47 +1,28 @@
1
+ # -*- coding: utf-8 -*-
1
2
  =begin rdoc
2
-
3
- = SixArm Ruby Gem: PasswordText class to generate good secure random passwords.
4
-
5
- Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
6
- Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
7
- License:: CreativeCommons License, Non-commercial Share Alike
8
- License:: LGPL, GNU Lesser General Public License
9
-
10
- Generates strong yet user-friendly passwords using Ruby's secure random cryptographic functions.
11
-
12
- You can change how passwords are created using the optional parameters and the return value is a string, so you can do string methods on it.
13
-
14
- The default length is 12 characters, which is sufficiently strong for most web applications. You can make this stronger as needed.
15
-
16
- The default character array is optimized for usability and accessibility, to help mobile phone users and people with disabilities: all letters are lowercase and letters that look like numbers (specifically, "i", "l", "o") are not used.
17
-
18
- == Method
19
-
20
- * new: optional, named parameters are length (integer) and alternate character set (array of characters, which forces the password to contain only characters from the passed array)
21
-
22
- == Examples
23
- password = PasswordText.new => "avzwbnxremcd"
24
- password = PasswordText.new(:length => 4) => "avzw"
25
- password = PasswordText.new(:length => 4, :chars => ['x','y','z']) => "yzyx"
26
-
27
- == SecureRandom
28
-
29
- Ruby 1.8.6 and older does not include a secure random number method so this gem checks to see if the SecureRandom class is defined and, if not, requires the sixarm_ruby_secure_random gem (http://github.com/sixarm/sixarm_ruby_secure_random).
30
-
3
+ Please see README
31
4
  =end
32
5
 
33
6
 
34
- if !defined?(SecureRandom) then require 'sixarm_ruby_secure_random' end
7
+ if !defined?(SecureRandom)
8
+ begin
9
+ # First we will try to load the Ruby standard library
10
+ require 'securerandom'
11
+ rescue
12
+ # Second we will try to load our own SecureRandom gem library
13
+ require 'sixarm_ruby_secure_random'
14
+ end
15
+ end
35
16
 
36
17
 
37
18
  class PasswordText < String
38
19
 
39
20
 
40
21
  # Default characters
41
- @@chars=['a','b','c','d','e','f','g','h','j','k','m','n','p','q','r','s','t','u','v','w','x','y','z']
22
+ DEFAULT_CHARS=['a','b','c','d','e','f','g','h','j','k','m','n','p','q','r','s','t','u','v','w','x','y','z']
42
23
 
43
24
  # Default length
44
- @@length=12
25
+ DEFAULT_LEN=12
45
26
 
46
27
 
47
28
  # Return a new secure random password.
@@ -49,7 +30,7 @@ class PasswordText < String
49
30
  # The password has a given length (or the default)
50
31
  # and is picked from a given character array (or the default).
51
32
  #
52
- # To set the default length, see #length.
33
+ # To set the default length, see #length
53
34
  #
54
35
  # To set the default character array, see #chars
55
36
  #
@@ -57,17 +38,14 @@ class PasswordText < String
57
38
  # password = PasswordText.new => "avzwbnxremcd"
58
39
  # password = PasswordText.new(4) => "avzw"
59
40
  # password = PasswordText.new(4,['x','y','z']) => "yzyx"
60
- #
61
- # DEPRECATED, BREAKS CURRENT IMPLEMENTATION
62
- # def initialize(length=@@length,chars=@@chars)
63
- # super(Array.new(length){chars[SecureRandom.random_number(chars.size)]}.join)
64
- # end
41
+
65
42
  def initialize(opts={})
66
- @@length ||= opts[:length],
67
- @@chars ||= opts[:chars]
68
- super(Array.new(length){chars[SecureRandom.random_number(chars.size)]}.join)
43
+ self.chars= opts[:chars] || DEFAULT_CHARS
44
+ self.len= opts[:len] || DEFAULT_LEN
45
+ super(Array.new(len){chars[SecureRandom.random_number(chars.size)]}.join)
69
46
  end
70
47
 
48
+
71
49
  # Get the default character array.
72
50
  #
73
51
  # To improve usability, the passwords only use lowercase letters.
@@ -77,15 +55,15 @@ class PasswordText < String
77
55
  #
78
56
  # We choose this as a valuable tradeoff between usability and complexity.
79
57
 
80
- def self.chars
81
- @@chars
58
+ def chars
59
+ @chars || DEFAULT_CHARS
82
60
  end
83
61
 
84
62
 
85
63
  # Set the default character array
86
64
 
87
- def self.chars=(chars)
88
- @@chars=chars
65
+ def chars=(chars)
66
+ @chars=chars
89
67
  end
90
68
 
91
69
 
@@ -94,17 +72,25 @@ class PasswordText < String
94
72
  # We choose 12 characters to make a sufficiently strong password.
95
73
  # for usual web applications. You can make this stronger as needed.
96
74
 
97
- def self.length
98
- @@length||=12
75
+ def len
76
+ @len || DEFAULT_LEN
99
77
  end
100
78
 
101
79
 
102
80
  # Set the default length
103
81
 
104
- def self.length=(length)
105
- @@length=length
82
+ def len=(length)
83
+ @len=length
106
84
  end
107
85
 
86
+
87
+ # Return the next random password of the same length and character array
88
+
89
+ def next
90
+ PasswordText.new(:chars => chars, :len => len)
91
+ end
92
+
93
+
108
94
  end
109
95
 
110
96
 
@@ -1,44 +1,156 @@
1
- require 'test/unit'
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
2
5
  require 'sixarm_ruby_password_text'
3
6
 
4
- class PasswordTextTest < Test::Unit::TestCase
7
+ describe PasswordText do
5
8
 
6
- def test_default
7
- s = PasswordText.new
8
- assert_equal(12,s.length)
9
- assert_equal(0,s=~/^[abcdefghjkmnpqrstuvwxyz]{12}$/)
9
+ before do
10
+ CUSTOM_CHARS ||= ['a','b','c','d','e','f']
11
+ CUSTOM_LEN ||= 20
12
+ DEFAULT ||= PasswordText.new
13
+ CUSTOM ||= PasswordText.new(:chars => CUSTOM_CHARS, :len => CUSTOM_LEN)
10
14
  end
11
15
 
12
- def test_with_length
13
- s = PasswordText.new(20)
14
- assert_equal(20,s.length)
15
- assert_equal(0,s=~/^[abcdefghjkmnpqrstuvwxyz]{20}$/)
16
+ describe ".new" do
17
+
18
+ describe "with default" do
19
+
20
+ it "uses default chars" do
21
+ DEFAULT.chars.must_equal PasswordText::DEFAULT_CHARS
22
+ end
23
+
24
+ it "uses default len" do
25
+ DEFAULT.len.must_equal PasswordText::DEFAULT_LEN
26
+ end
27
+
28
+ it "uses default match" do
29
+ DEFAULT.must_match /^[abcdefghjkmnpqrstuvwxyz]{12}$/ # DEFAULT_CHARS, DEFAULT_LEN
30
+ end
31
+
32
+ end
33
+
34
+ describe "with custom" do
35
+
36
+ it "uses custom chars" do
37
+ CUSTOM.chars.must_equal CUSTOM_CHARS
38
+ end
39
+
40
+ it "uses custom len" do
41
+ CUSTOM.len.must_equal CUSTOM_LEN
42
+ end
43
+
44
+ it "uses default match" do
45
+ CUSTOM.must_match /^[abcdef]{20}$/ # CUSTOM_CHARS, CUSTOM_LEN
46
+ end
47
+
48
+ end
49
+
16
50
  end
51
+
52
+ describe "#chars" do
53
+
54
+ it "=> Array" do
55
+ DEFAULT.chars.must_be_kind_of Array
56
+ end
57
+
58
+ it "uses default chars" do
59
+ DEFAULT.chars.must_equal PasswordText::DEFAULT_CHARS
60
+ end
61
+
62
+ it "uses custom chars" do
63
+ CUSTOM.chars.must_equal CUSTOM_CHARS
64
+ end
17
65
 
18
- def test_with_length_and_characters
19
- s = PasswordText.new(20,['a','b','c'])
20
- assert_equal(20,s.length)
21
- assert_equal(0,s=~/^[abc]{20}$/)
22
66
  end
23
67
 
24
- def test_chars
25
- chars=['a','b','c']
26
- PasswordText.chars=(chars)
27
- assert_equal(chars,PasswordText.chars)
28
- s=PasswordText.new
29
- assert_equal(0,s=~/^[abc]+$/)
68
+ describe "#chars=" do
69
+
70
+ before do
71
+ @p = PasswordText.new
72
+ end
73
+
74
+ it "=" do
75
+ @p.chars=CUSTOM_CHARS
76
+ @p.chars.must_equal CUSTOM_CHARS
77
+ end
78
+
79
+ end
80
+
81
+ describe "#len" do
82
+
83
+ it "=> Fixnum" do
84
+ DEFAULT.len.must_be_kind_of Fixnum
85
+ end
86
+
87
+ it "uses default len" do
88
+ DEFAULT.len.must_equal PasswordText::DEFAULT_LEN
89
+ end
90
+
91
+ it "uses custom len" do
92
+ CUSTOM.len.must_equal CUSTOM_LEN
93
+ end
94
+
30
95
  end
31
96
 
32
- def test_length
33
- length=99
34
- PasswordText.length=(length)
35
- assert_equal(length,PasswordText.length)
36
- s=PasswordText.new
37
- assert_equal(length,s.length)
97
+ describe "#len=" do
98
+
99
+ before do
100
+ @p = PasswordText.new
101
+ end
102
+
103
+ it "=" do
104
+ @p.len=CUSTOM_LEN
105
+ @p.len.must_equal CUSTOM_LEN
106
+ end
107
+
38
108
  end
39
109
 
40
- end
110
+ describe "next" do
111
+
112
+ describe "with default" do
113
+
114
+ before do
115
+ @p = DEFAULT.next
116
+ end
117
+
118
+ it "=> PasswordText" do
119
+ @p.must_be_kind_of PasswordText
120
+ end
121
+
122
+ it "use default chars" do
123
+ @p.must_match /^[abcdefghjkmnpqrstuvwxyz]{12}$/ # DEFAULT_CHARS, DEFAULT_LEN
124
+ end
125
+
126
+ it "use default len" do
127
+ @p.len.must_equal PasswordText::DEFAULT_LEN
128
+ end
41
129
 
130
+ end
42
131
 
132
+ describe "with custom" do
43
133
 
134
+ before do
135
+ @p = CUSTOM.next
136
+ end
137
+
138
+ it "=> PasswordText" do
139
+ @p.must_be_kind_of PasswordText
140
+ end
141
+
142
+ it "use custom chars" do
143
+ @p.must_match /^[abcdef]{20}$/ # CUSTOM_CHARS, CUSTOM_LEN
144
+ end
145
+
146
+ it "use default len" do
147
+ @p.len.must_equal CUSTOM_LEN
148
+ end
149
+
150
+ end
151
+
152
+ end
153
+
154
+
155
+ end
44
156
 
metadata CHANGED
@@ -1,101 +1,89 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_password_text
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 2
8
- - 1
9
- version: 1.2.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - SixArm
13
9
  autorequire:
14
10
  bindir: bin
15
- cert_chain:
16
- - |
17
- -----BEGIN CERTIFICATE-----
18
- MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
19
- BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
20
- c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
21
- MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
22
- CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
23
- U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
24
- ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
25
- QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
26
- eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHVea2o9yabbEiS6VSeJWoQIDAQABo4HF
27
- MIHCMB0GA1UdDgQWBBQzPJtqmSgc53eDN7aSzDQwr9TALDCBkgYDVR0jBIGKMIGH
28
- gBQzPJtqmSgc53eDN7aSzDQwr9TALKFkpGIwYDELMAkGA1UEBhMCVVMxEzARBgNV
29
- BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xDzANBgNVBAoT
30
- BlNpeEFybTETMBEGA1UEAxMKc2l4YXJtLmNvbYIJAKPwEETU5bHoMAwGA1UdEwQF
31
- MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAooEexP/oPam1TP71SyuhxMb+uTrZbSQe
32
- jVB+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
33
- ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
34
- eabwpCbAopo=
35
- -----END CERTIFICATE-----
36
-
37
- date: 2010-12-13 00:00:00 -08:00
38
- default_executable:
39
- dependencies:
40
- - !ruby/object:Gem::Dependency
11
+ cert_chain:
12
+ - !binary |-
13
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQW0yZ0F3SUJB
14
+ Z0lKQUtQd0VFVFU1YkhvTUEwR0NTcUdTSWIzRFFFQkJRVUFNR0F4Q3pBSkJn
15
+ TlYKQkFZVEFsVlRNUk13RVFZRFZRUUlFd3BEWVd4cFptOXlibWxoTVJZd0ZB
16
+ WURWUVFIRXcxVFlXNGdSbkpoYm1OcApjMk52TVE4d0RRWURWUVFLRXdaVGFY
17
+ aEJjbTB4RXpBUkJnTlZCQU1UQ25OcGVHRnliUzVqYjIwd0hoY05NVEF4Ck1q
18
+ RXpNak15TnpFeldoY05NVE13T1RBNE1qTXlOekV6V2pCZ01Rc3dDUVlEVlFR
19
+ R0V3SlZVekVUTUJFR0ExVUUKQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFV
20
+ RUJ4TU5VMkZ1SUVaeVlXNWphWE5qYnpFUE1BMEdBMVVFQ2hNRwpVMmw0UVhK
21
+ dE1STXdFUVlEVlFRREV3cHphWGhoY20wdVkyOXRNSUdmTUEwR0NTcUdTSWIz
22
+ RFFFQkFRVUFBNEdOCkFEQ0JpUUtCZ1FDOTRtRDlKRHdCc3Vuc09JMFZSM0NY
23
+ WGJPV2c5Y1dhV2Npd0Z5Sk5GaU03QTlJOEtQTGZYVXcKUUM0Y3pVZTVadUc0
24
+ V0h2aW5yV2hrckNLKzFkV0Jxb0VDbHhkRi9Gb0tPNWErdG9uR0Nqam1meTgx
25
+ Sm1Gamp5eAplVHNqc0h5dncrUWlrOWtwZjlhajYrcG5rTnJWc3dnTkhWZWEy
26
+ bzl5YWJiRWlTNlZTZUpXb1FJREFRQUJvNEhGCk1JSENNQjBHQTFVZERnUVdC
27
+ QlF6UEp0cW1TZ2M1M2VETjdhU3pEUXdyOVRBTERDQmtnWURWUjBqQklHS01J
28
+ R0gKZ0JRelBKdHFtU2djNTNlRE43YVN6RFF3cjlUQUxLRmtwR0l3WURFTE1B
29
+ a0dBMVVFQmhNQ1ZWTXhFekFSQmdOVgpCQWdUQ2tOaGJHbG1iM0p1YVdFeEZq
30
+ QVVCZ05WQkFjVERWTmhiaUJHY21GdVkybHpZMjh4RHpBTkJnTlZCQW9UCkJs
31
+ TnBlRUZ5YlRFVE1CRUdBMVVFQXhNS2MybDRZWEp0TG1OdmJZSUpBS1B3RUVU
32
+ VTViSG9NQXdHQTFVZEV3UUYKTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVGQlFB
33
+ RGdZRUFvb0VleFAvb1BhbTFUUDcxU3l1aHhNYit1VHJaYlNRZQpqVkIrRXhS
34
+ d1dhZEd3YU5QVUE1NmQzOXF3YXZ3UCtpdSszSnBlb25OTVZ2YldYRjVuYUNY
35
+ L2RORkllUkVIekVSClpEUlFZTXFydTlURU1uYTZIRDl6cGNzdEY3dndUaEdv
36
+ dmxPUSszWTZwbFE0bk16aXBYY1o5VEhxczY1UElMMHEKZWFid3BDYkFvcG89
37
+ Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
38
+ date: 2012-03-17 00:00:00.000000000 Z
39
+ dependencies:
40
+ - !ruby/object:Gem::Dependency
41
41
  name: bcrypt-ruby
42
- prerelease: false
43
- requirement: &id001 !ruby/object:Gem::Requirement
42
+ requirement: &24591440 !ruby/object:Gem::Requirement
44
43
  none: false
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- segments:
49
- - 2
50
- - 0
51
- - 5
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
52
47
  version: 2.0.5
53
48
  type: :runtime
54
- version_requirements: *id001
49
+ prerelease: false
50
+ version_requirements: *24591440
55
51
  description:
56
52
  email: sixarm@sixarm.com
57
53
  executables: []
58
-
59
54
  extensions: []
60
-
61
55
  extra_rdoc_files: []
62
-
63
- files:
64
- - README.rdoc
65
- - LICENSE.txt
56
+ files:
57
+ - .gemtest
58
+ - Rakefile
59
+ - README.md
60
+ - VERSION
66
61
  - lib/sixarm_ruby_password_text.rb
67
62
  - test/sixarm_ruby_password_text_test.rb
68
- has_rdoc: true
69
63
  homepage: http://sixarm.com/
70
64
  licenses: []
71
-
72
65
  post_install_message:
73
66
  rdoc_options: []
74
-
75
- require_paths:
67
+ require_paths:
76
68
  - lib
77
- required_ruby_version: !ruby/object:Gem::Requirement
69
+ required_ruby_version: !ruby/object:Gem::Requirement
78
70
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
76
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- segments:
91
- - 0
92
- version: "0"
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
93
81
  requirements: []
94
-
95
82
  rubyforge_project:
96
- rubygems_version: 1.3.7
83
+ rubygems_version: 1.8.11
97
84
  signing_key:
98
85
  specification_version: 3
99
- summary: "SixArm Ruby Gem: Password text generator for strong web-savvy passwords"
100
- test_files:
86
+ summary: SixArm.com » Ruby » Password text generator for strong web-savvy passwords
87
+ test_files:
101
88
  - test/sixarm_ruby_password_text_test.rb
89
+ has_rdoc: true
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- e�϶��q��D0��K�[G]i�` �t�p~醐�t�8�o�]�{4���fu�͠k�c�1��WŁ3l/*uu4�ڀՑm�ՖF�Wq��[I���2�&�������i���$�B
1
+ �{�V���C+gw��S"DR�~F�#gS'��N���Zh�׀
2
+ �1S�}JqD
3
+ 9s�6�D���)��h�`}V�G�|-;�G���q�G�`�$���8�5v}3��J�ה��Ǟ-1�������
data/LICENSE.txt DELETED
@@ -1,12 +0,0 @@
1
- LICENSE
2
-
3
- You may choose any of these licenses:
4
-
5
- - CreativeCommons License, Non-commercial Share Alike
6
- - LGPL, GNU Lesser General Public License
7
- - MIT License
8
- - Ruby License
9
-
10
- THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
data/README.rdoc DELETED
@@ -1,28 +0,0 @@
1
-
2
- = SixArm Ruby Gem: Generate secure random passwords.
3
-
4
- Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
5
- Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
6
- License:: CreativeCommons License, Non-commercial Share Alike
7
- License:: LGPL, GNU Lesser General Public License
8
-
9
- Generates strong yet user-friendly passwords using Ruby's secure random cryptographic functions.
10
-
11
- You can change how passwords are created using the optional parameters and the return value is a string, so you can do string methods on it.
12
-
13
- The default length is 12 characters, which is sufficiently strong for most web applications. You can make this stronger as needed.
14
-
15
- The default character array is optimized for usability and accessibility, to help mobile phone users and people with disabilities: all letters are lowercase and letters that look like numbers (specifically, "i", "l", "o") are not used.
16
-
17
- == Method
18
- * new: optional, named parameters are length (integer) and alternate character set (array of characters, which forces the password to contain only characters from the passed array)
19
-
20
- == Examples
21
- pt = PasswordText.new => "avzwbnxremcd"
22
- pt4 = PasswordText.new(:length => 4) => "avzw"
23
- pt4a = PasswordText.new(:length => 4, :chars => ['x','y','z']) => "yzyx"
24
-
25
- == SecureRandom
26
-
27
- Ruby 1.8.6 and older does not include a secure random number method so this gem checks to see if the SecureRandom class is defined and, if not, requires the sixarm_ruby_secure_random gem (http://github.com/sixarm/sixarm_ruby_secure_random).
28
-