lib/galakei/docomo_css/inline_stylesheet.rb in galakei-0.12.1 vs lib/galakei/docomo_css/inline_stylesheet.rb in galakei-0.13.0
- old
+ new
@@ -6,11 +6,11 @@
def self.filter(controller)
return unless controller.request.imode_browser_1_0?
doc = Nokogiri::HTML(controller.response.body)
stylesheets = doc.xpath('//link[@rel="stylesheet"]')
return if stylesheets.empty?
- Galakei.logger.info("[galakei] DoCoMo browser 1.0 and external stylesheets detected, inlining CSS")
+ Rails.logger.debug("[galakei] DoCoMo browser 1.0 and external stylesheets detected, inlining CSS")
stylesheets.each do |e|
e.unlink
stylesheet = Galakei::DocomoCss::Stylesheet.new(parser(e['href']))
stylesheet.apply(doc)
end
@@ -26,10 +26,10 @@
elsif /^\/assets\/([^?]+)/=~ href
asset = Rails.application.assets.find_asset($1)
if asset
parser.add_block!(asset.to_s, {:media_types => :all, :base_dir => File.dirname(href)})
else
- Galakei.logger.warn("[galakei] asset lookup for #{$1} failed, skipping")
+ Rails.logger.warn("[galakei] asset lookup for #{$1} failed, skipping")
end
else
parser.load_file!(path(href))
end
return parser