senha 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +23 -0
- data/LICENSE +1 -1
- data/NEWS.markdown +4 -0
- data/README.markdown +2 -2
- data/Rakefile +16 -16
- data/bin/senha +4 -4
- data/lib/senha.rb +5 -4
- data/lib/senha/base.rb +3 -3
- data/lib/senha/base/generator.rb +3 -3
- data/lib/senha/cli.rb +3 -3
- data/lib/senha/cli/application.rb +17 -16
- data/senha.gemspec +13 -13
- metadata +16 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5651759d5507a8c2e39bbb8246edd380d3bb5012
|
4
|
+
data.tar.gz: 5bdf2402eba1c8e6a33d8aa94274d4a83a59597b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 55ec12dc6ef4b5b1832e3ccfce75d31a85b7688940ecd561c66ae2c8bdea0a0fbc6b677ae53034e5cdb25a1e6f1832781caa58662faf688a6dd7af6c099e1f1b
|
7
|
+
data.tar.gz: 945ceecfd8b9c311cff4641fa205e78069d89635bc1e91513c3f963f49f0cc4b009c7707cdcdba6ac0df0e0798175515724e35b58aabccdc382bba928edf1895
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
docile (1.1.5)
|
5
|
+
json (1.8.3)
|
6
|
+
minitest (5.8.3)
|
7
|
+
rake (10.4.2)
|
8
|
+
simplecov (0.11.0)
|
9
|
+
docile (~> 1.1.0)
|
10
|
+
json (~> 1.8)
|
11
|
+
simplecov-html (~> 0.10.0)
|
12
|
+
simplecov-html (0.10.0)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
minitest (~> 5.0)
|
19
|
+
rake (~> 10.4.2)
|
20
|
+
simplecov
|
21
|
+
|
22
|
+
BUNDLED WITH
|
23
|
+
1.10.6
|
data/LICENSE
CHANGED
data/NEWS.markdown
CHANGED
data/README.markdown
CHANGED
@@ -31,7 +31,7 @@ Using senha is relatively simple. Some example usage would be:
|
|
31
31
|
#TyFKmzVTVer,;E-0^ro
|
32
32
|
|
33
33
|
# Issues
|
34
|
-
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/
|
34
|
+
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/arxopia/senha/issues).
|
35
35
|
|
36
36
|
# Contact
|
37
|
-
You can reach me at
|
37
|
+
You can reach me at senha[at]arxopia[dot]com.
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
28
28
|
|
@@ -30,24 +30,24 @@ require "senha"
|
|
30
30
|
require 'rake'
|
31
31
|
require 'rake/testtask'
|
32
32
|
|
33
|
-
task :build do
|
34
|
-
system "gem build #{Senha::APP_NAME}.gemspec"
|
35
|
-
end
|
36
|
-
|
37
33
|
task :tag_and_bag do
|
38
34
|
system "git tag -a v#{Senha::VERSION} -m 'version #{Senha::VERSION}'"
|
39
35
|
system "git push --tags"
|
36
|
+
system "git checkout master"
|
37
|
+
system "git merge #{Senha::VERSION}"
|
38
|
+
system "git push"
|
40
39
|
end
|
41
40
|
|
42
|
-
task :
|
43
|
-
system "gem
|
44
|
-
puts "Just released #{Senha::APP_NAME} v#{Senha::VERSION}. #{Senha::APP_NAME} is a simple CLI password generator. More information at http://hammackj.com/projects/senha/"
|
41
|
+
task :build do
|
42
|
+
system "gem build #{Senha::APP_NAME}.gemspec"
|
45
43
|
end
|
46
44
|
|
47
|
-
task :
|
48
|
-
system "
|
49
|
-
|
50
|
-
|
45
|
+
task :push => [:build] do
|
46
|
+
system "gem push #{Senha::APP_NAME}-#{Senha::VERSION}.gem"
|
47
|
+
end
|
48
|
+
|
49
|
+
task :release => [:tag_and_bag, :push] do
|
50
|
+
puts "Just released #{Senha::APP_NAME} v#{Senha::VERSION}. #{Senha::APP_NAME} is a simple CLI password generator. More information at #{Senha::HOME_PAGE}"
|
51
51
|
end
|
52
52
|
|
53
53
|
task :clean do
|
@@ -56,8 +56,8 @@ end
|
|
56
56
|
|
57
57
|
Rake::TestTask.new("run_tests") do |t|
|
58
58
|
t.libs << "test"
|
59
|
-
|
60
|
-
|
59
|
+
t.pattern = 'test/*/*_test.rb'
|
60
|
+
t.verbose = verbose
|
61
61
|
end
|
62
62
|
|
63
63
|
task :default => [:run_tests]
|
data/bin/senha
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Copyright (c) 2010-
|
3
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
4
4
|
# All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without
|
@@ -23,12 +23,12 @@
|
|
23
23
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
24
24
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
25
25
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
26
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
27
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
27
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
28
|
|
29
29
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/../lib'))
|
30
30
|
|
31
31
|
require 'senha'
|
32
32
|
|
33
33
|
app = Senha::CLI::Application.new
|
34
|
-
app.run
|
34
|
+
app.run ARGV
|
data/lib/senha.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,12 +21,13 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
module Senha
|
28
28
|
APP_NAME = "senha"
|
29
|
-
VERSION = "0.0.
|
29
|
+
VERSION = "0.0.4"
|
30
|
+
DEFAULT_LENGTH = 10
|
30
31
|
end
|
31
32
|
|
32
33
|
require 'optparse'
|
data/lib/senha/base.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
module Senha
|
28
28
|
module Base
|
data/lib/senha/base/generator.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
module Senha
|
28
28
|
module Base
|
data/lib/senha/cli.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
module Senha
|
28
28
|
module CLI
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2015 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
22
|
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
23
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
-
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
-
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
27
|
module Senha
|
28
28
|
module CLI
|
@@ -37,11 +37,11 @@ module Senha
|
|
37
37
|
end
|
38
38
|
|
39
39
|
# Parses the command line arguments
|
40
|
-
def parse_arguments
|
40
|
+
def parse_arguments (args)
|
41
41
|
begin
|
42
42
|
options = {}
|
43
43
|
|
44
|
-
options[:length] =
|
44
|
+
options[:length] = Senha::DEFAULT_LENGTH
|
45
45
|
options[:count] = 1
|
46
46
|
|
47
47
|
opts = OptionParser.new do |opt|
|
@@ -94,14 +94,13 @@ module Senha
|
|
94
94
|
puts opt.to_s + "\n"
|
95
95
|
exit
|
96
96
|
end
|
97
|
-
|
98
97
|
end
|
99
98
|
|
100
|
-
if
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
99
|
+
if args.length != 0
|
100
|
+
opts.parse! args
|
101
|
+
else
|
102
|
+
puts opts.to_s + "\n"
|
103
|
+
exit
|
105
104
|
end
|
106
105
|
|
107
106
|
options
|
@@ -115,13 +114,15 @@ module Senha
|
|
115
114
|
end
|
116
115
|
|
117
116
|
# Main body of the Application class
|
118
|
-
def run
|
119
|
-
options = parse_arguments
|
117
|
+
def run(args)
|
118
|
+
options = parse_arguments(args)
|
120
119
|
|
121
|
-
|
120
|
+
if options != nil
|
121
|
+
gen = Senha::Base::Generator.new(options)
|
122
122
|
|
123
|
-
|
124
|
-
|
123
|
+
options[:count].times do
|
124
|
+
puts gen.password(options[:length])
|
125
|
+
end
|
125
126
|
end
|
126
127
|
end
|
127
128
|
end
|
data/senha.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2013 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -30,22 +30,22 @@ $:.unshift(File.join(File.dirname(base), 'lib'))
|
|
30
30
|
require 'senha'
|
31
31
|
|
32
32
|
Gem::Specification.new do |s|
|
33
|
-
s.name
|
34
|
-
s.version
|
35
|
-
s.homepage
|
36
|
-
s.summary
|
37
|
-
s.description
|
38
|
-
s.license
|
33
|
+
s.name = "#{Senha::APP_NAME}"
|
34
|
+
s.version = Senha::VERSION
|
35
|
+
s.homepage = "http://www.arxopia.com/projects/senha"
|
36
|
+
s.summary = "#{Senha::APP_NAME}"
|
37
|
+
s.description = "#{Senha::APP_NAME} is a password generation tool"
|
38
|
+
s.license = "BSD"
|
39
39
|
|
40
|
-
s.author
|
41
|
-
s.email
|
40
|
+
s.author = "Jacob Hammack"
|
41
|
+
s.email = "senha@arxopia.com"
|
42
42
|
|
43
|
-
s.files
|
43
|
+
s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['senha.gemspec']
|
44
44
|
s.default_executable = "#{Senha::APP_NAME}"
|
45
|
-
s.executables
|
46
|
-
s.require_paths
|
45
|
+
s.executables = ["#{Senha::APP_NAME}"]
|
46
|
+
s.require_paths = ["lib"]
|
47
47
|
|
48
|
-
s.has_rdoc
|
48
|
+
s.has_rdoc = 'yard'
|
49
49
|
s.extra_rdoc_files = ["README.markdown", "LICENSE", "NEWS.markdown"]
|
50
50
|
|
51
51
|
s.required_rubygems_version = ">= 1.6.0"
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: senha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jacob Hammack
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: senha is a password generation tool
|
15
|
-
email:
|
14
|
+
email: senha@arxopia.com
|
16
15
|
executables:
|
17
16
|
- senha
|
18
17
|
extensions: []
|
@@ -21,41 +20,42 @@ extra_rdoc_files:
|
|
21
20
|
- LICENSE
|
22
21
|
- NEWS.markdown
|
23
22
|
files:
|
24
|
-
-
|
23
|
+
- Gemfile
|
24
|
+
- Gemfile.lock
|
25
25
|
- LICENSE
|
26
26
|
- NEWS.markdown
|
27
|
-
-
|
27
|
+
- README.markdown
|
28
28
|
- Rakefile
|
29
|
-
-
|
29
|
+
- TODO.markdown
|
30
|
+
- bin/senha
|
31
|
+
- lib/senha.rb
|
30
32
|
- lib/senha/base.rb
|
33
|
+
- lib/senha/base/generator.rb
|
31
34
|
- lib/senha/cli.rb
|
32
35
|
- lib/senha/cli/application.rb
|
33
|
-
- lib/senha.rb
|
34
36
|
- senha.gemspec
|
35
|
-
|
36
|
-
homepage: http://www.hammackj.com/
|
37
|
+
homepage: http://www.arxopia.com/projects/senha
|
37
38
|
licenses:
|
38
39
|
- BSD
|
40
|
+
metadata: {}
|
39
41
|
post_install_message:
|
40
42
|
rdoc_options: []
|
41
43
|
require_paths:
|
42
44
|
- lib
|
43
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
46
|
requirements:
|
46
|
-
- -
|
47
|
+
- - ">="
|
47
48
|
- !ruby/object:Gem::Version
|
48
49
|
version: '0'
|
49
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.6.0
|
55
55
|
requirements: []
|
56
56
|
rubyforge_project: senha
|
57
|
-
rubygems_version:
|
57
|
+
rubygems_version: 2.4.5.1
|
58
58
|
signing_key:
|
59
|
-
specification_version:
|
59
|
+
specification_version: 4
|
60
60
|
summary: senha
|
61
61
|
test_files: []
|