pgmodelgen 0.5.2 → 0.5.3

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 +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d82f0998a2c3fd117f51a8c1426020998bcdc6d7
4
- data.tar.gz: c23fcd1018b1dce93a7f64a958bce0b92b9d89c4
3
+ metadata.gz: fb4be41191539822879579ae93250a5013886577
4
+ data.tar.gz: 1276ce97601747801a990e69845b879d0cf7cf47
5
5
  SHA512:
6
- metadata.gz: dd8c8b22f042cdf5ccb229eb2053df3f1da4d53c8f17ffacd376b61d2f8c58ac2541c60bcf1c19f09d05d719808f70b14ccd2593dd5cd7baf944cbc25eea2f5d
7
- data.tar.gz: 999988c04ca40bb8c5eb44bd94e9a4e411b6c7669860f7cf44fe9ea9125ceef4accb048e9ddc8fcc785f68e6192c006d6d9485af2bc8388121add0445e7cd352
6
+ metadata.gz: 5b06ef51aebdc70d06432bbb70d2d36eea17480a88e8ef5ec38887caf18c1f7e98b7a08769e191a46f056b624bb2c6cbd0424333fc7fc60ffcf52bddbc957fea
7
+ data.tar.gz: 3781de626266a243ef62a0e62e196af4093c6b25624ac40057b4f507d3c58e28a0da803e4ce496753736eaee90901ba6876bcbb0ca732651724e12eaa2819b26
@@ -599,8 +599,8 @@ class PGGen
599
599
 
600
600
  # Regex check constraint
601
601
  match = row['condition_decleration_src'].match('\)::text ~\* \'(.*)\'::text\)$')
602
- regex_ruby_style = match[1].gsub('\\\\.','').gsub('/','\/').gsub(/^\^/,"\A").gsub(/\$$/,"\z")
603
- models[table_name][:constraint] += "\tvalidates_format_of :#{column_rows.first["attribute_name"]}, :with => /#{regex_ruby_style}/i#{allow_nil}\n, "
602
+ regex_ruby_style = match[1].gsub('\\\\.','').gsub('/','\/').gsub(/^\^/,"\\A").gsub(/\$$/,"\\z")
603
+ models[table_name][:constraint] += "\tvalidates_format_of :#{column_rows.first["attribute_name"]}, :with => /#{regex_ruby_style}/i#{allow_nil}\n"
604
604
 
605
605
  elsif row['condition_decleration_src'].match(/\(char_length\((.*)::text\) >= ([0-9]*)\)/)
606
606
 
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.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bjorn Blomqvist