csv2hash 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -5
  3. data/.yardoc/checksums +25 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/CHANGELOG.md +8 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +15 -1
  10. data/README.md +32 -4
  11. data/UPGRADE.md +2 -0
  12. data/bin/generate_doc +3 -0
  13. data/config/example.csv +10 -0
  14. data/config/rules.yml +7 -0
  15. data/doc/Cell.html +282 -0
  16. data/doc/Csv2hash/Adapter/Abstract.html +215 -0
  17. data/doc/Csv2hash/Adapter/Base/UnsupportedAdapter.html +123 -0
  18. data/doc/Csv2hash/Adapter/Base.html +201 -0
  19. data/doc/Csv2hash/Adapter/CsvAdapter.html +348 -0
  20. data/doc/Csv2hash/Adapter/MemoryAdapter.html +348 -0
  21. data/doc/Csv2hash/Adapter.html +117 -0
  22. data/doc/Csv2hash/DataWrapper.html +500 -0
  23. data/doc/Csv2hash/Definition.html +1008 -0
  24. data/doc/Csv2hash/Discover.html +192 -0
  25. data/doc/Csv2hash/Expectation.html +202 -0
  26. data/doc/Csv2hash/ExtraValidator.html +207 -0
  27. data/doc/Csv2hash/Main.html +1298 -0
  28. data/doc/Csv2hash/Notifier.html +189 -0
  29. data/doc/Csv2hash/Parser/Collection.html +283 -0
  30. data/doc/Csv2hash/Parser/Mapping.html +266 -0
  31. data/doc/Csv2hash/Parser.html +121 -0
  32. data/doc/Csv2hash/StructureValidator/Deprecation.html +215 -0
  33. data/doc/Csv2hash/StructureValidator/MaxColumns.html +327 -0
  34. data/doc/Csv2hash/StructureValidator/MinColumns.html +327 -0
  35. data/doc/Csv2hash/StructureValidator/ValidationError.html +123 -0
  36. data/doc/Csv2hash/StructureValidator/Validator.html +184 -0
  37. data/doc/Csv2hash/StructureValidator.html +311 -0
  38. data/doc/Csv2hash/Validator/Collection.html +217 -0
  39. data/doc/Csv2hash/Validator/Mapping.html +200 -0
  40. data/doc/Csv2hash/Validator.html +295 -0
  41. data/doc/Csv2hash.html +131 -0
  42. data/doc/CsvArray.html +200 -0
  43. data/doc/Registry.html +312 -0
  44. data/doc/_index.html +391 -0
  45. data/doc/class_list.html +54 -0
  46. data/doc/css/common.css +1 -0
  47. data/doc/css/full_list.css +57 -0
  48. data/doc/css/style.css +339 -0
  49. data/doc/file.README.html +499 -0
  50. data/doc/file_list.html +56 -0
  51. data/doc/frames.html +26 -0
  52. data/doc/index.html +499 -0
  53. data/doc/js/app.js +219 -0
  54. data/doc/js/full_list.js +178 -0
  55. data/doc/js/jquery.js +4 -0
  56. data/doc/method_list.html +473 -0
  57. data/doc/top-level-namespace.html +114 -0
  58. data/lib/csv2hash/definition.rb +3 -3
  59. data/lib/csv2hash/version.rb +1 -1
  60. data/lib/csv2hash/yaml_loader.rb +33 -0
  61. data/lib/csv2hash.rb +28 -8
  62. data/spec/csv2hash/yaml_loader_spec.rb +20 -0
  63. data/spec/csv2hash_spec.rb +13 -10
  64. metadata +56 -1
@@ -0,0 +1,215 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Csv2hash::Adapter::Abstract
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!Csv2hash/Adapter/Abstract.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (A)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Adapter.html" title="Csv2hash::Adapter (module)">Adapter</a></span></span>
36
+ &raquo;
37
+ <span class="title">Abstract</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Csv2hash::Adapter::Abstract
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Csv2hash::Adapter::Abstract</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/csv2hash/adapters/abstract.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <div id="subclasses">
103
+ <h2>Direct Known Subclasses</h2>
104
+ <p class="children"><span class='object_link'><a href="CsvAdapter.html" title="Csv2hash::Adapter::CsvAdapter (class)">CsvAdapter</a></span>, <span class='object_link'><a href="MemoryAdapter.html" title="Csv2hash::Adapter::MemoryAdapter (class)">MemoryAdapter</a></span></p>
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <h2>
115
+ Instance Method Summary
116
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
117
+ </h2>
118
+
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#source-instance_method" title="#source (instance method)">- (Object) <strong>source</strong> </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'></div></span>
139
+
140
+ </li>
141
+
142
+
143
+ </ul>
144
+
145
+
146
+
147
+
148
+ <div id="instance_method_details" class="method_details_list">
149
+ <h2>Instance Method Details</h2>
150
+
151
+
152
+ <div class="method_details first">
153
+ <h3 class="signature first" id="source-instance_method">
154
+
155
+ - (<tt>Object</tt>) <strong>source</strong>
156
+
157
+
158
+
159
+
160
+
161
+ </h3><div class="docstring">
162
+ <div class="discussion">
163
+
164
+
165
+ </div>
166
+ </div>
167
+ <div class="tags">
168
+
169
+ <p class="tag_title">Raises:</p>
170
+ <ul class="raise">
171
+
172
+ <li>
173
+
174
+
175
+ <span class='type'>(<tt>NotImplementedError</tt>)</span>
176
+
177
+
178
+
179
+ </li>
180
+
181
+ </ul>
182
+
183
+ </div><table class="source_code">
184
+ <tr>
185
+ <td>
186
+ <pre class="lines">
187
+
188
+
189
+ 5
190
+ 6
191
+ 7</pre>
192
+ </td>
193
+ <td>
194
+ <pre class="code"><span class="info file"># File 'lib/csv2hash/adapters/abstract.rb', line 5</span>
195
+
196
+ <span class='kw'>def</span> <span class='id identifier rubyid_source'>source</span>
197
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span>
198
+ <span class='kw'>end</span></pre>
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ </div>
203
+
204
+ </div>
205
+
206
+ </div>
207
+
208
+ <div id="footer">
209
+ Generated on Fri Aug 29 17:12:27 2014 by
210
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
211
+ 0.8.7.4 (ruby-2.1.2).
212
+ </div>
213
+
214
+ </body>
215
+ </html>
@@ -0,0 +1,123 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Exception: Csv2hash::Adapter::Base::UnsupportedAdapter
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!Csv2hash/Adapter/Base/UnsupportedAdapter.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (U)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Adapter.html" title="Csv2hash::Adapter (module)">Adapter</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Base.html" title="Csv2hash::Adapter::Base (class)">Base</a></span></span>
36
+ &raquo;
37
+ <span class="title">UnsupportedAdapter</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Exception: Csv2hash::Adapter::Base::UnsupportedAdapter
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">StandardError</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">StandardError</li>
82
+
83
+ <li class="next">Csv2hash::Adapter::Base::UnsupportedAdapter</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/csv2hash/adapters/base.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ </div>
115
+
116
+ <div id="footer">
117
+ Generated on Fri Aug 29 17:12:27 2014 by
118
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
+ 0.8.7.4 (ruby-2.1.2).
120
+ </div>
121
+
122
+ </body>
123
+ </html>
@@ -0,0 +1,201 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Csv2hash::Adapter::Base
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!Csv2hash/Adapter/Base.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (B)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Adapter.html" title="Csv2hash::Adapter (module)">Adapter</a></span></span>
36
+ &raquo;
37
+ <span class="title">Base</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Csv2hash::Adapter::Base
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Csv2hash::Adapter::Base</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/csv2hash/adapters/base.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Defined Under Namespace</h2>
103
+ <p class="children">
104
+
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Base/UnsupportedAdapter.html" title="Csv2hash::Adapter::Base::UnsupportedAdapter (class)">UnsupportedAdapter</a></span>
109
+
110
+
111
+ </p>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Class Method Summary
122
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#create-class_method" title="create (class method)">+ (Object) <strong>create</strong>(adapter_name, file_path_or_data) </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ </ul>
150
+
151
+
152
+
153
+
154
+ <div id="class_method_details" class="method_details_list">
155
+ <h2>Class Method Details</h2>
156
+
157
+
158
+ <div class="method_details first">
159
+ <h3 class="signature first" id="create-class_method">
160
+
161
+ + (<tt>Object</tt>) <strong>create</strong>(adapter_name, file_path_or_data)
162
+
163
+
164
+
165
+
166
+
167
+ </h3><table class="source_code">
168
+ <tr>
169
+ <td>
170
+ <pre class="lines">
171
+
172
+
173
+ 7
174
+ 8
175
+ 9
176
+ 10</pre>
177
+ </td>
178
+ <td>
179
+ <pre class="code"><span class="info file"># File 'lib/csv2hash/adapters/base.rb', line 7</span>
180
+
181
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span> <span class='id identifier rubyid_adapter_name'>adapter_name</span><span class='comma'>,</span> <span class='id identifier rubyid_file_path_or_data'>file_path_or_data</span>
182
+ <span class='id identifier rubyid_load'>load</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>csv2hash/adapters/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_adapter_name'>adapter_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>_adapter.rb</span><span class='tstring_end'>&quot;</span></span>
183
+ <span class='id identifier rubyid_class_eval'>class_eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Csv2hash::Adapter::</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_klass_adapter'>klass_adapter</span><span class='lparen'>(</span><span class='id identifier rubyid_adapter_name'>adapter_name</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_file_path_or_data'>file_path_or_data</span>
184
+ <span class='kw'>end</span></pre>
185
+ </td>
186
+ </tr>
187
+ </table>
188
+ </div>
189
+
190
+ </div>
191
+
192
+ </div>
193
+
194
+ <div id="footer">
195
+ Generated on Fri Aug 29 17:12:27 2014 by
196
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
197
+ 0.8.7.4 (ruby-2.1.2).
198
+ </div>
199
+
200
+ </body>
201
+ </html>