Skip to content

Commit d242a45

Browse files
committed
#79 Improvement Log messages
1 parent 34a4171 commit d242a45

File tree

15 files changed

+19
-19
lines changed

15 files changed

+19
-19
lines changed

lib/automatic/feed_maker.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Name:: Automatic::FeedMaker
33
# Author:: 774 <http://id774.net>
44
# Created:: Feb 21, 2014
5-
# Updated:: Feb 21, 2014
5+
# Updated:: Feb 26, 2014
66
# Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
77
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88

@@ -44,7 +44,7 @@ def self.create_pipeline(feeds = [])
4444
unless feeds.nil?
4545
feeds.each {|feed|
4646
unless feed.link.nil?
47-
Automatic::Log.puts("info", "Feed: #{feed.link}")
47+
Automatic::Log.puts("info", "Create Pipeline: #{feed.link}")
4848
item = maker.items.new_item
4949
item.title = feed.title
5050
item.link = feed.link

lib/automatic/feed_parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Name:: Automatic::FeedParser
33
# Author:: 774 <http://id774.net>
44
# Created:: Feb 19, 2012
5-
# Updated:: Feb 21, 2014
5+
# Updated:: Feb 26, 2014
66
# Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
77
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
88

@@ -15,7 +15,7 @@ module FeedParser
1515
def self.get_url(url)
1616
begin
1717
unless url.nil?
18-
Automatic::Log.puts("info", "Parsing: #{url}")
18+
Automatic::Log.puts("info", "Parsing Feed: #{url}")
1919
feed = URI.parse(url).normalize
2020
open(feed) {|http|
2121
response = http.read

lib/automatic/recipe.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def load_recipe(path)
2424
@procedure = Hashie::Mash.new(YAML.load(File.read(path)))
2525
log_level = @procedure.global && @procedure.global.log && @procedure.global.log.level
2626
Automatic::Log.level(log_level)
27-
Automatic::Log.puts("info", "Loading: #{path}")
27+
Automatic::Log.puts("info", "Loading Recipe: #{path}")
2828
@procedure
2929
end
3030

plugins/publish/amazon_s3.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def upload_amazons3(filename, target_path)
5151
object = @bucket.objects[target]
5252
source = Pathname.new(filename)
5353
object.write(source) unless @mode == "test"
54-
Automatic::Log.puts("info", "Uploaded file #{source} to the bucket #{target} on #{@bucket.name}.")
54+
Automatic::Log.puts("info", "Uploaded: file #{source} to the bucket #{target} on #{@bucket.name}.")
5555
return source, target
5656
end
5757
end

plugins/publish/google_calendar.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def add(arg)
3737
end
3838
end
3939

40-
Automatic::Log.puts("info", "日付 #{date}")
41-
Automatic::Log.puts("info", "タイトル#{text}")
40+
Automatic::Log.puts("info", "Date#{date}")
41+
Automatic::Log.puts("info", "Title#{text}")
4242

4343
# Register to calendar
4444
require 'rubygems'

plugins/publish/hipchat.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run
2929
retry_max = @config['retry'].to_i || 0
3030
begin
3131
@client.send(@config['username'], feed.description, @options)
32-
Automatic::Log.puts("info", "post: #{feed.description.gsub(/[\r\n]/,'')[0..50]}...") rescue nil
32+
Automatic::Log.puts("info", "Hipchat post: #{feed.description.gsub(/[\r\n]/,'')[0..50]}...") rescue nil
3333
rescue => e
3434
retries += 1
3535
Automatic::Log.puts("error", "ErrorCount: #{retries}, #{e.message}")

plugins/publish/twitter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def run
3434
@pipeline.each {|feeds|
3535
unless feeds.nil?
3636
feeds.items.each {|feed|
37-
Automatic::Log.puts("info", "tweet: #{feed.link}")
37+
Automatic::Log.puts("info", "Publish Tweet: #{feed.link}")
3838
retries = 0
3939
retry_max = @config['retry'].to_i || 0
4040
begin

plugins/store/database.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def db_dir
5454

5555
def prepare_database
5656
db = File.join(db_dir, @config['db'])
57-
Automatic::Log.puts("info", "Database: #{db}")
57+
Automatic::Log.puts("info", "Using Database: #{db}")
5858
ActiveRecord::Base.establish_connection(
5959
:adapter => "sqlite3",
6060
:database => db)

plugins/store/file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def run
3232
unless feeds.nil?
3333
feeds.items.each {|feed|
3434
unless feed.link.nil?
35-
Automatic::Log.puts("info", "Downloading: #{feed.link}")
35+
Automatic::Log.puts("info", "Downloading File: #{feed.link}")
3636
FileUtils.mkdir_p(@config['path']) unless FileTest.exist?(@config['path'])
3737
retries = 0
3838
retry_max = @config['retry'].to_i || 0
@@ -65,7 +65,7 @@ def get_file(url)
6565
else
6666
return_path = wget(uri, url)
6767
end
68-
Automatic::Log.puts("info", "Saved: #{return_path}")
68+
Automatic::Log.puts("info", "Saved File: #{return_path}")
6969
"file://" + return_path
7070
end
7171

plugins/store/full_text.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def model_class
4040

4141
def run
4242
for_each_new_feed {|feed|
43-
Automatic::Log.puts("info", "Saving: #{feed.link}")
43+
Automatic::Log.puts("info", "Saving FullText: #{feed.link}")
4444
begin
4545
Blog.create(
4646
:title => feed.title,

0 commit comments

Comments
 (0)