automatic 13.5.0 → 13.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/Gemfile +11 -5
  2. data/README.md +4 -6
  3. data/VERSION +1 -1
  4. data/automatic.gemspec +61 -18
  5. data/doc/ChangeLog +25 -0
  6. data/doc/PLUGINS +202 -12
  7. data/doc/PLUGINS.ja +221 -30
  8. data/doc/README +1 -1
  9. data/doc/README.ja +1 -1
  10. data/lib/automatic.rb +3 -3
  11. data/lib/automatic/feed_parser.rb +2 -2
  12. data/lib/automatic/log.rb +12 -2
  13. data/lib/automatic/pipeline.rb +1 -1
  14. data/lib/automatic/recipe.rb +5 -2
  15. data/plugins/custom_feed/svn_log.rb +3 -3
  16. data/plugins/filter/absolute_uri.rb +8 -4
  17. data/plugins/filter/accept.rb +61 -0
  18. data/plugins/filter/full_feed.rb +4 -5
  19. data/plugins/filter/github_feed.rb +36 -0
  20. data/plugins/filter/ignore.rb +1 -1
  21. data/plugins/filter/image.rb +1 -1
  22. data/plugins/filter/image_source.rb +34 -10
  23. data/plugins/filter/one.rb +1 -1
  24. data/plugins/filter/rand.rb +1 -1
  25. data/plugins/filter/sanitize.rb +50 -0
  26. data/plugins/filter/sort.rb +1 -1
  27. data/plugins/filter/tumblr_resize.rb +1 -1
  28. data/plugins/publish/console.rb +3 -3
  29. data/plugins/publish/console_link.rb +30 -0
  30. data/plugins/publish/eject.rb +42 -0
  31. data/plugins/publish/fluentd.rb +42 -0
  32. data/plugins/publish/google_calendar.rb +3 -3
  33. data/plugins/publish/hatena_bookmark.rb +1 -1
  34. data/plugins/publish/hipchat.rb +45 -0
  35. data/plugins/publish/instapaper.rb +2 -1
  36. data/plugins/publish/memcached.rb +44 -0
  37. data/plugins/publish/pocket.rb +1 -1
  38. data/plugins/publish/twitter.rb +1 -1
  39. data/plugins/store/database.rb +3 -3
  40. data/plugins/store/full_text.rb +2 -2
  41. data/plugins/store/permalink.rb +1 -1
  42. data/plugins/store/target_link.rb +3 -2
  43. data/plugins/subscription/chan_toru.rb +56 -0
  44. data/plugins/subscription/feed.rb +1 -1
  45. data/plugins/subscription/g_guide.rb +48 -0
  46. data/plugins/subscription/google_reader_star.rb +3 -3
  47. data/plugins/subscription/link.rb +2 -2
  48. data/plugins/subscription/pocket.rb +49 -0
  49. data/plugins/subscription/text.rb +3 -12
  50. data/plugins/subscription/tumblr.rb +7 -1
  51. data/plugins/subscription/twitter.rb +1 -1
  52. data/plugins/subscription/twitter_search.rb +50 -0
  53. data/plugins/subscription/weather.rb +7 -41
  54. data/script/build +3 -0
  55. data/spec/fixtures/sampleRecipe.yml +1 -1
  56. data/spec/lib/automatic/log_spec.rb +31 -0
  57. data/spec/lib/automatic/pipeline_spec.rb +1 -1
  58. data/spec/lib/automatic/recipe_spec.rb +1 -1
  59. data/spec/lib/automatic_spec.rb +3 -3
  60. data/spec/plugins/custom_feed/svn_log_spec.rb +1 -1
  61. data/spec/plugins/filter/absolute_uri_spec.rb +1 -1
  62. data/spec/plugins/filter/accept_spec.rb +331 -0
  63. data/spec/plugins/filter/full_feed_spec.rb +4 -6
  64. data/spec/plugins/filter/github_feed_spec.rb +54 -0
  65. data/spec/plugins/filter/ignore_spec.rb +1 -1
  66. data/spec/plugins/filter/image_source_spec.rb +17 -3
  67. data/spec/plugins/filter/image_spec.rb +1 -1
  68. data/spec/plugins/filter/one_spec.rb +1 -1
  69. data/spec/plugins/filter/rand_spec.rb +1 -1
  70. data/spec/plugins/filter/sanitize_spec.rb +153 -0
  71. data/spec/plugins/filter/sort_spec.rb +1 -1
  72. data/spec/plugins/filter/tumblr_resize_spec.rb +1 -1
  73. data/spec/plugins/notify/ikachan_spec.rb +1 -1
  74. data/spec/plugins/publish/console_spec.rb +1 -1
  75. data/spec/plugins/publish/eject_spec.rb +40 -0
  76. data/spec/plugins/publish/fluentd_spec.rb +39 -0
  77. data/spec/plugins/publish/google_calendar_spec.rb +1 -1
  78. data/spec/plugins/publish/hatena_bookmark_spec.rb +1 -1
  79. data/spec/plugins/publish/hipchat_spec.rb +69 -0
  80. data/spec/plugins/publish/instapaper_spec.rb +42 -28
  81. data/spec/plugins/publish/memcached_spec.rb +63 -0
  82. data/spec/plugins/publish/pocket_spec.rb +33 -33
  83. data/spec/plugins/publish/twitter_spec.rb +57 -19
  84. data/spec/plugins/store/full_text_spec.rb +6 -1
  85. data/spec/plugins/store/permalink_spec.rb +18 -19
  86. data/spec/plugins/store/target_link_spec.rb +1 -1
  87. data/spec/plugins/subscription/chan_toru_spec.rb +56 -0
  88. data/spec/plugins/subscription/feed_spec.rb +1 -1
  89. data/spec/plugins/subscription/g_guide_spec.rb +76 -0
  90. data/spec/plugins/subscription/google_reader_star_spec.rb +1 -1
  91. data/spec/plugins/subscription/link_spec.rb +1 -1
  92. data/spec/plugins/subscription/pocket_spec.rb +57 -0
  93. data/spec/plugins/subscription/text_spec.rb +1 -14
  94. data/spec/plugins/subscription/tumblr_spec.rb +3 -2
  95. data/spec/plugins/subscription/twitter_search_spec.rb +57 -0
  96. data/spec/plugins/subscription/twitter_spec.rb +3 -2
  97. data/spec/plugins/subscription/weather_spec.rb +2 -15
  98. data/spec/spec_helper.rb +1 -0
  99. data/test/integration/test_chan_toru.yml +19 -0
  100. data/test/integration/test_fluentd.yml +20 -0
  101. data/test/integration/test_pocket.yml +21 -0
  102. data/test/integration/test_sanitize.yml +22 -0
  103. data/test/integration/test_twitter_search.yml +21 -0
  104. metadata +145 -24
  105. data/plugins/publish/mail.rb +0 -64
  106. data/plugins/publish/smtp.rb +0 -48
  107. data/spec/plugins/publish/mail_spec.rb +0 -53
  108. data/spec/plugins/publish/smtp_spec.rb +0 -49
