blogpost 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blogpost/hatenadiary.rb +3 -1
- data/lib/blogpost/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c09845730d15328d3813fd3c97a364df560210ab
|
4
|
+
data.tar.gz: c6b4b3e252218b68c4697eaa57ebedfc59ae7bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5d6f99792dba9addc9719ce08c837b7cfd4d0df938d440a853d022e041c6dfa742a6fb1ce9eb28d334ad56d3b7b1434e3ffe46bde1f919faf4f04cc006a513e
|
7
|
+
data.tar.gz: 58e9e4f2db87d6e0d7eb7596ba3e6f8e138d52efbb75b572b0d867cf6904680d4034455c45051fa38226a7604c01c3b7c64485c4f6d6ca8e7b84cc2f757917e5
|
data/lib/blogpost/hatenadiary.rb
CHANGED
@@ -5,7 +5,9 @@ module Blogpost
|
|
5
5
|
auth = Atompub::Auth::Wsse.new(username: opts[:user],password: opts[:pass])
|
6
6
|
client = Atompub::Client.new(auth: auth)
|
7
7
|
entry = Atom::Entry.new(title: opts[:title].encode('BINARY', 'BINARY'),content: opts[:content].encode('BINARY', 'BINARY'))
|
8
|
-
client.
|
8
|
+
service = client.get_service "http://d.hatena.ne.jp/#{opts[:user]}/atom" #"http://d.hatena.ne.jp/%s/atom" % @user
|
9
|
+
collection_uri = service.workspace.collections[1].href
|
10
|
+
client.create_entry(collection_uri, entry)
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
data/lib/blogpost/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blogpost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shoprev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atomutil
|