huami 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +1 -2
- data/Gemfile.lock +10 -2
- data/README.md +20 -0
- data/Rakefile +4 -0
- data/bin/huami +2 -14
- data/huami.gemspec +3 -1
- metadata +36 -12
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c87924c7ff941d233f05e9924e36a317eb4e6a00
|
4
|
+
data.tar.gz: cc086e77ca5a8d265322ea27e4656ca56cd3dd33
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6a781016d55a71503f728613c16a49f06a68eb665a90b72793c126bcd097d7cec2c1c8054026b33c4faef60f2221a6c4e84388add114caca679a3f66cfaff51b
|
7
|
+
data.tar.gz: 801958872a87ae3aff238588a24b89d27875b4565038b1b937d8bb574ade5cd2ea27d1c59d80a8bdc558eee2af893942c1df0e1727a8b9cd32c34f16f0751355
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
huami (1.0.3)
|
5
|
+
clipboard
|
6
|
+
highline
|
7
|
+
|
1
8
|
GEM
|
2
9
|
remote: http://rubygems.org/
|
3
10
|
specs:
|
4
|
-
|
11
|
+
clipboard (1.0.5)
|
12
|
+
highline (1.6.19)
|
5
13
|
rake (0.9.2.2)
|
6
14
|
|
7
15
|
PLATFORMS
|
8
16
|
ruby
|
9
17
|
|
10
18
|
DEPENDENCIES
|
11
|
-
|
19
|
+
huami!
|
12
20
|
rake
|
data/README.md
CHANGED
@@ -14,4 +14,24 @@ USAGE
|
|
14
14
|
------
|
15
15
|
|
16
16
|
$ huami -h
|
17
|
+
Usage: huami [options] key
|
18
|
+
-c, --copy Copy password to the clipboard instead of output.
|
19
|
+
-h, --help Display this screen.
|
20
|
+
-v, --version Print the version number of huami to the standard output stream.
|
17
21
|
|
22
|
+
LICENSE
|
23
|
+
-------
|
24
|
+
|
25
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
26
|
+
Version 2, December 2004
|
27
|
+
|
28
|
+
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
29
|
+
|
30
|
+
Everyone is permitted to copy and distribute verbatim or modified
|
31
|
+
copies of this license document, and changing it is allowed as long
|
32
|
+
as the name is changed.
|
33
|
+
```
|
34
|
+
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
35
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
36
|
+
```
|
37
|
+
0. You just DO WHAT THE FUCK YOU WANT TO.
|
data/Rakefile
CHANGED
data/bin/huami
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'huami'
|
4
|
-
require 'bundler/setup'
|
5
4
|
require 'optparse'
|
6
5
|
require 'highline/import'
|
6
|
+
require 'clipboard'
|
7
7
|
|
8
8
|
options = {}
|
9
9
|
|
@@ -36,19 +36,7 @@ password = ask("Enter password: ") { |q| q.echo = false }
|
|
36
36
|
hash_password = Huami.huami(key, password)
|
37
37
|
|
38
38
|
if options[:copy]
|
39
|
-
|
40
|
-
copy_cmd = 'xclip -selection clipboard'
|
41
|
-
# I don't get a mac, so I'm not sure is this right!
|
42
|
-
elsif system('which pbcopy > /dev/null 2>&1')
|
43
|
-
copy_cmd = 'pbcopy'
|
44
|
-
end
|
45
|
-
|
46
|
-
if copy_cmd.nil?
|
47
|
-
puts 'Can not find pbcopy or xclip command.'
|
48
|
-
exit 1
|
49
|
-
end
|
50
|
-
# Don't know why backticks do not work...
|
51
|
-
IO.popen("echo -n #{hash_password} | #{copy_cmd}")
|
39
|
+
Clipboard.copy hash_password
|
52
40
|
puts 'The password has been copyed to your clipboard.'
|
53
41
|
elsif
|
54
42
|
puts hash_password
|
data/huami.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'huami'
|
3
|
-
s.version = '1.0.
|
3
|
+
s.version = '1.0.3'
|
4
4
|
s.date = '2012-05-24'
|
5
5
|
s.summary = 'Huami'
|
6
6
|
s.description = 'Manage your password in rememberable way.'
|
@@ -10,4 +10,6 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.files = `git ls-files`.split("\n")
|
11
11
|
s.homepage = 'https://rubygems.org/gems/huami'
|
12
12
|
s.add_runtime_dependency 'highline'
|
13
|
+
s.add_runtime_dependency 'clipboard'
|
14
|
+
s.add_development_dependency 'rake'
|
13
15
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huami
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Wei Zhu
|
@@ -14,17 +13,43 @@ dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: highline
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: clipboard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
28
53
|
- !ruby/object:Gem::Version
|
29
54
|
version: '0'
|
30
55
|
description: Manage your password in rememberable way.
|
@@ -46,26 +71,25 @@ files:
|
|
46
71
|
- test/test_huami.rb
|
47
72
|
homepage: https://rubygems.org/gems/huami
|
48
73
|
licenses: []
|
74
|
+
metadata: {}
|
49
75
|
post_install_message:
|
50
76
|
rdoc_options: []
|
51
77
|
require_paths:
|
52
78
|
- lib
|
53
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
80
|
requirements:
|
56
|
-
- -
|
81
|
+
- - '>='
|
57
82
|
- !ruby/object:Gem::Version
|
58
83
|
version: '0'
|
59
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
85
|
requirements:
|
62
|
-
- -
|
86
|
+
- - '>='
|
63
87
|
- !ruby/object:Gem::Version
|
64
88
|
version: '0'
|
65
89
|
requirements: []
|
66
90
|
rubyforge_project:
|
67
|
-
rubygems_version:
|
91
|
+
rubygems_version: 2.0.3
|
68
92
|
signing_key:
|
69
|
-
specification_version:
|
93
|
+
specification_version: 4
|
70
94
|
summary: Huami
|
71
95
|
test_files: []
|