h 2.1.1 → 2.1.2

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: c07dc8a1160801aa395ef4a00a614038c5ce47b3
4
- data.tar.gz: a2cc31855430b3c748f052d940f18efba1aeb178
3
+ metadata.gz: 9fbc46de0065e17f1a304f81fd70ff90ecf7fab2
4
+ data.tar.gz: 36189d636953da2c574c6b8b1d1ac488f63b2fe3
5
5
  SHA512:
6
- metadata.gz: f119cb301bca5c0245bc4ec16a28999730a509c250759c87a482becda3ef653c40704ce1bb859b0ab45779253159201ac1e478296004c123ab0a08f793068570
7
- data.tar.gz: 5382479ddf4fd3cb89a31612ba1d1bb213953a64ec5fdd4168c5c42cda9ec4f1f7924705e8a584efa161904b25a533218ee6c347dcc94b276fdcdf17b60e9b38
6
+ metadata.gz: 43045f4df0b930e4bbd189d3f53ba4cfabd1e78fa25155744a7a0fee0d33dede07cdf484122ca8a6426192ab4df8e70f80488ed3ce6f9bfa33956a06197aad05
7
+ data.tar.gz: 4a0a7835c9650c40c7e7f7b05ec475e3a57fb86291cdaad3bac4f5dc9982fe90499630be18930a593a1aaeb405bc12774ecf2d480e1024a516235fd827710fa8
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
@@ -1,5 +1,4 @@
1
1
  language: ruby
2
+ script: 'bundle exec rake test'
2
3
  rvm:
3
- - 2.0.0
4
- - 2.1.0
5
- - 2.1.1
4
+ - 2.1.2
data/Gemfile CHANGED
@@ -1,6 +1,2 @@
1
1
  source 'https://rubygems.org'
2
-
3
2
  gemspec
4
-
5
- gem 'rake'
6
- gem 'highline'
data/README.md CHANGED
@@ -39,10 +39,10 @@ To prevent your log display the message as a string, do not specify it at first.
39
39
  Message: ******
40
40
  -q0zMnMSszj8D23a8aNJX_VYry9oSSLZ30XlHkmFt9I=
41
41
 
42
- ## Code Status
42
+ ## Status
43
43
 