@@ -0,0 +1,22 @@
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: FilterSanitize
15
+ config:
16
+ mode: restricted
17
+
18
+ - module: StoreFullText
19
+ config:
20
+ db: test_sanitize.db
21
+
22
+ # - module: PublishConsole
@@ -0,0 +1,21 @@
1
+ global:
2
+ timezone: Asia/Tokyo
3
+ cache:
4
+ base: /tmp
5
+ log:
6
+ level: none
7
+
8
+ plugins:
9
+ - module: SubscriptionTwitterSearch
10
+ config:
11
+ consumer_key: 'consumer_key'
12
+ consumer_secret: 'consumer_secret'
13
+ oauth_token: 'oauth_token'
14
+ oauth_token_secret: 'oauth_token_secret'
15
+ search: 'ruby'
16
+
17
+ - module: StorePermalink
18
+ config:
19
+ db: test_twitter_search.db
20
+
21
+ #- module: PublishConsole
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.5.0
4
+ version: 13.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-18 00:00:00.000000000 Z
12
+ date: 2013-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.7.7
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.7.7
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: sqlite3
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +50,7 @@ dependencies:
34
50
  requirements:
35
51
  - - ~>
36
52
  - !ruby/object:Gem::Version
37
- version: '3'
53
+ version: 4.0.0
38
54
  type: :runtime
39
55
  prerelease: false
40
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,31 +58,31 @@ dependencies:
42
58
  requirements:
43
59
  - - ~>
44
60
  - !ruby/object:Gem::Version
