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 +4 -4
- data/.travis.yml +1 -0
- data/README.md +2 -3
- data/lib/pinboard/client.rb +1 -1
- data/lib/pinboard/note.rb +1 -1
- data/pinboard.gemspec +2 -2
- data/spec/fixtures/notes_list.xml +17 -0
- data/spec/pinboard/client_spec.rb +15 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2a6d08711c6876f6bdd956a05bc2fb1a6b5cf26
|
4
|
+
data.tar.gz: 825e67c3b384583775f37ea079094eff0f537c5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 818560e95ef122daea35a48300980d767d98a3266fc9e7955ffbad72226084959739d1c91e5710021f4292ba6bf76031e7b7d1305fd15d6b63e1923090058270
|
7
|
+
data.tar.gz: cae21f19f48dda2edbb1414b65d11257751129d64e2b4fd4c8233aa2f2e50cda0cb8f6a6ba73b60c4770195c1dd017a11dafc169d52965776b3060cf5c58f209
|
data/.travis.yml
CHANGED
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.
|
54
|
-
*
|
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)
|
data/lib/pinboard/client.rb
CHANGED
@@ -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(
|
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]
|
data/lib/pinboard/note.rb
CHANGED
data/pinboard.gemspec
CHANGED
@@ -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.
|
16
|
-
s.date = '2013-
|
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.
|
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-
|
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
|