passwd 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/passwd.rb CHANGED
@@ -38,12 +38,12 @@ class Passwd
38
38
  @text = password
39
39
  end
40
40
  # @text = password.nil? ? self.class.create : password
41
- @hash = Digest::SHA1.digest @text
41
+ @hash = Passwd.hashing(@text)
42
42
  end
43
43
 
44
44
  def text=(password)
45
45
  @text = password
46
- @hash = Digest::SHA1.digest @text
46
+ @hash = Passwd.hashing(@text)
47
47
  @text
48
48
  end
49
49
 
@@ -94,7 +94,7 @@ class Passwd
94
94
  end
95
95
 
96
96
  def hashing(passwd)
97
- Digest::SHA1.digest passwd
97
+ Digest::SHA1.hexdigest passwd
98
98
  end
99
99
 
100
100
  def config(options={})
@@ -1,3 +1,3 @@
1
1
  class Passwd
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/spec/passwd_spec.rb CHANGED
@@ -78,7 +78,7 @@ describe Passwd do
78
78
 
79
79
  it "return hashed password" do
80
80
  password = Passwd.create
81
- password_hash = Digest::SHA1.digest(password)
81
+ password_hash = Digest::SHA1.hexdigest(password)
82
82
  expect(Passwd.hashing(password)).to eq(password_hash)
83
83
  end
84
84
  end
@@ -141,7 +141,7 @@ describe Passwd do
141
141
 
142
142
  it "@hash is hash of specified password" do
143
143
  pass_text = Passwd.create
144
- pass_hash = Digest::SHA1.digest(pass_text)
144
+ pass_hash = Digest::SHA1.hexdigest(pass_text)
145
145
  password = Passwd.new(pass_text)
146
146
  expect(password.hash).to eq(pass_hash)
147
147
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passwd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-21 00:00:00.000000000 Z
12
+ date: 2013-04-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  segments:
92
92
  - 0
93
- hash: -460687481186337323
93
+ hash: 1759901407687586597
94
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
@@ -99,10 +99,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  segments:
101
101
  - 0
102
- hash: -460687481186337323
102
+ hash: 1759901407687586597
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 1.8.23
105
+ rubygems_version: 1.8.25
106
106
  signing_key:
107
107
  specification_version: 3
108
108
  summary: Password utility