irkit 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -1
- data/bin/irkit +10 -3
- data/lib/irkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7758fde80d4656287936a75268bc2c77d1dd3493
|
4
|
+
data.tar.gz: 261ee3cac8bea21d0e18427910b48ba9c89791f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4e8c0cb95bb006a4764514eca3215a03a843afc3335f9775659fe8bcd99c22997828dfe27fc3923ca325eb8105a0c5b27e9ede8c4040bd116b98b6138f45379
|
7
|
+
data.tar.gz: 295625cae7b62b547803cd5a480eb20c6c553dc073d06c82bf152b571a5ff95f6dadd68b6271bdb13a358aeeb13cf0f1ba080cf4d0a006d70d00dc084eea35be
|
data/History.txt
CHANGED
data/bin/irkit
CHANGED
@@ -46,6 +46,7 @@ if args.has_option? :help or
|
|
46
46
|
end
|
47
47
|
|
48
48
|
if args.has_option? :list
|
49
|
+
puts "~> #{IRKit::App::DATA_FILE}"
|
49
50
|
puts "== Data"
|
50
51
|
IRKit::App::Data.IR.each do |k,v|
|
51
52
|
puts k
|
@@ -55,7 +56,7 @@ if args.has_option? :list
|
|
55
56
|
puts "#{k}\tInternet API"
|
56
57
|
end
|
57
58
|
IRKit::Device.find.each do |device|
|
58
|
-
puts "#{device.address}\t#{device.bonjour_name}"
|
59
|
+
puts "#{device.address}\t#{device.bonjour_name} (bonjour)"
|
59
60
|
end
|
60
61
|
exit
|
61
62
|
end
|
@@ -83,7 +84,10 @@ end
|
|
83
84
|
if args.has_param? :address
|
84
85
|
irkit = IRKit::Device.new(address: args[:address])
|
85
86
|
elsif args.has_param? :device
|
86
|
-
info = IRKit::App::Data.Device[ args[:device] ]
|
87
|
+
unless info = IRKit::App::Data.Device[ args[:device] ]
|
88
|
+
STDERR.puts %Q{Device "#{args[:device]}" not found}
|
89
|
+
exit 1
|
90
|
+
end
|
87
91
|
irkit = IRKit::InternetAPI.new(clientkey: info.clientkey, deviceid: info.deviceid)
|
88
92
|
else
|
89
93
|
irkit = IRKit::Device.find.first
|
@@ -121,7 +125,10 @@ end
|
|
121
125
|
if args.has_param? :post
|
122
126
|
name = args[:post]
|
123
127
|
puts %Q{post "#{name}"}
|
124
|
-
ir_data = IRKit::App::Data.IR[name]
|
128
|
+
unless ir_data = IRKit::App::Data.IR[name]
|
129
|
+
STDERR.puts %Q{IR Data "#{name}" not found}
|
130
|
+
exit 1
|
131
|
+
end
|
125
132
|
res = irkit.post_messages ir_data
|
126
133
|
case res.code
|
127
134
|
when 200
|
data/lib/irkit/version.rb
CHANGED