color-japanese 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.txt +3 -0
 - data/History.txt +3 -0
 - data/Manifest.txt +37 -0
 - data/README.txt +123 -0
 - data/Rakefile +123 -0
 - data/bin/jcolorc +119 -0
 - data/examples/Rakefile +57 -0
 - data/examples/color-test.html.in +57 -0
 - data/examples/color2html.rb +173 -0
 - data/examples/default.css.in +66 -0
 - data/examples/default.html +60 -0
 - data/examples/palletize.rb +58 -0
 - data/helper/helper.rb +3 -0
 - data/helper/rake.rb +58 -0
 - data/helper/rake_sh_filter.rb +23 -0
 - data/helper/util.rb +19 -0
 - data/lib/color/rgb/jp.rb +12 -0
 - data/lib/color/rgb/jp/base.rb +10 -0
 - data/lib/color/rgb/jp/base/color_name.rb +39 -0
 - data/lib/color/rgb/jp/base/encode.rb +23 -0
 - data/lib/color/rgb/jp/base/named_rgb.rb +15 -0
 - data/lib/color/rgb/jp/base/pallet.rb +49 -0
 - data/lib/color/rgb/jp/compiler/command.rb +102 -0
 - data/lib/color/rgb/jp/compiler/compiler.rb +203 -0
 - data/lib/color/rgb/jp/jisz8102.rb +547 -0
 - data/lib/color/rgb/jp/traditional.rb +943 -0
 - data/lib/color/rgb/jp/version.rb +11 -0
 - data/setup.rb +1585 -0
 - data/test/helper.rb +25 -0
 - data/test/test_color_name.rb +77 -0
 - data/test/test_compiler.rb +181 -0
 - data/test/test_encode.rb +42 -0
 - data/test/test_jisz8102.rb +39 -0
 - data/test/test_named_rgb.rb +25 -0
 - data/test/test_pallet.rb +78 -0
 - data/test/test_traditional.rb +39 -0
 - data/test/test_version.rb +19 -0
 - metadata +106 -0
 
| 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # -*- encoding: utf8 -*-
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require File.dirname(__FILE__) + '/helper.rb'
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            class TestTraditional < Test::Unit::TestCase
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              T = Color::RGB::JP::Traditional
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              def test_alias
         
     | 
| 
      
 10 
     | 
    
         
            +
                assert_same(Color::RGB::JP::Traditional, Color::RGB::JP::Trad)
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              def test_bracket_utf8
         
     | 
| 
      
 14 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T["sakurairo"])
         
     | 
| 
      
 15 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T["SakuraIro"])
         
     | 
| 
      
 16 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T["Sakura-Iro"])
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroKanji])
         
     | 
| 
      
 19 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroHiragana])
         
     | 
| 
      
 20 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroKatakana])
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroKanji, "UTF-8"])
         
     | 
| 
      
 23 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroHiragana, "UTF-8"])
         
     | 
| 
      
 24 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::UTF_8::SakuraIroKatakana, "UTF-8"])
         
     | 
| 
      
 25 
     | 
    
         
            +
              end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
              def test_bracket_sjis
         
     | 
| 
      
 28 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::Shift_JIS::SakuraIroKanji, "Shift_JIS"])
         
     | 
| 
      
 29 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::Shift_JIS::SakuraIroHiragana, "Shift_JIS"])
         
     | 
| 
      
 30 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::Shift_JIS::SakuraIroKatakana, "Shift_JIS"])
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
              def test_bracket_eucjp
         
     | 
| 
      
 34 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::EUC_JP::SakuraIroKanji, "EUC-JP"])
         
     | 
| 
      
 35 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::EUC_JP::SakuraIroHiragana, "EUC-JP"])
         
     | 
| 
      
 36 
     | 
    
         
            +
                assert_equal(T::SakuraIro, T[Fixture::EUC_JP::SakuraIroKatakana, "EUC-JP"])
         
     | 
| 
      
 37 
     | 
    
         
            +
              end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,19 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require File.dirname(__FILE__) + '/helper.rb'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class TestVersion < Test::Unit::TestCase
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              def test_version
         
     | 
| 
      
 6 
     | 
    
         
            +
                assert_kind_of(String, Color::RGB::JP::VERSION::STRING)
         
     | 
| 
      
 7 
     | 
    
         
            +
                assert_kind_of(Integer, Color::RGB::JP::VERSION::MAJOR)
         
     | 
| 
      
 8 
     | 
    
         
            +
                assert_kind_of(Integer, Color::RGB::JP::VERSION::MINOR)
         
     | 
| 
      
 9 
     | 
    
         
            +
                assert_kind_of(Integer, Color::RGB::JP::VERSION::TINY)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                assert_match(/\d+\.\d+\.\d+/, Color::RGB::JP::VERSION::STRING)
         
     | 
| 
      
 12 
     | 
    
         
            +
                assert_equal(Color::RGB::JP::VERSION::STRING, [
         
     | 
| 
      
 13 
     | 
    
         
            +
                  Color::RGB::JP::VERSION::MAJOR,
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Color::RGB::JP::VERSION::MINOR,
         
     | 
| 
      
 15 
     | 
    
         
            +
                  Color::RGB::JP::VERSION::TINY,
         
     | 
| 
      
 16 
     | 
    
         
            +
                ].join('.'))
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,106 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            rubygems_version: 0.9.2
         
     | 
| 
      
 3 
     | 
    
         
            +
            specification_version: 1
         
     | 
| 
      
 4 
     | 
    
         
            +
            name: color-japanese
         
     | 
| 
      
 5 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 6 
     | 
    
         
            +
              version: 1.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            date: 2007-04-14 00:00:00 +09:00
         
     | 
| 
      
 8 
     | 
    
         
            +
            summary: color-japanese defines RGB value for Japanese color names.
         
     | 
| 
      
 9 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 10 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 11 
     | 
    
         
            +
            email: miyamuko@gmail.com
         
     | 
| 
      
 12 
     | 
    
         
            +
            homepage: http://color-japanese.rubyforge.org/
         
     | 
| 
      
 13 
     | 
    
         
            +
            rubyforge_project: color-japanese
         
     | 
| 
      
 14 
     | 
    
         
            +
            description: "color-japanese defines RGB value for Japanese color names.  Supported color names are: * Japanese traditional colors * JIS Z 8102 (Names of non-luminous object colours)"
         
     | 
| 
      
 15 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 16 
     | 
    
         
            +
            default_executable: 
         
     | 
| 
      
 17 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 18 
     | 
    
         
            +
            has_rdoc: true
         
     | 
| 
      
 19 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Version::Requirement 
         
     | 
| 
      
 20 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 21 
     | 
    
         
            +
              - - ">"
         
     | 
| 
      
 22 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 23 
     | 
    
         
            +
                  version: 0.0.0
         
     | 
| 
      
 24 
     | 
    
         
            +
              version: 
         
     | 
| 
      
 25 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 26 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 27 
     | 
    
         
            +
            cert_chain: 
         
     | 
| 
      
 28 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 29 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 30 
     | 
    
         
            +
            - MIYAMUKO Katsuyuki
         
     | 
| 
      
 31 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 32 
     | 
    
         
            +
            - CHANGELOG.txt
         
     | 
| 
      
 33 
     | 
    
         
            +
            - History.txt
         
     | 
| 
      
 34 
     | 
    
         
            +
            - Manifest.txt
         
     | 
| 
      
 35 
     | 
    
         
            +
            - README.txt
         
     | 
| 
      
 36 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 37 
     | 
    
         
            +
            - bin/jcolorc
         
     | 
| 
      
 38 
     | 
    
         
            +
            - examples/Rakefile
         
     | 
| 
      
 39 
     | 
    
         
            +
            - examples/color-test.html.in
         
     | 
| 
      
 40 
     | 
    
         
            +
            - examples/color2html.rb
         
     | 
| 
      
 41 
     | 
    
         
            +
            - examples/default.css.in
         
     | 
| 
      
 42 
     | 
    
         
            +
            - examples/default.html
         
     | 
| 
      
 43 
     | 
    
         
            +
            - examples/palletize.rb
         
     | 
| 
      
 44 
     | 
    
         
            +
            - helper/helper.rb
         
     | 
| 
      
 45 
     | 
    
         
            +
            - helper/rake.rb
         
     | 
| 
      
 46 
     | 
    
         
            +
            - helper/rake_sh_filter.rb
         
     | 
| 
      
 47 
     | 
    
         
            +
            - helper/util.rb
         
     | 
| 
      
 48 
     | 
    
         
            +
            - lib/color/rgb/jp.rb
         
     | 
| 
      
 49 
     | 
    
         
            +
            - lib/color/rgb/jp/base.rb
         
     | 
| 
      
 50 
     | 
    
         
            +
            - lib/color/rgb/jp/base/color_name.rb
         
     | 
| 
      
 51 
     | 
    
         
            +
            - lib/color/rgb/jp/base/encode.rb
         
     | 
| 
      
 52 
     | 
    
         
            +
            - lib/color/rgb/jp/base/named_rgb.rb
         
     | 
| 
      
 53 
     | 
    
         
            +
            - lib/color/rgb/jp/base/pallet.rb
         
     | 
| 
      
 54 
     | 
    
         
            +
            - lib/color/rgb/jp/compiler/command.rb
         
     | 
| 
      
 55 
     | 
    
         
            +
            - lib/color/rgb/jp/compiler/compiler.rb
         
     | 
| 
      
 56 
     | 
    
         
            +
            - lib/color/rgb/jp/jisz8102.rb
         
     | 
| 
      
 57 
     | 
    
         
            +
            - lib/color/rgb/jp/traditional.rb
         
     | 
| 
      
 58 
     | 
    
         
            +
            - lib/color/rgb/jp/version.rb
         
     | 
| 
      
 59 
     | 
    
         
            +
            - setup.rb
         
     | 
| 
      
 60 
     | 
    
         
            +
            - test/helper.rb
         
     | 
| 
      
 61 
     | 
    
         
            +
            - test/test_color_name.rb
         
     | 
| 
      
 62 
     | 
    
         
            +
            - test/test_compiler.rb
         
     | 
| 
      
 63 
     | 
    
         
            +
            - test/test_encode.rb
         
     | 
| 
      
 64 
     | 
    
         
            +
            - test/test_jisz8102.rb
         
     | 
| 
      
 65 
     | 
    
         
            +
            - test/test_named_rgb.rb
         
     | 
| 
      
 66 
     | 
    
         
            +
            - test/test_pallet.rb
         
     | 
| 
      
 67 
     | 
    
         
            +
            - test/test_traditional.rb
         
     | 
| 
      
 68 
     | 
    
         
            +
            - test/test_version.rb
         
     | 
| 
      
 69 
     | 
    
         
            +
            test_files: 
         
     | 
| 
      
 70 
     | 
    
         
            +
            - test/test_color_name.rb
         
     | 
| 
      
 71 
     | 
    
         
            +
            - test/test_compiler.rb
         
     | 
| 
      
 72 
     | 
    
         
            +
            - test/test_encode.rb
         
     | 
| 
      
 73 
     | 
    
         
            +
            - test/test_jisz8102.rb
         
     | 
| 
      
 74 
     | 
    
         
            +
            - test/test_named_rgb.rb
         
     | 
| 
      
 75 
     | 
    
         
            +
            - test/test_pallet.rb
         
     | 
| 
      
 76 
     | 
    
         
            +
            - test/test_traditional.rb
         
     | 
| 
      
 77 
     | 
    
         
            +
            - test/test_version.rb
         
     | 
| 
      
 78 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
            executables: 
         
     | 
| 
      
 83 
     | 
    
         
            +
            - jcolorc
         
     | 
| 
      
 84 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            dependencies: 
         
     | 
| 
      
 89 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 90 
     | 
    
         
            +
              name: color-tools
         
     | 
| 
      
 91 
     | 
    
         
            +
              version_requirement: 
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Version::Requirement 
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ">"
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: 0.0.0
         
     | 
| 
      
 97 
     | 
    
         
            +
                version: 
         
     | 
| 
      
 98 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 99 
     | 
    
         
            +
              name: hoe
         
     | 
| 
      
 100 
     | 
    
         
            +
              version_requirement: 
         
     | 
| 
      
 101 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Version::Requirement 
         
     | 
| 
      
 102 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 103 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 104 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 105 
     | 
    
         
            +
                    version: 1.2.0
         
     | 
| 
      
 106 
     | 
    
         
            +
                version: 
         
     |