autoremote 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2b9cbfdd54c4ff05c1075eabe8b2ddf8ac1af82
4
- data.tar.gz: 9d3f433333b4e827c8755a016bcc074e0ab02890
3
+ metadata.gz: f7425536a642d37ded44ebeee1c3fae00723d844
4
+ data.tar.gz: 4584ee3bdb9292ade41e13cad99f3134528534b4
5
5
  SHA512:
6
- metadata.gz: c7f8e03824393a70fe0a5a6f4d329667c2b9a965149ff082555c816888d9c8264f0078e09c7827fa02b947ea4e472009489ff67f758f657b303d63924900297d
7
- data.tar.gz: 67ab0febc0d4a344803dc6c4f2cf9c788b7511250d390c658523a36f2f7b2cb9c8a2ec6241b7ac1a0095e6250aadc145a364bc88d4e2afe8692f9ae2e3106a0b
6
+ metadata.gz: 92bbd1059537f25488964ced27908658c5fc226ff83c42ed53f06171efc6bc2fdd4b3f24d96ca1052bc24aced2cd1ccd718cab7e69a1ec0d51e7818a8931864c
7
+ data.tar.gz: ad8f6d64cf473c1c2b35d4302830a8b9c839ca2bf4cdeca3a2609222e881457188a08155badbe937fb55a160f3eed0b59739674efaea127c3176d86d9dbb4b2e
@@ -45,8 +45,11 @@ elsif arg0 == 'add' && ARGV[1] && ARGV[2]
45
45
 
46
46
  puts 'Adding device'
47
47
  begin
48
- AutoRemote.addDevice(ARGV[1], ARGV[2])
49
- puts 'Device added successfully'
48
+ if AutoRemote.addDevice(ARGV[1], ARGV[2])
49
+ puts 'Device added successfully'
50
+ else
51
+ puts 'Device already exists'
52
+ end
50
53
  rescue StandardError => e
51
54
  puts "Error: #{e.message}"
52
55
  end
@@ -56,8 +59,11 @@ elsif ( arg0 == 'remove' || arg0 == 'delete' ) && ARGV[1]
56
59
 
57
60
  puts 'Removing device'
58
61
  begin
59
- AutoRemote.removeDevice(ARGV[1])
60
- puts 'Device removed successfully'
62
+ if AutoRemote.removeDevice(ARGV[1])
63
+ puts 'Device removed successfully'
64
+ else
65
+ puts 'Device was not found'
66
+ end
61
67
  rescue StandardError => e
62
68
  puts "Error: #{e.message}"
63
69
  end
@@ -78,8 +84,11 @@ elsif arg0 == 'list'
78
84
  elsif arg0 == 'message' && ARGV[1] && ARGV[2]
79
85
 
80
86
  begin
81
- AutoRemote.sendMessage(ARGV[1], ARGV[2])
82
- puts 'Message sent successfully'
87
+ if AutoRemote.sendMessage(ARGV[1], ARGV[2])
88
+ puts 'Message sent successfully'
89
+ else
90
+ puts 'Message could not be sent'
91
+ end
83
92
  rescue StandardError => e
84
93
  puts "Error: #{e.message}"
85
94
  end
@@ -98,8 +107,11 @@ elsif arg0 == 'register' && ARGV[1] && ARGV[2]
98
107
  end
99
108
 
100
109
  begin
101
- AutoRemote.registerOnDevice(ARGV[1], ARGV[2])
102
- puts 'Device registered successfully'
110
+ if AutoRemote.registerOnDevice(ARGV[1], ARGV[2])
111
+ puts 'Device registered successfully'
112
+ else
113
+ puts 'Could not register computer on the device'
114
+ end
103
115
  rescue StandardError => e
104
116
  puts "Error: #{e.message}"
105
117
  end
@@ -1,3 +1,3 @@
1
1
  module AutoRemote
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoremote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Smedberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-31 00:00:00.000000000 Z
11
+ date: 2015-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler