automatic 13.1.0 → 13.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/README.md +1 -1
  2. data/VERSION +1 -1
  3. data/assets/siteinfo/items_all.json +52139 -0
  4. data/automatic.gemspec +16 -5
  5. data/bin/automatic +2 -2
  6. data/bin/automatic-config +8 -2
  7. data/doc/ChangeLog +19 -0
  8. data/doc/PLUGINS +79 -18
  9. data/doc/PLUGINS.ja +79 -17
  10. data/doc/README +10 -15
  11. data/doc/README.ja +10 -15
  12. data/lib/automatic.rb +2 -2
  13. data/plugins/filter/full_feed.rb +76 -0
  14. data/plugins/filter/ignore.rb +4 -12
  15. data/plugins/filter/{reverse.rb → sort.rb} +12 -6
  16. data/plugins/publish/instapaper.rb +77 -0
  17. data/plugins/store/target_link.rb +6 -2
  18. data/plugins/subscription/feed.rb +6 -2
  19. data/plugins/subscription/google_reader_star.rb +63 -0
  20. data/plugins/subscription/link.rb +6 -2
  21. data/plugins/subscription/tumblr.rb +14 -10
  22. data/plugins/subscription/twitter.rb +6 -2
  23. data/spec/lib/automatic_spec.rb +2 -2
  24. data/spec/plugins/filter/full_feed_spec.rb +48 -0
  25. data/spec/plugins/filter/ignore_spec.rb +184 -15
  26. data/spec/plugins/filter/sort_spec.rb +189 -0
  27. data/spec/plugins/publish/instapaper_spec.rb +56 -0
  28. data/spec/plugins/store/target_link_spec.rb +17 -1
  29. data/spec/plugins/subscription/feed_spec.rb +28 -1
  30. data/spec/plugins/subscription/google_reader_star_spec.rb +45 -0
  31. data/spec/plugins/subscription/link_spec.rb +29 -2
  32. data/spec/plugins/subscription/tumblr_spec.rb +17 -2
  33. data/spec/plugins/subscription/twitter_spec.rb +29 -2
  34. data/test/integration/test_absoluteurl.yml +25 -0
  35. data/test/integration/test_fulltext.yml +7 -1
  36. data/test/integration/test_googlestar.yml +19 -0
  37. data/test/integration/test_image2local.yml +4 -1
  38. data/test/integration/{test_reverse.yml → test_instapaper.yml} +9 -2
  39. data/test/integration/test_link2local.yml +34 -0
  40. data/test/integration/test_sort.yml +36 -0
  41. data/test/integration/test_tumblr2local.yml +16 -4
  42. metadata +16 -5
  43. data/spec/plugins/filter/reverse_spec.rb +0 -54
@@ -2,7 +2,7 @@
2
2
  # Name:: Automatic::Plugin::Subscription::Tumblr
3
3
  # Author:: 774 <http://id774.net>
4
4
  # Created:: Oct 16, 2012
5
- # Updated:: Jan 8, 2013
5
+ # Updated:: Feb 8, 2013
6
6
  # Copyright:: 774 Copyright (c) 2012
7
7
  # License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
8
8
 
@@ -48,11 +48,26 @@ describe Automatic::Plugin::SubscriptionTumblr do
48
48
  { 'urls' => [
49
49
  "http://reblog.id774.net"],
50
50
  'pages' => 3,
51
- 'interval' => 5
51
+ 'interval' => 5,
52
+ 'retry' => 5
52
53
  }
53
54
  )
54
55
  }
55
56
 
56
57
  its(:run) { should have(3).item }
57
58
  end
59
+
60
+ context "with retry to URLs whose invalid URL" do
61
+ subject {
62
+ Automatic::Plugin::SubscriptionTumblr.new(
63
+ { 'urls' => ["invalid_url"],
64
+ 'pages' => 3,
65
+ 'interval' => 1,
66
+ 'retry' => 2
67
+ }
68
+ )
69
+ }
70
+
71
+ its(:run) { should be_empty }
72
+ end
58
73
  end
@@ -2,7 +2,7 @@
2
2
  # Name:: Automatic::Plugin::Subscription::Twitter
3
3
  # Author:: 774 <http://id774.net>
4
4
  # Created:: Sep 10, 2012
5
- # Updated:: Jan 8, 2013
5
+ # Updated:: Feb 8, 2013
6
6
  # Copyright:: 774 Copyright (c) 2012
7
7
  # License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
8
8
 
@@ -35,11 +35,38 @@ describe Automatic::Plugin::SubscriptionTwitter do
35
35
  Automatic::Plugin::SubscriptionTwitter.new(
36
36
  { 'urls' => [
37
37
  "http://id774.net/test/twitter/favorites.html"],
38
- 'interval' => 5
38
+ 'interval' => 1
39
39
  }
40
40
  )
41
41
  }
42
42
 
43
43
  its(:run) { should have(1).item }
44
44
  end
45
+
46
+ context "with retry to URLs whose valid URL" do
47
+ subject {
48
+ Automatic::Plugin::SubscriptionTwitter.new(
49
+ { 'urls' => [
50
+ "http://id774.net/test/twitter/favorites.html"],
51
+ 'interval' => 2,
52
+ 'retry' => 1
53
+ }
54
+ )
55
+ }
56
+
57
+ its(:run) { should have(1).item }
58
+ end
59
+
60
+ context "with retry to URLs whose invalid URL" do
61
+ subject {
62
+ Automatic::Plugin::SubscriptionTwitter.new(
63
+ { 'urls' => ["invalid_url"],
64
+ 'interval' => 1,
65
+ 'retry' => 2
66
+ }
67
+ )
68
+ }
69
+
70
+ its(:run) { should be_empty }
71
+ end
45
72
  end
@@ -0,0 +1,25 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionLink
10
+ config:
11
+ urls:
12
+ - http://alsscan.com/photos.html
13
+
14
+ - module: FilterImage
15
+
16
+ - module: FilterAbsoluteURI
17
+ config:
18
+ url: http://alsscan.com/
19
+
20
+ - module: StorePermalink
21
+ config:
22
+ db: test_absoluteuri.db
23
+
24
+ #- module: PublishConsole
25
+
@@ -16,7 +16,13 @@ plugins:
16
16
  link:
17
17
  - hoge
18
18
 
19
- #- module: PublishConsole
19
+ # - module: PublishConsole
20
+
21
+ - module: FilterFullFeed
22
+ config:
23
+ siteinfo: items_all.json
24
+
25
+ # - module: PublishConsole
20
26
 
21
27
  - module: StoreFullText
22
28
  config:
@@ -0,0 +1,19 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionGoogleReaderStar
10
+ config:
11
+ feeds:
12
+ - http://www.google.com/reader/public/atom/user%2F00482198897189159802%2Fstate%2Fcom.google%2Fstarred
13
+
14
+ - module: StorePermalink
15
+ config:
16
+ db: test_googlestar.db
17
+
18
+ #- module: PublishConsole
19
+
@@ -22,5 +22,8 @@ plugins:
22
22
  - module: StoreTargetLink
23
23
  config:
24
24
  path: /tmp
25
- interval: 2
25
+ retry: 2
26
+ interval: 4
27
+
28
+ #- module: PublishConsole
26
29
 
@@ -11,7 +11,14 @@ plugins:
11
11
  feeds:
12
12
  - http://blog.id774.net/post/feed/
13
13
 
14
- - module: FilterReverse
14
+ - module: StorePermalink
15
+ config:
16
+ db: test_instapaper.db
15
17
 
16
- #- module: PublishConsole
18
+ - module: PublishInstapaper
19
+ config:
20
+ email: your_email
21
+ password: your_pass
22
+ interval: 5
17
23
 
