[logaling-commit] logaling/logaling-command [add-no-annotation-option] Change option 'no-annotation' to 'fixed'

Back to archive index

SUZUKI Miho null+****@clear*****
Mon Oct 29 10:54:20 JST 2012


SUZUKI Miho	2012-10-29 10:54:20 +0900 (Mon, 29 Oct 2012)

  New Revision: 6ebef50b897c73befadd0b3ef60cb670d9f4cc96
  https://github.com/logaling/logaling-command/commit/6ebef50b897c73befadd0b3ef60cb670d9f4cc96

  Log:
    Change option 'no-annotation' to 'fixed'

  Modified files:
    lib/logaling/command/application.rb
    lib/logaling/repository.rb
    spec/logaling/repository_spec.rb

  Modified: lib/logaling/command/application.rb (+1 -1)
===================================================================
--- lib/logaling/command/application.rb    2012-10-12 11:43:23 +0900 (b147d2e)
+++ lib/logaling/command/application.rb    2012-10-29 10:54:20 +0900 (be9b160)
@@ -262,7 +262,7 @@ module Logaling::Command
     method_option "no-pager", type: :boolean, default: false
     method_option "no-color", type: :boolean, default: false
     method_option "dictionary", type: :boolean, default: false, aliases: "--dict"
-    method_option "no-annotation", type: :boolean, default: false
+    method_option "fixed", type: :boolean, default: false
     def lookup(source_term)
       check_logaling_home_exists
       @repository.index

  Modified: lib/logaling/repository.rb (+1 -1)
===================================================================
--- lib/logaling/repository.rb    2012-10-12 11:43:23 +0900 (4f8f599)
+++ lib/logaling/repository.rb    2012-10-29 10:54:20 +0900 (943fefa)
@@ -93,7 +93,7 @@ module Logaling
           terms = db.lookup(source_term, glossary)
         end
       end
-      options['no-annotation'] ? except_annotation(terms) : terms
+      options['fixed'] ? except_annotation(terms) : terms
     end
 
     def except_annotation(terms)

  Modified: spec/logaling/repository_spec.rb (+2 -2)
===================================================================
--- spec/logaling/repository_spec.rb    2012-10-12 11:43:23 +0900 (e6c80f1)
+++ spec/logaling/repository_spec.rb    2012-10-29 10:54:20 +0900 (fc94dc5)
@@ -90,14 +90,14 @@ module Logaling
         end
       end
 
-      context 'with no-annotation option' do
+      context 'with ifixed option' do
         let(:annotation_word) { Logaling::Glossary::SUPPORTED_ANNOTATION.first }
         before do
           glossary.add("user", "ユーザ", "ユーザーではない")
           glossary.add("user-logaling", "ユーザ", "ユーザーと迷い中 #{annotation_word}")
           File.stub!(:mtime).and_return(Time.now - 1)
           repository.index
-          options = {"no-annotation" => true}
+          options = {"fixed" => true}
           @terms = repository.lookup("user", glossary, options)
           @result = [{
             :glossary_name=>"spec",
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



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