idata 0.1.3 → 0.1.4

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: 521f9181a3c63dbe51c67763b06cb8469c0daf2d
4
- data.tar.gz: dade0d4c7350811ad3270298cd18ed2c3213ba9c
3
+ metadata.gz: 25140998b6255c27f9d303f589a4a4a6bb985243
4
+ data.tar.gz: dd065941104de3ebc029951bf8e5268dfcadf2b7
5
5
  SHA512:
6
- metadata.gz: 52d9d927c5c2543c906652fbd38bab4d503cb97650b8e1f7b542e54ca1c99fddfe4a7f4307ddba2e98f257f1f00f0eba11d4be519c9a44322a6ea0a1261e1a98
7
- data.tar.gz: 5b2a0c7f48ad547ede412525dfadfe885557a984315c1cb58cfe6eead69cd5d35d080765a120cc7cd8e44eecdce1ecd3ac5f3c04d6b179bce41abb059430f6b7
6
+ metadata.gz: 3675be44947c520d37acddca6dd46d7afb3b8fca7a70eced8476ac87da661899ded7ff218cf7aa4494071b0b3a994bc668aa035c4383265b45e76678337e3da0
7
+ data.tar.gz: 4a59e5866b3a7aeb3e81af5108c7b60a68775ec5152ac14e5ec691ff988ca9a92ada609a66cfbb0ab03e1c824d8ca1573938a0b247da2724c96cf91ac64f4344
data/bin/ieval CHANGED
@@ -66,9 +66,9 @@ EXAMPLES
66
66
  -------------------------------------------------------
67
67
  Run a custom Ruby command on the every record represented by the `item` variable
68
68
 
69
- ruby eval.rb --host=localhost --username=postgres --password=postgres \\
70
- --table=vendors --database=db \\
71
- --eval="item.last_name = item.full_name.split(/\\s+/).last"
69
+ ieval --host=localhost --username=postgres --password=postgres \\
70
+ --table=vendors --database=db \\
71
+ --eval="item.last_name = item.full_name.split(/\\s+/).last"
72
72
 
73
73
  eos
74
74
  end
@@ -100,9 +100,9 @@ def help
100
100
  EXAMPLES
101
101
  -------------------------------------------------------
102
102
 
103
- ruby export.rb --host=localhost --username=postgres --database=db --table=items \\
104
- --output=/tmp/data.csv --format=csv --delim="\\t" --linebreak=$'\\r\\n' \\
105
- --select="id, name AS vendor_name, age" --where="active = 1"
103
+ iexport --host=localhost --username=postgres --database=db --table=items \\
104
+ --output=/tmp/data.csv --format=csv --delim="\\t" --linebreak=$'\\r\\n' \\
105
+ --select="id, name AS vendor_name, age" --where="active = 1"
106
106
 
107
107
  eos
108
108
  end
data/bin/iload CHANGED
@@ -84,10 +84,10 @@ EXAMPLES
84
84
  -------------------------------------------------------
85
85
  Load data from text file and store to a table name "vendors"
86
86
 
87
- ruby load.rb --host=localhost --username=postgres --password=postgres \\
88
- --database=db --table=vendors \\
89
- --input=/home/administrator/VendorMaster.txt \\
90
- --format=CSV --delim=$'\\t'
87
+ iload --host=localhost --username=postgres --password=postgres \\
88
+ --database=db --table=vendors \\
89
+ --input=/home/administrator/VendorMaster.txt \\
90
+ --format=CSV --delim=$'\\t'
91
91
 
92
92
 
93
93
  eos
data/bin/ipatch CHANGED
@@ -55,8 +55,8 @@ EXAMPLES
55
55
  -------------------------------------------------------
56
56
  Send custom SQL to a data table
57
57
 
58
- ruby patch.rb --host=localhost --username=postgres --password=postgres --database=db \\
59
- --query="ALTER TABLE vendors ADD COLUMN tmp text; UPDATE vendors SET tmp = vendor_number"
58
+ ipatch --host=localhost --username=postgres --password=postgres --database=db \\
59
+ --query="ALTER TABLE vendors ADD COLUMN tmp text; UPDATE vendors SET tmp = vendor_number"
60
60
 
61
61
  eos
62
62
  end
@@ -104,4 +104,4 @@ ActiveRecord::Base.establish_connection(
104
104
  # Execute the query, use it at your own risk!!!
105
105
  ActiveRecord::Base.connection.execute($options[:query])
106
106
 
107
- puts "\nDone!\n\n"
107
+ puts "\nDone!\n\n"
@@ -93,17 +93,17 @@ EXAMPLES
93
93
  -------------------------------------------------------
94
94
  Validate `mfrs` table against several rules and write error logs to errors field:
95
95
 
96
- ruby validate.rb -h localhost -u postgres -p postgres -d db \\
97
- --table=mfrs \\
98
- --log-to=errors \\
99
- --unique="mfr_lic" \\
100
- --unique="mfr_number" \\
101
- --not-null="mfr_number" \\
102
- --not-null="mfr_lic" \\
103
- --match="mfr_number/^2.*/" \\
104
- --match="mfr_name/^[a-zA-Z]+/" \\
105
- --not-match="status/(failed|inactive|wrong)/" \\
106
- --query="start_date <= end_date"
96
+ ivalidate -h localhost -u postgres -p postgres -d db \\
97
+ --table=mfrs \\
98
+ --log-to=errors \\
99
+ --unique="mfr_lic" \\
100
+ --unique="mfr_number" \\
101
+ --not-null="mfr_number" \\
102
+ --not-null="mfr_lic" \\
103
+ --match="mfr_number/^2.*" \\
104
+ --match="mfr_name/^[a-zA-Z]+/" \\
105
+ --not-match="status/(failed|inactive|wrong)/" \\
106
+ --query="start_date <= end_date"
107
107
 
108
108
  eos
109
109
  end
@@ -1,3 +1,3 @@
1
1
  module Idata
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nghi Pham