24
+ #- module: PublishConsole
@@ -0,0 +1,34 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionLink
10
+ config:
11
+ urls:
12
+ - http://reblog.id774.net
13
+
14
+ - module: SubscriptionLink
15
+ config:
16
+ urls:
17
+ - http://reblog.id774.net
18
+ interval: 1
19
+
20
+ - module: SubscriptionLink
21
+ config:
22
+ urls:
23
+ - http://reblog.id774.net
24
+ interval: 5
25
+ retry: 5
26
+
27
+ - module: FilterImage
28
+
29
+ - module: StorePermalink
30
+ config:
31
+ db: test_link.db
32
+
33
+ #- module: PublishConsole
34
+
@@ -0,0 +1,36 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: info
7
+
8
+ plugins:
9
+ - module: SubscriptionFeed
10
+ config:
11
+ feeds:
12
+ - http://blog.id774.net/post/feed/
13
+
14
+ - module: SubscriptionFeed
15
+ config:
16
+ feeds:
17
+ - http://blog.id774.net/post/feed/
18
+ interval: 1
19
+
20
+ - module: SubscriptionFeed
21
+ config:
22
+ feeds:
23
+ - http://blog.id774.net/post/feed/
24
+ interval: 5
25
+ retry: 5
26
+
27
+ - module: FilterSort
28
+ config:
29
+ sort: asc
30
+
31
+ - module: FilterSort
32
+ config:
33
+ sort: desc
34
+
35
+ #- module: PublishConsole
36
+
@@ -12,14 +12,26 @@ plugins:
12
12
  - http://reblog.id774.net
13
13
  pages: 2
14
14
 
15
+ - module: SubscriptionTumblr
16
+ config:
17
+ urls:
18
+ - http://reblog.id774.net
19
+ pages: 2
20
+ interval: 1
21
+
22
+ - module: SubscriptionTumblr
23
+ config:
24
+ urls:
25
+ - http://reblog.id774.net
26
+ pages: 1
27
+ interval: 5
28
+ retry: 5
29
+
15
30
  - module: FilterImage
16
31
 
17
32
  - module: StorePermalink
18
33
  config:
19
34
  db: test_tumblr.db
20
35
 
21
- - module: StoreTargetLink
22
- config:
23
- path: /tmp
24
- interval: 2
36
+ #- module: PublishConsole
25
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.0
4
+ version: 13.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -216,6 +216,7 @@ files:
216
216
  - README.md
217
217
  - Rakefile
218
218
  - VERSION
219
+ - assets/siteinfo/items_all.json
219
220
  - automatic.gemspec
220
221
  - bin/automatic
221
222
  - bin/automatic-config
@@ -237,15 +238,17 @@ files:
237
238
  - lib/automatic/recipe.rb
238
239
  - plugins/custom_feed/svn_log.rb
239
240
  - plugins/filter/absolute_uri.rb
241
+ - plugins/filter/full_feed.rb
240
242
  - plugins/filter/ignore.rb
241
243
  - plugins/filter/image.rb
242
244
  - plugins/filter/image_source.rb
243
- - plugins/filter/reverse.rb
245
+ - plugins/filter/sort.rb
244
246
  - plugins/filter/tumblr_resize.rb
245
247
  - plugins/notify/ikachan.rb
246
248
  - plugins/publish/console.rb
247
249
  - plugins/publish/google_calendar.rb
248
250
  - plugins/publish/hatena_bookmark.rb
251
+ - plugins/publish/instapaper.rb
249
252
  - plugins/publish/mail.rb
250
253
  - plugins/publish/smtp.rb
251
254
  - plugins/store/database.rb
@@ -253,6 +256,7 @@ files:
253
256
  - plugins/store/permalink.rb
254
257
  - plugins/store/target_link.rb
255
258
  - plugins/subscription/feed.rb
259
+ - plugins/subscription/google_reader_star.rb
256
260
  - plugins/subscription/link.rb
257
261
  - plugins/subscription/tumblr.rb
258
262
  - plugins/subscription/twitter.rb
@@ -264,35 +268,42 @@ files:
264
268
  - spec/lib/automatic_spec.rb
265
269
  - spec/plugins/custom_feed/svn_log_spec.rb
266
270
  - spec/plugins/filter/absolute_uri_spec.rb
271
+ - spec/plugins/filter/full_feed_spec.rb
267
272
  - spec/plugins/filter/ignore_spec.rb
268
273
  - spec/plugins/filter/image_source_spec.rb
269
274
  - spec/plugins/filter/image_spec.rb
270
- - spec/plugins/filter/reverse_spec.rb
275
+ - spec/plugins/filter/sort_spec.rb
271
276
  - spec/plugins/filter/tumblr_resize_spec.rb
272
277
  - spec/plugins/notify/ikachan_spec.rb
273
278
  - spec/plugins/publish/console_spec.rb
274
279
  - spec/plugins/publish/google_calendar_spec.rb
275
280
  - spec/plugins/publish/hatena_bookmark_spec.rb
281
+ - spec/plugins/publish/instapaper_spec.rb
276
282
  - spec/plugins/publish/mail_spec.rb
277
283
  - spec/plugins/publish/smtp_spec.rb
278
284
  - spec/plugins/store/full_text_spec.rb
279
285
  - spec/plugins/store/permalink_spec.rb
280
286
  - spec/plugins/store/target_link_spec.rb
281
287
  - spec/plugins/subscription/feed_spec.rb
288
+ - spec/plugins/subscription/google_reader_star_spec.rb
282
289
  - spec/plugins/subscription/link_spec.rb
283
290
  - spec/plugins/subscription/tumblr_spec.rb
284
291
  - spec/plugins/subscription/twitter_spec.rb
285
292
  - spec/spec_helper.rb
286
293
  - spec/user_dir/plugins/store/mock.rb
287
294
  - test/fixtures/sampleOPML.xml
295
+ - test/integration/test_absoluteurl.yml
288
296
  - test/integration/test_activerecord.yml
289
297
  - test/integration/test_fulltext.yml
290
298
  - test/integration/test_googlealert.yml
299
+ - test/integration/test_googlestar.yml
291
300
  - test/integration/test_hatenabookmark.yml
292
301
  - test/integration/test_ignore.yml
293
302
  - test/integration/test_ignore2.yml
294
303
  - test/integration/test_image2local.yml
295
- - test/integration/test_reverse.yml
304
+ - test/integration/test_instapaper.yml
305
+ - test/integration/test_link2local.yml
306
+ - test/integration/test_sort.yml
296
307
  - test/integration/test_svnlog.yml
297
308
  - test/integration/test_tumblr2local.yml
298
309
  - vendor/.gitkeep
@@ -1,54 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Name:: Automatic::Plugin::Filter::Reverse
3
- # Author:: 774 <http://id774.net>
4
- # Created:: Mar 23, 2012
5
- # Updated:: Mar 23, 2012
6
- # Copyright:: 774 Copyright (c) 2012
7
- # License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
8
-
9
- require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
10
-
11
- require 'filter/reverse'
12
-
13
- describe Automatic::Plugin::FilterReverse do
14
- context "it should be reverse sorted" do
15
- subject {
16
- Automatic::Plugin::FilterReverse.new({},
17
- AutomaticSpec.generate_pipeline {
18
- feed {
19
- item "http://aaa.png", "",
20
- "<img src=\"http://aaa.png\">",
21
- "Fri, 23 Mar 2012 00:10:00 +0000"
22
- item "http://bbb.png", "",
23
- "<img src=\"http://bbb.png\">",
24
- "Fri, 25 Mar 2012 01:05:00 +0000"
25
- item "http://ccc.png", "",
26
- "<img src=\"http://ccc.png\">",
27
- "Fri, 22 Mar 2012 00:15:00 +0000"
28
- item "http://ddd.png", "",
29
- "<img src=\"http://ddd.png\">",
30
- "Fri, 23 Mar 2012 00:00:08 +0000"
31
- item "http://eee.png", "",
32
- "<img src=\"http://eee.png\">",
33
- "Fri, 23 Nov 2012 00:09:00 +0000"
34
- }})}
35
-
36
- describe "#run" do
37
- its(:run) { should have(1).feeds }
38
-
39
- specify {
40
- subject.run
41
- subject.instance_variable_get(:@pipeline)[0].items[0].link.
42
- should == "http://ccc.png"
43
- subject.instance_variable_get(:@pipeline)[0].items[1].link.
44
- should == "http://ddd.png"
45
- subject.instance_variable_get(:@pipeline)[0].items[2].link.
46
- should == "http://aaa.png"
47
- subject.instance_variable_get(:@pipeline)[0].items[3].link.
48
- should == "http://bbb.png"
49
- subject.instance_variable_get(:@pipeline)[0].items[4].link.
50
- should == "http://eee.png"
51
- }
52
- end
53
- end
54
- end