jordandobson-posterous 0.1.5 → 0.1.6

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.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.1.6 / 2009-06-11
2
+
3
+ * 1 fix
4
+
5
+ * Fixed issue where specifying site ID while only having one site cause has_site? to fail
6
+
1
7
  === 0.1.5 / 2009-06-03
2
8
 
3
9
  * 1 major enhancement
data/Rakefile CHANGED
@@ -6,7 +6,8 @@ require './lib/posterous.rb'
6
6
 
7
7
  Hoe.new('posterous', Posterous::VERSION) do |p|
8
8
  p.developer('Jordan Dobson', 'jordan.dobson@madebysquad.com')
9
- p.extra_deps = ['httparty', 'mocha']
9
+ p.extra_deps = ['httparty']
10
+ p.extra_dev_deps = ['mocha']
10
11
  end
11
12
 
12
- # vim: syntax=Ruby
13
+ # vim: syntax=Ruby
data/lib/posterous.rb CHANGED
@@ -3,7 +3,7 @@ require 'httparty'
3
3
 
4
4
  module Posterous
5
5
 
6
- VERSION = '0.1.5'
6
+ VERSION = '0.1.6'
7
7
 
8
8
  class AuthError < StandardError; end
9
9
  class TagError < StandardError; end
@@ -23,7 +23,7 @@ module Posterous
23
23
  POST_PATH = '/api/newpost'
24
24
  AUTH_PATH = '/api/getsites'
25
25
 
26
- include HTTParty
26
+ include HTTParty
27
27
  base_uri DOMAIN
28
28
 
29
29
  attr_accessor :title, :body, :source, :source_url, :date
@@ -59,7 +59,7 @@ module Posterous
59
59
  case res["site"]
60
60
  when Hash
61
61
  return true unless @site_id
62
- @site_id && @site_id == res["site"]["id"]
62
+ return @site_id == res["site"]["id"]
63
63
  when Array
64
64
  res["site"].each do |site|
65
65
  return true if @site_id && @site_id == site["id"]
@@ -179,6 +179,11 @@ class TestPosterous < Test::Unit::TestCase
179
179
  Posterous::Client.stubs(:post).returns(@resp_ok)
180
180
  assert_equal false, @new_obj_with_bad_id.has_site?
181
181
  end
182
+
183
+ def test_has_site_successful_that_site_id_matches_response
184
+ Posterous::Client.stubs(:post).returns(@resp_ok)
185
+ assert_equal true, @new_obj_with_id.has_site?
186
+ end
182
187
 
183
188
  def test_has_site_is_successful_on_multiple_when_specified
184
189
  Posterous::Client.stubs(:post).returns(@resp_ok_2_sites)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jordandobson-posterous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Dobson