nameboy 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/History.md +6 -0
  2. data/README.md +11 -0
  3. data/TODO.md +4 -4
  4. data/bin/nameboy +15 -21
  5. data/lib/nameboy.rb +1 -1
  6. metadata +3 -3
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.0.1 / 2011-03-05
2
+
3
+ * 1 bug fix
4
+
5
+ * shebang
6
+
1
7
  ### 1.0.0 / 2011-03-05
2
8
 
3
9
  * 1 major enhancement
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
- puts "OH NOES! You mistyped one of your passwords."
16
- puts "Start over and try again."
17
- puts
18
- exit
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?"
@@ -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 read_help_text
15
+ def help_text
14
16
  readme = File.read("../README.md")
15
- help_exit = readme.split("## Usage").last.strip
16
- end
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
- help_exit
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
- puts
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
- puts
42
- puts "TOO FEW ARGUMENTS"
43
- puts
44
- puts "The format is:"
45
- puts "nameboy enom:password @current_password @new_password domains_file_url"
46
- puts
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
 
@@ -1,3 +1,3 @@
1
1
  class Nameboy
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nameboy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Shane Becker