Kouhei Sutou
null+****@clear*****
Wed Dec 7 23:46:07 JST 2016
Kouhei Sutou 2016-12-07 23:46:07 +0900 (Wed, 07 Dec 2016) New Revision: cf6b512c849947522d4d25b5112c9c5f5f0e8ac6 https://github.com/ranguba/packnga/commit/cf6b512c849947522d4d25b5112c9c5f5f0e8ac6 Message: Support YARD 0.9 Modified files: lib/packnga/reference-task.rb packnga.gemspec Modified: lib/packnga/reference-task.rb (+4 -4) =================================================================== --- lib/packnga/reference-task.rb 2016-12-01 15:48:34 +0900 (2da74bb) +++ lib/packnga/reference-task.rb 2016-12-07 23:46:07 +0900 (86f40a6) @@ -320,15 +320,15 @@ module Packnga header_template = templates[:header] if header_template - content = content.gsub(/<body(?:.*?)>/) do |body_start| - "#{body_start}\n#{header_template.result(binding)}\n" + content = content.gsub(/<div id="main".*?>/) do |main_div_start| + "#{main_div_start}\n#{header_template.result(binding)}\n" end end footer_template = templates[:footer] if footer_template - content = content.gsub(/<\/body/) do |body_end| - "\n#{footer_template.result(binding)}\n#{body_end}" + content = content.gsub(/<\/div>\s*<\/body/m) do |main_div_end| + "\n#{footer_template.result(binding)}\n#{main_div_end}" end end Modified: packnga.gemspec (+1 -1) =================================================================== --- packnga.gemspec 2016-12-01 15:48:34 +0900 (a4a5330) +++ packnga.gemspec 2016-12-07 23:46:07 +0900 (c82623c) @@ -64,7 +64,7 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency("rake") - spec.add_runtime_dependency("yard", ">= 0.8.6.1", "< 0.9") + spec.add_runtime_dependency("yard", ">= 0.9") spec.add_runtime_dependency("gettext", ">= 3.1.3") spec.add_development_dependency("test-unit") spec.add_development_dependency("test-unit-notify") -------------- next part -------------- HTML����������������������������... 다운로드