edge_csv 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c56b6d0e42c941b1a3c4c52c5c7a4b0b03a6cce8
4
- data.tar.gz: 5dda2557a1cbe890f5ebce1c38fa5e7ee85d251f
3
+ metadata.gz: 996c01204a34b6ec523126621e2fc156dd54f925
4
+ data.tar.gz: a6ab43fda037f88ae640fac513e4f1ab5bef46d8
5
5
  SHA512:
6
- metadata.gz: 2a837b9091e55fb6b141afd6955f5bbf25471e4d89ce11f84adb26d0b5f35f22d082591183f462b74854dad8839c0b253b0c66233683ed76e0f4d6cfa18487ec
7
- data.tar.gz: ed3cd6e7f930730974824052ccf7067f41b97bac3504fe1a21116787832f181d654131da878cbf6ac75b102972d7089037ca699b83391b45423008f435c9a1c1
6
+ metadata.gz: 7468c98f40c087b66f9c6d4ebdd8ec975afc2917a3474d9a1e520dfa06f8fe6c4439c4348aeadd306be4e7e23a0e5c0e5393a978f1d07c8d84f9e68ad68eb2e6
7
+ data.tar.gz: bec9d7f825eb0e74ce6e18a22ded0b4584a837cf42e2d8476efb1db4478f1c33b4950fe990ebd684e78ab6d8d36dcb23bda15e921270ed11111b054655b7b207
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
+ /.idea
3
4
  /Gemfile.lock
4
5
  /_yardoc/
5
6
  /coverage/
@@ -17,6 +17,6 @@
17
17
  <orderEntry type="inheritedJdk" />
18
18
  <orderEntry type="sourceFolder" forTests="false" />
19
19
  <orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.7, RVM: ruby-2.3.0) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, RVM: ruby-2.3.0) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, RVM: ruby-2.3.0) [gem]" level="application" />
21
21
  </component>
22
22
  </module>
@@ -1,7 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="fd515e82-a949-4b98-a4c3-95206c4be8c5" name="Default" comment="" />
4
+ <list default="true" id="fd515e82-a949-4b98-a4c3-95206c4be8c5" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
+ </list>
5
7
  <ignored path="edge_csv.iws" />
6
8
  <ignored path=".idea/workspace.xml" />
7
9
  <ignored path="$PROJECT_DIR$/.bundle/" />
@@ -29,22 +31,22 @@
29
31
  <favorites_list name="edge_csv" />
30
32
  </component>
31
33
  <component name="FileEditorManager">
32
- <leaf>
33
- <file leaf-file-name="edge_csv.gemspec" pinned="false" current-in-tab="true">
34
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
35
+ <file leaf-file-name="edge_csv.gemspec" pinned="false" current-in-tab="false">
34
36
  <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
35
37
  <provider selected="true" editor-type-id="text-editor">
36
- <state relative-caret-position="80">
37
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
38
+ <state relative-caret-position="240">
39
+ <caret line="12" column="73" selection-start-line="12" selection-start-column="73" selection-end-line="12" selection-end-column="73" />
38
40
  <folding />
39
41
  </state>
40
42
  </provider>
41
43
  </entry>
42
44
  </file>
43
- <file leaf-file-name="console" pinned="false" current-in-tab="false">
44
- <entry file="file://$PROJECT_DIR$/bin/console">
45
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
46
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/version.rb">
45
47
  <provider selected="true" editor-type-id="text-editor">
46
- <state relative-caret-position="0">
47
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
48
+ <state relative-caret-position="20">
49
+ <caret line="1" column="16" selection-start-line="1" selection-start-column="16" selection-end-line="1" selection-end-column="16" />
48
50
  <folding />
49
51
  </state>
50
52
  </provider>
@@ -53,8 +55,28 @@
53
55
  <file leaf-file-name="edge_csv.rb" pinned="false" current-in-tab="false">
54
56
  <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
55
57
  <provider selected="true" editor-type-id="text-editor">
