pgmodelgen 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/pgmodelgen.rake +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d82f0998a2c3fd117f51a8c1426020998bcdc6d7
|
4
|
+
data.tar.gz: c23fcd1018b1dce93a7f64a958bce0b92b9d89c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd8c8b22f042cdf5ccb229eb2053df3f1da4d53c8f17ffacd376b61d2f8c58ac2541c60bcf1c19f09d05d719808f70b14ccd2593dd5cd7baf944cbc25eea2f5d
|
7
|
+
data.tar.gz: 999988c04ca40bb8c5eb44bd94e9a4e411b6c7669860f7cf44fe9ea9125ceef4accb048e9ddc8fcc785f68e6192c006d6d9485af2bc8388121add0445e7cd352
|
data/lib/tasks/pgmodelgen.rake
CHANGED
@@ -597,10 +597,9 @@ class PGGen
|
|
597
597
|
|
598
598
|
if row['condition_decleration_src'].match('\)::text ~\* \'(.*)\'::text\)$')
|
599
599
|
|
600
|
-
regex_ruby_style = match[1].gsub('\\\\.','').gsub('/','\/').gsub(/^\^/,"\A").gsub(/\$$/,"\z")
|
601
|
-
|
602
600
|
# Regex check constraint
|
603
601
|
match = row['condition_decleration_src'].match('\)::text ~\* \'(.*)\'::text\)$')
|
602
|
+
regex_ruby_style = match[1].gsub('\\\\.','').gsub('/','\/').gsub(/^\^/,"\A").gsub(/\$$/,"\z")
|
604
603
|
models[table_name][:constraint] += "\tvalidates_format_of :#{column_rows.first["attribute_name"]}, :with => /#{regex_ruby_style}/i#{allow_nil}\n, "
|
605
604
|
|
606
605
|
elsif row['condition_decleration_src'].match(/\(char_length\((.*)::text\) >= ([0-9]*)\)/)
|