File tree 3 files changed +0
-24
lines changed
3 files changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,4 @@ options = {
15
15
config = YAML . load_file ( "share.yml" )
16
16
Daemons . daemonize options
17
17
ShareLinuxFr . configure_twitter config [ 'twitter' ]
18
- ShareLinuxFr . configure_identica config [ 'identica' ]
19
18
ShareLinuxFr . run config [ 'base_url' ]
Original file line number Diff line number Diff line change 4
4
consumer_secret: "xxx"
5
5
access_token: "xxx"
6
6
access_token_secret: "xxx"
7
- identica:
8
- endpoint: "http://identi.ca/api/"
9
- username: "linuxfrorg"
10
- password: "xxx"
Original file line number Diff line number Diff line change @@ -26,11 +26,6 @@ def self.configure_twitter(options)
26
26
end
27
27
end
28
28
29
- def self . configure_identica ( options )
30
- @@identica = options
31
- @@identica [ 'uri' ] = URI . parse ( "#{ @@identica [ 'endpoint' ] } /statuses/update.xml" )
32
- end
33
-
34
29
def initialize ( base_url )
35
30
@redis = Redis . new
36
31
@base_url = base_url
@@ -42,7 +37,6 @@ def start
42
37
msg = Yajl ::Parser . parse ( message )
43
38
puts "Publish a new message: #{ msg . inspect } "
44
39
tweet msg
45
- dent msg
46
40
end
47
41
end
48
42
rescue Errno ::ECONNREFUSED => err
@@ -58,17 +52,4 @@ def tweet(news)
58
52
puts "\t status = #{ status . inspect } "
59
53
end
60
54
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 "\t status = #{ status . inspect } "
72
- end
73
-
74
55
end
You can’t perform that action at this time.
0 commit comments