kuppayam 0.1.6dev2 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -1
  3. data/app/assets/images/android-icon-144x144.png +0 -0
  4. data/app/assets/images/android-icon-192x192.png +0 -0
  5. data/app/assets/images/android-icon-36x36.png +0 -0
  6. data/app/assets/images/android-icon-48x48.png +0 -0
  7. data/app/assets/images/android-icon-72x72.png +0 -0
  8. data/app/assets/images/android-icon-96x96.png +0 -0
  9. data/app/assets/images/apple-icon-114x114.png +0 -0
  10. data/app/assets/images/apple-icon-120x120.png +0 -0
  11. data/app/assets/images/apple-icon-144x144.png +0 -0
  12. data/app/assets/images/apple-icon-152x152.png +0 -0
  13. data/app/assets/images/apple-icon-180x180.png +0 -0
  14. data/app/assets/images/apple-icon-57x57.png +0 -0
  15. data/app/assets/images/apple-icon-60x60.png +0 -0
  16. data/app/assets/images/apple-icon-72x72.png +0 -0
  17. data/app/assets/images/apple-icon-76x76.png +0 -0
  18. data/app/assets/images/apple-icon-precomposed.png +0 -0
  19. data/app/assets/images/apple-icon.png +0 -0
  20. data/app/assets/images/browserconfig.xml +2 -0
  21. data/app/assets/images/favicon-16x16.png +0 -0
  22. data/app/assets/images/favicon-32x32.png +0 -0
  23. data/app/assets/images/favicon-96x96.png +0 -0
  24. data/app/assets/images/favicon.ico +0 -0
  25. data/app/assets/images/logo-on-white.png +0 -0
  26. data/app/assets/images/logo-small.png +0 -0
  27. data/app/assets/images/logo.png +0 -0
  28. data/app/assets/images/manifest.json +41 -0
  29. data/app/assets/images/ms-icon-144x144.png +0 -0
  30. data/app/assets/images/ms-icon-150x150.png +0 -0
  31. data/app/assets/images/ms-icon-310x310.png +0 -0
  32. data/app/assets/images/ms-icon-70x70.png +0 -0
  33. data/app/assets/sketches/logo.sketch +0 -0
  34. data/app/views/layouts/kuppayam/_head.html.erb +15 -6
  35. data/app/views/layouts/kuppayam/_sidebar.html.erb +1 -1
  36. data/db/test_data/single_file/master.csv +8294 -0
  37. data/db/test_data/split_files/master.csv +101909 -0
  38. data/db/test_data/split_files/split_csv.sh +51 -0
  39. data/lib/kuppayam/version.rb +1 -1
  40. metadata +54 -14
  41. data/app/assets/images/favicon.png +0 -0
@@ -0,0 +1,51 @@
1
+ #! /bin/bash
2
+
3
+ NUMBER_OF_SPLIT_LINES=10000
4
+ SPLIT_FILE_PREFIX='small-'
5
+ BIG_FILE_PATH=master.csv
6
+ SPLIT_FILES=$SPLIT_FILE_PREFIX*
7
+
8
+ COMMAND_COLOR='\033[0;36m'
9
+ HIGHLIGHT_COLOR='\033[0;33m'
10
+ NO_COLOR='\033[0m' # No Color
11
+
12
+ # cd_split_folder () {
13
+ # cd regions/
14
+ # }
15
+
16
+ split_big_csv_into_small_chunks () {
17
+ header=$(head -1 $BIG_FILE_PATH)
18
+ echo -e "Parsing the HEADER"
19
+ echo -e "${HIGHLIGHT_COLOR}$header${NO_COLOR}"
20
+
21
+ # Separate the data from the header
22
+ echo -e "\nMoving the data file out"
23
+ echo -e "${COMMAND_COLOR}tail -n +2 $BIG_FILE_PATH > output.data${NO_COLOR}"
24
+ tail -n +2 $BIG_FILE_PATH > output.data
25
+
26
+ echo -e "\nSplit $BIG_FILE_PATH file into small chunks with size $NUMBER_OF_SPLIT_LINES lines..."
27
+ echo -e "${COMMAND_COLOR}split -l $NUMBER_OF_SPLIT_LINES output.data $SPLIT_FILE_PREFIX${NO_COLOR}"
28
+ split -l $NUMBER_OF_SPLIT_LINES output.data $SPLIT_FILE_PREFIX
29
+ }
30
+
31
+ add_header_row_split_files () {
32
+ for part in `ls -1 $SPLIT_FILE_PREFIX*`
33
+ do
34
+ printf "%s\n%s" "$header" "`cat $part`" > $part
35
+ done
36
+ }
37
+
38
+ add_csv_extension_to_split_files () {
39
+ for part in `ls -1 $SPLIT_FILE_PREFIX*`
40
+ do
41
+ mv ${part} ${part}.csv
42
+ done
43
+ }
44
+
45
+ # cd_split_folder
46
+ split_big_csv_into_small_chunks
47
+ add_header_row_split_files
48
+ add_csv_extension_to_split_files
49
+
50
+ echo -e "\nCleaning ...."
51
+ rm output.data
@@ -1,3 +1,3 @@
1
1
  module Kuppayam
2
- VERSION = '0.1.6dev2'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuppayam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6dev2
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-19 00:00:00.000000000 Z
11
+ date: 2017-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -113,25 +113,33 @@ dependencies:
113
113
  - !ruby/object:Gem::Version
114
114
  version: '1.0'
115
115
  - !ruby/object:Gem::Dependency
116
- name: colorize
116
+ name: bcrypt
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: 0.8.1
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 0.8.0
125
- type: :development
121
+ version: '3.0'
122
+ type: :runtime
126
123
  prerelease: false
127
124
  version_requirements: !ruby/object:Gem::Requirement
128
125
  requirements:
129
126
  - - "~>"
130
127
  - !ruby/object:Gem::Version
131
- version: 0.8.1
132
- - - ">="
128
+ version: '3.0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: colorize
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
133
134
  - !ruby/object:Gem::Version
134
- version: 0.8.0
135
+ version: '0.8'
136
+ type: :runtime
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: '0.8'
135
143
  - !ruby/object:Gem::Dependency
136
144
  name: pry
137
145
  requirement: !ruby/object:Gem::Requirement
@@ -327,15 +335,44 @@ files:
327
335
  - app/assets/fonts/meteocons.svg
328
336
  - app/assets/fonts/meteocons.ttf
329
337
  - app/assets/fonts/meteocons.woff
330
- - app/assets/images/favicon.png
338
+ - app/assets/images/android-icon-144x144.png
339
+ - app/assets/images/android-icon-192x192.png
340
+ - app/assets/images/android-icon-36x36.png
341
+ - app/assets/images/android-icon-48x48.png
342
+ - app/assets/images/android-icon-72x72.png
343
+ - app/assets/images/android-icon-96x96.png
344
+ - app/assets/images/apple-icon-114x114.png
345
+ - app/assets/images/apple-icon-120x120.png
346
+ - app/assets/images/apple-icon-144x144.png
347
+ - app/assets/images/apple-icon-152x152.png
348
+ - app/assets/images/apple-icon-180x180.png
349
+ - app/assets/images/apple-icon-57x57.png
350
+ - app/assets/images/apple-icon-60x60.png
351
+ - app/assets/images/apple-icon-72x72.png
352
+ - app/assets/images/apple-icon-76x76.png
353
+ - app/assets/images/apple-icon-precomposed.png
354
+ - app/assets/images/apple-icon.png
355
+ - app/assets/images/browserconfig.xml
356
+ - app/assets/images/favicon-16x16.png
357
+ - app/assets/images/favicon-32x32.png
358
+ - app/assets/images/favicon-96x96.png
359
+ - app/assets/images/favicon.ico
331
360
  - app/assets/images/kuppayam/defaults/default-large.png
332
361
  - app/assets/images/kuppayam/defaults/default-small.png
333
362
  - app/assets/images/kuppayam/defaults/user-large.png
334
363
  - app/assets/images/kuppayam/defaults/user-small.png
364
+ - app/assets/images/logo-on-white.png
365
+ - app/assets/images/logo-small.png
335
366
  - app/assets/images/logo.png
367
+ - app/assets/images/manifest.json
368
+ - app/assets/images/ms-icon-144x144.png
369
+ - app/assets/images/ms-icon-150x150.png
370
+ - app/assets/images/ms-icon-310x310.png
371
+ - app/assets/images/ms-icon-70x70.png
336
372
  - app/assets/javascripts/jquery_with_ujs.js
337
373
  - app/assets/javascripts/kuppayam.js
338
374
  - app/assets/javascripts/kuppayam/utilities.js
375
+ - app/assets/sketches/logo.sketch
339
376
  - app/assets/stylesheets/kuppayam.css
340
377
  - app/assets/stylesheets/kuppayam/custom.css
341
378
  - app/assets/stylesheets/kuppayam/handycss.css
@@ -450,6 +487,9 @@ files:
450
487
  - db/migrate/20170000000000_create_images.rb
451
488
  - db/migrate/20170000000001_create_documents.rb
452
489
  - db/migrate/20170000000002_create_import_data.rb
490
+ - db/test_data/single_file/master.csv
491
+ - db/test_data/split_files/master.csv
492
+ - db/test_data/split_files/split_csv.sh
453
493
  - lib/kuppayam.rb
454
494
  - lib/kuppayam/action_view/form_helper.rb
455
495
  - lib/kuppayam/action_view/modal_helper.rb
@@ -1473,9 +1513,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1473
1513
  version: '0'
1474
1514
  required_rubygems_version: !ruby/object:Gem::Requirement
1475
1515
  requirements:
1476
- - - ">"
1516
+ - - ">="
1477
1517
  - !ruby/object:Gem::Version
1478
- version: 1.3.1
1518
+ version: '0'
1479
1519
  requirements: []
1480
1520
  rubyforge_project:
1481
1521
  rubygems_version: 2.6.11
Binary file