irkit 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +5 -1
  3. data/bin/irkit +10 -3
  4. data/lib/irkit/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 495dc7b5f1bd1ea2ce202c6ed9751743fdc5dd66
4
- data.tar.gz: 3912b50c735eb862a1e9f98c4904a4766147bfc7
3
+ metadata.gz: 7758fde80d4656287936a75268bc2c77d1dd3493
4
+ data.tar.gz: 261ee3cac8bea21d0e18427910b48ba9c89791f5
5
5
  SHA512:
6
- metadata.gz: 83d087a4cd98abae59dc8256e385a71490c1a74e1833d2bb00bd33c5a03153b393561912ffcb19c8ba67a005372e335370bcfb55b3f94bd4d40c03808507b7fe
7
- data.tar.gz: 0eb6c6e7d51b781ad8d728e0baa095c69c1d2b192199a85438a09a778fa6af900331e72d63656fb90ec250ee81e0cf072696b2891400d884a0c20e2060aa3c7b
6
+ metadata.gz: c4e8c0cb95bb006a4764514eca3215a03a843afc3335f9775659fe8bcd99c22997828dfe27fc3923ca325eb8105a0c5b27e9ede8c4040bd116b98b6138f45379
7
+ data.tar.gz: 295625cae7b62b547803cd5a480eb20c6c553dc073d06c82bf152b571a5ff95f6dadd68b6271bdb13a358aeeb13cf0f1ba080cf4d0a006d70d00dc084eea35be
@@ -1,6 +1,10 @@
1
+ === 0.0.3 2014-03-17
2
+
3
+ * fix irkit command #1
4
+
1
5
  === 0.0.2 2014-03-17
2
6
 
3
- * add executable "irkit" command
7
+ * add executable "irkit" command #1
4
8
 
5
9
  === 0.0.1 2014-03-16
6
10
 
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
@@ -1,3 +1,3 @@
1
1
  module IRKit
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto