mymatrix 0.0.5 → 0.0.6

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.
@@ -20,6 +20,7 @@ class LoaderTxt < FileIO
20
20
  end
21
21
  opts[:sep]||="\t"
22
22
  fi.each do |line|
23
+
23
24
  row = MyMatrix.toutf8(line).chomp.split(/#{opts[:sep]}/)
24
25
  #「1,300台」などカンマが使われている場合、「"1,300台"」となってしまうので、カンマを無視する
25
26
  newRow = []
@@ -7,7 +7,7 @@ require 'rubygems'
7
7
  require 'nkf'
8
8
  require 'logger'
9
9
  require 'pp'
10
- require 'enumerable_ex' #verbose_each
10
+ require 'exeach' #verbose_each
11
11
 
12
12
  require 'loader_factory'
13
13
 
@@ -944,27 +944,31 @@ class MyMatrix
944
944
  def self.cp932ize(str)
945
945
  out = str.dup
946
946
  cases = [
947
- #['−', '―'], #MINUS SIGN(U+2212) to FULLWIDTH HYPHEN-MINUS(U+2015)(windows)
948
- #↑仕様としては上記が正しいが、運用上MINUS SIGN(U+2212) は FULLWIDTH HYPHEN-MINUS(U+FF0D)に変換する
949
- #キー入力時にMacとWindowsで同じ文字コードとなることが望ましいため。
950
-
951
- ['〜','~'], #WAVE DASH (U+301C) to FULLWIDTH TILDE(U+FF5E)(windows)
952
- ['‖','∥'], #DOUBLE VERTICAL LINE (U+2016, "‖") を PARALLEL TO (U+2225, "∥") に
953
- ['—', '―'], #EM DASH (U+2014, "—") を HORIZONTAL BAR (U+2015, "―") に
954
- #以下、キー入力を想定した変換。
955
- ['ー', 'ー'], #MacのハイフンF7(google ime)→Windows(googleime):同じ
956
- ['ー', 'ー'], #MacのハイフンF8(google ime)→Windows(googleime):同じ
957
- ['−', '-'], #MacのハイフンF9[−](google ime)→Windows[-](googleime):違う。MINUS SIGN(U+2212) to FULLWIDTH HYPHEN-MINUS(U+FF0D)
958
- ['-', '-'], #MacのハイフンF10(google ime)→Windows(googleime):同じ
959
- #ユニコード固有文字:ノーブレークスペース
960
- ['[\u00A0]', ' '],
961
- #yen
962
- ['[\u00A5]', '¥'],
963
- # éとè:eの上に´と`
964
- ['[\u00E9]', 'e'],['[\u00E8]', 'e'],
965
- #spaces
966
- ['[\u2000]', ' '],['[\u2001]', ' '],['[\u2002]', ' '],['[\u2003]', ' '],['[\u2004]', ' '],['[\u2005]', ' '],['[\u2006]', ' '],['[\u2007]', ' '],['[\u2008]', ' '],['[\u2009]', ' '],['[\u200A]', ' '],['[\u205F]', ' ']
967
- ]
947
+ #['−', '―'], #MINUS SIGN(U+2212) to FULLWIDTH HYPHEN-MINUS(U+2015)(windows)
948
+ #↑仕様としては上記が正しいが、運用上MINUS SIGN(U+2212) は FULLWIDTH HYPHEN-MINUS(U+FF0D)に変換する
949
+ #キー入力時にMacとWindowsで同じ文字コードとなることが望ましいため。
950
+
951
+ ['〜','~'], #WAVE DASH (U+301C) to FULLWIDTH TILDE(U+FF5E)(windows)
952
+ ['‖','∥'], #DOUBLE VERTICAL LINE (U+2016, "‖") を PARALLEL TO (U+2225, "∥") に
953
+ ['—', '―'], #EM DASH (U+2014, "—") を HORIZONTAL BAR (U+2015, "―") に
954
+ #以下、キー入力を想定した変換。
955
+ ['ー', 'ー'], #MacのハイフンF7(google ime)→Windows(googleime):同じ
956
+ ['ー', 'ー'], #MacのハイフンF8(google ime)→Windows(googleime):同じ
957
+ ['−', '-'], #MacのハイフンF9[−](google ime)→Windows[-](googleime):違う。MINUS SIGN(U+2212) to FULLWIDTH HYPHEN-MINUS(U+FF0D)
958
+ ['-', '-'], #MacのハイフンF10(google ime)→Windows(googleime):同じ
959
+ #ユニコード固有文字:ノーブレークスペース
960
+ ['[\u00A0]', ' '],
961
+ #yen
962
+ ['[\u00A5]', '¥'],
963
+ # éとè:eの上に´と`
964
+ ['[\u00E9]', 'e'],['[\u00E8]', 'e'],
965
+ # todo:よく使う文字(http://www.geocities.jp/laut6/mojibakesetumei/mojibakesetumei2.html より)
966
+
967
+ #spaces
968
+ ['[\u2000]', ' '],['[\u2001]', ' '],['[\u2002]', ' '],['[\u2003]', ' '],['[\u2004]', ' '],['[\u2005]', ' '],['[\u2006]', ' '],['[\u2007]', ' '],['[\u2008]', ' '],['[\u2009]', ' '],['[\u200A]', ' '],['[\u205F]', ' ']
969
+ ]
970
+
971
+
968
972
  cases.each do |c|
969
973
  out.gsub!(/#{c[0]}/, c[1])
970
974
  end
@@ -1,3 +1,3 @@
1
1
  class MyMatrix
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -20,5 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # specify any dependencies here; for example:
22
22
  s.add_development_dependency "rspec"
23
+ s.add_development_dependency "exeach"
24
+ s.add_development_dependency "spreadsheet"
23
25
  # s.add_runtime_dependency "rest-client"
24
26
  end
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mymatrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-27 00:00:00.000000000 Z
12
+ date: 2012-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &2152866440 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,44 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2152866440
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: exeach
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: spreadsheet
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
25
62
  description: mymatrix is a handling library for MS Excel and csv/tsv text.
26
63
  email:
27
64
  - yukihico@gmail.com
@@ -39,6 +76,11 @@ files:
39
76
  - lib/mymatrix.rb
40
77
  - lib/mymatrix/version.rb
41
78
  - mymatrix.gemspec
79
+ - pkg/mymatrix-0.0.1.gem
80
+ - pkg/mymatrix-0.0.2.gem
81
+ - pkg/mymatrix-0.0.3.gem
82
+ - pkg/mymatrix-0.0.4.gem
83
+ - pkg/mymatrix-0.0.5.gem
42
84
  - spec/csv.csv
43
85
  - spec/csv.csv.txt
44
86
  - spec/csv_test.csv
@@ -82,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
124
  version: '0'
83
125
  requirements: []
84
126
  rubyforge_project: mymatrix
85
- rubygems_version: 1.8.10
127
+ rubygems_version: 1.8.21
86
128
  signing_key:
87
129
  specification_version: 3
88
130
  summary: MS Excel and csv/tsv text handling library