56
- <state relative-caret-position="80">
57
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
58
+ <state relative-caret-position="160">
59
+ <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
60
+ <folding />
61
+ </state>
62
+ </provider>
63
+ </entry>
64
+ </file>
65
+ <file leaf-file-name="export.rb" pinned="false" current-in-tab="false">
66
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
67
+ <provider selected="true" editor-type-id="text-editor">
68
+ <state relative-caret-position="500">
69
+ <caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
70
+ <folding />
71
+ </state>
72
+ </provider>
73
+ </entry>
74
+ </file>
75
+ <file leaf-file-name="export_helpert.rb" pinned="false" current-in-tab="false">
76
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
77
+ <provider selected="true" editor-type-id="text-editor">
78
+ <state relative-caret-position="240">
79
+ <caret line="12" column="7" selection-start-line="10" selection-start-column="4" selection-end-line="12" selection-end-column="7" />
58
80
  <folding />
59
81
  </state>
60
82
  </provider>
@@ -68,8 +90,15 @@
68
90
  <component name="IdeDocumentHistory">
69
91
  <option name="CHANGED_PATHS">
70
92
  <list>
93
+ <option value="$PROJECT_DIR$/lib/export.rb" />
94
+ <option value="$PROJECT_DIR$/lib/edge_csv/import.rb" />
71
95
  <option value="$PROJECT_DIR$/lib/edge_csv.rb" />
96
+ <option value="$PROJECT_DIR$/.gitignore" />
97
+ <option value="$PROJECT_DIR$/README.md" />
98
+ <option value="$PROJECT_DIR$/lib/edge_csv/export.rb" />
99
+ <option value="$PROJECT_DIR$/lib/helpers/export_helpert.rb" />
72
100
  <option value="$PROJECT_DIR$/edge_csv.gemspec" />
101
+ <option value="$PROJECT_DIR$/lib/edge_csv/version.rb" />
73
102
  </list>
74
103
  </option>
75
104
  </component>
@@ -109,7 +138,6 @@
109
138
  <foldersAlwaysOnTop value="true" />
110
139
  </navigator>
111
140
  <panes>
112
- <pane id="Scratches" />
113
141
  <pane id="ProjectPane">
114
142
  <subPane>
115
143
  <PATH>
@@ -156,12 +184,17 @@
156
184
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
157
185
  </PATH_ELEMENT>
158
186
  <PATH_ELEMENT>
159
- <option name="myItemId" value="bin" />
187
+ <option name="myItemId" value="lib" />
188
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
189
+ </PATH_ELEMENT>
190
+ <PATH_ELEMENT>
191
+ <option name="myItemId" value="edge_csv" />
160
192
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
161
193
  </PATH_ELEMENT>
162
194
  </PATH>
163
195
  </subPane>
164
196
  </pane>
197
+ <pane id="Scratches" />
165
198
  <pane id="Scope" />
166
199
  </panes>
167
200
  </component>
@@ -170,6 +203,136 @@
170
203
  <property name="settings.editor.splitter.proportion" value="0.2" />
171
204
  <property name="last_opened_file_path" value="$PROJECT_DIR$" />
172
205
  <property name="WebServerToolWindowFactoryState" value="false" />
