idata 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88055107e664ebd906f326d17d66565c7ada1048
4
- data.tar.gz: 7ee59a09d1c8328f3f479f04c521ceb7ab675ea2
3
+ metadata.gz: 32167a99138f7f8c9a2685be4fbb494bfdf44e5c
4
+ data.tar.gz: ca5493dd9e660a24c69b9a8cc1c234e6e5b20bfc
5
5
  SHA512:
6
- metadata.gz: d05abf741cb5b6cf44eaeb49a2992739ad5805174cbdb655383e1856791f37e8429893a76b4620f8267c33860085fb19caf7dce27266a96edeec20fde7a3733a
7
- data.tar.gz: 8020ab90eb44d7ff467f06c102de45fa60d34465ad31855f244245c620a202085b021788be9ae7c823549a513f690e915cf4c3e38b41ac04d172e61f6d325b36
6
+ metadata.gz: 177d8f683986549f9fcfc8f92cecb6065c0641fb769e0176b8c79e32880e0f5ff17e099d7d8aa0fe333de97cd8c680512b616657901fbdab905f66c1f143a6bf
7
+ data.tar.gz: cde736b0efca4a968879c111c7987b3cca51f7946d3ce6574fe450332b6be4832be0217bd0a35884a7a84727638d3b3a4b85549f8eb7135725d72b7ef7a42980
data/bin/ieval CHANGED
@@ -1,4 +1,4 @@
1
- # DATA LOADER
1
+ # DATA ADJUSTING TOOL
2
2
  #
3
3
  # @author Nghi Pham
4
4
  # @date April 2014
@@ -101,7 +101,7 @@ if $options[:database].nil?
101
101
  end
102
102
 
103
103
  if $options[:username].nil?
104
- puts "\nPlease specify PostgreSQL username: -d\n\n"
104
+ puts "\nPlease specify PostgreSQL username: -u\n\n"
105
105
  exit
106
106
  end
107
107
 
data/bin/iexport CHANGED
@@ -184,7 +184,7 @@ CSV.open($options[:output], "wb", :quote_char => $options[:quote_char], :col_sep
184
184
 
185
185
  scope.each do |item|
186
186
  attrs = item.attributes.values
187
- if $options[:quote_empty]
187
+ if !$options[:quote_empty]
188
188
  attrs.map!{|e| e == "" ? nil : e }
189
189
  end
190
190
 
data/bin/iload CHANGED
@@ -85,16 +85,11 @@ EXAMPLES
85
85
  Load data from text file and store to a table name "vendors"
86
86
 
87
87
  ruby load.rb --host=localhost --username=postgres --password=postgres \\
88
- --input=/home/administrator/VendorMaster.txt --format=fx \\
89
- --table=vendors --database=db
88
+ --database=db --table=vendors \\
89
+ --input=/home/administrator/VendorMaster.txt \\
90
+ --format=CSV --delim=$'\\t'
90
91
 
91
92
 
92
- The same usage in short form:
93
-
94
- ruby load.rb -h localhost -u postgres -p postgres \\
95
- -i /home/administrator/VendorMaster.txt -f fx \\
96
- -t vendors -d db
97
-
98
93
  eos
99
94
  end
100
95
 
data/bin/ivalidate CHANGED
@@ -102,7 +102,8 @@ Validate `mfrs` table against several rules and write error logs to errors field
102
102
  --not-null="mfr_lic" \\
103
103
  --match="mfr_number/^2.*/" \\
104
104
  --match="mfr_name/^[a-zA-Z]+/" \\
105
- --not-match="status/(failed|inactive|wrong)/"
105
+ --not-match="status/(failed|inactive|wrong)/" \\
106
+ --query="start_date <= end_date"
106
107
 
107
108
  eos
108
109
  end
data/lib/idata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Idata
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nghi Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler