unidom-geo-china 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5dd8fa89ff879d8ad98a63349c4dc3fd68d8d9c9
4
- data.tar.gz: '095dfe1d5ab55022b30f65328a0bbe57d4366fc2'
3
+ metadata.gz: df8ffc44c1b04d7976b724d7cbbdca3edb47c5d8
4
+ data.tar.gz: d230a71f6933e49cbfc0664e46daf2c55b4d51b3
5
5
  SHA512:
6
- metadata.gz: 85df3cfef412f717c2e631359c4f92b1712fcc3740d6ede909b9790e54359048f91aaf4c75459f15cbcce58148b35caaa56a25abfe86aad9ede49f0adadb2a77
7
- data.tar.gz: 3d3d5ca53e56cf977d8d161f05d2bdd37acab38ec09d995efc80268c73ee6e77db887e687613d97dc145eb34f1f0b79d4e1df696fade0e575537cfd52a1253d3
6
+ metadata.gz: a2e45104d86fc3367d88c06541fdf46388ab521a2d810d776981bfbf9e9f1803c17a712a4a3f06314f8f948427bdac15eafc0db2c16a88287665067180b782ba
7
+ data.tar.gz: 973e88869c9d7f8d5233d9b2efe6d91da80718489e9b083a0a3e7087ba48a523b555cb938629777b201b2123933ea4b9743490522ca777d4508448027ab55615
@@ -33,7 +33,7 @@ class Unidom::Geo::China::Region < Unidom::Geo::China::ApplicationRecord
33
33
 
34
34
  validates :numeric_code, presence: true, numericality: { integer_only: true, greater_than_or_equal_to: 0 }, length: { minimum: columns_hash['numeric_code'].limit }
35
35
  validates :alphabetic_code, allow_blank: true, length: { minimum: 2 }
36
- validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
36
+ validates :name, presence: true, length: { in: 1..self.columns_hash['name'].limit }
37
37
 
38
38
  belongs_to :scheme, polymorphic: true
39
39
 
@@ -56,8 +56,8 @@ describe Unidom::Geo::China::Region, type: :model do
56
56
  { } => 0,
57
57
  { name: nil } => 2,
58
58
  { name: '' } => 2,
59
- { name: '1' } => 1,
60
- { name: 'A' } => 1,
59
+ { name: '1' } => 0,
60
+ { name: 'A' } => 0,
61
61
  { name: '11' } => 0,
62
62
  { name: 'AA' } => 0,
63
63
  { name: '111' } => 0,
@@ -23,7 +23,7 @@ namespace :unidom do
23
23
  updated_count = 0
24
24
  created_count = 0
25
25
 
26
- region_entities = ::Unidom::Geo::China::Region.scheme_id_is(scheme_id).scheme_type_is(scheme_type).select('id, name, virtual, numeric_code, alphabetic_code, scheme_id, scheme_type, opened_at, closed_at, defunct, updated_at').to_a
26
+ region_entities = ::Unidom::Geo::China::Region.scheme_id_is(scheme_id).scheme_type_is(scheme_type).to_a
27
27
 
28
28
  each_csv_row file_name do |region|
29
29
 
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Geo
3
3
  module China
4
- VERSION = '0.5.1'.freeze
4
+ VERSION = '0.5.2'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-geo-china
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
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-19 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-geo