206
+ <property name="js-jscs-nodeInterpreter" value="/usr/bin/node" />
207
+ </component>
208
+ <component name="RecentsManager">
209
+ <key name="MoveFile.RECENT_KEYS">
210
+ <recent name="$PROJECT_DIR$/lib/edge_csv" />
211
+ </key>
212
+ </component>
213
+ <component name="RunManager">
214
+ <configuration default="true" type="BashConfigurationType" factoryName="Bash">
215
+ <option name="INTERPRETER_OPTIONS" value="" />
216
+ <option name="INTERPRETER_PATH" value="/bin/bash" />
217
+ <option name="WORKING_DIRECTORY" value="" />
218
+ <option name="PARENT_ENVS" value="true" />
219
+ <option name="SCRIPT_NAME" value="" />
220
+ <option name="PARAMETERS" value="" />
221
+ <module name="" />
222
+ <envs />
223
+ <method />
224
+ </configuration>
225
+ <configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
226
+ <predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
227
+ <module name="" />
228
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
229
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
230
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
231
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
232
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
233
+ <envs />
234
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
235
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
236
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
237
+ <COVERAGE_PATTERN ENABLED="true">
238
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
239
+ </COVERAGE_PATTERN>
240
+ </EXTENSION>
241
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
242
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
243
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
244
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
245
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
246
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
247
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
248
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
249
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
250
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
251
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
252
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
253
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
254
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
255
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
256
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
257
+ <method />
258
+ </configuration>
259
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
260
+ <method />
261
+ </configuration>
262
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
263
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
264
+ <module name="" />
265
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
266
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
267
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
268
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
269
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
270
+ <envs />
271
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
272
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
273
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
274
+ <COVERAGE_PATTERN ENABLED="true">
275
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
276
+ </COVERAGE_PATTERN>
277
+ </EXTENSION>
278
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
279
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
280
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
281
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
282
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
283
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
284
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
285
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
286
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
287
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
288
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
289
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
290
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
291
+ <method />
292
+ </configuration>
293
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
294
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
295
+ <module name="" />
296
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
297
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
298
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
299
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
300
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
301
+ <envs />
302
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
303
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
304
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
305
+ <COVERAGE_PATTERN ENABLED="true">
306
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
307
+ </COVERAGE_PATTERN>
308
+ </EXTENSION>
309
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
310
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
311
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
312
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
313
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
314
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
315
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
316
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
317
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
318
+ <method />
319
+ </configuration>
320
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
321
+ <node-interpreter>project</node-interpreter>
322
+ <node-options />
323
+ <gulpfile />
324
+ <tasks />
325
+ <arguments />
326
+ <envs />
327
+ <method />
328
+ </configuration>
329
+ <configuration default="true" type="js.build_tools.npm" factoryName="npm">
330
+ <command value="run-script" />
331
+ <scripts />
332
+ <node-interpreter value="project" />
333
+ <envs />
334
+ <method />
335
+ </configuration>
173
336
  </component>
174
337
  <component name="ShelveChangesManager" show_recycled="false">
175
338
  <option name="remove_strategy" value="false" />
@@ -181,21 +344,24 @@
181
344
  <option name="number" value="Default" />
182
345
  <option name="presentableId" value="Default" />
183
346
  <updated>1484390064424</updated>
184
- <workItem from="1484390065775" duration="1829000" />
347
+ <workItem from="1484390065775" duration="10892000" />
348
+ <workItem from="1484583017767" duration="2648000" />
349
+ <workItem from="1487696894790" duration="374000" />
350
+ <workItem from="1487698507949" duration="805000" />
185
351
  </task>
186
352
  <servers />
187
353
  </component>
188
354
  <component name="TimeTrackingManager">
189
- <option name="totallyTimeSpent" value="1829000" />
355
+ <option name="totallyTimeSpent" value="14719000" />
190
356
  </component>
191
357
  <component name="ToolWindowManager">
192
358
  <frame x="65" y="-4" width="1855" height="1084" extended-state="6" />
193
359
  <editor active="false" />
194
360
  <layout>
195
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21503593" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
361
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18076286" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
196
362
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
197
363
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3174442" sideWeight="0.50193477" order="10" side_tool="true" content_ui="tabs" />
198
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19458264" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
364
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.19458264" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
199
365
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27281946" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
200
366
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2498618" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
201
367
  <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.39249492" sideWeight="0.49806523" order="9" side_tool="false" content_ui="tabs" />
@@ -212,6 +378,35 @@
212
378
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
213
379
  <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
214
380
  </layout>
381
+ <layout-to-restore>
382
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
383
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
384
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4888438" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
385
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
386
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
387
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3174442" sideWeight="0.50193477" order="10" side_tool="true" content_ui="tabs" />
388
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
389
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27281946" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
390
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296146" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
391
+ <window_info id="Thumbnails" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296146" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
392
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.39249492" sideWeight="0.49806523" order="9" side_tool="false" content_ui="tabs" />
393
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21503593" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
394
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
395
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19458264" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
396
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.22008114" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
397
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2498618" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
398
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
399
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
400
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
401
+ </layout-to-restore>
402
+ </component>
403
+ <component name="Vcs.Log.UiProperties">
404
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
405
+ <collection />
406
+ </option>
407
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
408
+ <collection />
409
+ </option>
215
410
  </component>
216
411
  <component name="VcsContentAnnotationSettings">
217
412
  <option name="myLimit" value="2678400000" />
@@ -221,7 +416,71 @@
221
416
  <watches-manager />
222
417
  </component>