45
- version: '3'
61
+ version: 4.0.0
46
62
  - !ruby/object:Gem::Dependency
47
- name: hashie
63
+ name: activerecord
48
64
  requirement: !ruby/object:Gem::Requirement
49
65
  none: false
50
66
  requirements:
51
- - - ! '>='
67
+ - - ~>
52
68
  - !ruby/object:Gem::Version
53
- version: '0'
69
+ version: 4.0.0
54
70
  type: :runtime
55
71
  prerelease: false
56
72
  version_requirements: !ruby/object:Gem::Requirement
57
73
  none: false
58
74
  requirements:
59
- - - ! '>='
75
+ - - ~>
60
76
  - !ruby/object:Gem::Version
61
- version: '0'
77
+ version: 4.0.0
62
78
  - !ruby/object:Gem::Dependency
63
- name: activerecord
79
+ name: actionmailer
64
80
  requirement: !ruby/object:Gem::Requirement
65
81
  none: false
66
82
  requirements:
67
83
  - - ~>
68
84
  - !ruby/object:Gem::Version
69
- version: '3'
85
+ version: 4.0.0
70
86
  type: :runtime
71
87
  prerelease: false
72
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,23 +90,23 @@ dependencies:
74
90
  requirements:
75
91
  - - ~>
76
92
  - !ruby/object:Gem::Version
77
- version: '3'
93
+ version: 4.0.0
78
94
  - !ruby/object:Gem::Dependency
79
- name: actionmailer
95
+ name: hashie
80
96
  requirement: !ruby/object:Gem::Requirement
81
97
  none: false
82
98
  requirements:
83
- - - ~>
99
+ - - ! '>='
84
100
  - !ruby/object:Gem::Version
85
- version: '3'
101
+ version: '0'
86
102
  type: :runtime
87
103
  prerelease: false
88
104
  version_requirements: !ruby/object:Gem::Requirement
89
105
  none: false
90
106
  requirements:
91
- - - ~>
107
+ - - ! '>='
92
108
  - !ruby/object:Gem::Version
93
- version: '3'
109
+ version: '0'
94
110
  - !ruby/object:Gem::Dependency
95
111
  name: gcalapi
96
112
  requirement: !ruby/object:Gem::Requirement
@@ -155,6 +171,22 @@ dependencies:
155
171
  - - ! '>='
156
172
  - !ruby/object:Gem::Version
157
173
  version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: sanitize
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :runtime
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
158
190
  - !ruby/object:Gem::Dependency
159
191
  name: twitter
160
192
  requirement: !ruby/object:Gem::Requirement
@@ -204,14 +236,14 @@ dependencies:
204
236
  - !ruby/object:Gem::Version
205
237
  version: '0'
206
238
  - !ruby/object:Gem::Dependency
207
- name: cucumber
239
+ name: hipchat
208
240
  requirement: !ruby/object:Gem::Requirement
209
241
  none: false
210
242
  requirements:
211
243
  - - ! '>='
212
244
  - !ruby/object:Gem::Version
213
245
  version: '0'
214
- type: :development
246
+ type: :runtime
215
247
  prerelease: false
216
248
  version_requirements: !ruby/object:Gem::Requirement
217
249
  none: false
@@ -220,7 +252,39 @@ dependencies:
220
252
  - !ruby/object:Gem::Version
221
253
  version: '0'
222
254
  - !ruby/object:Gem::Dependency
223
- name: bundler
255
+ name: fluent-logger
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :runtime
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ! '>='
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: dalli
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :runtime
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ - !ruby/object:Gem::Dependency
287
+ name: cucumber
224
288
  requirement: !ruby/object:Gem::Requirement
225
289
  none: false
226
290
  requirements:
@@ -235,6 +299,38 @@ dependencies:
235
299
  - - ! '>='
236
300
  - !ruby/object:Gem::Version
237
301
  version: '0'
302
+ - !ruby/object:Gem::Dependency
303
+ name: bundler
304
+ requirement: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ~>
308
+ - !ruby/object:Gem::Version
309
+ version: 1.3.5
310
+ type: :development
311
+ prerelease: false
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ~>
316
+ - !ruby/object:Gem::Version
317
+ version: 1.3.5
318
+ - !ruby/object:Gem::Dependency
319
+ name: builder
320
+ requirement: !ruby/object:Gem::Requirement
321
+ none: false
322
+ requirements:
323
+ - - ~>
324
+ - !ruby/object:Gem::Version
325
+ version: 3.1.0
326
+ type: :development
327
+ prerelease: false
328
+ version_requirements: !ruby/object:Gem::Requirement
329
+ none: false
330
+ requirements:
331
+ - - ~>
332
+ - !ruby/object:Gem::Version
333
+ version: 3.1.0
238
334
  - !ruby/object:Gem::Dependency
239
335
  name: jeweler
240
336
  requirement: !ruby/object:Gem::Requirement
@@ -284,66 +380,86 @@ files:
284
380
  - lib/automatic/recipe.rb
285
381
  - plugins/custom_feed/svn_log.rb
286
382
  - plugins/filter/absolute_uri.rb
383
+ - plugins/filter/accept.rb
287
384
  - plugins/filter/full_feed.rb
385
+ - plugins/filter/github_feed.rb
288
386
  - plugins/filter/ignore.rb
289
387
  - plugins/filter/image.rb
290
388
  - plugins/filter/image_source.rb
291
389
  - plugins/filter/one.rb
292
390
  - plugins/filter/rand.rb
391
+ - plugins/filter/sanitize.rb
293
392
  - plugins/filter/sort.rb
294
393
  - plugins/filter/tumblr_resize.rb
295
394
  - plugins/notify/ikachan.rb
296
395
  - plugins/publish/console.rb
396
+ - plugins/publish/console_link.rb
397
+ - plugins/publish/eject.rb
398
+ - plugins/publish/fluentd.rb
297
399
  - plugins/publish/google_calendar.rb
298
400
  - plugins/publish/hatena_bookmark.rb
401
+ - plugins/publish/hipchat.rb
299
402
  - plugins/publish/instapaper.rb
300
- - plugins/publish/mail.rb
403
+ - plugins/publish/memcached.rb
301
404
  - plugins/publish/pocket.rb
302
- - plugins/publish/smtp.rb
303
405
  - plugins/publish/twitter.rb
304
406
  - plugins/store/database.rb
305
407
  - plugins/store/full_text.rb
306
408
  - plugins/store/permalink.rb
307
409
  - plugins/store/target_link.rb
410
+ - plugins/subscription/chan_toru.rb
308
411
  - plugins/subscription/feed.rb
412
+ - plugins/subscription/g_guide.rb
309
413
  - plugins/subscription/google_reader_star.rb
310
414
  - plugins/subscription/link.rb
415
+ - plugins/subscription/pocket.rb
311
416
  - plugins/subscription/text.rb
312
417
  - plugins/subscription/tumblr.rb
313
418
  - plugins/subscription/twitter.rb
419
+ - plugins/subscription/twitter_search.rb
314
420
  - plugins/subscription/weather.rb
315
421
  - script/build
316
422
  - spec/fixtures/sampleRecipe.yml
423
+ - spec/lib/automatic/log_spec.rb
317
424
  - spec/lib/automatic/pipeline_spec.rb
318
425
  - spec/lib/automatic/recipe_spec.rb
319
426
  - spec/lib/automatic_spec.rb
320
427
  - spec/plugins/custom_feed/svn_log_spec.rb
321
428
  - spec/plugins/filter/absolute_uri_spec.rb
429
+ - spec/plugins/filter/accept_spec.rb
322
430
  - spec/plugins/filter/full_feed_spec.rb
431
+ - spec/plugins/filter/github_feed_spec.rb
323
432
  - spec/plugins/filter/ignore_spec.rb
324
433
  - spec/plugins/filter/image_source_spec.rb
325
434
  - spec/plugins/filter/image_spec.rb
326
435
  - spec/plugins/filter/one_spec.rb
327
436
  - spec/plugins/filter/rand_spec.rb
437
+ - spec/plugins/filter/sanitize_spec.rb
328
438
  - spec/plugins/filter/sort_spec.rb
329
439
  - spec/plugins/filter/tumblr_resize_spec.rb
330
440
  - spec/plugins/notify/ikachan_spec.rb
331
441
  - spec/plugins/publish/console_spec.rb
442
+ - spec/plugins/publish/eject_spec.rb
443
+ - spec/plugins/publish/fluentd_spec.rb
332
444
  - spec/plugins/publish/google_calendar_spec.rb
333
445
  - spec/plugins/publish/hatena_bookmark_spec.rb
