Skip to content

Commit

Permalink
Merge pull request automaticruby#30 from soramugi/console_link
Browse files Browse the repository at this point in the history
Add plugin console_link
  • Loading branch information
id774 committed Jun 2, 2013
2 parents 56bad74 + 4b40a0b commit 8fb78bc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions plugins/publish/console_link.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::ConsoleLink
# Author:: soramugi <http://soramugi.net>
# Created:: Jun 02, 2013
# Updated:: Jun 02, 2013
# Copyright:: soramugi Copyright (c) 2013
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.

module Automatic::Plugin
class PublishConsoleLink
require 'pp'

def initialize(config, pipeline=[])
@config = config
@pipeline = pipeline
@output = STDOUT
end

def run
@pipeline.each { |feeds|
unless feeds.nil?
feeds.items.each { |feed|
@output.puts("info", feed.link)
}
end
}
@pipeline
end
end
end

0 comments on commit 8fb78bc

Please sign in to comment.