pinboard 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87cc2921a9f8b072ac29ce9be0629ebc368cca61
4
- data.tar.gz: 9bb8e0dc7769f13d49227efe154d5678178083de
3
+ metadata.gz: c2a6d08711c6876f6bdd956a05bc2fb1a6b5cf26
4
+ data.tar.gz: 825e67c3b384583775f37ea079094eff0f537c5a
5
5
  SHA512:
6
- metadata.gz: 1d2ff69a5c1f26f2721cb53f26bd67d4672112b205c7000dde9de8e400df1bae1245e747822cc703f3efcfa26c151fdbc94f33b5ce1847a99eeb8eec91cf8651
7
- data.tar.gz: e129eaa534e5cf5f6c4ad85f0888c1f38941914bd9564ceda05fdb1d987a757ff60ce514b8b91d220caf9c5ec5c3fff48386b45f619a2938745d187c4f683689
6
+ metadata.gz: 818560e95ef122daea35a48300980d767d98a3266fc9e7955ffbad72226084959739d1c91e5710021f4292ba6bf76031e7b7d1305fd15d6b63e1923090058270
7
+ data.tar.gz: cae21f19f48dda2edbb1414b65d11257751129d64e2b4fd4c8233aa2f2e50cda0cb8f6a6ba73b60c4770195c1dd017a11dafc169d52965776b3060cf5c58f209
@@ -1,4 +1,5 @@
1
1
  rvm:
2
2
  - 1.9.3
3
+ - 2.0.0
3
4
  - jruby
4
5
  - ruby-head
data/README.md CHANGED
@@ -50,10 +50,9 @@ Ruby Support & Continuous Integration
50
50
  I am using [travis-ci.org](http://travis-ci.org) for continuous
51
51
  integration and support of the following rubies in rvm:
52
52
 
53
- * 1.8.7
54
- * 1.9.2
53
+ * 1.9.3
54
+ * 2.0.0
55
55
  * jruby
56
- * ree
57
56
  * ruby-head
58
57
 
59
58
  [![Build Status](https://secure.travis-ci.org/ryw/pinboard.png)](http://travis-ci.org/ryw/pinboard)
@@ -169,7 +169,7 @@ module Pinboard
169
169
  #
170
170
  # @return [Array<Note>] list of notes
171
171
  def notes_list
172
- options = create_params(params)
172
+ options = create_params({})
173
173
  notes = self.class.get('/notes/list', options)['notes']['note']
174
174
  notes = [] if notes.nil?
175
175
  notes = [*notes]
@@ -1,5 +1,5 @@
1
1
  module Pinboard
2
- class Note < Struct.new(:id, :title, :created_at, :updated_at, :length)
2
+ class Note < Struct.new(:id, :title, :created_at, :updated_at, :length, :text)
3
3
  def initialize(attributes={})
4
4
  self.id = attributes[:id]
5
5
  self.title = attributes[:title]
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.add_runtime_dependency 'httparty', '= 0.11.0'
14
14
  s.name = 'pinboard'
15
- s.version = '0.1.0'
16
- s.date = '2013-04-28'
15
+ s.version = '0.1.1'
16
+ s.date = '2013-05-02'
17
17
  s.summary = "Ruby wrapper for the Pinboard API"
18
18
  s.description = "Ruby wrapper for the Pinboard API"
19
19
  s.authors = ["Ry Waker", "Jan-Erik Rediger"]
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <notes>
3
+ <note id="cf73bfc02e00edaa1e2b">
4
+ <title>Paul Graham on Hirin' The Ladies</title>
5
+ <hash>0bbca3cba9246bbbda2c</hash>
6
+ <created_at>2011-10-28 13:37:23</created_at>
7
+ <updated_at>2011-10-28 13:37:23</updated_at>
8
+ <length>890</length>
9
+ </note>
10
+ <note id="8e5d6964bb810e0050b0">
11
+ <title>StarCraft beta coming this week!</title>
12
+ <hash>0c9c30f60cadabd31415</hash>
13
+ <created_at>2010-02-11 03:46:56</created_at>
14
+ <updated_at>2010-02-11 03:47:47</updated_at>
15
+ <length>153</length>
16
+ </note>
17
+ </notes>
@@ -324,4 +324,19 @@ describe Pinboard::Client do
324
324
  end
325
325
  end
326
326
  end
327
+
328
+ describe "#notes_list" do
329
+ let(:client) { Pinboard::Client.new(auth_params) }
330
+ before do
331
+ stub_get("notes/list?").
332
+ to_return(:body => fixture("notes_list.xml"),
333
+ :headers => { 'content-type' => 'text/xml' })
334
+ end
335
+
336
+ it "returns a list of notes" do
337
+ notes = client.notes_list
338
+ notes.size.should == 2
339
+ notes.first.title.should == "Paul Graham on Hirin' The Ladies"
340
+ end
341
+ end
327
342
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ry Waker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-28 00:00:00.000000000 Z
12
+ date: 2013-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yard
@@ -196,6 +196,7 @@ files:
196
196
  - spec/fixtures/multiple_posts.xml
197
197
  - spec/fixtures/no_posts.xml
198
198
  - spec/fixtures/not_found.xml
199
+ - spec/fixtures/notes_list.xml
199
200
  - spec/fixtures/post_update.xml
200
201
  - spec/fixtures/single_post.xml
201
202
  - spec/helper.rb
@@ -235,6 +236,7 @@ test_files:
235
236
  - spec/fixtures/multiple_posts.xml
236
237
  - spec/fixtures/no_posts.xml
237
238
  - spec/fixtures/not_found.xml
239
+ - spec/fixtures/notes_list.xml
238
240
  - spec/fixtures/post_update.xml
239
241
  - spec/fixtures/single_post.xml
240
242
  - spec/helper.rb