44
- * [![Build Status](https://secure.travis-ci.org/cyril/h.png)](http://travis-ci.org/cyril/h)
45
- * [![Dependencies Status](https://gemnasium.com/cyril/h.png?travis)](https://gemnasium.com/cyril/h)
44
+ * [![Build Status](https://secure.travis-ci.org/cyril/h.rb.png)](//travis-ci.org/cyril/h.rb)
45
+ * [![Dependency Status](https://gemnasium.com/cyril/h.rb.svg)](//gemnasium.com/cyril/h.rb)
46
46
 
47
47
  * * *
48
48
 
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
data/h.gemspec CHANGED
@@ -1,25 +1,21 @@
1
- # encoding: utf-8
1
+ Gem::Specification.new do |spec|
2
+ spec.name = 'h'
3
+ spec.version = File.read('VERSION.semver')
4
+ spec.authors = ['Cyril Wack']
5
+ spec.email = ['contact@cyril.io']
6
+ spec.homepage = 'https://github.com/cyril/h.rb'
7
+ spec.summary = %q{Salted hashes tool}
8
+ spec.description = %q{Small tool that generates salted hashes, scented with the SHA2 function, for those who prefer to put makeup on passwords rather than yield them to Manager™.}
9
+ spec.license = 'ISC'
2
10
 
3
- Gem::Specification.new do |s|
4
- s.name = 'h'
5
- s.version = File.read('VERSION.semver')
6
- s.platform = Gem::Platform::RUBY
7
- s.authors = ['Cyril Wack']
8
- s.email = ['contact@cyril.io']
9
- s.homepage = 'https://github.com/cyril/h'
10
- s.summary = %q{Salted hashes tool}
11
- s.description = %q{Small tool that generates salted hashes, scented with the SHA2 function, for those who prefer to put makeup on passwords rather than yield them to Manager™.}
12
- s.license = 'ISC'
11
+ spec.files = `git ls-files -z`.split("\x0")
12
+ spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
13
+ spec.test_files = spec.files.grep(%r{^test/})
14
+ spec.require_paths = ['lib']
13
15
 
14
- s.rubyforge_project = 'h'
16
+ spec.add_dependency 'highline', '~> 1'
15
17
 
16
- s.bindir = 'bin'
17
- s.executables = ['h']
18
-
19
- s.add_runtime_dependency 'highline'
20
-
21
- s.files = `git ls-files`.split("\n")
22
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
- s.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) }
24
- s.require_paths = ['lib']
18
+ spec.add_development_dependency 'bundler', '~> 1.6'
19
+ spec.add_development_dependency 'minitest', '~> 5'
20
+ spec.add_development_dependency 'rake', '~> 10'
25
21
  end
@@ -1,17 +1,39 @@
1
- # encoding: utf-8
2
-
3
1
  require_relative '_test_helper'
4
2
 
5
- class HTest < MiniTest::Unit::TestCase
6
- def test_h
7
- @h = H::Generator.new('my-salt')
3
+ describe H::Generator do
4
+ describe 'basic test' do
5
+ before do
6
+ @h = H::Generator.new('my-salt')
7
+ end
8
+
9
+ it 'returns a salted hash' do
10
+ @h.input('').must_equal 'rdOQxxmSfOy-3-HA7OrnqT2Pl2Y_I7Ojqsc1NwVP4sg='
11
+ end
12
+
13
+ it 'returns another salted hash' do
14
+ @h.input('p@ssw0rd').must_equal 'LCoF25LqK6yFMRs6OoQoZEI4GV4-gR7vd1JZtbi8swA='
15
+ end
16
+
17
+ it 'returns a salted hash of 8 chars' do
18
+ @h.input('p@ssw0rd', 8).must_equal 'LCoF25Lq'
19
+ end
20
+ end
21
+
22
+ describe 'exotic test' do
23
+ before do
24
+ @h = H::Generator.new('塩')
25
+ end
8
26
 
9
- assert_equal @h.input('p@ssw0rd'), 'LCoF25LqK6yFMRs6OoQoZEI4GV4-gR7vd1JZtbi8swA='
10
- assert_equal @h.input('p@ssw0rd', 8), 'LCoF25Lq'
27
+ it 'returns a different salted hash' do
28
+ @h.input('p@ssw0rd').wont_equal 'LCoF25LqK6yFMRs6OoQoZEI4GV4-gR7vd1JZtbi8swA='
29
+ end
11
30
 
12
- @h = H::Generator.new('塩')
31
+ it 'returns a salted hash' do
32
+ @h.input('シークレット').must_equal '-q0zMnMSszj8D23a8aNJX_VYry9oSSLZ30XlHkmFt9I='
33
+ end
13
34
 
14
- assert_equal @h.input('シークレット'), '-q0zMnMSszj8D23a8aNJX_VYry9oSSLZ30XlHkmFt9I='
15
- assert_equal @h.input('シークレット', 3), '-q0'
35
+ it 'returns a salted hash of 3 chars' do
36
+ @h.input('シークレット', 3).must_equal '-q0'
37
+ end
16
38
  end
17
39
  end
metadata CHANGED
@@ -1,29 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10'
27
69
  description: Small tool that generates salted hashes, scented with the SHA2 function,
28
70
  for those who prefer to put makeup on passwords rather than yield them to Manager™.
29
71
  email:
@@ -46,7 +88,7 @@ files:
46
88
  - lib/h.rb
47
89
  - test/_test_helper.rb
48
90
  - test/test_h.rb
49
- homepage: https://github.com/cyril/h
91
+ homepage: https://github.com/cyril/h.rb
50
92
  licenses:
51
93
  - ISC
52
94
  metadata: {}
@@ -65,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
107
  - !ruby/object:Gem::Version
66
108
  version: '0'
67
109
  requirements: []
68
- rubyforge_project: h
110
+ rubyforge_project:
69
111
  rubygems_version: 2.2.2
70
112
  signing_key:
71
113
  specification_version: 4