223
418
  <component name="editorHistoryManager">
224
- <entry file="file://$PROJECT_DIR$/bin/setup">
419
+ <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
420
+ <provider selected="true" editor-type-id="text-editor">
421
+ <state relative-caret-position="0">
422
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
423
+ <folding />
424
+ </state>
425
+ </provider>
426
+ </entry>
427
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
428
+ <provider selected="true" editor-type-id="text-editor">
429
+ <state relative-caret-position="160">
430
+ <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
431
+ <folding />
432
+ </state>
433
+ </provider>
434
+ </entry>
435
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
436
+ <provider selected="true" editor-type-id="text-editor">
437
+ <state relative-caret-position="500">
438
+ <caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
439
+ <folding />
440
+ </state>
441
+ </provider>
442
+ </entry>
443
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
444
+ <provider selected="true" editor-type-id="text-editor">
445
+ <state relative-caret-position="240">
446
+ <caret line="12" column="7" selection-start-line="10" selection-start-column="4" selection-end-line="12" selection-end-column="7" />
447
+ <folding />
448
+ </state>
449
+ </provider>
450
+ </entry>
451
+ <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
452
+ <provider selected="true" editor-type-id="text-editor">
453
+ <state relative-caret-position="260">
454
+ <caret line="13" column="24" selection-start-line="13" selection-start-column="24" selection-end-line="13" selection-end-column="24" />
455
+ <folding />
456
+ </state>
457
+ </provider>
458
+ </entry>
459
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
460
+ <provider selected="true" editor-type-id="text-editor">
461
+ <state relative-caret-position="160">
462
+ <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
463
+ <folding />
464
+ </state>
465
+ </provider>
466
+ </entry>
467
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
468
+ <provider selected="true" editor-type-id="text-editor">
469
+ <state relative-caret-position="0">
470
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
471
+ <folding />
472
+ </state>
473
+ </provider>
474
+ </entry>
475
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
476
+ <provider selected="true" editor-type-id="text-editor">
477
+ <state relative-caret-position="240">
478
+ <caret line="12" column="7" selection-start-line="10" selection-start-column="4" selection-end-line="12" selection-end-column="7" />
479
+ <folding />
480
+ </state>
481
+ </provider>
482
+ </entry>
483
+ <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
225
484
  <provider selected="true" editor-type-id="text-editor">
226
485
  <state relative-caret-position="0">
227
486
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@@ -229,26 +488,129 @@
229
488
  </state>
230
489
  </provider>
231
490
  </entry>
491
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
492
+ <provider selected="true" editor-type-id="text-editor">
493
+ <state relative-caret-position="160">
494
+ <caret line="8" column="14" selection-start-line="8" selection-start-column="14" selection-end-line="8" selection-end-column="14" />
495
+ <folding />
496
+ </state>
497
+ </provider>
498
+ </entry>
499
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
500
+ <provider selected="true" editor-type-id="text-editor">
501
+ <state relative-caret-position="160">
502
+ <caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" />
503
+ <folding />
504
+ </state>
505
+ </provider>
506
+ </entry>
507
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
508
+ <provider selected="true" editor-type-id="text-editor">
509
+ <state relative-caret-position="60">
510
+ <caret line="3" column="59" selection-start-line="3" selection-start-column="59" selection-end-line="3" selection-end-column="59" />
511
+ <folding />
512
+ </state>
513
+ </provider>
514
+ </entry>
515
+ <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
516
+ <provider selected="true" editor-type-id="text-editor">
517
+ <state relative-caret-position="0">
518
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
519
+ <folding />
520
+ </state>
521
+ </provider>
522
+ </entry>
523
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
524
+ <provider selected="true" editor-type-id="text-editor">
525
+ <state relative-caret-position="160">
526
+ <caret line="8" column="14" selection-start-line="8" selection-start-column="14" selection-end-line="8" selection-end-column="14" />
527
+ <folding />
528
+ </state>
529
+ </provider>
530
+ </entry>
531
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
532
+ <provider selected="true" editor-type-id="text-editor">
533
+ <state relative-caret-position="160">
534
+ <caret line="8" column="38" selection-start-line="8" selection-start-column="38" selection-end-line="8" selection-end-column="38" />
535
+ <folding />
536
+ </state>
537
+ </provider>
538
+ </entry>
539
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
540
+ <provider selected="true" editor-type-id="text-editor">
541
+ <state relative-caret-position="60">
542
+ <caret line="3" column="59" selection-start-line="3" selection-start-column="59" selection-end-line="3" selection-end-column="59" />
543
+ <folding />
544
+ </state>
545
+ </provider>
546
+ </entry>
547
+ <entry file="file://$PROJECT_DIR$/bin/setup">
548
+ <provider selected="true" editor-type-id="text-editor">
549
+ <state relative-caret-position="0">
550
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
551
+ </state>
552
+ </provider>
553
+ </entry>
232
554
  <entry file="file://$PROJECT_DIR$/bin/console">
233
555
  <provider selected="true" editor-type-id="text-editor">
234
556
  <state relative-caret-position="0">
235
557
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
558
+ </state>
559
+ </provider>
560
+ </entry>
561
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/import.rb" />
562
+ <entry file="file://$PROJECT_DIR$/edge_csv-0.1.0.gem" />
563
+ <entry file="file://$PROJECT_DIR$/.gitignore">
564
+ <provider selected="true" editor-type-id="text-editor">
565
+ <state relative-caret-position="40">
566
+ <caret line="2" column="13" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
567
+ <folding />
568
+ </state>
569
+ </provider>
570
+ </entry>
571
+ <entry file="file://$PROJECT_DIR$/README.md">
572
+ <provider selected="true" editor-type-id="text-editor">
573
+ <state relative-caret-position="249">
574
+ <caret line="23" column="7" selection-start-line="23" selection-start-column="7" selection-end-line="23" selection-end-column="7" />
575
+ </state>
576
+ </provider>
577
+ </entry>
578
+ <entry file="file://$PROJECT_DIR$/lib/helpers/export_helpert.rb">
579
+ <provider selected="true" editor-type-id="text-editor">
580
+ <state relative-caret-position="240">
581
+ <caret line="12" column="7" selection-start-line="10" selection-start-column="4" selection-end-line="12" selection-end-column="7" />
582
+ <folding />
583
+ </state>
584
+ </provider>
585
+ </entry>
586
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/export.rb">
587
+ <provider selected="true" editor-type-id="text-editor">
588
+ <state relative-caret-position="500">
589
+ <caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
236
590
  <folding />
237
591
  </state>
238
592
  </provider>
239
593
  </entry>
240
594
  <entry file="file://$PROJECT_DIR$/lib/edge_csv.rb">
241
595
  <provider selected="true" editor-type-id="text-editor">
242
- <state relative-caret-position="80">
243
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
596
+ <state relative-caret-position="160">
597
+ <caret line="8" column="22" selection-start-line="8" selection-start-column="22" selection-end-line="8" selection-end-column="22" />
244
598
  <folding />
245
599
  </state>
246
600
  </provider>
247
601
  </entry>
248
602
  <entry file="file://$PROJECT_DIR$/edge_csv.gemspec">
249
603
  <provider selected="true" editor-type-id="text-editor">
250
- <state relative-caret-position="80">
251
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
604
+ <state relative-caret-position="240">
605
+ <caret line="12" column="73" selection-start-line="12" selection-start-column="73" selection-end-line="12" selection-end-column="73" />
606
+ <folding />
607
+ </state>
608
+ </provider>
609
+ </entry>
610
+ <entry file="file://$PROJECT_DIR$/lib/edge_csv/version.rb">
611
+ <provider selected="true" editor-type-id="text-editor">
612
+ <state relative-caret-position="20">
613
+ <caret line="1" column="16" selection-start-line="1" selection-start-column="16" selection-end-line="1" selection-end-column="16" />
252
614
  <folding />
253
615
  </state>
254
616
  </provider>
