preposterous 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 4
4
+ :patch: 5
5
5
  :build:
@@ -23,6 +23,7 @@ module Preposterous
23
23
 
24
24
  def self.raise_errors(response)
25
25
  response.body =~ /code="(\d+)" msg="(.*)"/
26
+
26
27
  code = $1.to_i
27
28
  # going to pass this to the exception at some point... maybe
28
29
  msg = $2
@@ -24,7 +24,6 @@ module Preposterous
24
24
  response["post"] if not response.nil?
25
25
  end
26
26
 
27
- # TODO: refactor this and the newpost method
28
27
  def updatepost(fields={}, *files)
29
28
  # create options hash
30
29
  options = generate_post_options(fields, *files)
@@ -36,16 +35,16 @@ module Preposterous
36
35
  # this is BROKEN
37
36
  # for some reason the XML will not parse
38
37
  # the CDATA fields are throwing off the parser
39
- def readposts(options={})
40
- response = perform_get("/api/readposts")
38
+ def readposts(fields={})
39
+ response = perform_get("/api/readposts", :fields => fields)
41
40
  response["post"] if not response.nil?
42
41
  end
43
42
 
44
43
  # for some reason posterous does not recognize the post_id
45
44
  # i think there maybe something wrong with their API
46
45
  # at least I hope it isn't me
47
- def newcomment(options={})
48
- response = perform_post("/api/newcomment")
46
+ def newcomment(fields={})
47
+ response = perform_post("/api/newcomment", :fields => fields)
49
48
  response["comment"] if not response.nil?
50
49
  end
51
50
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{preposterous}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ray Hernandez"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ray Hernandez