anyplayer 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjAzZTE1ZGYxMzM4NGEwYzIzZmFiZDhjMjFiN2JiODY2YmE4MGNkNw==
5
+ data.tar.gz: !binary |-
6
+ MmQzNjhkNzViN2I0NDJhYzQ1MTU3ODhlMTc3MDg1NDJkMTU2NzQ5Mw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ODY4NjVjNTI5MmM0MTJmNGIwMTU3NDc0ZTgxZDYyMTM4YmMxNDY4NDhjNDFm
10
+ NGZhYTA0YTY2NWM1MTAzMDA5MjM5YWRkMjQxM2E3OTQ2YjUyN2NhMmI4OTg5
11
+ ZTgzNzBkOGRiYWY3ZDg1NDI3NmE1MmMxZjJhNzM1MzYxYzhiMDE=
12
+ data.tar.gz: !binary |-
13
+ NmIzNmFjZTE2OWNhNzBmMThlZjgwNzY3MWIzMWFkZTE1MTZlNzI4YzBhMWNh
14
+ OGI0ZjIzYzVmYzIyMWNkNzRkODBjNzJlODFjN2IyMzJjNzQxOTU3MWViZGNm
15
+ YjNjNGE5M2NiZDIxM2EwYjM0ZmRjNmNhY2RmZTUzNzg0MmI0YzA=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anyplayer (1.1.2)
4
+ anyplayer (1.1.3)
5
5
  ruby-mpd (~> 0.3.0)
6
6
 
7
7
  GEM
@@ -10,7 +10,7 @@ GEM
10
10
  flexmock (0.9.0)
11
11
  minitest (4.1.0)
12
12
  rake (0.9.2.2)
13
- ruby-mpd (0.3.0)
13
+ ruby-mpd (0.3.1)
14
14
 
15
15
  PLATFORMS
16
16
  ruby
@@ -36,32 +36,31 @@ class Anyplayer::Xmms2 < Anyplayer::Player
36
36
  def volume
37
37
  # currently just the first (left?) channel
38
38
  xmms2('server volume').split("\n").first.sub(/([^0-9]*)/, '')
39
- $1
40
39
  end
41
40
 
42
41
  def track
43
- xmms2 "status -f '${title}'"
42
+ xmms2 "current -f '${title}'"
44
43
  end
45
44
 
46
45
  def artist
47
- xmms2 "status -f '${artist}'"
46
+ xmms2 "current -f '${artist}'"
48
47
  end
49
48
 
50
49
  def album
51
- xmms2 "status -f '${album}'"
50
+ xmms2 "current -f '${album}'"
52
51
  end
53
52
 
54
53
  def playing?
55
- xmms2("status -f '${playback_status}'") == "Playing"
54
+ xmms2("current -f '${playback_status}'") == "Playing"
56
55
  end
57
56
 
58
57
  def paused?
59
- xmms2("status -f '${playback_status}'") == "Paused"
58
+ xmms2("current -f '${playback_status}'") == "Paused"
60
59
  end
61
60
 
62
61
  def launched?
63
62
  # xmms2 autolaunches the daemon, so this should always be true
64
- %x(xmms2 status 2> /dev/null)
63
+ %x(xmms2 current 2> /dev/null)
65
64
  $? == 0
66
65
  end
67
66
 
@@ -71,7 +70,8 @@ class Anyplayer::Xmms2 < Anyplayer::Player
71
70
 
72
71
  private
73
72
  def xmms2(command)
74
- %x(xmms2 #{command}).split("\n").first.strip
73
+ ret = %x(xmms2 #{command}).split("\n").first
74
+ ret ? ret.strip : ""
75
75
  end
76
76
  end
77
77
 
@@ -1,3 +1,3 @@
1
1
  module Anyplayer
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyplayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
5
- prerelease:
4
+ version: 1.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sunny Ripert
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-12-18 00:00:00.000000000 Z
12
+ date: 2014-01-27 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: ruby-mpd
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: minitest
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ! '>='
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ! '>='
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: flexmock
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ! '>='
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ! '>='
61
54
  - !ruby/object:Gem::Version
@@ -102,33 +95,26 @@ files:
102
95
  homepage: http://github.com/sunny/anyplayer
103
96
  licenses:
104
97
  - MIT
98
+ metadata: {}
105
99
  post_install_message:
106
100
  rdoc_options: []
107
101
  require_paths:
108
102
  - lib
109
103
  required_ruby_version: !ruby/object:Gem::Requirement
110
- none: false
111
104
  requirements:
112
105
  - - ! '>='
113
106
  - !ruby/object:Gem::Version
114
107
  version: '0'
115
- segments:
116
- - 0
117
- hash: -4308262987889258544
118
108
  required_rubygems_version: !ruby/object:Gem::Requirement
119
- none: false
120
109
  requirements:
121
110
  - - ! '>='
122
111
  - !ruby/object:Gem::Version
123
112
  version: '0'
124
- segments:
125
- - 0
126
- hash: -4308262987889258544
127
113
  requirements: []
128
114
  rubyforge_project:
129
- rubygems_version: 1.8.23
115
+ rubygems_version: 2.2.1
130
116
  signing_key:
131
- specification_version: 3
117
+ specification_version: 4
132
118
  summary: Interact with the running music player
133
119
  test_files:
134
120
  - test/anyplayer_test.rb