Permalink
Browse files

Replace #warn with $stderr.puts

  • Loading branch information...
nicksieger committed Apr 12, 2011
1 parent d3ac36d commit bf6175d6aa604d9b76ff2fb58d92e3d53f77db44
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/warbler/config.rb
  2. +3 −3 lib/warbler/jar.rb
  3. +2 −2 lib/warbler/task.rb
View
@@ -195,13 +195,13 @@ def define_tasks
# Deprecated
def war_name
- warn "config.war_name deprecated; replace with config.jar_name" #:nocov:
+ $stderr.puts "config.war_name deprecated; replace with config.jar_name" #:nocov:
jar_name #:nocov:
end
# Deprecated
def war_name=(w)
- warn "config.war_name deprecated; replace with config.jar_name" #:nocov:
+ $stderr.puts "config.war_name deprecated; replace with config.jar_name" #:nocov:
self.jar_name = w #:nocov:
end
View
@@ -146,7 +146,7 @@ def find_single_gem_files(config, gem_pattern, version = nil)
def find_application_files(config)
config.dirs.select do |d|
exists = File.directory?(d)
- warn "warning: application directory `#{d}' does not exist or is not a directory; skipping" unless exists
+ $stderr.puts "warning: application directory `#{d}' does not exist or is not a directory; skipping" unless exists
exists
end.each do |d|
@files[apply_pathmaps(config, d, :application)] = nil
@@ -215,7 +215,7 @@ def create_jar(war_file, entries)
if src.respond_to?(:read)
zipfile.get_output_stream(entry) {|f| f << src.read }
elsif src.nil? || File.directory?(src)
- warn "directory symlinks are not followed unless using JRuby; #{entry} contents not in archive" \
+ $stderr.puts "directory symlinks are not followed unless using JRuby; #{entry} contents not in archive" \
if File.symlink?(entry) && !defined?(JRUBY_VERSION)
zipfile.mkdir(entry)
elsif File.symlink?(src)
@@ -242,7 +242,7 @@ def entry_in_jar(jar, entry)
class War < Jar
def initialize(*)
super
- warn "Warbler::War is deprecated. Please replace all occurrences with Warbler::Jar."
+ $stderr.puts "Warbler::War is deprecated. Please replace all occurrences with Warbler::Jar."
end
end
end
View
@@ -45,7 +45,7 @@ def initialize(name = nil, config = nil)
end
@config ||= Config.new
unless @config.kind_of? Config
- warn "Warbler::Config not provided by override in initializer or #{Config::FILE}; using defaults"
+ $stderr.puts "Warbler::Config not provided by override in initializer or #{Config::FILE}; using defaults"
@config = Config.new
end
@name = name || @config.jar_extension
@@ -80,7 +80,7 @@ def define_main_task
@config.features.each do |feature|
t = "#@name:#{feature}"
unless Rake.application.lookup(t)
- warn "unknown feature `#{feature}', ignoring"
+ $stderr.puts "unknown feature `#{feature}', ignoring"
next
end
Rake::Task[t].invoke

0 comments on commit bf6175d

Please sign in to comment.