data/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # EdgeCsv
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/edge_csv`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ There is the gem which make your work with csv and database pretty simple, by using just only two commands: EdgeCsv.export({}) and EdgeCsv.import({}).
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
5
+ ## Getting Started
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
@@ -20,17 +18,17 @@ Or install it yourself as:
20
18
 
21
19
  $ gem install edge_csv
22
20
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/edge_csv.
21
+ ## Documentation
22
+ Params for export:
36
23
 
24
+ ```ruby
25
+ {
26
+ "subjects": @products,
27
+ "fileds": %w(price name),
28
+ "sequince": %w(name price),
29
+ "headers": false,
30
+ "header_names": {
31
+ "name": "Product Name",
32
+ "price": "Product Price"
33
+ }
34
+ }
@@ -6,12 +6,12 @@ require 'edge_csv/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "edge_csv"
8
8
  spec.version = EdgeCsv::VERSION
9
- spec.authors = ["Dmitry Gusev", "Arvid Stahovskiy"]
9
+ spec.authors = ["Dmitry Gusev", "Arvid Stahovskiy", "Igor Potapov"]
10
10
  spec.email = ["dmitriy.gusev@duniceedge.com"]
11
11
 
12
12
  spec.summary = %q{A warning so people will logoff and go to bed!.}
13
13
  spec.description = %q{A warning so people will logoff and go to bed!}
14
- spec.homepage = ""
14
+ spec.homepage = "http://rubygems.org/gems/edge_cs'"
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
@@ -1,5 +1,13 @@
1
- require "edge_csv/version"
1
+ require 'edge_csv/export'
2
+ class EdgeCsv
3
+
4
+ def self.import
5
+ puts "Started Importing"
6
+ puts "Params are: "
7
+ end
8
+
9
+ def self.export data
10
+ Export.new(data).start
11
+ end
2
12
 
3
- module EdgeCsv
4
- VERSION = "0.0.1"
5
13
  end
@@ -0,0 +1,35 @@
1
+ class Export
2
+ include ExportHelper
3
+
4
+ def initialize data
5
+ @name = data['name'] || 'new_csv'
6
+ @auto_send = data['auto_send'] || true
7
+ @headers = data['headers'] || true
8
+ @subjects = data['subjects'] || []
9
+ @fields = data['fields'] || get_fields(@subjects[0])
10
+ @sequence = data['sequence'] || []
11
+ end
12
+
13
+ def start
14
+ puts("Started export #{@name}")
15
+ if @auto_send
16
+ send_data(collect_csv, :filename => "#{@name}.csv", :type => "text/csv")
17
+ else
18
+ collect_csv
19
+ end
20
+ puts("Completed export #{@name}")
21
+ end
22
+
23
+ private
24
+
25
+ def collect_csv
26
+ header = convert_headers(@fields, @headers)
27
+ keys = sequences_headers(@sequence, @fields)
28
+ CSV.generate(headers: true) do |csv|
29
+ csv << header if @headers
30
+ @subjects.each{ |subject| csv << keys.map{ |key| subject[key] } }
31
+ end
32
+ end
33
+
34
+
35
+ end
@@ -1,3 +1,3 @@
1
1
  module EdgeCsv
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,22 @@
1
+ module ExportHelper
2
+
3
+ def get_fields instance
4
+ instance = instance.attributes if instance.class != 'Hash'
5
+ internal_headers = instance.keys
6
+ internal_headers
7
+ end
8
+
9
+ def convert_headers(fields, headers)
10
+ fields.map{ |field| field.sub!('_', ' ').split(' ').map(&:capitalize).join(' ') }
11
+ headers.each do |initial, new|
12
+
13
+ end
14
+ end
15
+
16
+ def sequences_headers(sequence, fields)
17
+ keys = sequence
18
+ keys << fields - sequence
19
+ keys.flatten
20
+ end
21
+
22
+ end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edge_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Gusev
8
8
  - Arvid Stahovskiy
9
+ - Igor Potapov
9
10
  autorequire:
10
11
  bindir: exe
11
12
  cert_chain: []
12
- date: 2017-01-14 00:00:00.000000000 Z
13
+ date: 2017-02-21 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: bundler
@@ -60,8 +61,10 @@ files:
60
61
  - bin/setup
61
62
  - edge_csv.gemspec
62
63
  - lib/edge_csv.rb
64
+ - lib/edge_csv/export.rb
63
65
  - lib/edge_csv/version.rb
64
- homepage: ''
66
+ - lib/helpers/export_helpert.rb
67
+ homepage: http://rubygems.org/gems/edge_cs'
65
68
  licenses: []
66
69
  metadata: {}
67
70
  post_install_message: