domr 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/bin/domr +4 -2
  2. data/lib/domr.rb +2 -4
  3. metadata +1 -1
data/bin/domr CHANGED
@@ -6,8 +6,10 @@ if !ARGV[0]
6
6
  puts "Please enter a name".color(:red).bright
7
7
 
8
8
  # Exit the program
9
- exit
9
+ exit 1
10
10
  end
11
11
 
12
12
  # Perform the search
13
- Domr.search ARGV[0]
13
+ if Domr.search(ARGV[0])
14
+ exit 1
15
+ end
@@ -30,9 +30,7 @@ class Domr
30
30
  # Check for errors
31
31
  if response.code != "200"
32
32
  puts "HTTP error".color(:red).bright # Color is red
33
-
34
- # Exit the program
35
- exit
33
+ return false
36
34
  end
37
35
 
38
36
  # Output results
@@ -56,6 +54,6 @@ class Domr
56
54
  puts string.color(color).bright
57
55
  end
58
56
 
59
- true
57
+ return true
60
58
  end
61
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: