tumblr 2.1.0 → 2.2.0

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.
Files changed (5) hide show
  1. data/README +5 -1
  2. data/bin/tumblr +10 -0
  3. data/lib/tumblr.rb +10 -1
  4. data/tumblr.gemspec +2 -2
  5. metadata +3 -3
data/README CHANGED
@@ -37,7 +37,11 @@ DESCRIPTION
37
37
  you can read
38
38
 
39
39
  cfp: ~> tumblr read start=42 num=42
40
-
40
+
41
+ you can delete a post
42
+
43
+ cfp: ~> tumblr delete post-id=42
44
+
41
45
  you can test the auth
42
46
 
43
47
  cfp: ~> tumblr authenticate
data/bin/tumblr CHANGED
@@ -37,6 +37,10 @@ Main {
37
37
 
38
38
  cfp: ~> tumblr read start=42 num=42
39
39
 
40
+ you can delete a post
41
+
42
+ cfp: ~> tumblr delete post-id=42
43
+
40
44
  you can test the auth
41
45
 
42
46
  cfp: ~> tumblr authenticate
@@ -161,6 +165,12 @@ Main {
161
165
  end
162
166
  end
163
167
 
168
+ mode "delete" do
169
+ def run
170
+ handle tumblr.delete(mode, parse_args)
171
+ end
172
+ end
173
+
164
174
  mode "authenticate" do
165
175
  def run
166
176
  handle tumblr.authenticate
@@ -18,10 +18,12 @@
18
18
  # tumblr.rb
19
19
  #
20
20
  module Tumblr
21
- Version = '2.1.0'
21
+ Version = '2.2.0'
22
+ Description = 'a command line utility and library which interfaces to the excellent tumblr blogging platform'
22
23
 
23
24
  class << Tumblr
24
25
  def version() Tumblr::Version end
26
+ def description() Tumblr::Description end
25
27
 
26
28
  def for *a, &b
27
29
  Account.new *a, &b
@@ -66,6 +68,7 @@
66
68
  fattr("uri_write"){ "#{ uri }/write" }
67
69
  fattr("uri_read"){ "#{ uri }/read" }
68
70
  fattr("uri_read_json"){ "#{ uri }/read/json" }
71
+ fattr("uri_delete"){ "#{ uri }/delete" }
69
72
 
70
73
  def initialize options = {}
71
74
  options.each{|k,v| send k, v}
@@ -83,6 +86,12 @@
83
86
  get uri, options.merge(account.options)
84
87
  end
85
88
 
89
+ def delete type, options = {}
90
+ json = options.delete('json') || options.delete(:json)
91
+ uri = uri_delete
92
+ post uri, options.merge(account.options)
93
+ end
94
+
86
95
  def authenticate options = {}
87
96
  post uri_write,
88
97
  options.merge(account.options).merge('action' => 'authenticate')
@@ -3,10 +3,10 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "tumblr"
6
- spec.version = "2.1.0"
6
+ spec.version = "2.2.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "tumblr"
9
- spec.description = "description: tumblr kicks the ass"
9
+ spec.description = "a command line utility and library which interfaces to the excellent tumblr blogging platform"
10
10
 
11
11
  spec.files = ["bin", "bin/tumblr", "lib", "lib/tumblr.rb", "Rakefile", "README", "tumblr.gemspec"]
12
12
  spec.executables = ["tumblr"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumblr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-05 00:00:00 -07:00
12
+ date: 2009-11-08 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: "description: tumblr kicks the ass"
16
+ description: a command line utility and library which interfaces to the excellent tumblr blogging platform
17
17
  email: ara.t.howard@gmail.com
18
18
  executables:
19
19
  - tumblr