unidom-geo-china 0.4.6 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/lib/rspec/models/unidom/geo/china/region_spec.rb +23 -0
- data/lib/rspec/models/unidom/geo/china/town_spec.rb +21 -0
- data/lib/unidom/geo/china/models_rspec.rb +2 -0
- data/lib/unidom/geo/china/types_rspec.rb +0 -0
- data/lib/unidom/geo/china/validators_rspec.rb +0 -0
- data/lib/unidom/geo/china/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4253c2c9b2bebab9dd44364fccbe7b3ea0e469e
|
4
|
+
data.tar.gz: 2dc44883d08f0941f86a8910fdaadbee394565b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5a11d775e24b072c36fe37f7a9a14ba4678ff329d3b4451efa6f3cd49f135de91ea8a0e7a309a15ccdeee20b4c8a8c574feb402d6872786447bb6eac324f7e4
|
7
|
+
data.tar.gz: 1f1bfd5828fd0f962dbde608f9762567fcba70956e3a72c61ff931e30fd6eb66213e369909e2a5d595f525b4ddd9bc54052b6ba8d59c76898f1fd60d70af0627
|
data/README.md
CHANGED
@@ -99,3 +99,18 @@ Unidom::Common.configure do |options|
|
|
99
99
|
|
100
100
|
end
|
101
101
|
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
## RSpec examples
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
# spec/models/unidom_spec.rb
|
109
|
+
require 'unidom/geo/china/models_rspec'
|
110
|
+
|
111
|
+
# spec/types/unidom_spec.rb
|
112
|
+
require 'unidom/geo/china/types_rspec'
|
113
|
+
|
114
|
+
# spec/validators/unidom_spec.rb
|
115
|
+
require 'unidom/geo/china/validators_rspec'
|
116
|
+
```
|
@@ -0,0 +1,23 @@
|
|
1
|
+
describe Unidom::Geo::China::Region, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
scheme_id: SecureRandom.uuid,
|
13
|
+
scheme_type: 'Unidom::Geo::China::Scheme::Mock',
|
14
|
+
numeric_code: '999999',
|
15
|
+
alphabetic_code: 'ZZZ',
|
16
|
+
name: 'Some Region'
|
17
|
+
}
|
18
|
+
|
19
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
describe Unidom::Geo::China::Town, type: :model do
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
model_attributes = {
|
12
|
+
region_id: SecureRandom.uuid,
|
13
|
+
numeric_code: '1'*9,
|
14
|
+
name: 'Some Town'
|
15
|
+
}
|
16
|
+
|
17
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
File without changes
|
File without changes
|
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.
|
4
|
+
version: '0.5'
|
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-01
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-geo
|
@@ -58,9 +58,14 @@ files:
|
|
58
58
|
- config/routes.rb
|
59
59
|
- db/migrate/20010491560010_create_unidom_china_regions.rb
|
60
60
|
- db/migrate/20010491560020_create_unidom_china_towns.rb
|
61
|
+
- lib/rspec/models/unidom/geo/china/region_spec.rb
|
62
|
+
- lib/rspec/models/unidom/geo/china/town_spec.rb
|
61
63
|
- lib/tasks/data_tasks.rake
|
62
64
|
- lib/unidom/geo/china.rb
|
63
65
|
- lib/unidom/geo/china/engine.rb
|
66
|
+
- lib/unidom/geo/china/models_rspec.rb
|
67
|
+
- lib/unidom/geo/china/types_rspec.rb
|
68
|
+
- lib/unidom/geo/china/validators_rspec.rb
|
64
69
|
- lib/unidom/geo/china/version.rb
|
65
70
|
homepage: https://github.com/topbitdu/unidom-geo-china
|
66
71
|
licenses:
|