moat 0.0.8 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "moat"))
metadata CHANGED
@@ -1,70 +1,91 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: moat
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 8
9
- version: 0.0.8
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
10
5
  platform: ruby
11
- authors:
12
- - Bryan Woods
6
+ authors:
7
+ - Poll Everywhere
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2010-04-19 00:00:00 -04:00
18
- default_executable:
19
- dependencies: []
20
-
21
- description: Brain-dead simple password storage. Improved.
22
- email: bryanwoods4e@gmail.com
23
- executables:
24
- - moat
11
+ date: 2018-06-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.57.2
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.57.2
41
+ description: Moat is an small authorization library built for Ruby (primarily Rails)
42
+ web applications
43
+ email:
44
+ - geeks@polleverywhere.com
45
+ executables: []
25
46
  extensions: []
26
-
27
- extra_rdoc_files: []
28
-
29
- files:
30
- - bin/moat
31
- - History.txt
47
+ extra_rdoc_files:
48
+ - README.md
49
+ files:
50
+ - ".rubocop.yml"
51
+ - CONTRIBUTING.md
52
+ - Gemfile
53
+ - Gemfile.lock
54
+ - LICENSE
55
+ - README.md
56
+ - Rakefile
32
57
  - lib/moat.rb
33
- - Manifest.txt
34
- - moat-0.0.7.gem
58
+ - lib/moat/rspec.rb
59
+ - lib/moat/version.rb
35
60
  - moat.gemspec
36
- - Rakefile
37
- - README.txt
38
- - test/test_moat.rb
39
- has_rdoc: true
40
- homepage: http://github.com/bryanwoods/moat
41
- licenses: []
42
-
61
+ - spec/moat_spec.rb
62
+ - spec/spec_helper.rb
63
+ homepage: https://github.com/polleverywhere/moat
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
43
67
  post_install_message:
44
- rdoc_options: []
45
-
46
- require_paths:
68
+ rdoc_options:
69
+ - "--main"
70
+ - README.md
71
+ require_paths:
47
72
  - lib
48
- required_ruby_version: !ruby/object:Gem::Requirement
49
- requirements:
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
50
75
  - - ">="
51
- - !ruby/object:Gem::Version
52
- segments:
53
- - 0
54
- version: "0"
55
- required_rubygems_version: !ruby/object:Gem::Requirement
56
- requirements:
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
57
80
  - - ">="
58
- - !ruby/object:Gem::Version
59
- segments:
60
- - 0
61
- version: "0"
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
62
83
  requirements: []
63
-
64
- rubyforge_project: moat
65
- rubygems_version: 1.3.6
84
+ rubyforge_project:
85
+ rubygems_version: 2.6.14
66
86
  signing_key:
67
- specification_version: 3
68
- summary: Brain-dead simple password storage. Improved.
69
- test_files: []
70
-
87
+ specification_version: 4
88
+ summary: A small authorization library
89
+ test_files:
90
+ - spec/moat_spec.rb
91
+ - spec/spec_helper.rb
@@ -1,47 +0,0 @@
1
- === 0.0.1 / 2010-04-01
2
-
3
- * 1 major enhancement
4
-
5
- * Birthday!
6
-
7
- === 0.0.2 / 2010-04-01
8
-
9
- * 1 major enhancement:
10
-
11
- * Adding functionality
12
-
13
- === 0.0.3 / 2010-04-02
14
-
15
- * 1 major enhancement:
16
-
17
- * Adding README
18
-
19
- === 0.0.4 / 2010-04-02
20
-
21
- * 1 major enhancement:
22
-
23
- * Adding grep command-line argument
24
-
25
- === 0.0.5 / 2010-04-02
26
-
27
- * 1 major enhancement:
28
-
29
- * Bugfix for generate (-G) command-line argument
30
-
31
- === 0.0.6 / 2010-04-02
32
-
33
- * 1 major enhancement:
34
-
35
- * Hacky fix to off-by-one bug when generating password with --length argument
36
-
37
- === 0.0.7 / 2010-04-02
38
-
39
- * 1 major enhancement:
40
-
41
- * Adding capital letters for better 'security'
42
-
43
- === 0.0.8 / 2010-04-19
44
-
45
- * 1 major enhancement:
46
-
47
- * Explicitly requiring YAML
@@ -1,8 +0,0 @@
1
- .autotest
2
- History.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- bin/moat
7
- lib/moat.rb
8
- test/test_moat.rb
data/README.txt DELETED
@@ -1,84 +0,0 @@
1
- = moat: Brain-dead simple password storage. Improved.
2
-
3
- Moat is "Heavily inspired" (ripped off completely) from password,
4
- by Giles Bowkett
5
- http://gilesbowkett.blogspot.com/2008/02/sudo-gem-install-password.html
6
-
7
- Moat improves password by removing the ActiveSupport requirement,
8
- generating cleaner alphanumeric passwords, and hiding itself in a moatfile.
9
- Everything else should be exactly the same.
10
-
11
- Long story short, it's password. Just faster, more stable, and should generate
12
- passwords that even your bank will treat as valid. Though you might not want to use it there.
13
-
14
- == DESCRIPTION:
15
-
16
- moat is a simple command-line tool to store your INESSENTIAL passwords.
17
-
18
- All passwords stored with moat are stored as plain text in a hidden file called
19
- ".moatfile" in your home directory.
20
-
21
- If you store vitally essential personal information using moat, you are a
22
- dumb motherfucker. (Or, at least, much braver than smart.)
23
-
24
- == CODE EXAMPLES:
25
-
26
- moat -g twitter
27
- moat --get twitter
28
-
29
- Prints your Twitter username and password to the terminal.
30
-
31
- moat -a
32
-
33
- Prints every known username/password combo to the terminal.
34
-
35
- moat -s twitter wilbur s3cr3t
36
- moat --set twitter wilbur s3cr3t
37
-
38
- Sets your moat entry for "twitter" to username "wilbur" and password "s3cr3t".
39
-
40
- moat -G twitter wilbur
41
- moat --generating_set twitter wilbur
42
-
43
- Sets your moat entry for "twitter" to username "wilbur" and a 10-digit
44
- autogenerated password, and prints the new username/password combo.
45
-
46
- moat -l 23 -G twitter wilbur
47
- moat --length 23 --generating_set twitter wilbur
48
-
49
- Sets your moat entry for "twitter" to username "wilbur" and a 23-digit
50
- autogenerated password, and prints the new username/password combo.
51
-
52
- == REQUIREMENTS:
53
-
54
- * Must not be an idiot
55
-
56
- == INSTALL:
57
-
58
- * (sudo) gem install moat
59
-
60
- == LICENSE:
61
-
62
- (The MIT License)
63
-
64
- Copyright (c) 2008 Giles Bowkett
65
- Copyright (c) 2010 Bryan Woods
66
-
67
- Permission is hereby granted, free of charge, to any person obtaining
68
- a copy of this software and associated documentation files (the
69
- 'Software'), to deal in the Software without restriction, including
70
- without limitation the rights to use, copy, modify, merge, publish,
71
- distribute, sublicense, and/or sell copies of the Software, and to
72
- permit persons to whom the Software is furnished to do so, subject to
73
- the following conditions:
74
-
75
- The above copyright notice and this permission notice shall be
76
- included in all copies or substantial portions of the Software.
77
-
78
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
79
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
80
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
81
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
82
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
83
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
84
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bin/moat DELETED
@@ -1,69 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Almost everything here is stolen from Giles Bowkett's
4
- # password gem. sudo gem install password for the original good shit.
5
-
6
- require 'rubygems'
7
- require 'optparse'
8
- require 'yaml'
9
-
10
- require "#{File.dirname(__FILE__)}/../lib/moat"
11
- include Moat
12
-
13
- load_passwords
14
-
15
- option_parser = OptionParser.new do |option_parser|
16
- option_parser.on("-?", "--grep query", String) do |query|
17
- @query = query
18
- @action = :grep
19
- end
20
-
21
- option_parser.on("-a") do
22
- @action = :all
23
- end
24
-
25
- option_parser.on("-s", "--set site", String) do |site|
26
- @site = site
27
- @action = :set
28
- end
29
-
30
- option_parser.on("-g", "--get site", String) do |site|
31
- @site = site
32
- @action = :get
33
- end
34
-
35
- option_parser.on("-l", "--length length") do |length|
36
- @length = length.to_i - 1
37
- end
38
-
39
- option_parser.on("-G", "--generating_set site") do |site|
40
- @site = site
41
- @action = :set
42
- @length ||= 10
43
- @generated = generate(@length)
44
- end
45
- end
46
-
47
- username, password = option_parser.parse(ARGV)
48
- password ||= @generated
49
-
50
- def show_credentials_for(site)
51
- abort "No password stored for #{site}" unless Moat::SITES[site]
52
- puts site
53
- puts " username: #{Moat::SITES[site][:username]}"
54
- puts " password: #{Moat::SITES[site][:password]}"
55
- end
56
-
57
- case @action
58
- when :get
59
- show_credentials_for(@site)
60
- when :all
61
- Moat::SITES.keys.each {|site| show_credentials_for(site)}
62
- when :set
63
- Moat::SITES[@site] = {:username => username, :password => password }
64
- show_credentials_for(@site) if @generated
65
- save_passwords
66
- when :grep
67
- Moat::SITES.keys.each {|site| show_credentials_for(site) if site =~ /#{@query}/ }
68
- end
69
-
Binary file
@@ -1,8 +0,0 @@
1
- require "test/unit"
2
- require "moat"
3
-
4
- class TestMoat < Test::Unit::TestCase
5
- def test_sanity
6
- flunk "write tests or I will kneecap you"
7
- end
8
- end