@@ -51,9 +51,9 @@ def root_dir
5151 def db_dir
5252 dir = ( File . expand_path ( '~/.automatic/db' ) )
5353 if File . directory? ( dir )
54- return dir
54+ dir
5555 else
56- return File . join ( root_dir , "db" )
56+ File . join ( root_dir , "db" )
5757 end
5858 end
5959 end
@@ -70,20 +70,6 @@ def feed(&block)
7070 generator . instance_eval ( &block )
7171 @pipeline << generator . feed
7272 end
73-
74- def html ( fixture )
75- obj = File . read ( File . join ( APP_ROOT , "spec" ,
76- "fixtures" , fixture ) )
77- @pipeline << obj
78- end
79-
80- def link ( fixture )
81- obj = File . read ( File . join ( APP_ROOT , "spec" ,
82- "fixtures" , fixture ) )
83- require 'extract/link'
84- @pipeline << obj
85- @pipeline . replace Automatic ::Plugin ::ExtractLink . new ( nil , @pipeline ) . run
86- end
8773 end
8874
8975 class StubFeedGenerator
@@ -94,16 +80,16 @@ def initialize
9480 def feed
9581 rss = RSS ::Rss . new ( [ ] )
9682 rss . instance_variable_set ( :@channel , @channel )
97- return rss
83+ rss
9884 end
9985
10086 def item ( url , title = "" , description = "" , date = "" )
101- itm = RSS ::Rss ::Channel ::Item . new
102- itm . link = url
103- itm . title = title unless title . blank?
104- itm . instance_variable_set ( :@description , description )
105- itm . pubDate = date unless date . blank?
106- @channel . items << itm
87+ item = RSS ::Rss ::Channel ::Item . new
88+ item . link = url
89+ item . title = title unless title . blank?
90+ item . instance_variable_set ( :@description , description )
91+ item . pubDate = date unless date . blank?
92+ @channel . items << item
10793 end
10894 end
10995end
0 commit comments