Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

skips_pre comes before desc

  • Loading branch information...
commit d470acde5828951199c913a9f92baa0afdeb4c6f 1 parent 79198cb
Wynn Netherland authored
25 lib/rdio.rb
@@ -72,6 +72,7 @@ def self.add_to_collection(tracks)
72 72 flag :access_token
73 73 flag :access_secret
74 74
  75 + skips_pre
75 76 desc 'Plays the current track'
76 77 command :play do |c|
77 78 c.action do |global_options,options,args|
@@ -79,22 +80,23 @@ def self.add_to_collection(tracks)
79 80 end
80 81 end
81 82
82   - desc 'Pause the player'
83 83 skips_pre
  84 + desc 'Pause the player'
84 85 command :pause do |c|
85 86 c.action do |global_options,options,args|
86 87 bridge.pause
87 88 end
88 89 end
89 90
90   - desc 'Toggle playback'
91 91 skips_pre
  92 + desc 'Toggle playback'
92 93 command :toggle do |c|
93 94 c.action do |global_options,options,args|
94 95 bridge.toggle
95 96 end
96 97 end
97 98
  99 + skips_pre
98 100 desc 'Display the current track info'
99 101 long_desc %(
100 102 Display current track, artist, and album info. Pass
@@ -102,31 +104,30 @@ def self.add_to_collection(tracks)
102 104 %{track}, %{artist}, and %{album} placeholders.
103 105 )
104 106 arg_name 'format'
105   - skips_pre
106 107 command :current do |c|
107 108 c.action do |global_options,options,args|
108 109 say bridge.now_playing(args.first)
109 110 end
110 111 end
111 112
112   - desc 'Skip to next track'
113 113 skips_pre
  114 + desc 'Skip to next track'
114 115 command :next do |c|
115 116 c.action do |global_options,options,args|
116 117 bridge.next_track
117 118 end
118 119 end
119 120
120   - desc 'Play previous track'
121 121 skips_pre
  122 + desc 'Play previous track'
122 123 command :previous, :prev do |c|
123 124 c.action do |global_options,options,args|
124 125 bridge.previous_track
125 126 end
126 127 end
127 128
128   - desc 'Open the current track in Rdio player'
129 129 skips_pre
  130 + desc 'Open the current track in Rdio player'
130 131 command :browse do |c|
131 132 c.action do |global_options,options,args|
132 133 protocol = args.first == 'app' ? 'rdio' : 'http'
@@ -134,8 +135,8 @@ def self.add_to_collection(tracks)
134 135 end
135 136 end
136 137
137   - desc 'Set volume for player'
138 138 skips_pre
  139 + desc 'Set volume for player'
139 140 arg_name 'level'
140 141 command :volume, :vol do |c|
141 142 c.action do |global_options,options,args|
@@ -144,40 +145,40 @@ def self.add_to_collection(tracks)
144 145 end
145 146 end
146 147
147   - desc 'Mute the Rdio player'
148 148 skips_pre
  149 + desc 'Mute the Rdio player'
149 150 command :mute do |c|
150 151 c.action do |global_options,options,args|
151 152 brdige.set_volume 0
152 153 end
153 154 end
154 155
155   - desc 'Get a shareable link for the current track'
156 156 skips_pre
  157 + desc 'Get a shareable link for the current track'
157 158 command :link do |c|
158 159 c.action do |global_options,options,args|
159 160 say bridge.current_url
160 161 end
161 162 end
162 163
163   - desc "Get CLI and application version info"
164 164 skips_pre
  165 + desc "Get CLI and application version info"
165 166 command :version, :v do |c|
166 167 c.action do |global_options,options,args|
167 168 say "rdio-cli #{Rdio::VERSION} / Rdio #{apple_script('get version of application "Rdio"')}"
168 169 end
169 170 end
170 171
171   - desc "Quit Rdio"
172 172 skips_pre
  173 + desc "Quit Rdio"
173 174 command :quit, :q do |c|
174 175 c.action do |global_options,options,args|
175 176 bridge.quit
176 177 end
177 178 end
178 179
179   - desc "Authorize Rdio account"
180 180 skips_pre
  181 + desc "Authorize Rdio account"
181 182 command :authorize, :auth do |c|
182 183 c.action do |global_options,options,args|
183 184 require 'highline/import'
2  spec/rdio/desktop_bridge_spec.rb
... ... @@ -1,6 +1,6 @@
1 1 require 'spec_helper'
2 2
3   -describe 'Rdio::DesktopBridge' do
  3 +describe Rdio::DesktopBridge do
4 4
5 5 before do
6 6 @bridge = Rdio::DesktopBridge.new
1  spec/rdio_spec.rb
@@ -116,6 +116,7 @@
116 116
117 117 Rdio.run %w(q)
118 118 end
  119 +
119 120 context "when authenticated" do
120 121
121 122 it "snags the currently playing track to your collection" do

0 comments on commit d470acd

Please sign in to comment.
Something went wrong with that request. Please try again.