ampt 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,14 +61,14 @@ This is a work in progress.
61
61
 
62
62
  === Scripting:
63
63
 
64
- See lib/ampt_cfg/default.rb to see how configurations work -- all of ampt's
64
+ See `lib/ampt_cfg/default.rb` to see how configurations work -- all of ampt's
65
65
  commands are written the same way you would write your own custom command or
66
66
  configuration.
67
67
 
68
68
  == REQUIREMENTS:
69
69
 
70
- * libopenssl bindings for ruby
71
- * libcurl-dev
70
+ * `libopenssl` bindings for ruby
71
+ * `libcurl-dev`
72
72
 
73
73
  == INSTALL:
74
74
 
@@ -77,7 +77,8 @@ configuration.
77
77
  == TODO:
78
78
  * Fix error handling when getting invalid data from the server.
79
79
  * Write up a bit of documentation on writing configurations.
80
+ * Support for piping arguments to certain commands.
80
81
 
81
82
  == LICENSE:
82
83
 
83
- See LICENSE.
84
+ See `LICENSE`.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ampt}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rich"]
12
- s.date = %q{2010-01-22}
12
+ s.date = %q{2010-01-27}
13
13
  s.default_executable = %q{ampt}
14
14
  s.description = %q{This is a command line client for the Acoustics Media Player (amp).}
15
15
  s.email = %q{rich@interhacktive.com}
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'trollop'
3
3
 
4
4
  module Ampt
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  # This is the module that holds the API for the current music player. Defined in
7
7
  # ampt_api/acoustics.rb
8
8
  module API
@@ -18,6 +18,12 @@ module Ampt
18
18
  player_status req 'unvote', 'song_id' => song_id
19
19
  end
20
20
 
21
+ # Purges a user's votes. Need to be admin to do this.
22
+ def purge user
23
+ auth
24
+ player_status req 'unvote', 'purge' => user
25
+ end
26
+
21
27
  # Votes up a song. Takes a song_id (string)
22
28
  def vote song_id
23
29
  auth
@@ -274,6 +274,18 @@ command 'reset' do
274
274
  end
275
275
  end
276
276
 
277
+ command 'purge' do
278
+ desc "Clear a user's votes. Need to be admin to do this."
279
+ arg "user"
280
+ on_run do |opts, args|
281
+ if args.size > 0
282
+ purge args[0]
283
+ else
284
+ die "Need to specify username"
285
+ end
286
+ end
287
+ end
288
+
277
289
  command 'start' do
278
290
  desc "Start Acoustics."
279
291
  on_run do |opts, args|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ampt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-22 00:00:00 -06:00
12
+ date: 2010-01-27 00:00:00 -06:00
13
13
  default_executable: ampt
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency