dbx 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ee3e7675d2bf79eee5b1c193719713b894677e6
4
- data.tar.gz: a8c1b1a08b82a0ae18930b5d7e9614f5b0f2ee05
3
+ metadata.gz: 3a9156b9797726754b8258e171e2bfd19de4ccd7
4
+ data.tar.gz: 2886905cce5b47d0b2675cf4249659de21666b22
5
5
  SHA512:
6
- metadata.gz: f0bbf5e27d8bf10dc4864c30c2bfbeb568c7815ec5f51f02e1a0c2a5673ccb1e7c0fb9e5a9e7a4e3ee70594b3a2bf19369c4e091d0426b21b727d6b38f2ebb19
7
- data.tar.gz: 6b632abac4bb5546651d6825e5e209933a602901abf6785c59266c1a01c51e6e5f3b8e5ea43d6e64946046abf61777ea78284dff3d11296a0453b060ffcfb484
6
+ metadata.gz: 35784e53ee334916019dfc1df50a95a5f224767242418e8f8ff2247e778699fddf3287416dc467d738325d86aa4e09d662fe8aefd4be91aa6da50d33a09ecc5b
7
+ data.tar.gz: b396f106e73027fff0a3dd6a314899bb6996bc6ef82a93c127cae5f9af8f8483fa4e7ffa134c112c68b129d13d65ff2b28f90d139711132c1b84c51fecf1a936
data/Gemfile.lock CHANGED
@@ -30,7 +30,7 @@ GEM
30
30
  concurrent-ruby (~> 1.0)
31
31
  method_source (0.9.0)
32
32
  minitest (5.11.3)
33
- pg (0.19.0)
33
+ pg (0.21.0)
34
34
  pry (0.11.3)
35
35
  coderay (~> 1.1.0)
36
36
  method_source (~> 0.9.0)
data/README.md CHANGED
@@ -24,6 +24,9 @@ Options:
24
24
  If the current path contains a `dbx.yml` file, it will be read first. Settings in the config file can still be overridden by command line arguments.
25
25
 
26
26
  ```yaml
27
+ # Database receiving the imported and diff data.
28
+ db: postgres://localhost/scratch
29
+
27
30
  # Column patterns are used to override column detection based on the a matched pattern in the name.
28
31
  # This is useful for things like phone numbers and zip codes where they look like numbers, but should be strings.
29
32
  column_patterns:
data/dbx_sample.yml CHANGED
@@ -1,3 +1,13 @@
1
+ # Database receiving the imported and diff data.
2
+ db: postgres://localhost/scratch
3
+
4
+ # Column patterns are used to override column detection based on the a matched pattern in the name.
5
+ # This is useful for things like phone numbers and zip codes where they look like numbers, but should be strings.
1
6
  column_patterns:
2
7
  phone_number: :string
3
- external: :string
8
+ zipcode: :string
9
+ zip_code: :string
10
+ external_ref: :string
11
+
12
+ # Number of rows to sample for type detection
13
+ sample: 100
data/exe/dbx CHANGED
@@ -4,7 +4,6 @@ require 'bundler/setup'
4
4
  require 'thor'
5
5
  require 'dbx'
6
6
  require 'pp'
7
- require 'pry'
8
7
 
9
8
  # nodoc
10
9
  # #rubocop:disable all
data/lib/dbx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dbx
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/lib/dbx.rb CHANGED
@@ -4,6 +4,7 @@ require 'csv'
4
4
  require 'pg'
5
5
  require 'active_support/all'
6
6
  require 'active_record'
7
+ require 'time'
7
8
  require 'pp'
8
9
 
9
10
  require 'dbx/model_base'
@@ -168,7 +169,7 @@ module DBX
168
169
  :uuid
169
170
  elsif value =~ /^\d{4}(\D)\d{2}\1\d{2}$/ && (Date.parse(value) rescue false)
170
171
  :date
171
- elsif (Time.zone.parse(value) rescue false)
172
+ elsif (Time.parse(value) rescue false)
172
173
  :datetime
173
174
  else
174
175
  :string
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbx
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
  - Scott Pierce