[Groonga-commit] ranguba/chupa-text at 3c33097 [master] Decomposer requires options on initialize

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jan 3 15:11:35 JST 2014


Kouhei Sutou	2014-01-03 15:11:35 +0900 (Fri, 03 Jan 2014)

  New Revision: 3c33097d15a3afe8c053fef3f1180f50f84f6486
  https://github.com/ranguba/chupa-text/commit/3c33097d15a3afe8c053fef3f1180f50f84f6486

  Message:
    Decomposer requires options on initialize

  Modified files:
    lib/chupa-text/decomposer-registry.rb
    lib/chupa-text/decomposer.rb
    test/decomposers/test-gzip.rb
    test/decomposers/test-tar.rb
    test/test-decomposer.rb
    test/test-extractor.rb

  Modified: lib/chupa-text/decomposer-registry.rb (+1 -1)
===================================================================
--- lib/chupa-text/decomposer-registry.rb    2014-01-03 14:08:28 +0900 (2904aaa)
+++ lib/chupa-text/decomposer-registry.rb    2014-01-03 15:11:35 +0900 (c3061ce)
@@ -32,7 +32,7 @@ module ChupaText
 
     def decomposers
       collect do |decomposer_class|
-        decomposer_class.new
+        decomposer_class.new({})
       end
     end
   end

  Modified: lib/chupa-text/decomposer.rb (+4 -0)
===================================================================
--- lib/chupa-text/decomposer.rb    2014-01-03 14:08:28 +0900 (da0f5c3)
+++ lib/chupa-text/decomposer.rb    2014-01-03 15:11:35 +0900 (e8b3733)
@@ -35,6 +35,10 @@ module ChupaText
       end
     end
 
+    def initialize(options)
+      @options = options
+    end
+
     def target?(data)
       raise NotImplementedError, "must implement #{self.class}\##{__method__}"
     end

  Modified: test/decomposers/test-gzip.rb (+1 -1)
===================================================================
--- test/decomposers/test-gzip.rb    2014-01-03 14:08:28 +0900 (35ae825)
+++ test/decomposers/test-gzip.rb    2014-01-03 15:11:35 +0900 (77d4200)
@@ -18,7 +18,7 @@ class TestDecomposersGzip < Test::Unit::TestCase
   include Helper
 
   def setup
-    @decomposer = ChupaText::Decomposers::Gzip.new
+    @decomposer = ChupaText::Decomposers::Gzip.new({})
   end
 
   private

  Modified: test/decomposers/test-tar.rb (+1 -1)
===================================================================
--- test/decomposers/test-tar.rb    2014-01-03 14:08:28 +0900 (733eaf1)
+++ test/decomposers/test-tar.rb    2014-01-03 15:11:35 +0900 (1d3ae6f)
@@ -18,7 +18,7 @@ class TestDecomposersTar < Test::Unit::TestCase
   include Helper
 
   def setup
-    @decomposer = ChupaText::Decomposers::Tar.new
+    @decomposer = ChupaText::Decomposers::Tar.new({})
   end
 
   private

  Modified: test/test-decomposer.rb (+1 -1)
===================================================================
--- test/test-decomposer.rb    2014-01-03 14:08:28 +0900 (1592b9d)
+++ test/test-decomposer.rb    2014-01-03 15:11:35 +0900 (111fc84)
@@ -20,7 +20,7 @@ class TestDecomposer < Test::Unit::TestCase
     end
 
     def setup
-      @decomposer = NotImplementedDecomposer.new
+      @decomposer = NotImplementedDecomposer.new({})
       @data = ChupaText::Data.new
     end
 

  Modified: test/test-extractor.rb (+2 -2)
===================================================================
--- test/test-extractor.rb    2014-01-03 14:08:28 +0900 (7341edd)
+++ test/test-extractor.rb    2014-01-03 15:11:35 +0900 (9f22147)
@@ -61,7 +61,7 @@ class TestExtractor < Test::Unit::TestCase
 
       def setup
         super
-        decomposer = HTMLDecomposer.new
+        decomposer = HTMLDecomposer.new({})
         @extractor.add_decomposer(decomposer)
       end
 
@@ -89,7 +89,7 @@ class TestExtractor < Test::Unit::TestCase
 
       def setup
         super
-        decomposer = CopyDecomposer.new
+        decomposer = CopyDecomposer.new({})
         @extractor.add_decomposer(decomposer)
       end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index