locksmith 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -17,6 +17,7 @@ class Locksmith
17
17
  @use_alphabet = options.has_key?(:use_alphabet) ? options[:use_alphabet] : true
18
18
  @use_number = options.has_key?(:use_number) ? options[:use_number] : true
19
19
  @use_symbol = options.has_key?(:use_symbol) ? options[:use_symbol] : true
20
+ @max_length = options.has_key?(:max_length) ? options[:max_length] : nil
20
21
 
21
22
  @errors = []
22
23
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{locksmith}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yehezkiel Syamsuhadi"]
@@ -8,7 +8,8 @@ describe 'Locksmith' do
8
8
  @options = {
9
9
  :use_alphabet => true,
10
10
  :use_number => true,
11
- :use_symbol => true
11
+ :use_symbol => true,
12
+ :max_length => 100
12
13
  }
13
14
  @locksmith = Locksmith.new(@private_password, @domain, @username, @options)
14
15
  end
@@ -20,6 +21,7 @@ describe 'Locksmith' do
20
21
  @locksmith.use_alphabet?.should == true
21
22
  @locksmith.use_number?.should == true
22
23
  @locksmith.use_symbol?.should == true
24
+ @locksmith.max_length.should == 100
23
25
  end
24
26
 
25
27
  it 'should be able to change the attributes' do
@@ -143,6 +145,7 @@ describe 'Locksmith' do
143
145
  end
144
146
 
145
147
  it 'should be able to limit the generated password length' do
148
+ @locksmith.max_length = nil
146
149
  generated_password = @locksmith.generated_password
147
150
 
148
151
  @locksmith.max_length = 6
@@ -153,9 +156,6 @@ describe 'Locksmith' do
153
156
 
154
157
  @locksmith.max_length = 0
155
158
  @locksmith.generated_password.should == ''
156
-
157
- @locksmith.max_length = nil
158
- @locksmith.generated_password.should == generated_password
159
159
  end
160
160
  end
161
161
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: locksmith
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Yehezkiel Syamsuhadi
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- hash: 2172219786960532592
107
+ hash: -761674674476359463
108
108
  segments:
109
109
  - 0
110
110
  version: "0"