csv2psql 0.0.16 → 0.0.17

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: 22ed4a3c0fd8d982937fd5ff0fd94a28096b53ee
4
- data.tar.gz: 69be2825f4e5073e8b1176e781c5c6be185c430d
3
+ metadata.gz: d824881a6506c8361b6a86a03e3f72d15ff387e5
4
+ data.tar.gz: c2e7c53a7539087591393505d02891e1387fae93
5
5
  SHA512:
6
- metadata.gz: e83da80ea836915620c2da1093dbaf7246ad64456eb390d2a89085cef5a5a851b2f54c62b3893054c5af480e72d1d9a50ea4df643751a9681698884b99afb25a
7
- data.tar.gz: 940af7ddd4b901109e9435b780441fbaed0327f59c5c871b841deb177cb59519b871fb436081b6aed94e6b917d5db86ec89d61bf39f5b18337deae1212b215a5
6
+ metadata.gz: 984b952b56b88a8e1a32a0f8bced16b05950f2cc38ea6214031b237b368b7302a51ab0d8b4ff7d315bf66d686794269d91b24e819bcc9855d7991915cb6d3ee9
7
+ data.tar.gz: 2951daad71c751420c59efec70a031ba3c5587f667ee8111491f87cc51f54044315e064a128a7f998b2de6bc63e526d4ee1428c0a8e9de53cb8b7f21bf738916
@@ -0,0 +1,22 @@
1
+ # encoding: UTF-8
2
+
3
+ require_relative 'base_analyzer'
4
+
5
+ module Csv2Psql
6
+ module Analyzers
7
+ # Bigint value matcher
8
+ class Cidr < BaseAnalyzer
9
+ TYPE = :cidr
10
+ CLASS = :special
11
+ WEIGHT = 4
12
+
13
+ RE = Regexp.new(/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/)
14
+
15
+ class << self
16
+ def analyze(val)
17
+ val && RE.match(val)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Csv2Psql module
4
4
  module Csv2Psql
5
- VERSION = '0.0.16'
5
+ VERSION = '0.0.17'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv2psql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Korcak
@@ -289,6 +289,7 @@ files:
289
289
  - lib/csv2psql/analyzer/types/bigint.rb
290
290
  - lib/csv2psql/analyzer/types/boolean.rb
291
291
  - lib/csv2psql/analyzer/types/character.rb
292
+ - lib/csv2psql/analyzer/types/cidr.rb
292
293
  - lib/csv2psql/analyzer/types/date.rb
293
294
  - lib/csv2psql/analyzer/types/decimal.rb
294
295
  - lib/csv2psql/analyzer/types/null.rb