automatic 12.4.0 → 12.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -0
- data/README.md +8 -5
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/automatic.gemspec +32 -9
- data/bin/automatic +3 -3
- data/bin/automatic-config +34 -17
- data/config/feed2console.yml +1 -2
- data/config/html2console.yml +16 -0
- data/doc/ChangeLog +38 -3
- data/doc/PLUGINS +191 -14
- data/doc/PLUGINS.ja +187 -10
- data/doc/README +70 -42
- data/doc/README.ja +64 -58
- data/lib/automatic/opml.rb +2 -1
- data/lib/automatic/pipeline.rb +3 -3
- data/lib/automatic/recipe.rb +6 -1
- data/lib/automatic.rb +6 -6
- data/plugins/extract/link.rb +32 -0
- data/plugins/filter/ignore.rb +7 -16
- data/plugins/filter/image_link.rb +37 -0
- data/plugins/filter/{image.rb → image_source.rb} +6 -7
- data/plugins/filter/reverse.rb +3 -4
- data/plugins/filter/tumblr_resize.rb +3 -4
- data/plugins/notify/ikachan.rb +1 -2
- data/plugins/publish/console.rb +0 -1
- data/plugins/publish/dump.rb +24 -0
- data/plugins/publish/google_calendar.rb +0 -2
- data/plugins/publish/hatena_bookmark.rb +2 -3
- data/plugins/store/{store_database.rb → database.rb} +32 -7
- data/plugins/store/full_text.rb +5 -5
- data/plugins/store/link.rb +47 -0
- data/plugins/store/permalink.rb +7 -7
- data/plugins/store/target.rb +41 -0
- data/plugins/subscription/feed.rb +0 -1
- data/plugins/subscription/uri.rb +31 -0
- data/script/build +18 -4
- data/spec/fixtures/extractLink.html +14 -0
- data/spec/fixtures/filterImageLink.html +34 -0
- data/spec/fixtures/publishDump.html +14 -0
- data/{config/default.yml → spec/fixtures/sampleRecipe.yml} +8 -10
- data/spec/fixtures/storeLink.html +34 -0
- data/spec/fixtures/storeLink2.html +36 -0
- data/spec/fixtures/storeTarget.html +11 -0
- data/spec/fixtures/storeTarget2.html +11 -0
- data/spec/lib/automatic/pipeline_spec.rb +27 -14
- data/spec/lib/automatic/recipe_spec.rb +35 -0
- data/spec/lib/automatic_spec.rb +21 -14
- data/spec/plugins/extract/link_spec.rb +38 -0
- data/spec/plugins/filter/ignore_spec.rb +59 -3
- data/spec/plugins/filter/image_link_spec.rb +51 -0
- data/spec/plugins/filter/{image_spec.rb → image_source_spec.rb} +29 -9
- data/spec/plugins/filter/reverse_spec.rb +0 -1
- data/spec/plugins/filter/tumblr_resize_spec.rb +7 -0
- data/spec/plugins/publish/console_spec.rb +9 -2
- data/spec/plugins/publish/dump_spec.rb +32 -0
- data/spec/plugins/publish/google_calendar_spec.rb +2 -1
- data/spec/plugins/publish/hatena_bookmark_spec.rb +2 -1
- data/spec/plugins/publish/mail_spec.rb +9 -1
- data/spec/plugins/publish/smtp_spec.rb +9 -1
- data/spec/plugins/store/full_text_spec.rb +15 -5
- data/spec/plugins/store/link_spec.rb +47 -0
- data/spec/plugins/store/permalink_spec.rb +9 -2
- data/spec/plugins/store/target_link_spec.rb +17 -3
- data/spec/plugins/store/target_spec.rb +41 -0
- data/spec/plugins/subscription/feed_spec.rb +14 -4
- data/spec/plugins/subscription/uri_spec.rb +43 -0
- data/spec/spec_helper.rb +31 -8
- data/spec/user_dir/plugins/store/mock.rb +4 -0
- data/test/integration/test_activerecord.yml +1 -1
- data/test/integration/test_fulltext.yml +1 -1
- data/test/integration/test_get_image.yml +26 -0
- data/test/integration/test_hatenabookmark.yml +1 -1
- data/test/integration/test_ignore.yml +1 -1
- data/test/integration/test_ignore2.yml +1 -1
- data/test/integration/test_image2local.yml +1 -1
- data/test/integration/test_reverse.yml +1 -1
- data/test/integration/test_tumblr2local.yml +1 -1
- metadata +45 -9
- data/spec/lib/pipeline_spec.rb +0 -67
- data/test/integration/test_mail.yml +0 -21
@@ -1,14 +1,13 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
|
-
# Name:: Automatic::Plugin::Filter::
|
2
|
+
# Name:: Automatic::Plugin::Filter::ImageSource
|
4
3
|
# Author:: 774 <http://id774.net>
|
5
4
|
# Created:: Feb 28, 2012
|
6
|
-
# Updated::
|
5
|
+
# Updated:: Jun 13, 2012
|
7
6
|
# Copyright:: 774 Copyright (c) 2012
|
8
7
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
8
|
|
10
9
|
module Automatic::Plugin
|
11
|
-
class
|
10
|
+
class FilterImageSource
|
12
11
|
require 'net/http'
|
13
12
|
require 'kconv'
|
14
13
|
|
@@ -26,7 +25,7 @@ module Automatic::Plugin
|
|
26
25
|
end
|
27
26
|
|
28
27
|
def run
|
29
|
-
return_feeds = []
|
28
|
+
@return_feeds = []
|
30
29
|
@pipeline.each {|feeds|
|
31
30
|
img_url = ""
|
32
31
|
unless feeds.nil?
|
@@ -39,9 +38,9 @@ module Automatic::Plugin
|
|
39
38
|
end
|
40
39
|
}
|
41
40
|
end
|
42
|
-
return_feeds << feeds
|
41
|
+
@return_feeds << feeds
|
43
42
|
}
|
44
|
-
return_feeds
|
43
|
+
@return_feeds
|
45
44
|
end
|
46
45
|
end
|
47
46
|
end
|
data/plugins/filter/reverse.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
# Name:: Automatic::Plugin::Filter::Reverse
|
4
3
|
# Author:: 774 <http://id774.net>
|
@@ -17,17 +16,17 @@ module Automatic::Plugin
|
|
17
16
|
end
|
18
17
|
|
19
18
|
def run
|
20
|
-
return_feeds = []
|
19
|
+
@return_feeds = []
|
21
20
|
@pipeline.each { |feeds|
|
22
21
|
return_feed_items = []
|
23
22
|
unless feeds.nil?
|
24
23
|
feeds.items.sort!{|a,b|
|
25
24
|
a.date <=> b.date
|
26
25
|
}
|
27
|
-
return_feeds << feeds
|
26
|
+
@return_feeds << feeds
|
28
27
|
end
|
29
28
|
}
|
30
|
-
return_feeds
|
29
|
+
@return_feeds
|
31
30
|
end
|
32
31
|
end
|
33
32
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
# Name:: Automatic::Plugin::Filter::TumblrResize
|
4
3
|
# Author:: 774 <http://id774.net>
|
@@ -24,7 +23,7 @@ module Automatic::Plugin
|
|
24
23
|
end
|
25
24
|
|
26
25
|
def run
|
27
|
-
return_feeds = []
|
26
|
+
@return_feeds = []
|
28
27
|
@pipeline.each {|feeds|
|
29
28
|
img_url = ""
|
30
29
|
unless feeds.nil?
|
@@ -32,9 +31,9 @@ module Automatic::Plugin
|
|
32
31
|
feed.link = resize(feed.link) unless feed.link.nil?
|
33
32
|
}
|
34
33
|
end
|
35
|
-
return_feeds << feeds
|
34
|
+
@return_feeds << feeds
|
36
35
|
}
|
37
|
-
return_feeds
|
36
|
+
@return_feeds
|
38
37
|
end
|
39
38
|
end
|
40
39
|
end
|
data/plugins/notify/ikachan.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
|
4
3
|
require 'active_support/core_ext'
|
@@ -45,7 +44,7 @@ module Automatic::Plugin
|
|
45
44
|
end
|
46
45
|
|
47
46
|
private
|
48
|
-
|
47
|
+
|
49
48
|
def build_message(link, title)
|
50
49
|
message = ""
|
51
50
|
message += "#{title.to_s} - " unless title.blank?
|
data/plugins/publish/console.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Name:: Automatic::Plugin::Publish::Dump
|
3
|
+
# Author:: 774 <http://id774.net>
|
4
|
+
# Created:: Jun 13, 2012
|
5
|
+
# Updated:: Jun 13, 2012
|
6
|
+
# Copyright:: 774 Copyright (c) 2012
|
7
|
+
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
|
+
|
9
|
+
module Automatic::Plugin
|
10
|
+
class PublishDump
|
11
|
+
require 'pp'
|
12
|
+
|
13
|
+
def initialize(config, pipeline=[])
|
14
|
+
@config = config
|
15
|
+
@pipeline = pipeline
|
16
|
+
@output = STDOUT
|
17
|
+
end
|
18
|
+
|
19
|
+
def run
|
20
|
+
pp(@pipeline, out=@output)
|
21
|
+
@pipeline
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
# Name:: Automatic::Plugin::Publish::Googlecalendar
|
4
3
|
# Author:: 774 <http://id774.net>
|
@@ -47,7 +46,6 @@ module Automatic::Plugin
|
|
47
46
|
|
48
47
|
cal = GoogleCalendar::Calendar.new(GoogleCalendar::Service.new(
|
49
48
|
@user["username"], @user["password"]), @feed)
|
50
|
-
|
51
49
|
event = cal.create_event
|
52
50
|
event.title = text
|
53
51
|
event.st = Time.mktime(date.year, date.month, date.day)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
# Name:: Automatic::Plugin::Publish::HatenaBookmark
|
4
3
|
# Author:: 774 <http://id774.net>
|
@@ -29,10 +28,10 @@ module Automatic::Plugin
|
|
29
28
|
# Unique value
|
30
29
|
nonce = [Time.now.to_i.to_s].pack('m').gsub(/\n/, '')
|
31
30
|
now = Time.now.utc.iso8601
|
32
|
-
|
31
|
+
|
33
32
|
# Base64 encoding for SHA1 Digested strings
|
34
33
|
digest = [Digest::SHA1.digest(nonce + now + password)].pack("m").gsub(/\n/, '')
|
35
|
-
|
34
|
+
|
36
35
|
{'X-WSSE' => sprintf(
|
37
36
|
%Q<UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s">,
|
38
37
|
hatena_id, digest, nonce, now)
|
@@ -1,19 +1,37 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# Name:: Automatic::Plugin::Store::Database
|
3
3
|
# Author:: kzgs
|
4
|
+
# 774 <http://id774.net>
|
4
5
|
# Created:: Feb 27, 2012
|
5
|
-
# Updated::
|
6
|
+
# Updated:: Jun 17, 2012
|
6
7
|
# Copyright:: kzgs Copyright (c) 2012
|
7
8
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
9
|
|
9
10
|
require 'active_record'
|
10
11
|
|
11
12
|
module Automatic::Plugin
|
12
|
-
module
|
13
|
+
module Database
|
14
|
+
def for_each_new_link
|
15
|
+
prepare_database
|
16
|
+
existing_records = model_class.find(:all)
|
17
|
+
@return_html = []
|
18
|
+
@pipeline.each { |link|
|
19
|
+
unless link.nil?
|
20
|
+
new_link = false
|
21
|
+
unless existing_records.detect { |b| b.try(unique_key) == link }
|
22
|
+
yield(link)
|
23
|
+
new_link = true
|
24
|
+
end
|
25
|
+
@return_html << link if new_link
|
26
|
+
end
|
27
|
+
}
|
28
|
+
@return_html
|
29
|
+
end
|
30
|
+
|
13
31
|
def for_each_new_feed
|
14
32
|
prepare_database
|
15
33
|
existing_records = model_class.find(:all)
|
16
|
-
return_feeds = []
|
34
|
+
@return_feeds = []
|
17
35
|
@pipeline.each { |feeds|
|
18
36
|
unless feeds.nil?
|
19
37
|
new_feed = false
|
@@ -23,10 +41,10 @@ module Automatic::Plugin
|
|
23
41
|
new_feed = true
|
24
42
|
end
|
25
43
|
}
|
26
|
-
return_feeds << feeds if new_feed
|
44
|
+
@return_feeds << feeds if new_feed
|
27
45
|
end
|
28
46
|
}
|
29
|
-
return_feeds
|
47
|
+
@return_feeds
|
30
48
|
end
|
31
49
|
|
32
50
|
private
|
@@ -40,13 +58,20 @@ module Automatic::Plugin
|
|
40
58
|
end
|
41
59
|
|
42
60
|
def db_dir
|
43
|
-
|
61
|
+
dir = (File.expand_path('~/.automatic/db'))
|
62
|
+
if File.directory?(dir)
|
63
|
+
return dir
|
64
|
+
else
|
65
|
+
return File.join(File.dirname(__FILE__), '..', '..', 'db')
|
66
|
+
end
|
44
67
|
end
|
45
68
|
|
46
69
|
def prepare_database
|
70
|
+
db = File.join(db_dir, @config['db'])
|
71
|
+
Automatic::Log.puts("info", "Database: #{db}")
|
47
72
|
ActiveRecord::Base.establish_connection(
|
48
73
|
:adapter => "sqlite3",
|
49
|
-
:database =>
|
74
|
+
:database => db)
|
50
75
|
create_table unless model_class.table_exists?
|
51
76
|
end
|
52
77
|
end
|
data/plugins/store/full_text.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# -*- coding: utf-8 -*-
|
3
2
|
# Name:: Automatic::Plugin::Store::FullText
|
4
3
|
# Author:: 774 <http://id774.net>
|
5
4
|
# Created:: Feb 26, 2012
|
6
|
-
# Updated::
|
5
|
+
# Updated:: Jun 14, 2012
|
7
6
|
# Copyright:: 774 Copyright (c) 2012
|
8
7
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
|
-
|
8
|
+
|
9
|
+
require 'plugins/store/database'
|
10
10
|
|
11
11
|
module Automatic::Plugin
|
12
12
|
class Blog < ActiveRecord::Base
|
13
13
|
end
|
14
14
|
|
15
15
|
class StoreFullText
|
16
|
-
include Automatic::Plugin::
|
17
|
-
|
16
|
+
include Automatic::Plugin::Database
|
17
|
+
|
18
18
|
def initialize(config, pipeline=[])
|
19
19
|
@config = config
|
20
20
|
@pipeline = pipeline
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Name:: Automatic::Plugin::Store::Link
|
3
|
+
# Author:: 774 <http://id774.net>
|
4
|
+
# Created:: May 24, 2012
|
5
|
+
# Updated:: Jun 14, 2012
|
6
|
+
# Copyright:: 774 Copyright (c) 2012
|
7
|
+
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
|
+
|
9
|
+
require 'plugins/store/database'
|
10
|
+
|
11
|
+
module Automatic::Plugin
|
12
|
+
class Link < ActiveRecord::Base
|
13
|
+
end
|
14
|
+
|
15
|
+
class StoreLink
|
16
|
+
include Automatic::Plugin::Database
|
17
|
+
|
18
|
+
def initialize(config, pipeline=[])
|
19
|
+
@config = config
|
20
|
+
@pipeline = pipeline
|
21
|
+
end
|
22
|
+
|
23
|
+
def column_definition
|
24
|
+
return {
|
25
|
+
:url => :string,
|
26
|
+
:created_at => :string
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def unique_key
|
31
|
+
return :url
|
32
|
+
end
|
33
|
+
|
34
|
+
def model_class
|
35
|
+
return Automatic::Plugin::Link
|
36
|
+
end
|
37
|
+
|
38
|
+
def run
|
39
|
+
return for_each_new_link { |link|
|
40
|
+
Link.create(
|
41
|
+
:url => link,
|
42
|
+
:created_at => Time.now.strftime("%Y/%m/%d %X"))
|
43
|
+
Automatic::Log.puts("info", "Saving: #{link}")
|
44
|
+
}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/plugins/store/permalink.rb
CHANGED
@@ -3,17 +3,17 @@
|
|
3
3
|
# Name:: Automatic::Plugin::Store::Permalink
|
4
4
|
# Author:: 774 <http://id774.net>
|
5
5
|
# Created:: Feb 22, 2012
|
6
|
-
# Updated::
|
6
|
+
# Updated:: Jun 14, 2012
|
7
7
|
# Copyright:: 774 Copyright (c) 2012
|
8
8
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
|
-
require 'plugins/store/
|
9
|
+
require 'plugins/store/database'
|
10
10
|
|
11
|
-
module Automatic::Plugin
|
11
|
+
module Automatic::Plugin
|
12
12
|
class Permalink < ActiveRecord::Base
|
13
13
|
end
|
14
14
|
|
15
15
|
class StorePermalink
|
16
|
-
include Automatic::Plugin::
|
16
|
+
include Automatic::Plugin::Database
|
17
17
|
|
18
18
|
def initialize(config, pipeline=[])
|
19
19
|
@config = config
|
@@ -24,9 +24,9 @@ module Automatic::Plugin
|
|
24
24
|
return {
|
25
25
|
:url => :string,
|
26
26
|
:created_at => :string
|
27
|
-
}
|
27
|
+
}
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def unique_key
|
31
31
|
return :url
|
32
32
|
end
|
@@ -34,7 +34,7 @@ module Automatic::Plugin
|
|
34
34
|
def model_class
|
35
35
|
return Automatic::Plugin::Permalink
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
def run
|
39
39
|
return for_each_new_feed { |feed|
|
40
40
|
Permalink.create(
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
# Name:: Automatic::Plugin::Store::Target
|
4
|
+
# Author:: 774 <http://id774.net>
|
5
|
+
# Created:: May 24, 2012
|
6
|
+
# Updated:: May 28, 2012
|
7
|
+
# Copyright:: 774 Copyright (c) 2012
|
8
|
+
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
|
+
|
10
|
+
module Automatic::Plugin
|
11
|
+
class StoreTarget
|
12
|
+
def initialize(config, pipeline=[])
|
13
|
+
@config = config
|
14
|
+
@pipeline = pipeline
|
15
|
+
end
|
16
|
+
|
17
|
+
def wget(url)
|
18
|
+
filename = url.split(/\//).last
|
19
|
+
open(url) { |source|
|
20
|
+
open(File.join(@config['path'], filename), "w+b") { |o|
|
21
|
+
o.print source.read
|
22
|
+
}
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def run
|
27
|
+
@pipeline.each {|html|
|
28
|
+
begin
|
29
|
+
unless html.nil?
|
30
|
+
Automatic::Log.puts("info", "Get: #{html}")
|
31
|
+
wget(html)
|
32
|
+
end
|
33
|
+
rescue
|
34
|
+
Automatic::Log.puts("error", "Error found during file download.")
|
35
|
+
end
|
36
|
+
sleep @config['interval'].to_i
|
37
|
+
}
|
38
|
+
@pipeline
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Name:: Automatic::Plugin::Subscription::URI
|
3
|
+
# Author:: 774 <http://id774.net>
|
4
|
+
# Created:: May 24, 2012
|
5
|
+
# Updated:: Jun 13, 2012
|
6
|
+
# Copyright:: 774 Copyright (c) 2012
|
7
|
+
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
8
|
+
|
9
|
+
module Automatic::Plugin
|
10
|
+
class SubscriptionURI
|
11
|
+
require 'open-uri'
|
12
|
+
|
13
|
+
def initialize(config, pipeline=[])
|
14
|
+
@config = config
|
15
|
+
@pipeline = pipeline
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
@config['urls'].each {|url|
|
20
|
+
begin
|
21
|
+
Automatic::Log.puts("info", "Parsing: #{url}")
|
22
|
+
doc = open(url).read
|
23
|
+
@pipeline << doc
|
24
|
+
rescue
|
25
|
+
Automatic::Log.puts("error", "Fault in parsing: #{url}")
|
26
|
+
end
|
27
|
+
}
|
28
|
+
return @pipeline
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/script/build
CHANGED
@@ -2,9 +2,14 @@
|
|
2
2
|
#
|
3
3
|
########################################################################
|
4
4
|
# Integration Build Script
|
5
|
+
# $1 = all (Run integration tests)
|
5
6
|
#
|
6
7
|
# Maintainer: id774 <idnanashi@gmail.com>
|
7
8
|
#
|
9
|
+
# v1.2 6/16,2012
|
10
|
+
# Add all option for integration tests.
|
11
|
+
# v1.1 6/14,2012
|
12
|
+
# Correspond to unscaffold subcommand.
|
8
13
|
# v1.0 3/16,2012
|
9
14
|
# First.
|
10
15
|
########################################################################
|
@@ -44,20 +49,29 @@ test_config() {
|
|
44
49
|
$RACK_ROOT/bin/automatic-config $*
|
45
50
|
}
|
46
51
|
|
47
|
-
|
52
|
+
test_scaffold() {
|
48
53
|
test_config scaffold
|
54
|
+
test_config unscaffold
|
55
|
+
}
|
56
|
+
|
57
|
+
added_tests() {
|
58
|
+
test -f $HOME/.automatic || test_scaffold
|
49
59
|
test_config autodiscovery http://blog.id774.net/blogs/
|
50
60
|
test_config opmlparser "$RACK_ROOT/test/fixtures/sampleOPML.xml"
|
51
61
|
test_config feedparser http://blog.id774.net/blogs/feed/ > /dev/null
|
52
62
|
test_config log info finished.
|
53
63
|
}
|
54
64
|
|
65
|
+
integration() {
|
66
|
+
load_tests
|
67
|
+
added_tests
|
68
|
+
}
|
69
|
+
|
55
70
|
main() {
|
56
71
|
kickstart
|
57
72
|
exec_rspec
|
58
|
-
|
59
|
-
added_tests
|
73
|
+
test -n "$1" && integration
|
60
74
|
}
|
61
75
|
|
62
76
|
set -ex
|
63
|
-
main
|
77
|
+
main $*
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://id774.net">id774.net</a>
|
9
|
+
<a href="http://reblog.id774.net">reblog.id774.net</a>
|
10
|
+
<a href="http://oh-news.net/live/wp-content/uploads/2011/04/Eila_omote.jpg">
|
11
|
+
<img src="http://24.media.tumblr.com/tumblr_m5gneyJmsH1qza5ppo1_500.jpg" alt="" /></a>
|
12
|
+
<a href="http://blog.id774.net/post/">blog.id774.net</a>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://id774.net">id774.net</a>
|
9
|
+
<a href="http://reblog.id774.net">reblog.id774.net</a>
|
10
|
+
<a href="http://link_1.jpg">
|
11
|
+
<img src="http://imgsrc_1.jpg" alt="" /></a>
|
12
|
+
<a href="http://link_2.jpg">
|
13
|
+
<img src="http://imgsrc_2.jpg" alt="" /></a>
|
14
|
+
<a href="http://link_3.JPG">
|
15
|
+
<img src="http://imgsrc_3.JPG" alt="" /></a>
|
16
|
+
<a href="http://link_4.png">
|
17
|
+
<img src="http://imgsrc_4.png" alt="" /></a>
|
18
|
+
<a href="http://link_5.jpeg">
|
19
|
+
<img src="http://imgsrc_5.jpeg" alt="" /></a>
|
20
|
+
<a href="http://link_6.PNG">
|
21
|
+
<img src="http://imgsrc_6.PNG" alt="" /></a>
|
22
|
+
<a href="http://link_7.jpega">
|
23
|
+
<img src="http://imgsrc_7.jpega" alt="" /></a>
|
24
|
+
<a href="http://link_8.gif">
|
25
|
+
<img src="http://imgsrc_8.gif" alt="" /></a>
|
26
|
+
<a href="http://link_9.GIF">
|
27
|
+
<img src="http://imgsrc_9.GIF" alt="" /></a>
|
28
|
+
<a href="http://link_10.tiff">
|
29
|
+
<img src="http://imgsrc_10.tiff" alt="" /></a>
|
30
|
+
<a href="http://link_11.TIFF">
|
31
|
+
<img src="http://imgsrc_11.TIFF" alt="" /></a>
|
32
|
+
<a href="http://blog.id774.net/post/">blog.id774.net</a>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://id774.net">id774.net</a>
|
9
|
+
<a href="http://reblog.id774.net">reblog.id774.net</a>
|
10
|
+
<a href="http://oh-news.net/live/wp-content/uploads/2011/04/Eila_omote.jpg">
|
11
|
+
<img src="http://24.media.tumblr.com/tumblr_m5gneyJmsH1qza5ppo1_500.jpg" alt="" /></a>
|
12
|
+
<a href="http://blog.id774.net/post/">blog.id774.net</a>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -9,18 +9,16 @@ plugins:
|
|
9
9
|
- module: SubscriptionFeed
|
10
10
|
config:
|
11
11
|
feeds:
|
12
|
-
- http://
|
12
|
+
- http://blog.id774.net/post/feed/
|
13
13
|
|
14
|
-
- module:
|
14
|
+
- module: FilterIgnore
|
15
15
|
config:
|
16
|
-
|
17
|
-
|
18
|
-
- module: FilterImage
|
19
|
-
|
20
|
-
- module: FilterTumblrResize
|
16
|
+
link:
|
17
|
+
- hoge
|
21
18
|
|
22
|
-
- module:
|
19
|
+
- module: StorePermalink
|
23
20
|
config:
|
24
|
-
|
25
|
-
|
21
|
+
db: test_permalink.db
|
22
|
+
|
23
|
+
#- module: PublishConsole
|
26
24
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://id774.net">id774.net</a>
|
9
|
+
<a href="http://reblog.id774.net">reblog.id774.net</a>
|
10
|
+
<a href="http://link_1.jpg">
|
11
|
+
<img src="http://imgsrc_1.jpg" alt="" /></a>
|
12
|
+
<a href="http://link_2.jpg">
|
13
|
+
<img src="http://imgsrc_2.jpg" alt="" /></a>
|
14
|
+
<a href="http://link_3.JPG">
|
15
|
+
<img src="http://imgsrc_3.JPG" alt="" /></a>
|
16
|
+
<a href="http://link_4.png">
|
17
|
+
<img src="http://imgsrc_4.png" alt="" /></a>
|
18
|
+
<a href="http://link_5.jpeg">
|
19
|
+
<img src="http://imgsrc_5.jpeg" alt="" /></a>
|
20
|
+
<a href="http://link_6.PNG">
|
21
|
+
<img src="http://imgsrc_6.PNG" alt="" /></a>
|
22
|
+
<a href="http://link_7.jpega">
|
23
|
+
<img src="http://imgsrc_7.jpega" alt="" /></a>
|
24
|
+
<a href="http://link_8.gif">
|
25
|
+
<img src="http://imgsrc_8.gif" alt="" /></a>
|
26
|
+
<a href="http://link_9.GIF">
|
27
|
+
<img src="http://imgsrc_9.GIF" alt="" /></a>
|
28
|
+
<a href="http://link_10.tiff">
|
29
|
+
<img src="http://imgsrc_10.tiff" alt="" /></a>
|
30
|
+
<a href="http://link_11.TIFF">
|
31
|
+
<img src="http://imgsrc_11.TIFF" alt="" /></a>
|
32
|
+
<a href="http://blog.id774.net/post/">blog.id774.net</a>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://id774.net">id774.net</a>
|
9
|
+
<a href="http://reblog.id774.net">reblog.id774.net</a>
|
10
|
+
<a href="http://link_1.jpg">
|
11
|
+
<img src="http://imgsrc_1.jpg" alt="" /></a>
|
12
|
+
<a href="http://link_2.jpg">
|
13
|
+
<img src="http://imgsrc_2.jpg" alt="" /></a>
|
14
|
+
<a href="http://link_3.JPG">
|
15
|
+
<img src="http://imgsrc_3.JPG" alt="" /></a>
|
16
|
+
<a href="http://link_4.png">
|
17
|
+
<img src="http://imgsrc_4.png" alt="" /></a>
|
18
|
+
<a href="http://link_5.jpeg">
|
19
|
+
<img src="http://imgsrc_5.jpeg" alt="" /></a>
|
20
|
+
<a href="http://link_6.PNG">
|
21
|
+
<img src="http://imgsrc_6.PNG" alt="" /></a>
|
22
|
+
<a href="http://link_7.jpega">
|
23
|
+
<img src="http://imgsrc_7.jpega" alt="" /></a>
|
24
|
+
<a href="http://link_8.gif">
|
25
|
+
<img src="http://imgsrc_8.gif" alt="" /></a>
|
26
|
+
<a href="http://link_9.GIF">
|
27
|
+
<img src="http://imgsrc_9.GIF" alt="" /></a>
|
28
|
+
<a href="http://link_10.tiff">
|
29
|
+
<img src="http://imgsrc_10.tiff" alt="" /></a>
|
30
|
+
<a href="http://link_11.TIFF">
|
31
|
+
<img src="http://imgsrc_11.TIFF" alt="" /></a>
|
32
|
+
<a href="http://link_12.jpg">
|
33
|
+
<img src="http://imgsrc_12.jpg" alt="" /></a>
|
34
|
+
<a href="http://blog.id774.net/post/">blog.id774.net</a>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="ja">
|
3
|
+
<head>
|
4
|
+
<title>Sample</title>
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<p>A simple <b>test</b> string.</p>
|
8
|
+
<a href="http://oh-news.net/live/wp-content/uploads/2011/04/Eila_omote.jpg">
|
9
|
+
<img src="http://24.media.tumblr.com/tumblr_m5gneyJmsH1qza5ppo1_500.jpg" alt="" /></a>
|
10
|
+
</body>
|
11
|
+
</html>
|