automatic 14.1.0 → 14.2.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.
- checksums.yaml +4 -4
 - data/Gemfile +3 -2
 - data/README.md +2 -2
 - data/Rakefile +1 -1
 - data/VERSION +1 -1
 - data/automatic.gemspec +17 -9
 - data/bin/automatic +4 -4
 - data/doc/ChangeLog +27 -0
 - data/doc/PLUGINS +36 -6
 - data/doc/PLUGINS.ja +35 -7
 - data/doc/README +4 -4
 - data/doc/README.ja +3 -3
 - data/lib/automatic.rb +2 -1
 - data/lib/automatic/feed_maker.rb +80 -0
 - data/lib/automatic/feed_parser.rb +6 -50
 - data/lib/automatic/recipe.rb +1 -1
 - data/lib/automatic/version.rb +1 -1
 - data/plugins/filter/accept.rb +4 -3
 - data/plugins/filter/github_feed.rb +12 -11
 - data/plugins/filter/ignore.rb +3 -3
 - data/plugins/filter/image_source.rb +10 -10
 - data/plugins/filter/one.rb +4 -3
 - data/plugins/filter/rand.rb +3 -3
 - data/plugins/filter/sanitize.rb +2 -3
 - data/plugins/provide/fluentd.rb +5 -4
 - data/plugins/publish/amazon_s3.rb +58 -0
 - data/plugins/publish/fluentd.rb +5 -4
 - data/plugins/publish/google_calendar.rb +2 -2
 - data/plugins/publish/hipchat.rb +1 -1
 - data/plugins/publish/twitter.rb +1 -1
 - data/plugins/store/database.rb +4 -4
 - data/plugins/store/file.rb +95 -0
 - data/plugins/store/full_text.rb +1 -1
 - data/plugins/store/permalink.rb +1 -1
 - data/plugins/subscription/feed.rb +2 -2
 - data/plugins/subscription/g_guide.rb +3 -2
 - data/plugins/subscription/link.rb +4 -3
 - data/plugins/subscription/pocket.rb +12 -11
 - data/plugins/subscription/text.rb +35 -44
 - data/plugins/subscription/tumblr.rb +3 -3
 - data/plugins/subscription/twitter.rb +1 -1
 - data/plugins/subscription/twitter_search.rb +11 -12
 - data/plugins/subscription/weather.rb +7 -6
 - data/plugins/subscription/xml.rb +4 -3
 - data/spec/fixtures/sampleFeeds.tsv +1 -0
 - data/spec/fixtures/sampleFeeds2.tsv +2 -0
 - data/spec/lib/automatic/pipeline_spec.rb +4 -4
 - data/spec/lib/automatic_spec.rb +3 -3
 - data/spec/plugins/filter/github_feed_spec.rb +9 -8
 - data/spec/plugins/filter/image_source_spec.rb +7 -7
 - data/spec/plugins/notify/ikachan_spec.rb +3 -3
 - data/spec/plugins/provide/fluentd_spec.rb +6 -5
 - data/spec/plugins/publish/amazon_s3_spec.rb +40 -0
 - data/spec/plugins/publish/console_spec.rb +3 -3
 - data/spec/plugins/publish/fluentd_spec.rb +5 -4
 - data/spec/plugins/publish/google_calendar_spec.rb +5 -5
 - data/spec/plugins/publish/hatena_bookmark_spec.rb +10 -10
 - data/spec/plugins/publish/hipchat_spec.rb +6 -6
 - data/spec/plugins/publish/instapaper_spec.rb +6 -6
 - data/spec/plugins/publish/memcached_spec.rb +3 -3
 - data/spec/plugins/publish/pocket_spec.rb +3 -3
 - data/spec/plugins/publish/twitter_spec.rb +4 -4
 - data/spec/plugins/store/{target_link_spec.rb → file_spec.rb} +10 -10
 - data/spec/plugins/subscription/pocket_spec.rb +3 -3
 - data/spec/plugins/subscription/text_spec.rb +32 -2
 - data/spec/plugins/subscription/twitter_search_spec.rb +3 -3
 - data/test/integration/test_fluentd.yml +1 -0
 - data/test/integration/test_image2local.yml +6 -2
 - data/test/integration/test_text2feed.yml +8 -0
 - data/test/integration/test_tumblr2local.yml +6 -0
 - metadata +26 -7
 - data/plugins/store/target_link.rb +0 -55
 
| 
         @@ -1,9 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Publish::Hipchat
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    Kohei Hasegawa <http://github.com/banyan>
         
     | 
| 
       4 
     | 
    
         
            -
            # Created::   Jun 5, 
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 4 
     | 
    
         
            +
            # Created::   Jun 5,  2013
         
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -33,13 +33,13 @@ describe Automatic::Plugin::PublishHipchat do 
     | 
|
| 
       33 
33 
     | 
    
         | 
| 
       34 
34 
     | 
    
         
             
                context 'when successfully' do
         
     | 
| 
       35 
35 
     | 
    
         
             
                  it "should passed proper argument to HipChat::Client" do
         
     | 
| 
       36 
     | 
    
         
            -
                    client =  
     | 
| 
      
 36 
     | 
    
         
            +
                    client = double('client').as_null_object
         
     | 
| 
       37 
37 
     | 
    
         
             
                    HipChat::Client.should_receive(:new).with("bogus_api_token").and_return(client)
         
     | 
| 
       38 
38 
     | 
    
         
             
                    subject.run
         
     | 
| 
       39 
39 
     | 
    
         
             
                  end
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
41 
     | 
    
         
             
                  it "should post the link in the feed" do
         
     | 
| 
       42 
     | 
    
         
            -
                    client =  
     | 
| 
      
 42 
     | 
    
         
            +
                    client = double("client")
         
     | 
| 
       43 
43 
     | 
    
         
             
                    client.should_receive(:send).with('bogus_bot', 'description', {"color"=>"yellow", "notify"=>false})
         
     | 
| 
       44 
44 
     | 
    
         
             
                    subject.instance_variable_set(:@client, client)
         
     | 
| 
       45 
45 
     | 
    
         
             
                    subject.run.should have(1).feed
         
     | 
| 
         @@ -48,7 +48,7 @@ describe Automatic::Plugin::PublishHipchat do 
     | 
|
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                context 'when raise an error during post' do
         
     | 
| 
       50 
50 
     | 
    
         
             
                  it do
         
     | 
| 
       51 
     | 
    
         
            -
                    client =  
     | 
| 
      
 51 
     | 
    
         
            +
                    client = double("client")
         
     | 
| 
       52 
52 
     | 
    
         
             
                    client.stub(:send).and_raise
         
     | 
| 
       53 
53 
     | 
    
         
             
                    subject.instance_variable_set(:@client, client)
         
     | 
| 
       54 
54 
     | 
    
         
             
                    Automatic::Log.should_receive(:puts).twice
         
     | 
| 
         @@ -2,9 +2,9 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Publish::Instapaper
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            #             774 <http://id774.net>
         
     | 
| 
       5 
     | 
    
         
            -
            # Created::   Feb 9, 
     | 
| 
       6 
     | 
    
         
            -
            # Updated::    
     | 
| 
       7 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Created::   Feb 9,  2013
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 7 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       8 
8 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -25,7 +25,7 @@ describe Automatic::Plugin::PublishInstapaper do 
     | 
|
| 
       25 
25 
     | 
    
         
             
                })}
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                it "should post the link in the feed" do
         
     | 
| 
       28 
     | 
    
         
            -
                  instapaper =  
     | 
| 
      
 28 
     | 
    
         
            +
                  instapaper = double("instapaper")
         
     | 
| 
       29 
29 
     | 
    
         
             
                  instapaper.should_receive(:add).with("http://github.com", nil, '')
         
     | 
| 
       30 
30 
     | 
    
         
             
                  subject.instance_variable_set(:@instapaper, instapaper)
         
     | 
| 
       31 
31 
     | 
    
         
             
                  subject.run.should have(1).feed
         
     | 
| 
         @@ -63,7 +63,7 @@ describe Automatic::Plugin::Instapaper do 
     | 
|
| 
       63 
63 
     | 
    
         
             
                description = "automatic test"
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                specify {
         
     | 
| 
       66 
     | 
    
         
            -
                  res =  
     | 
| 
      
 66 
     | 
    
         
            +
                  res = double("res")
         
     | 
| 
       67 
67 
     | 
    
         
             
                  res.should_receive(:code).and_return("201")
         
     | 
| 
       68 
68 
     | 
    
         
             
                  subject.should_receive(:request).and_return(res)
         
     | 
| 
       69 
69 
     | 
    
         
             
                  subject.add(url, title, description)
         
     | 
| 
         @@ -72,7 +72,7 @@ describe Automatic::Plugin::Instapaper do 
     | 
|
| 
       72 
72 
     | 
    
         | 
| 
       73 
73 
     | 
    
         
             
                it 'raise error' do
         
     | 
| 
       74 
74 
     | 
    
         
             
                  lambda{
         
     | 
| 
       75 
     | 
    
         
            -
                    res =  
     | 
| 
      
 75 
     | 
    
         
            +
                    res = double("res")
         
     | 
| 
       76 
76 
     | 
    
         
             
                    res.should_receive(:code).twice.and_return("403")
         
     | 
| 
       77 
77 
     | 
    
         
             
                    subject.should_receive(:request).and_return(res)
         
     | 
| 
       78 
78 
     | 
    
         
             
                    subject.add(url, title, description)
         
     | 
| 
         @@ -2,8 +2,8 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Publish::Memcached
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    774 <http://id774.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            # Created::   Jun 25, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -54,7 +54,7 @@ describe Automatic::Plugin::PublishMemcached do 
     | 
|
| 
       54 
54 
     | 
    
         
             
                  }
         
     | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
                  its (:run) {
         
     | 
| 
       57 
     | 
    
         
            -
                    fluentd =  
     | 
| 
      
 57 
     | 
    
         
            +
                    fluentd = double("memcached")
         
     | 
| 
       58 
58 
     | 
    
         
             
                    subject.run.should have(2).feed
         
     | 
| 
       59 
59 
     | 
    
         
             
                  }
         
     | 
| 
       60 
60 
     | 
    
         
             
                end
         
     | 
| 
         @@ -2,8 +2,8 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Publish::Pocket
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            # Created::   May 15, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -24,7 +24,7 @@ describe Automatic::Plugin::PublishPocket do 
     | 
|
| 
       24 
24 
     | 
    
         
             
                })}
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                it "should post the link in the feed" do
         
     | 
| 
       27 
     | 
    
         
            -
                  client =  
     | 
| 
      
 27 
     | 
    
         
            +
                  client = double("client")
         
     | 
| 
       28 
28 
     | 
    
         
             
                  client.should_receive(:add).with(:url => 'http://github.com')
         
     | 
| 
       29 
29 
     | 
    
         
             
                  subject.instance_variable_set(:@client, client)
         
     | 
| 
       30 
30 
     | 
    
         
             
                  subject.run.should have(1).feed
         
     | 
| 
         @@ -2,8 +2,8 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Publish::Twitter
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            # Created::   May  5, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -21,7 +21,7 @@ describe Automatic::Plugin::PublishTwitter do 
     | 
|
| 
       21 
