Kouhei Sutou
null+****@clear*****
Fri Jan 3 14:07:55 JST 2014
Kouhei Sutou 2014-01-03 14:07:55 +0900 (Fri, 03 Jan 2014) New Revision: 0c8035a7010f4f4c9f063df1b3cf8ab77ec81c67 https://github.com/ranguba/chupa-text/commit/0c8035a7010f4f4c9f063df1b3cf8ab77ec81c67 Message: Remove needless plugin/ directory Modified files: lib/chupa-text/decomposer.rb Renamed files: lib/chupa-text/decomposers/gzip.rb (from lib/chupa-text/plugin/decomposer/gzip.rb) lib/chupa-text/decomposers/tar.rb (from lib/chupa-text/plugin/decomposer/tar.rb) test/decomposers/test-gzip.rb (from test/decomposer/test-gzip.rb) test/decomposers/test-tar.rb (from test/decomposer/test-tar.rb) Modified: lib/chupa-text/decomposer.rb (+2 -2) =================================================================== --- lib/chupa-text/decomposer.rb 2014-01-02 12:30:23 +0900 (50aed95) +++ lib/chupa-text/decomposer.rb 2014-01-03 14:07:55 +0900 (da0f5c3) @@ -27,8 +27,8 @@ module ChupaText $LOAD_PATH.each do |load_path| next unless File.directory?(load_path) Dir.chdir(load_path) do - Dir.glob("chupa-text/plugin/decomposer/*.rb") do |plugin_path| - require plugin_path.gsub(/\.rb\z/, "") + Dir.glob("chupa-text/decomposers/*.rb") do |decomposer_path| + require decomposer_path.gsub(/\.rb\z/, "") end end end Renamed: lib/chupa-text/decomposers/gzip.rb (+3 -1) 96% =================================================================== --- lib/chupa-text/plugin/decomposer/gzip.rb 2014-01-02 12:30:23 +0900 (ec12f50) +++ lib/chupa-text/decomposers/gzip.rb 2014-01-03 14:07:55 +0900 (eb9ba49) @@ -20,7 +20,8 @@ require "zlib" require "chupa-text" module ChupaText - class GzipDecomposer < Decomposer + module Decomposers + class Gzip < Decomposer registry.register(self) TARGET_EXTENSIONS = ["gz", "tgz"] @@ -48,4 +49,5 @@ module ChupaText yield(extracted) end end + end end Renamed: lib/chupa-text/decomposers/tar.rb (+3 -1) 96% =================================================================== --- lib/chupa-text/plugin/decomposer/tar.rb 2014-01-02 12:30:23 +0900 (fa65021) +++ lib/chupa-text/decomposers/tar.rb 2014-01-03 14:07:55 +0900 (f0c3e6b) @@ -20,7 +20,8 @@ require "rubygems/package" require "chupa-text" module ChupaText - class TarDecomposer < Decomposer + module Decomposers + class Tar < Decomposer registry.register(self) def target?(data) @@ -41,4 +42,5 @@ module ChupaText end end end + end end Renamed: test/decomposers/test-gzip.rb (+2 -2) 96% =================================================================== --- test/decomposer/test-gzip.rb 2014-01-02 12:30:23 +0900 (fb0964c) +++ test/decomposers/test-gzip.rb 2014-01-03 14:07:55 +0900 (35ae825) @@ -14,11 +14,11 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -class TestGzipDecomposer < Test::Unit::TestCase +class TestDecomposersGzip < Test::Unit::TestCase include Helper def setup - @decomposer = ChupaText::GzipDecomposer.new + @decomposer = ChupaText::Decomposers::Gzip.new end private Renamed: test/decomposers/test-tar.rb (+2 -2) 95% =================================================================== --- test/decomposer/test-tar.rb 2014-01-02 12:30:23 +0900 (20886d9) +++ test/decomposers/test-tar.rb 2014-01-03 14:07:55 +0900 (733eaf1) @@ -14,11 +14,11 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -class TestTarDecomposer < Test::Unit::TestCase +class TestDecomposersTar < Test::Unit::TestCase include Helper def setup - @decomposer = ChupaText::TarDecomposer.new + @decomposer = ChupaText::Decomposers::Tar.new end private -------------- next part -------------- HTML����������������������������... 다운로드