446
+ - spec/plugins/publish/hipchat_spec.rb
334
447
  - spec/plugins/publish/instapaper_spec.rb
335
- - spec/plugins/publish/mail_spec.rb
448
+ - spec/plugins/publish/memcached_spec.rb
336
449
  - spec/plugins/publish/pocket_spec.rb
337
- - spec/plugins/publish/smtp_spec.rb
338
450
  - spec/plugins/publish/twitter_spec.rb
339
451
  - spec/plugins/store/full_text_spec.rb
340
452
  - spec/plugins/store/permalink_spec.rb
341
453
  - spec/plugins/store/target_link_spec.rb
454
+ - spec/plugins/subscription/chan_toru_spec.rb
342
455
  - spec/plugins/subscription/feed_spec.rb
456
+ - spec/plugins/subscription/g_guide_spec.rb
343
457
  - spec/plugins/subscription/google_reader_star_spec.rb
344
458
  - spec/plugins/subscription/link_spec.rb
459
+ - spec/plugins/subscription/pocket_spec.rb
345
460
  - spec/plugins/subscription/text_spec.rb
346
461
  - spec/plugins/subscription/tumblr_spec.rb
462
+ - spec/plugins/subscription/twitter_search_spec.rb
347
463
  - spec/plugins/subscription/twitter_spec.rb
348
464
  - spec/plugins/subscription/weather_spec.rb
349
465
  - spec/spec_helper.rb
@@ -352,6 +468,8 @@ files:
352
468
  - test/integration/test_absoluteurl.yml
353
469
  - test/integration/test_activerecord.yml
354
470
  - test/integration/test_add_pocket.yml
471
+ - test/integration/test_chan_toru.yml
472
+ - test/integration/test_fluentd.yml
355
473
  - test/integration/test_fulltext.yml
356
474
  - test/integration/test_googlealert.yml
357
475
  - test/integration/test_googlestar.yml
@@ -362,11 +480,14 @@ files:
362
480
  - test/integration/test_instapaper.yml
363
481
  - test/integration/test_link2local.yml
364
482
  - test/integration/test_one.yml
483
+ - test/integration/test_pocket.yml
365
484
  - test/integration/test_rand.yml
485
+ - test/integration/test_sanitize.yml
366
486
  - test/integration/test_sort.yml
367
487
  - test/integration/test_svnlog.yml
368
488
  - test/integration/test_text2feed.yml
369
489
  - test/integration/test_tumblr2local.yml
490
+ - test/integration/test_twitter_search.yml
370
491
  - test/integration/test_weather.yml
371
492
  - vendor/.gitkeep
372
493
  homepage: http://github.com/automaticruby/automaticruby
@@ -1,64 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Name:: Automatic::Plugin::Publish::Mail
3
- # Author:: 774 <http://id774.net>
4
- # Created:: Apr 5, 2012
5
- # Updated:: Apr 5, 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 PublishMail
11
- require 'action_mailer'
12
-
13
- def initialize(config, pipeline=[])
14
- @config = config
15
- @pipeline = pipeline
16
- end
17
-
18
- def run
19
- Mailer.smtp_settings = default_setting.update(
20
- {
21
- :port => @config["port"],
22
- #:address => @config["address"],
23
- #:authentication => @config["auth"],
24
- #:user_name => @config["username"],
25
- #:password => @config["password"],
26
- #:domain => @config["domain"],
27
- })
28
-
29
- Mailer.raise_delivery_errors = true
30
- @pipeline.each { |feeds|
31
- unless feeds.nil?
32
- feeds.items.each { |feed|
33
- Mailer.notify(@config, feed)
34
- }
35
- end
36
- }
37
- @pipeline
38
- end
39
-
40
- def default_setting
41
- return {}
42
- end
43
-
44
- class Mailer < ActionMailer::Base
45
- def notify(option, feed)
46
- m = mail(
47
- :date => Time.now,
48
- :subject => feed.title,
49
- :to => option["mailto"],
50
- #:cc => option["mailcc"],
51
- #:bcc => option["mailbcc"],
52
- :from => option["mailfrom"])
53
-
54
- unless feed.content_encoded.nil?
55
- m.body = feed.content_encoded
56
- else
57
- m.body = feed.description
58
- end
59
-
60
- m.deliver
61
- end
62
- end
63
- end
64
- end