21 
     | 
    
         
             
                  })}
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                  its (:run) {
         
     | 
| 
       24 
     | 
    
         
            -
                    twitter =  
     | 
| 
      
 24 
     | 
    
         
            +
                    twitter = double("twitter")
         
     | 
| 
       25 
25 
     | 
    
         
             
                    twitter.should_receive(:update).with(" http://github.com")
         
     | 
| 
       26 
26 
     | 
    
         
             
                    subject.instance_variable_set(:@twitter, twitter)
         
     | 
| 
       27 
27 
     | 
    
         
             
                    subject.run.should have(1).feed
         
     | 
| 
         @@ -37,7 +37,7 @@ describe Automatic::Plugin::PublishTwitter do 
     | 
|
| 
       37 
37 
     | 
    
         
             
                  })}
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
                  its (:run) {
         
     | 
| 
       40 
     | 
    
         
            -
                    twitter =  
     | 
| 
      
 40 
     | 
    
         
            +
                    twitter = double("twitter")
         
     | 
| 
       41 
41 
     | 
    
         
             
                    twitter.should_receive(:update).with("publish-twitter")
         
     | 
| 
       42 
42 
     | 
    
         
             
                    subject.instance_variable_set(:@twitter, twitter)
         
     | 
| 
       43 
43 
     | 
    
         
             
                    subject.run.should have(1).feed
         
     | 
| 
         @@ -1,22 +1,22 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
     | 
    
         
            -
            # Name::      Automatic::Plugin:: 
     | 
| 
      
 2 
     | 
    
         
            +
            # Name::      Automatic::Plugin::Store::File
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    kzgs
         
     | 
| 
       4 
4 
     | 
    
         
             
            #             774 <http://id774.net>
         
     | 
| 
       5 
5 
     | 
    
         
             
            # Created::   Mar  4, 2012
         
     | 
| 
       6 
     | 
    
         
            -
            # Updated::    
     | 
| 
       7 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 6 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 7 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       8 
8 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            require 'store/ 
     | 
| 
      
 12 
     | 
    
         
            +
            require 'store/file'
         
     | 
| 
       13 
13 
     | 
    
         
             
            require 'tmpdir'
         
     | 
| 
       14 
14 
     | 
    
         
             
            require 'pathname'
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
            describe Automatic::Plugin:: 
     | 
| 
      
 16 
     | 
    
         
            +
            describe Automatic::Plugin::StoreFile do
         
     | 
| 
       17 
17 
     | 
    
         
             
              it "should store the target link" do
         
     | 
| 
       18 
18 
     | 
    
         
             
                Dir.mktmpdir do |dir|
         
     | 
| 
       19 
     | 
    
         
            -
                  instance = Automatic::Plugin:: 
     | 
| 
      
 19 
     | 
    
         
            +
                  instance = Automatic::Plugin::StoreFile.new(
         
     | 
| 
       20 
20 
     | 
    
         
             
                    { "path" => dir },
         
     | 
| 
       21 
21 
     | 
    
         
             
                    AutomaticSpec.generate_pipeline {
         
     | 
| 
       22 
22 
     | 
    
         
             
                      feed { item "http://id774.net/test/store/rss" }
         
     | 
| 
         @@ -29,19 +29,19 @@ describe Automatic::Plugin::StoreTargetLink do 
     | 
|
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
              it "should error during file download" do
         
     | 
| 
       31 
31 
     | 
    
         
             
                Dir.mktmpdir do |dir|
         
     | 
| 
       32 
     | 
    
         
            -
                  instance = Automatic::Plugin:: 
     | 
| 
      
 32 
     | 
    
         
            +
                  instance = Automatic::Plugin::StoreFile.new(
         
     | 
| 
       33 
33 
     | 
    
         
             
                    { "path" => dir },
         
     | 
| 
       34 
34 
     | 
    
         
             
                    AutomaticSpec.generate_pipeline {
         
     | 
| 
       35 
35 
     | 
    
         
             
                      feed { item "aaa" }
         
     | 
| 
       36 
36 
     | 
    
         
             
                    }
         
     | 
| 
       37 
37 
     | 
    
         
             
                  )
         
     | 
| 
       38 
     | 
    
         
            -
                  instance.run.should have( 
     | 
| 
      
 38 
     | 
    
         
            +
                  instance.run.should have(0).feed
         
     | 
| 
       39 
39 
     | 
    
         
             
                end
         
     | 
| 
       40 
40 
     | 
    
         
             
              end
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
              it "should error and retry during file download" do
         
     | 
| 
       43 
43 
     | 
    
         
             
                Dir.mktmpdir do |dir|
         
     | 
| 
       44 
     | 
    
         
            -
                  instance = Automatic::Plugin:: 
     | 
| 
      
 44 
     | 
    
         
            +
                  instance = Automatic::Plugin::StoreFile.new(
         
     | 
| 
       45 
45 
     | 
    
         
             
                    {
         
     | 
| 
       46 
46 
     | 
    
         
             
                      "path" => dir,
         
     | 
| 
       47 
47 
     | 
    
         
             
                      'retry' => 1,
         
     | 
| 
         @@ -51,7 +51,7 @@ describe Automatic::Plugin::StoreTargetLink do 
     | 
|
| 
       51 
51 
     | 
    
         
             
                      feed { item "aaa" }
         
     | 
| 
       52 
52 
     | 
    
         
             
                    }
         
     | 
| 
       53 
53 
     | 
    
         
             
                  )
         
     | 
| 
       54 
     | 
    
         
            -
                  instance.run.should have( 
     | 
| 
      
 54 
     | 
    
         
            +
                  instance.run.should have(0).feed
         
     | 
| 
       55 
55 
     | 
    
         
             
                end
         
     | 
| 
       56 
56 
     | 
    
         
             
              end
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
         @@ -2,8 +2,8 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Subscription::Pocket
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            # Created::   May 21, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -44,7 +44,7 @@ describe 'Automatic::Plugin::SubscriptionPocket' do 
     | 
|
| 
       44 
44 
     | 
    
         
             
                      'given_title' => 'GitHub',
         
     | 
| 
       45 
45 
     | 
    
         
             
                      'excerpt' => 'github'
         
     | 
| 
       46 
46 
     | 
    
         
             
                    }}}
         
     | 
| 
       47 
     | 
    
         
            -
                    client =  
     | 
| 
      
 47 
     | 
    
         
            +
                    client = double("client")
         
     | 
| 
       48 
48 
     | 
    
         
             
                    client.should_receive(:retrieve).
         
     | 
| 
       49 
49 
     | 
    
         
             
                      with(config['optional']).
         
     | 
| 
       50 
50 
     | 
    
         
             
                      and_return(retrieve)
         
     | 
| 
         @@ -1,9 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Subscription::Text
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
      
 4 
     | 
    
         
            +
            #             774 <http://id774.net>
         
     | 
| 
       4 
5 
     | 
    
         
             
            # Created::   May  6, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 6 
     | 
    
         
            +
            # Updated::   Feb 19, 2014
         
     | 
| 
      
 7 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
8 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
9 
     | 
    
         | 
| 
       9 
10 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -51,4 +52,33 @@ describe Automatic::Plugin::SubscriptionText do 
     | 
|
| 
       51 
52 
     | 
    
         
             
                its(:run) { should have(1).feed }
         
     | 
| 
       52 
53 
     | 
    
         
             
              end
         
     | 
| 
       53 
54 
     | 
    
         | 
| 
      
 55 
     | 
    
         
            +
              context "with feeds including full fields whose return feed" do
         
     | 
| 
      
 56 
     | 
    
         
            +
                subject {
         
     | 
| 
      
 57 
     | 
    
         
            +
                  Automatic::Plugin::SubscriptionText.new(
         
     | 
| 
      
 58 
     | 
    
         
            +
                    { 'feeds' => [ {'title' => 'huge', 'url' => "http://hugehuge", 'description' => "aaa", 'comments' => "bbb", 'author' => "ccc" } ] }
         
     | 
| 
      
 59 
     | 
    
         
            +
                  )
         
     | 
| 
      
 60 
     | 
    
         
            +
                }
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                its(:run) { should have(1).feed }
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
              context "with file whose return feed" do
         
     | 
| 
      
 66 
     | 
    
         
            +
                subject {
         
     | 
| 
      
 67 
     | 
    
         
            +
                  Automatic::Plugin::SubscriptionText.new(
         
     | 
| 
      
 68 
     | 
    
         
            +
                    { 'files' => ["spec/fixtures/sampleFeeds.tsv"] }
         
     | 
| 
      
 69 
     | 
    
         
            +
                  )
         
     | 
| 
      
 70 
     | 
    
         
            +
                }
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                its(:run) { should have(1).feed }
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
              context "with files whose return feed" do
         
     | 
| 
      
 76 
     | 
    
         
            +
                subject {
         
     | 
| 
      
 77 
     | 
    
         
            +
                  Automatic::Plugin::SubscriptionText.new(
         
     | 
| 
      
 78 
     | 
    
         
            +
                    { 'files' => ["spec/fixtures/sampleFeeds.tsv", "spec/fixtures/sampleFeeds2.tsv"] }
         
     | 
| 
      
 79 
     | 
    
         
            +
                  )
         
     | 
| 
      
 80 
     | 
    
         
            +
                }
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
                its(:run) { should have(1).feed }
         
     | 
| 
      
 83 
     | 
    
         
            +
              end
         
     | 
| 
       54 
84 
     | 
    
         
             
            end
         
     | 
| 
         @@ -2,8 +2,8 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            # Name::      Automatic::Plugin::Subscription::TwitterSearch
         
     | 
| 
       3 
3 
     | 
    
         
             
            # Author::    soramugi <http://soramugi.net>
         
     | 
| 
       4 
4 
     | 
    
         
             
            # Created::   May 30, 2013
         
     | 
| 
       5 
     | 
    
         
            -
            # Updated::    
     | 
| 
       6 
     | 
    
         
            -
            # Copyright:: Copyright (c) 2012- 
     | 
| 
      
 5 
     | 
    
         
            +
            # Updated::   Feb 25, 2014
         
     | 
| 
      
 6 
     | 
    
         
            +
            # Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
         
     | 
| 
       7 
7 
     | 
    
         
             
            # License::   Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
         
     | 
| 
         @@ -44,7 +44,7 @@ describe 'Automatic::Plugin::SubscriptionTwitterSearch' do 
     | 
|
| 
       44 
44 
     | 
    
         
             
                    status.created_at = Time.now
         
     | 
| 
       45 
45 
     | 
    
         
             
                    search         = Hashie::Mash.new
         
     | 
| 
       46 
46 
     | 
    
         
             
                    search.results = [status]
         
     | 
| 
       47 
     | 
    
         
            -
                    client =  
     | 
| 
      
 47 
     | 
    
         
            +
                    client = double("client")
         
     | 
| 
       48 
48 
     | 
    
         
             
                    client.should_receive(:search)
         
     | 
| 
       49 
49 
     | 
    
         
             
                    .with(config['search'],config['opt'])
         
     | 
| 
       50 
50 
     | 
    
         
             
                    .and_return(search)
         
     | 
| 
         @@ -19,11 +19,15 @@ plugins: 
     | 
|
| 
       19 
19 
     | 
    
         
             
                config:
         
     | 
| 
       20 
20 
     | 
    
         
             
                  db: test_image.db
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
              - module:  
     | 
| 
      
 22 
     | 
    
         
            +
              - module: StoreFile
         
     | 
| 
       23 
23 
     | 
    
         
             
                config:
         
     | 
| 
       24 
24 
     | 
    
         
             
                  path: /tmp
         
     | 
| 
       25 
25 
     | 
    
         
             
                  retry: 2
         
     | 
| 
       26 
26 
     | 
    
         
             
                  interval: 2
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
               
     | 
| 
      
 28 
     | 
    
         
            +
              - module: StorePermalink
         
     | 
| 
      
 29 
     | 
    
         
            +
                config:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  db: test_image2.db
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
              # - module: PublishConsole
         
     | 
| 
       29 
33 
     | 
    
         | 
| 
         @@ -19,6 +19,14 @@ plugins: 
     | 
|
| 
       19 
19 
     | 
    
         
             
                    -
         
     | 
| 
       20 
20 
     | 
    
         
             
                      title: 'Tumblr'
         
     | 
| 
       21 
21 
     | 
    
         
             
                      url:   'http://www.tumblr.com/dashboard'
         
     | 
| 
      
 22 
     | 
    
         
            +
                      description: 'aaa'
         
     | 
| 
      
 23 
     | 
    
         
            +
                      comments: 'bbb'
         
     | 
| 
      
 24 
     | 
    
         
            +
                      author: 'ccc'
         
     | 
| 
      
 25 
     | 
    
         
            +
                  files:
         
     | 
| 
      
 26 
     | 
    
         
            +
                    - 'spec/fixtures/sampleFeeds.tsv'
         
     | 
| 
      
 27 
     | 
    
         
            +
                  files:
         
     | 
| 
      
 28 
     | 
    
         
            +
                    - 'spec/fixtures/sampleFeeds.tsv'
         
     | 
| 
      
 29 
     | 
    
         
            +
                    - 'spec/fixtures/sampleFeeds2.tsv'
         
     | 
| 
       22 
30 
     | 
    
         | 
| 
       23 
31 
     | 
    
         
             
              - module: StorePermalink
         
     | 
| 
       24 
32 
     | 
    
         
             
                config:
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: automatic
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 14. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 14.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - id774
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-02-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: json
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 1.7.7
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 1.7.7
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: sqlite3
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -248,6 +248,20 @@ dependencies: 
     | 
|
| 
       248 
248 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       249 
249 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       250 
250 
     | 
    
         
             
                    version: 2.7.0
         
     | 
| 
      
 251 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 252 
     | 
    
         
            +
              name: aws-sdk
         
     | 
| 
      
 253 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 254 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 255 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 256 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 257 
     | 
    
         
            +
                    version: 1.33.0
         
     | 
| 
      
 258 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 259 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 260 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 261 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 262 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 263 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 264 
     | 
    
         
            +
                    version: 1.33.0
         
     | 
| 
       251 
265 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       252 
266 
     | 
    
         
             
              name: cucumber
         
     | 
| 
       253 
267 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -304,7 +318,7 @@ dependencies: 
     | 
|
| 
       304 
318 
     | 
    
         
             
                - - ">="
         
     | 
| 
       305 
319 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       306 
320 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       307 
     | 
    
         
            -
            description: Ruby  
     | 
| 
      
 321 
     | 
    
         
            +
            description: Ruby framework for the general-purpose automatic processing
         
     | 
| 
       308 
322 
     | 
    
         
             
            email: idnanashi@gmail.com
         
     | 
| 
       309 
323 
     | 
    
         
             
            executables:
         
     | 
| 
       310 
324 
     | 
    
         
             
            - automatic
         
     | 
| 
         @@ -330,6 +344,7 @@ files: 
     | 
|
| 
       330 
344 
     | 
    
         
             
            - doc/README.ja
         
     | 
| 
       331 
345 
     | 
    
         
             
            - lib/automatic.rb
         
     | 
| 
       332 
346 
     | 
    
         
             
            - lib/automatic/environment.rb
         
     | 
| 
      
 347 
     | 
    
         
            +
            - lib/automatic/feed_maker.rb
         
     | 
| 
       333 
348 
     | 
    
         
             
            - lib/automatic/feed_parser.rb
         
     | 
| 
       334 
349 
     | 
    
         
             
            - lib/automatic/log.rb
         
     | 
| 
       335 
350 
     | 
    
         
             
            - lib/automatic/opml.rb
         
     | 
| 
         @@ -351,6 +366,7 @@ files: 
     | 
|
| 
       351 
366 
     | 
    
         
             
            - plugins/filter/tumblr_resize.rb
         
     | 
| 
       352 
367 
     | 
    
         
             
            - plugins/notify/ikachan.rb
         
     | 
| 
       353 
368 
     | 
    
         
             
            - plugins/provide/fluentd.rb
         
     | 
| 
      
 369 
     | 
    
         
            +
            - plugins/publish/amazon_s3.rb
         
     | 
| 
       354 
370 
     | 
    
         
             
            - plugins/publish/console.rb
         
     | 
| 
       355 
371 
     | 
    
         
             
            - plugins/publish/console_link.rb
         
     | 
| 
       356 
372 
     | 
    
         
             
            - plugins/publish/eject.rb
         
     | 
| 
         @@ -363,9 +379,9 @@ files: 
     | 
|
| 
       363 
379 
     | 
    
         
             
            - plugins/publish/pocket.rb
         
     | 
| 
       364 
380 
     | 
    
         
             
            - plugins/publish/twitter.rb
         
     | 
| 
       365 
381 
     | 
    
         
             
            - plugins/store/database.rb
         
     | 
| 
      
 382 
     | 
    
         
            +
            - plugins/store/file.rb
         
     | 
| 
       366 
383 
     | 
    
         
             
            - plugins/store/full_text.rb
         
     | 
| 
       367 
384 
     | 
    
         
             
            - plugins/store/permalink.rb
         
     | 
| 
       368 
     | 
    
         
            -
            - plugins/store/target_link.rb
         
     | 
| 
       369 
385 
     | 
    
         
             
            - plugins/subscription/chan_toru.rb
         
     | 
| 
       370 
386 
     | 
    
         
             
            - plugins/subscription/feed.rb
         
     | 
| 
       371 
387 
     | 
    
         
             
            - plugins/subscription/g_guide.rb
         
     | 
| 
         @@ -378,6 +394,8 @@ files: 
     | 
|
| 
       378 
394 
     | 
    
         
             
            - plugins/subscription/weather.rb
         
     | 
| 
       379 
395 
     | 
    
         
             
            - plugins/subscription/xml.rb
         
     | 
| 
       380 
396 
     | 
    
         
             
            - script/build
         
     | 
| 
      
 397 
     | 
    
         
            +
            - spec/fixtures/sampleFeeds.tsv
         
     | 
| 
      
 398 
     | 
    
         
            +
            - spec/fixtures/sampleFeeds2.tsv
         
     | 
| 
       381 
399 
     | 
    
         
             
            - spec/fixtures/sampleRecipe.yml
         
     | 
| 
       382 
400 
     | 
    
         
             
            - spec/lib/automatic/log_spec.rb
         
     | 
| 
       383 
401 
     | 
    
         
             
            - spec/lib/automatic/pipeline_spec.rb
         
     | 
| 
         @@ -398,6 +416,7 @@ files: 
     | 
|
| 
       398 
416 
     | 
    
         
             
            - spec/plugins/filter/tumblr_resize_spec.rb
         
     | 
| 
       399 
417 
     | 
    
         
             
            - spec/plugins/notify/ikachan_spec.rb
         
     | 
| 
       400 
418 
     | 
    
         
             
            - spec/plugins/provide/fluentd_spec.rb
         
     | 
| 
      
 419 
     | 
    
         
            +
            - spec/plugins/publish/amazon_s3_spec.rb
         
     | 
| 
       401 
420 
     | 
    
         
             
            - spec/plugins/publish/console_spec.rb
         
     | 
| 
       402 
421 
     | 
    
         
             
            - spec/plugins/publish/eject_spec.rb
         
     | 
| 
       403 
422 
     | 
    
         
             
            - spec/plugins/publish/fluentd_spec.rb
         
     | 
| 
         @@ -408,9 +427,9 @@ files: 
     | 
|
| 
       408 
427 
     | 
    
         
             
            - spec/plugins/publish/memcached_spec.rb
         
     | 
| 
       409 
428 
     | 
    
         
             
            - spec/plugins/publish/pocket_spec.rb
         
     | 
| 
       410 
429 
     | 
    
         
             
            - spec/plugins/publish/twitter_spec.rb
         
     | 
| 
      
 430 
     | 
    
         
            +
            - spec/plugins/store/file_spec.rb
         
     | 
| 
       411 
431 
     | 
    
         
             
            - spec/plugins/store/full_text_spec.rb
         
     | 
| 
       412 
432 
     | 
    
         
             
            - spec/plugins/store/permalink_spec.rb
         
     | 
| 
       413 
     | 
    
         
            -
            - spec/plugins/store/target_link_spec.rb
         
     | 
| 
       414 
433 
     | 
    
         
             
            - spec/plugins/subscription/chan_toru_spec.rb
         
     | 
| 
       415 
434 
     | 
    
         
             
            - spec/plugins/subscription/feed_spec.rb
         
     | 
| 
       416 
435 
     | 
    
         
             
            - spec/plugins/subscription/g_guide_spec.rb
         
     |