pgmodelgen 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tasks/pgmodelgen.rake +1 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6cd715fcbf1f1f10a8a7bc5b51475a637817c97
4
- data.tar.gz: 2206fdd0480aa66efbbae1c015e59a7fb97e565f
3
+ metadata.gz: d82f0998a2c3fd117f51a8c1426020998bcdc6d7
4
+ data.tar.gz: c23fcd1018b1dce93a7f64a958bce0b92b9d89c4
5
5
  SHA512:
6
- metadata.gz: ec879f301a347717f26394c9efa16c4070b0c809e0d6f8abe7efdf9e734fdece816d2d360a61e039c750bd7500cf072c073d440fd7c0ac08e27592a3908a3ff5
7
- data.tar.gz: 81c5c4fd0f23dd7cea4bdc66b8de699240193b16c658259dc87deb3eb27f89c15d46948696a5e5daa02ea56421fb4078912307c8c4b7d3947b1cce26bc0d7945
6
+ metadata.gz: dd8c8b22f042cdf5ccb229eb2053df3f1da4d53c8f17ffacd376b61d2f8c58ac2541c60bcf1c19f09d05d719808f70b14ccd2593dd5cd7baf944cbc25eea2f5d
7
+ data.tar.gz: 999988c04ca40bb8c5eb44bd94e9a4e411b6c7669860f7cf44fe9ea9125ceef4accb048e9ddc8fcc785f68e6192c006d6d9485af2bc8388121add0445e7cd352
@@ -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]*)\)/)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgmodelgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bjorn Blomqvist