kiji 0.2.1 → 0.2.2
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.
- checksums.yaml +4 -4
 - data/README.md +19 -29
 - data/lib/kiji/version.rb +1 -1
 - data/lib/kiji/zipper.rb +2 -5
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 650cf23c5b56b95ed1ec450da45282d22681cb95
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ad11f5e43a74af605991c86eb11adf7a392b342f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0e608445571ff033884c7ebbd8273421e8ef46730e55d9bd8c86d26f012dcdb0a740ce99ff42e5f21b3a65784468bda5c04b4353b9d38155d948d4d7a3cd7c41
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5fd6843d54c6093a09aade8b4ab99582a75de5cf7dc5adae9fcfa927bbd7d26c64cffc12d0e90ac7282c3dbdc0098d181e2c693ec42795c2d29541e3c4cd6084
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -43,11 +43,15 @@ $ gem install kiji 
     | 
|
| 
       43 
43 
     | 
    
         
             
            ### 利用者 ID 登録
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
       45 
45 
     | 
    
         
             
            ```ruby
         
     | 
| 
      
 46 
     | 
    
         
            +
            p12 = OpenSSL::PKCS12.new(p12_file, P12_PIN)
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
       46 
48 
     | 
    
         
             
            client = Kiji::Client.new do |c|
         
     | 
| 
       47 
49 
     | 
    
         
             
              c.software_id   = ENV['EGOV_SOFTWARE_ID']
         
     | 
| 
       48 
50 
     | 
    
         
             
              c.api_end_point = ENV['EGOV_API_END_POINT']
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
               
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
              # 証明書 & 秘密鍵の attach
         
     | 
| 
      
 53 
     | 
    
         
            +
              c.cert = p12.certificate
         
     | 
| 
      
 54 
     | 
    
         
            +
              c.private_key = p12.key
         
     | 
| 
       51 
55 
     | 
    
         
             
            end
         
     | 
| 
       52 
56 
     | 
    
         | 
| 
       53 
57 
     | 
    
         
             
            response = client.register("NEW_USER_ID") # => Faraday::Response
         
     | 
| 
         @@ -58,11 +62,15 @@ xml.at_xpath('//Code').text # => 0(正常終了) 
     | 
|
| 
       58 
62 
     | 
    
         
             
            ### 利用者認証
         
     | 
| 
       59 
63 
     | 
    
         | 
| 
       60 
64 
     | 
    
         
             
            ```ruby
         
     | 
| 
      
 65 
     | 
    
         
            +
            p12 = OpenSSL::PKCS12.new(p12_file, P12_PIN)
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
       61 
67 
     | 
    
         
             
            client = Kiji::Client.new do |c|
         
     | 
| 
       62 
68 
     | 
    
         
             
              c.software_id   = ENV['EGOV_SOFTWARE_ID']
         
     | 
| 
       63 
69 
     | 
    
         
             
              c.api_end_point = ENV['EGOV_API_END_POINT']
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
               
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
              # 証明書 & 秘密鍵の attach
         
     | 
| 
      
 72 
     | 
    
         
            +
              c.cert = p12.certificate
         
     | 
| 
      
 73 
     | 
    
         
            +
              c.private_key = p12.key
         
     | 
| 
       66 
74 
     | 
    
         
             
            end
         
     | 
| 
       67 
75 
     | 
    
         | 
| 
       68 
76 
     | 
    
         
             
            # 利用者認証(Access Key の取得 & 設定)
         
     | 
| 
         @@ -74,11 +82,15 @@ client.access_key = xml.at_xpath('//AccessKey').text 
     | 
|
| 
       74 
82 
     | 
    
         
             
            ### 一括申請
         
     | 
| 
       75 
83 
     | 
    
         | 
| 
       76 
84 
     | 
    
         
             
            ```ruby
         
     | 
| 
      
 85 
     | 
    
         
            +
            p12 = OpenSSL::PKCS12.new(p12_file, P12_PIN)
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
       77 
87 
     | 
    
         
             
            client = Kiji::Client.new do |c|
         
     | 
| 
       78 
88 
     | 
    
         
             
              c.software_id   = ENV['EGOV_SOFTWARE_ID']
         
     | 
| 
       79 
89 
     | 
    
         
             
              c.api_end_point = ENV['EGOV_API_END_POINT']
         
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
               
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
              # 証明書 & 秘密鍵の attach
         
     | 
| 
      
 92 
     | 
    
         
            +
              c.cert = p12.certificate
         
     | 
| 
      
 93 
     | 
    
         
            +
              c.private_key = p12.key
         
     | 
| 
       82 
94 
     | 
    
         
             
            end
         
     | 
| 
       83 
95 
     | 
    
         | 
| 
       84 
96 
     | 
    
         
             
            # 利用者認証(Access Key の取得 & 設定)
         
     | 
| 
         @@ -116,28 +128,6 @@ end 
     | 
|
| 
       116 
128 
     | 
    
         | 
| 
       117 
129 
     | 
    
         
             
            [仕様書ダウンロード|電子政府の総合窓口e-Gov イーガブ](http://www.e-gov.go.jp/shinsei/interface_api/download.html) > 検証環境テスト用電子証明書
         
     | 
| 
       118 
130 
     | 
    
         | 
| 
       119 
     | 
    
         
            -
            **TIPS**
         
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
            pfx から *.pem と *.cer を取り出す
         
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
            __*.cer__
         
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
            ```bash
         
     | 
| 
       126 
     | 
    
         
            -
            $ openssl pkcs12 -in e-GovEE02_sha2.pfx -nokeys -out ~/Desktop/egov.cer
         
     | 
| 
       127 
     | 
    
         
            -
            Enter Import Password:(gpkitestと入力)
         
     | 
| 
       128 
     | 
    
         
            -
            MAC verified OK
         
     | 
| 
       129 
     | 
    
         
            -
            ```
         
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
            __*.pem__
         
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
            ```bash
         
     | 
| 
       134 
     | 
    
         
            -
            $ openssl pkcs12 -in e-GovEE02_sha2.pfx -nocerts -out ~/Desktop/egov.pem
         
     | 
| 
       135 
     | 
    
         
            -
            Enter Import Password:(gpkitestと入力)
         
     | 
| 
       136 
     | 
    
         
            -
            MAC verified OK
         
     | 
| 
       137 
     | 
    
         
            -
            Enter PEM pass phrase:(適当なパスワード入力)
         
     | 
| 
       138 
     | 
    
         
            -
            Verifying - Enter PEM pass phrase:(適当なパスワード入力)
         
     | 
| 
       139 
     | 
    
         
            -
            ```
         
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
131 
     | 
    
         | 
| 
       142 
132 
     | 
    
         
             
            ## API と メソッドの対応
         
     | 
| 
       143 
133 
     | 
    
         | 
| 
         @@ -223,4 +213,4 @@ KUFU では OSS 活動に積極的なエンジニアを募集しています! 
     | 
|
| 
       223 
213 
     | 
    
         
             
            古来より日本人と関わりの深い鳥として「日本書紀」、「万葉集」、「桃太郎」をはじめ、様々な文学作品に登場してきました。  
         
     | 
| 
       224 
214 
     | 
    
         
             
            国鳥であるにも関わらず狩猟が許可されているというちょっと悲しい鳥でもあります。
         
     | 
| 
       225 
215 
     | 
    
         | 
| 
       226 
     | 
    
         
            -
            kiji のロゴは「きじ馬(あるいは雉子車)」と呼ばれる、九州地方に伝わる郷土玩具をモチーフとしています。
         
     | 
| 
      
 216 
     | 
    
         
            +
            kiji のロゴは「きじ馬(あるいは雉子車)」と呼ばれる、九州地方に伝わる郷土玩具をモチーフとしています。
         
     | 
    
        data/lib/kiji/version.rb
    CHANGED
    
    
    
        data/lib/kiji/zipper.rb
    CHANGED
    
    | 
         @@ -54,10 +54,7 @@ module Kiji 
     | 
|
| 
       54 
54 
     | 
    
         
             
                  @input_dir = input_dir
         
     | 
| 
       55 
55 
     | 
    
         
             
                  @output_file = output_file
         
     | 
| 
       56 
56 
     | 
    
         | 
| 
       57 
     | 
    
         
            -
                  entries = Dir.entries(@input_dir)
         
     | 
| 
       58 
     | 
    
         
            -
                  entries.delete('.DS_Store')
         
     | 
| 
       59 
     | 
    
         
            -
                  entries.delete('.')
         
     | 
| 
       60 
     | 
    
         
            -
                  entries.delete('..')
         
     | 
| 
      
 57 
     | 
    
         
            +
                  entries = Dir.entries(@input_dir) - %w(. .. .DS_Store)
         
     | 
| 
       61 
58 
     | 
    
         
             
                  Zip.sort_entries = true
         
     | 
| 
       62 
59 
     | 
    
         
             
                  Zip::File.open(output_file, Zip::File::CREATE) do |io|
         
     | 
| 
       63 
60 
     | 
    
         
             
                    write_entries(entries, '', io)
         
     | 
| 
         @@ -87,7 +84,7 @@ module Kiji 
     | 
|
| 
       87 
84 
     | 
    
         | 
| 
       88 
85 
     | 
    
         
             
                def put_into_archive(disk_file_path, io, zip_file_path)
         
     | 
| 
       89 
86 
     | 
    
         
             
                  io.get_output_stream(zip_file_path) do |f|
         
     | 
| 
       90 
     | 
    
         
            -
                    f. 
     | 
| 
      
 87 
     | 
    
         
            +
                    f.write(File.open(disk_file_path, 'rb').read)
         
     | 
| 
       91 
88 
     | 
    
         
             
                  end
         
     | 
| 
       92 
89 
     | 
    
         
             
                end
         
     | 
| 
       93 
90 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kiji
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - kakipo
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-02-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |