vkpd 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/vkpd/cli.rb +6 -5
  3. data/lib/vkpd/version.rb +1 -1
  4. metadata +17 -32
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 56320686f21b1c1cd391dfca5c9797fedf34a6d9
4
+ data.tar.gz: dfae90e3d340d7f7491ccda89061c7d10b60afd0
5
+ SHA512:
6
+ metadata.gz: 3629d7c611799054c2d2663b31df0ee92251b31946fd0d4c933b0cfab784228e195faeebd00ed65e6f7eb8dda85b59b2bb730b0a402549c293e77a0e68a7935f
7
+ data.tar.gz: 4cd9854ec60de5bc842c1dc5f6ed3dce18df80ec1539533678d15b5435f7affb5f08b3e11ce5b8e0c29061cd89b2d0fee66fe5dc5a420c51e58d49417e74d140
data/lib/vkpd/cli.rb CHANGED
@@ -9,7 +9,7 @@ module Vkpd
9
9
  do_clear = true
10
10
  do_play = true
11
11
  params["auto_complete"] = '1'
12
- player = :mpd
12
+ player = ENV['VKPD_PLAYER'].to_sym || :mpd
13
13
  random = false
14
14
 
15
15
  if ARGV.empty?
@@ -27,8 +27,9 @@ module Vkpd
27
27
  @verbose = true
28
28
  when '-r', '--random'
29
29
  random = true
30
- when '-p', '--mplayer'
31
- player = :mplayer
30
+ when '-p', '--player', /^--player=\w+$/
31
+ player = current.include?("=") ? current.match(/=(.*)/)[1] : ARGV.shift
32
+ player = player.to_sym
32
33
  when '-c', '--count', /^--count=\d+$/
33
34
  value = current.include?("=") ? current.match(/=(.*)/)[1] : ARGV.shift
34
35
  params["count"] = value
@@ -86,11 +87,11 @@ module Vkpd
86
87
  mpd.add song["url"]
87
88
  end
88
89
  mpd.play if do_play
89
- when :mplayer
90
+ when :mplayer, :mpv
90
91
  catch :stop do
91
92
  response.each do |song|
92
93
  ap song
93
- system "mplayer --cache=8192 --cache-min=2 #{song['url']}"
94
+ system "#{player} -cache 8192 -cache-min 2 #{song['url']}"
94
95
  begin
95
96
  Timeout::timeout 0.25 do
96
97
  case key = STDIN.getch
data/lib/vkpd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vkpd
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.3"
3
3
  end
metadata CHANGED
@@ -1,68 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vkpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
5
- prerelease:
4
+ version: 1.3.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ales Guzik
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-27 00:00:00.000000000 Z
11
+ date: 2013-10-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sinatra
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: ruby-mpd
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.2.4
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.2.4
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: launchy
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: bundler
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,33 +69,29 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: awesome_print
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: VKPD searches for music files on russian social network vk.com and adds/plays
@@ -131,27 +118,25 @@ files:
131
118
  homepage: https://github.com/alesguzik/vkpd
132
119
  licenses:
133
120
  - MIT
121
+ metadata: {}
134
122
  post_install_message:
135
123
  rdoc_options: []
136
124
  require_paths:
137
125
  - lib
138
126
  required_ruby_version: !ruby/object:Gem::Requirement
139
- none: false
140
127
  requirements:
141
- - - ! '>='
128
+ - - '>='
142
129
  - !ruby/object:Gem::Version
143
130
  version: '0'
144
131
  required_rubygems_version: !ruby/object:Gem::Requirement
145
- none: false
146
132
  requirements:
147
- - - ! '>='
133
+ - - '>='
148
134
  - !ruby/object:Gem::Version
149
135
  version: '0'
150
136
  requirements: []
151
137
  rubyforge_project:
152
- rubygems_version: 1.8.23
138
+ rubygems_version: 2.0.3
153
139
  signing_key:
154
- specification_version: 3
140
+ specification_version: 4
155
141
  summary: Play any music from vk.com via MPD
156
142
  test_files: []
157
- has_rdoc: