hansef-checkdomain 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +1 -1
  2. data/lib/checkdomain/search.rb +1 -20
  3. metadata +2 -2
data/README.rdoc CHANGED
@@ -8,7 +8,7 @@ Easily check a domain's availability from the commandline.
8
8
 
9
9
  Usage: checkdomain domain [domain2 domain3 etc.]
10
10
 
11
- You can also put comma-separated terms in square brackets and they will be expanded: checkdomain example.[com,org,net]
11
+ You can also use globs for more goodness and they will be expanded: checkdomain example.{com,org,net}
12
12
 
13
13
  This will result in checks for each of the following:
14
14
 
@@ -7,31 +7,12 @@ module CheckDomain
7
7
  private
8
8
 
9
9
  def parse_domains(terms)
10
- expand(terms) do |name|
10
+ terms.each do |name|
11
11
  domain = Domain.new(:name => name)
12
12
  domain.availability!
13
13
  puts_availability(domain)
14
14
  end
15
15
  end
16
-
17
- def expand(terms)
18
- terms.each do |term|
19
- unless term.is_a?(Array)
20
- set = term.match(/\[.+?\]/)
21
- if set
22
- expansion = []
23
- set.to_s[1..-2].split(",").each do |item|
24
- expansion.push(term.gsub(set.to_s, item.strip))
25
- end
26
- expand(expansion) {|x| yield x}
27
- else
28
- yield(term)
29
- end
30
- else
31
- expand(term) {|x| yield x}
32
- end
33
- end
34
- end
35
16
 
36
17
  def puts_availability(domain)
37
18
  name = domain.name.ljust(50)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hansef-checkdomain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hans Friedrich
@@ -42,7 +42,7 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: "0.4"
44
44
  version:
45
- description: "Easily check a domain's availability from the commandline. Usage: checkdomain domain [domain2 domain3 etc.] You can also put comma-separated terms in square brackets and they will be expanded: checkdomain example.[com,org,net] This will result in checks for each of the following: * example.com * example.org * example.net"
45
+ description: "Easily check a domain's availability from the commandline. Usage: checkdomain domain [domain2 domain3 etc.] You can also use globs for more goodness and they will be expanded: checkdomain example.{com,org,net} This will result in checks for each of the following: * example.com * example.org * example.net"
46
46
  email:
47
47
  - hans@turingstudio.com
48
48
  executables: