nameboy 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +6 -0
- data/README.md +11 -0
- data/TODO.md +4 -4
- data/bin/nameboy +15 -21
- data/lib/nameboy.rb +1 -1
- metadata +3 -3
data/History.md
CHANGED
data/README.md
CHANGED
@@ -70,6 +70,17 @@ There are plans for more, thus the namespace.
|
|
70
70
|
new_password : what you use to log into access.enom.com
|
71
71
|
domains_file_url : publicly accessible url of a plain text listing of domains
|
72
72
|
|
73
|
+
This will change all of the domains' passwords listed in `domains_file_url`
|
74
|
+
from `current_password` to `new_password`.
|
75
|
+
|
76
|
+
### Change Passwords
|
77
|
+
|
78
|
+
nameboy enom:password current_password new_password domains_file_url -l
|
79
|
+
|
80
|
+
-l : turns on the Logger with STDERR
|
81
|
+
|
82
|
+
Handy for debugging.
|
83
|
+
|
73
84
|
### Example domains.txt
|
74
85
|
|
75
86
|
example.com
|
data/TODO.md
CHANGED
@@ -12,10 +12,10 @@
|
|
12
12
|
confirm_@new_password = gets
|
13
13
|
|
14
14
|
unless @new_password == @new_password
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
abort "
|
16
|
+
OH NOES! You mistyped one of your passwords.
|
17
|
+
Start over and try again.
|
18
|
+
"
|
19
19
|
end
|
20
20
|
|
21
21
|
puts "What is the URL of your domains file?"
|
data/bin/nameboy
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'mechanize'
|
3
5
|
require 'logger'
|
@@ -10,16 +12,11 @@ include Nameboy
|
|
10
12
|
@new_password = ""
|
11
13
|
@url = ""
|
12
14
|
|
13
|
-
def
|
15
|
+
def help_text
|
14
16
|
readme = File.read("../README.md")
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
def help_exit
|
19
|
-
puts
|
20
|
-
puts read_help_text
|
21
|
-
puts
|
22
|
-
exit
|
17
|
+
text = "\n"
|
18
|
+
text << readme.split("## Usage").last.strip
|
19
|
+
text << "\n"
|
23
20
|
end
|
24
21
|
|
25
22
|
def loggy?
|
@@ -27,24 +24,21 @@ def loggy?
|
|
27
24
|
end
|
28
25
|
|
29
26
|
def check_args
|
30
|
-
if ARGV.length.zero? || ARGV[0] == "-h"
|
31
|
-
|
27
|
+
if ARGV.length.zero? || ARGV[0] == "-h" || ARGV[0] == "help"
|
28
|
+
abort help_text
|
32
29
|
end
|
33
30
|
|
34
31
|
unless ARGV[0] == "enom:password"
|
35
|
-
|
36
|
-
puts "I only know how to deal with enom:password"
|
37
|
-
help_exit
|
32
|
+
abort "\nI only know how to deal with enom:password #{help_text}"
|
38
33
|
end
|
39
34
|
|
40
35
|
if ARGV.length < 4
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
exit
|
36
|
+
abort "TOO FEW ARGUMENTS
|
37
|
+
|
38
|
+
The format is:
|
39
|
+
nameboy enom:password @current_password @new_password domains_file_url
|
40
|
+
|
41
|
+
"
|
48
42
|
end
|
49
43
|
end
|
50
44
|
|
data/lib/nameboy.rb
CHANGED
metadata
CHANGED