automatic 12.4.0 → 12.6.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -21,6 +21,7 @@ Installation.
|
|
21
21
|
|
22
22
|
``` html
|
23
23
|
gem install automatic
|
24
|
+
automatic-config scaffold
|
24
25
|
```
|
25
26
|
|
26
27
|
Specify any recipe with -c option.
|
@@ -32,7 +33,7 @@ automatic -c <recipe>
|
|
32
33
|
Example.
|
33
34
|
|
34
35
|
``` html
|
35
|
-
$ automatic -c config/feed2console.yml
|
36
|
+
$ automatic -c ~/.automatic/config/example/feed2console.yml
|
36
37
|
```
|
37
38
|
|
38
39
|
|
@@ -45,9 +46,7 @@ of associated plug-ins.
|
|
45
46
|
|
46
47
|
This YAML file is called "Recipe".
|
47
48
|
|
48
|
-
|
49
|
-
the config/default.yml is called. You can use -c option for
|
50
|
-
specify a file name.
|
49
|
+
You can use -c option for specify a file name.
|
51
50
|
|
52
51
|
The Recipe has an implicit naming convention.
|
53
52
|
|
@@ -84,6 +83,10 @@ We need your help.
|
|
84
83
|
|
85
84
|
+ http://rubyforge.org/projects/automatic/
|
86
85
|
|
86
|
+
**RubyGems.org**
|
87
|
+
|
88
|
+
+ https://rubygems.org/gems/automatic
|
89
|
+
|
87
90
|
**CI**
|
88
91
|
|
89
92
|
+ http://jenkins.id774.net/jenkins/
|
@@ -102,7 +105,7 @@ Releases will be numbered with the follow format:
|
|
102
105
|
|
103
106
|
`<year>.<month>`
|
104
107
|
|
105
|
-
This naming convention is to mimic
|
108
|
+
This naming convention is to mimic Ubuntu.
|
106
109
|
|
107
110
|
|
108
111
|
Developers
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
12.
|
1
|
+
12.6.0
|
data/automatic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "automatic"
|
8
|
-
s.version = "12.
|
8
|
+
s.version = "12.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["id774"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-06-17"
|
13
13
|
s.description = "Ruby General Automation Framework"
|
14
14
|
s.email = "idnanashi@gmail.com"
|
15
15
|
s.executables = ["automatic", "automatic-config"]
|
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
|
|
24
24
|
"automatic.gemspec",
|
25
25
|
"bin/automatic",
|
26
26
|
"bin/automatic-config",
|
27
|
-
"config/default.yml",
|
28
27
|
"config/feed2console.yml",
|
28
|
+
"config/html2console.yml",
|
29
29
|
"db/.gitkeep",
|
30
30
|
"doc/AUTHORS",
|
31
31
|
"doc/COPYING",
|
@@ -42,52 +42,72 @@ Gem::Specification.new do |s|
|
|
42
42
|
"lib/automatic/pipeline.rb",
|
43
43
|
"lib/automatic/recipe.rb",
|
44
44
|
"plugins/custom_feed/svn_log.rb",
|
45
|
+
"plugins/extract/link.rb",
|
45
46
|
"plugins/filter/ignore.rb",
|
46
|
-
"plugins/filter/
|
47
|
+
"plugins/filter/image_link.rb",
|
48
|
+
"plugins/filter/image_source.rb",
|
47
49
|
"plugins/filter/reverse.rb",
|
48
50
|
"plugins/filter/tumblr_resize.rb",
|
49
51
|
"plugins/notify/ikachan.rb",
|
50
52
|
"plugins/publish/console.rb",
|
53
|
+
"plugins/publish/dump.rb",
|
51
54
|
"plugins/publish/google_calendar.rb",
|
52
55
|
"plugins/publish/hatena_bookmark.rb",
|
53
56
|
"plugins/publish/mail.rb",
|
54
57
|
"plugins/publish/smtp.rb",
|
58
|
+
"plugins/store/database.rb",
|
55
59
|
"plugins/store/full_text.rb",
|
60
|
+
"plugins/store/link.rb",
|
56
61
|
"plugins/store/permalink.rb",
|
57
|
-
"plugins/store/
|
62
|
+
"plugins/store/target.rb",
|
58
63
|
"plugins/store/target_link.rb",
|
59
64
|
"plugins/subscription/feed.rb",
|
65
|
+
"plugins/subscription/uri.rb",
|
60
66
|
"script/bootstrap",
|
61
67
|
"script/build",
|
68
|
+
"spec/fixtures/extractLink.html",
|
69
|
+
"spec/fixtures/filterImageLink.html",
|
70
|
+
"spec/fixtures/publishDump.html",
|
71
|
+
"spec/fixtures/sampleRecipe.yml",
|
72
|
+
"spec/fixtures/storeLink.html",
|
73
|
+
"spec/fixtures/storeLink2.html",
|
74
|
+
"spec/fixtures/storeTarget.html",
|
75
|
+
"spec/fixtures/storeTarget2.html",
|
62
76
|
"spec/lib/automatic/pipeline_spec.rb",
|
77
|
+
"spec/lib/automatic/recipe_spec.rb",
|
63
78
|
"spec/lib/automatic_spec.rb",
|
64
|
-
"spec/lib/pipeline_spec.rb",
|
65
79
|
"spec/plugins/custom_feed/svn_log_spec.rb",
|
80
|
+
"spec/plugins/extract/link_spec.rb",
|
66
81
|
"spec/plugins/filter/ignore_spec.rb",
|
67
|
-
"spec/plugins/filter/
|
82
|
+
"spec/plugins/filter/image_link_spec.rb",
|
83
|
+
"spec/plugins/filter/image_source_spec.rb",
|
68
84
|
"spec/plugins/filter/reverse_spec.rb",
|
69
85
|
"spec/plugins/filter/tumblr_resize_spec.rb",
|
70
86
|
"spec/plugins/notify/ikachan_spec.rb",
|
71
87
|
"spec/plugins/publish/console_spec.rb",
|
88
|
+
"spec/plugins/publish/dump_spec.rb",
|
72
89
|
"spec/plugins/publish/google_calendar_spec.rb",
|
73
90
|
"spec/plugins/publish/hatena_bookmark_spec.rb",
|
74
91
|
"spec/plugins/publish/mail_spec.rb",
|
75
92
|
"spec/plugins/publish/smtp_spec.rb",
|
76
93
|
"spec/plugins/store/full_text_spec.rb",
|
94
|
+
"spec/plugins/store/link_spec.rb",
|
77
95
|
"spec/plugins/store/permalink_spec.rb",
|
78
96
|
"spec/plugins/store/target_link_spec.rb",
|
97
|
+
"spec/plugins/store/target_spec.rb",
|
79
98
|
"spec/plugins/subscription/feed_spec.rb",
|
99
|
+
"spec/plugins/subscription/uri_spec.rb",
|
80
100
|
"spec/spec_helper.rb",
|
81
101
|
"spec/user_dir/plugins/store/mock.rb",
|
82
102
|
"test/fixtures/sampleOPML.xml",
|
83
103
|
"test/integration/test_activerecord.yml",
|
84
104
|
"test/integration/test_fulltext.yml",
|
105
|
+
"test/integration/test_get_image.yml",
|
85
106
|
"test/integration/test_googlealert.yml",
|
86
107
|
"test/integration/test_hatenabookmark.yml",
|
87
108
|
"test/integration/test_ignore.yml",
|
88
109
|
"test/integration/test_ignore2.yml",
|
89
110
|
"test/integration/test_image2local.yml",
|
90
|
-
"test/integration/test_mail.yml",
|
91
111
|
"test/integration/test_reverse.yml",
|
92
112
|
"test/integration/test_svnlog.yml",
|
93
113
|
"test/integration/test_tumblr2local.yml",
|
@@ -96,7 +116,7 @@ Gem::Specification.new do |s|
|
|
96
116
|
s.homepage = "http://github.com/id774/automaticruby"
|
97
117
|
s.licenses = ["GPL"]
|
98
118
|
s.require_paths = ["lib"]
|
99
|
-
s.rubygems_version = "1.8.
|
119
|
+
s.rubygems_version = "1.8.24"
|
100
120
|
s.summary = "Automatic Ruby"
|
101
121
|
|
102
122
|
if s.respond_to? :specification_version then
|
@@ -111,6 +131,7 @@ Gem::Specification.new do |s|
|
|
111
131
|
s.add_runtime_dependency(%q<gcalapi>, [">= 0"])
|
112
132
|
s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
|
113
133
|
s.add_runtime_dependency(%q<feedbag>, [">= 0"])
|
134
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
114
135
|
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
115
136
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
116
137
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
@@ -123,6 +144,7 @@ Gem::Specification.new do |s|
|
|
123
144
|
s.add_dependency(%q<gcalapi>, [">= 0"])
|
124
145
|
s.add_dependency(%q<xml-simple>, [">= 0"])
|
125
146
|
s.add_dependency(%q<feedbag>, [">= 0"])
|
147
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
126
148
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
127
149
|
s.add_dependency(%q<bundler>, [">= 0"])
|
128
150
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
@@ -136,6 +158,7 @@ Gem::Specification.new do |s|
|
|
136
158
|
s.add_dependency(%q<gcalapi>, [">= 0"])
|
137
159
|
s.add_dependency(%q<xml-simple>, [">= 0"])
|
138
160
|
s.add_dependency(%q<feedbag>, [">= 0"])
|
161
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
139
162
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
140
163
|
s.add_dependency(%q<bundler>, [">= 0"])
|
141
164
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
data/bin/automatic
CHANGED
@@ -20,7 +20,7 @@ parser = OptionParser.new { |parser|
|
|
20
20
|
parser.separator "options:"
|
21
21
|
parser.on('-c', '--config FILE', String,
|
22
22
|
"recipe YAML file"){|c| recipe_path = c}
|
23
|
-
parser.on('-h', '--help', "show this message") {
|
23
|
+
parser.on('-h', '--help', "show this message") {
|
24
24
|
puts parser
|
25
25
|
exit
|
26
26
|
}
|
@@ -35,9 +35,9 @@ rescue OptionParser::ParseError => err
|
|
35
35
|
exit 1
|
36
36
|
end
|
37
37
|
|
38
|
-
if recipe_path.to_s.empty?
|
38
|
+
if recipe_path.to_s.empty?
|
39
39
|
if ENV["AUTOMATIC_RUBY_ENV"] == "test"
|
40
|
-
recpie_path = File.join(root_dir, 'config/default.yml')
|
40
|
+
recpie_path = File.join(root_dir, 'config/default.yml')
|
41
41
|
else
|
42
42
|
puts parser
|
43
43
|
exit 0
|
data/bin/automatic-config
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
# -*- coding: utf-8 -*-
|
3
3
|
# Name:: Automatic::Ruby
|
4
4
|
# Author:: kzgs
|
5
|
+
# 774 <http://id774.net>
|
5
6
|
# Created:: Mar 11, 2012
|
6
|
-
# Updated::
|
7
|
+
# Updated:: Jun 17, 2012
|
7
8
|
# Copyright:: kzgs Copyright (c) 2012
|
8
9
|
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
|
9
10
|
|
@@ -13,6 +14,9 @@ $:.unshift root_dir + '/lib'
|
|
13
14
|
require 'automatic'
|
14
15
|
require 'rubygems'
|
15
16
|
require 'optparse'
|
17
|
+
require 'fileutils'
|
18
|
+
require 'feedbag'
|
19
|
+
require 'pp'
|
16
20
|
|
17
21
|
parser = OptionParser.new { |opt|
|
18
22
|
}
|
@@ -26,33 +30,36 @@ end
|
|
26
30
|
subparsers = {
|
27
31
|
'scaffold' => lambda { |argv|
|
28
32
|
Dir::entries(root_dir + '/plugins').sort.each { |path|
|
29
|
-
require 'fileutils'
|
30
33
|
dir = (File.expand_path('~/.automatic/plugins/' + path))
|
31
34
|
unless File.exist?(dir)
|
32
35
|
FileUtils.mkdir_p(dir)
|
33
36
|
puts "Create Directory #{dir}"
|
34
37
|
end
|
35
38
|
}
|
39
|
+
dir = (File.expand_path('~/.automatic/config'))
|
40
|
+
unless File.exist?(dir)
|
41
|
+
FileUtils.mkdir_p(dir)
|
42
|
+
FileUtils.cp_r(root_dir + '/config', dir + '/example')
|
43
|
+
puts "Create Directory #{dir}"
|
44
|
+
end
|
45
|
+
dir = (File.expand_path('~/.automatic/db'))
|
46
|
+
unless File.exist?(dir)
|
47
|
+
FileUtils.mkdir_p(dir)
|
48
|
+
puts "Create Directory #{dir}"
|
49
|
+
end
|
50
|
+
},
|
51
|
+
'unscaffold' => lambda { |argv|
|
52
|
+
dir = (File.expand_path('~/.automatic'))
|
53
|
+
if File.directory?(dir)
|
54
|
+
puts "Remove Directory #{dir}"
|
55
|
+
FileUtils.rm_r(dir)
|
56
|
+
end
|
36
57
|
},
|
37
58
|
'autodiscovery' => lambda { |argv|
|
38
|
-
require 'pp'
|
39
|
-
require 'feedbag'
|
40
59
|
url = argv.shift || abort_with_usage("autodiscovery", "<url>")
|
41
60
|
pp Feedbag.find(url)
|
42
61
|
},
|
43
|
-
'opmlparser' => lambda { |argv|
|
44
|
-
require 'automatic/opml'
|
45
|
-
path = argv.shift
|
46
|
-
if path.nil?
|
47
|
-
abort_with_usage("opmlparser", "<opml path>")
|
48
|
-
end
|
49
|
-
parser = Automatic::OPML::Parser.new(File.read(path))
|
50
|
-
parser.each_outline {|opml, o|
|
51
|
-
puts "#{o.xmlUrl}"
|
52
|
-
}
|
53
|
-
},
|
54
62
|
'feedparser' => lambda { |argv|
|
55
|
-
require 'pp'
|
56
63
|
require 'automatic/feed_parser'
|
57
64
|
url = argv.shift || abort_with_usage("feedparser", "<url>")
|
58
65
|
rss_results = Automatic::FeedParser.get_rss(url)
|
@@ -60,13 +67,23 @@ subparsers = {
|
|
60
67
|
},
|
61
68
|
'inspect' => lambda { |argv|
|
62
69
|
require 'automatic/feed_parser'
|
63
|
-
require 'feedbag'
|
64
70
|
url = argv.shift || abort_with_usage("inspect", "<url>")
|
65
71
|
feeds = Feedbag.find(url)
|
66
72
|
pp feeds
|
67
73
|
rss_results = Automatic::FeedParser.get_rss(feeds.pop)
|
68
74
|
pp rss_results
|
69
75
|
},
|
76
|
+
'opmlparser' => lambda { |argv|
|
77
|
+
require 'automatic/opml'
|
78
|
+
path = argv.shift
|
79
|
+
if path.nil?
|
80
|
+
abort_with_usage("opmlparser", "<opml path>")
|
81
|
+
end
|
82
|
+
parser = Automatic::OPML::Parser.new(File.read(path))
|
83
|
+
parser.each_outline {|opml, o|
|
84
|
+
puts "#{o.xmlUrl}"
|
85
|
+
}
|
86
|
+
},
|
70
87
|
'log' => lambda { |argv|
|
71
88
|
require 'automatic/log'
|
72
89
|
level = argv.shift || abort_with_usage("log", "<level> <message>")
|
data/config/feed2console.yml
CHANGED
data/doc/ChangeLog
CHANGED
@@ -1,12 +1,47 @@
|
|
1
|
+
=== 12.6.0 / 2012-06-18
|
2
|
+
|
3
|
+
* Added plug-ins.
|
4
|
+
|
5
|
+
* Subscription::URI
|
6
|
+
* Extract::Link
|
7
|
+
* Filter::Image
|
8
|
+
* Store::Link
|
9
|
+
* Store::Target
|
10
|
+
|
11
|
+
* Improvement automatic-config.
|
12
|
+
|
13
|
+
* Scaffold makes config and db directory.
|
14
|
+
* Unscaffold SubCommand added to automatic-config.
|
15
|
+
|
16
|
+
* Improvement search path.
|
17
|
+
|
18
|
+
* Search user_dir's config when order -c option with simple filename.
|
19
|
+
* If user's db directory exist, use it.
|
20
|
+
|
21
|
+
* Improvement log.
|
22
|
+
|
23
|
+
* Show recipe and db name on log.
|
24
|
+
|
25
|
+
* Refactoring.
|
26
|
+
|
27
|
+
* Refactoring plug-in names.
|
28
|
+
* Header fields.
|
29
|
+
|
30
|
+
* Add tests.
|
31
|
+
|
32
|
+
* RSpec code coverage over 99%.
|
33
|
+
* Add all option script/build.
|
34
|
+
|
35
|
+
|
1
36
|
=== 12.4.0 / 2012-04-30
|
2
37
|
|
3
38
|
* Inspect SubCommand added to automatic-config.
|
4
39
|
|
5
|
-
* Added
|
40
|
+
* Added plug-ins.
|
6
41
|
|
7
42
|
* Filter::Reverse
|
8
|
-
|
9
|
-
|
43
|
+
* Publish::SMTP
|
44
|
+
* Publish::Mail
|
10
45
|
|
11
46
|
* Running all Integration Tests with CI.
|
12
47
|
|