Skip to content

Commit 3c4b6dc

Browse files
committed
203 Refactoring
1 parent f1ed0c7 commit 3c4b6dc

File tree

6 files changed

+14
-28
lines changed

6 files changed

+14
-28
lines changed

config/html2console.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

plugins/filter/absolute_uri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def rewrite(string)
1818
if /^http:\/\/.*$/ =~ string
1919
return string
2020
else
21-
return @config['url'] + string
21+
return @config['url'] + string
2222
end
2323
end
2424

plugins/store/database.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def create_table
6060
def db_dir
6161
dir = (File.expand_path('~/.automatic/db'))
6262
if File.directory?(dir)
63-
return dir
63+
dir
6464
else
65-
return File.join(File.dirname(__FILE__), '..', '..', 'db')
65+
File.join(File.dirname(__FILE__), '..', '..', 'db')
6666
end
6767
end
6868

plugins/store/full_text.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(config, pipeline=[])
2121
end
2222

2323
def column_definition
24-
return {
24+
{
2525
:title => :string,
2626
:link => :string,
2727
:description => :string,
@@ -31,15 +31,15 @@ def column_definition
3131
end
3232

3333
def unique_key
34-
return :link
34+
:link
3535
end
3636

3737
def model_class
38-
return Automatic::Plugin::Blog
38+
Automatic::Plugin::Blog
3939
end
4040

4141
def run
42-
return for_each_new_feed { |feed|
42+
for_each_new_feed { |feed|
4343
begin
4444
Blog.create(
4545
:title => feed.title,

plugins/store/permalink.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Updated:: Sep 18, 2012
77
# Copyright:: 774 Copyright (c) 2012
88
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
9+
910
require 'plugins/store/database'
1011

1112
module Automatic::Plugin
@@ -21,22 +22,22 @@ def initialize(config, pipeline=[])
2122
end
2223

2324
def column_definition
24-
return {
25+
{
2526
:url => :string,
2627
:created_at => :string
2728
}
2829
end
2930

3031
def unique_key
31-
return :url
32+
:url
3233
end
3334

3435
def model_class
35-
return Automatic::Plugin::Permalink
36+
Automatic::Plugin::Permalink
3637
end
3738

3839
def run
39-
return for_each_new_feed {|feed|
40+
for_each_new_feed {|feed|
4041
unless feed.link.nil?
4142
Permalink.create(
4243
:url => feed.link,

plugins/store/target_link.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
# Copyright:: 774 Copyright (c) 2012
88
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
99

10+
require 'open-uri'
11+
1012
module Automatic::Plugin
1113
class StoreTargetLink
12-
require 'open-uri'
1314

1415
def initialize(config, pipeline=[])
1516
@config = config

0 commit comments

Comments
 (0)