muzak 0.1.0 → 0.1.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: efea3aab55cde7f64c4385e48873e81f89ba4b0f
4
- data.tar.gz: ff90d394bdb2937280c31615f7ca84d9e1e7651f
3
+ metadata.gz: 77ec08814fbae77829d95ec84d85548eaac56e8f
4
+ data.tar.gz: c2fd8434c2c313cd9260c9f4a9f6ce6cd1208bb5
5
5
  SHA512:
6
- metadata.gz: 5e4182c5276d798c51cd282ba6b6f8d5524eee2577c3f5f3574cd7f96bdfcb18b2d3b12f8362c1adf21cf0e074491ada9944c64f56d9c1d9d245b34415d43346
7
- data.tar.gz: 2827f75b69ecf2da6321ec3944647b0e9c64d2812d40b48bd76697dc999eb493e12c55b5b8e55149c3ec67e34565f310024873713a7d957e6d4a1b689c555452
6
+ metadata.gz: 91eaf44a796913f92e3dc0a2f9d98b3e934492ace722bc240216d4918ff5ee1d26f814a589e49b08214d4593c6a165da8a328abeab069447fa40d1759030be33
7
+ data.tar.gz: be43e3eaba0dbf5891923054602fbcc2cc0c4dabcd4f609990c6e144de946a059a3b46a025014aec6acfc8649f7014ac996114d4a54ae345c5b8a3034adf6f25
@@ -2,18 +2,16 @@
2
2
 
3
3
  require "muzak"
4
4
  require "socket"
5
-
6
- def fatal(msg)
7
- puts "Fatal: #{msg}"
8
- exit 1
9
- end
5
+ require "json"
10
6
 
11
7
  begin
12
8
  server_host = Muzak::Config.daemon_host
13
9
  server_port = Muzak::Config.daemon_port
14
10
  sock = TCPSocket.new server_host, server_port
15
11
  rescue
16
- fatal "Is muzakd running?"
12
+ error = { response: { error: "muzak is not running" } }.to_json
13
+ puts error
14
+ exit 1
17
15
  end
18
16
 
19
17
  sock.puts ARGV.join(" ")
data/bin/muzakd CHANGED
@@ -25,8 +25,7 @@ loop do
25
25
  break if cmd_argv.first == "quit"
26
26
  rescue Exception => e
27
27
  client.puts({ error: e.to_s }.to_json)
28
- raise e
29
28
  ensure
30
- client.close
29
+ client.close if client
31
30
  end
32
31
  end
@@ -1,6 +1,6 @@
1
1
  module Muzak
2
2
  # Muzak's current version
3
- VERSION = "0.1.0".freeze
3
+ VERSION = "0.1.1".freeze
4
4
 
5
5
  # The root directory for all user configuration, data, etc
6
6
  CONFIG_DIR = File.expand_path("~/.config/muzak").freeze
@@ -68,13 +68,6 @@ module Muzak
68
68
  puts "[#{box}] #{msg}"
69
69
  end
70
70
 
71
- # Outputs a boxed informational message.
72
- # @param args [Array<String>] the message(s)
73
- # @return [void]
74
- def info(*args)
75
- output pretty(:green, "info"), args
76
- end
77
-
78
71
  # Outputs a boxed warning message.
79
72
  # @param args [Array<String>] the message(s)
80
73
  # @return [void]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muzak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Woodruff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-30 00:00:00.000000000 Z
11
+ date: 2016-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: taglib-ruby