Skip to content

Commit 69e9029

Browse files
committed
Remove identica support
1 parent d193a9d commit 69e9029

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

bin/share-linuxfr

-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ options = {
1515
config = YAML.load_file("share.yml")
1616
Daemons.daemonize options
1717
ShareLinuxFr.configure_twitter config['twitter']
18-
ShareLinuxFr.configure_identica config['identica']
1918
ShareLinuxFr.run config['base_url']

config/share.yml.example

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ twitter:
44
consumer_secret: "xxx"
55
access_token: "xxx"
66
access_token_secret: "xxx"
7-
identica:
8-
endpoint: "http://identi.ca/api/"
9-
username: "linuxfrorg"
10-
password: "xxx"

lib/share-linuxfr.rb

-19
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ def self.configure_twitter(options)
2626
end
2727
end
2828

29-
def self.configure_identica(options)
30-
@@identica = options
31-
@@identica['uri'] = URI.parse("#{@@identica['endpoint']}/statuses/update.xml")
32-
end
33-
3429
def initialize(base_url)
3530
@redis = Redis.new
3631
@base_url = base_url
@@ -42,7 +37,6 @@ def start
4237
msg = Yajl::Parser.parse(message)
4338
puts "Publish a new message: #{msg.inspect}"
4439
tweet msg
45-
dent msg
4640
end
4741
end
4842
rescue Errno::ECONNREFUSED => err
@@ -58,17 +52,4 @@ def tweet(news)
5852
puts "\tstatus = #{status.inspect}"
5953
end
6054

61-
def dent(news)
62-
title = news['title'].slice(0, 105)
63-
status = "#{title}#{'…' if title != news['title']} #{@base_url}#{news['id']}"
64-
http = Net::HTTP.new(@@identica['uri'].host, @@identica['uri'].port)
65-
req = Net::HTTP::Post.new(@@identica['uri'].path)
66-
req.set_form_data 'status' => status
67-
req.basic_auth @@identica['username'], @@identica['password']
68-
res = http.request req
69-
rescue => err
70-
puts "Error on identica: #{err}"
71-
puts "\tstatus = #{status.inspect}"
72-
end
73-
7455
end

0 commit comments

Comments
 (0)