unidom-geo-china 0.4 → 0.4.1

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: 52810a4565400a8aef20f4bd31a99ca22e24d71c
4
- data.tar.gz: 67f3ed45ab394f6ef0b0b5a5b1e448c8b3452f2b
3
+ metadata.gz: de94a664147bd2d3d30e8be00ef7df78f4f0f5e1
4
+ data.tar.gz: 28ee45899c04dfcbec80efa0a13ba88de1539488
5
5
  SHA512:
6
- metadata.gz: 25ab5059fac40274cad8b47112d1f0ee9745da664880b5bd9a7d89e000e5df3ba37e673a6e2b0771d10a071bddae4b8d7a0d912ed63712ae9d31386c6125343f
7
- data.tar.gz: 0245d3e995dfd93c8f6359d13e11f158e295bb1815f347a12415063f0ca3a6af97fb266f373cebe16200b1bb64895115895f92b779d008d3906c55eb4519ca06
6
+ metadata.gz: f90138be02d467ab5a2ccfcdb20d5de01ed4d1fda388904bfd816020e1a323364aa054b5e17c351dd402d46e49ce2d900a7faa129a05a7a90f85989ba368ac1b
7
+ data.tar.gz: 1faf0c174f169b29105bdbb6850e6f89efd8c94a383167a93a6f642aa89d7cd60b1c60d6e882dbd42eae03285c882b9f045d327fce041858c1b71b52c80d588c
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
4
4
  [![Gem Version](https://badge.fury.io/rb/unidom-geo-china.svg)](https://badge.fury.io/rb/unidom-geo-china)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-geo-china.svg)](https://gemnasium.com/github.com/topbitdu/unidom-geo-china)
5
6
 
6
7
  Unidom (UNIfied Domain Object Model) is a series of domain model engines. The China Geo domain model engine includes the Region model and its migration.
7
8
  Unidom (统一领域对象模型)是一系列的领域模型引擎。中国地理领域模型引擎包括中国大陆的行政区划模型及其数据迁移脚本。
@@ -65,15 +66,18 @@ The Region model has a lot of domain knowlegde of the China regions.
65
66
 
66
67
 
67
68
  ## Include the Concerns
69
+
68
70
  ```ruby
69
71
  include Unidom::Geo::China::Concerns::AsInferiorRegion
70
72
  include Unidom::Geo::China::Concerns::AsSuperiorRegion
71
73
  ```
72
74
 
73
75
  ### As Inferior Region
76
+
74
77
  The As Inferior Region do the following tasks for the includer automatically:
75
78
  1. Define the #super_regions method as: ``super_regions``
76
79
 
77
80
  ### As Superior Region
81
+
78
82
  The As Superior Region do the following tasks for the includer automatically:
79
83
  1. Define the #sub_regions method as: ``sub_regions``
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
11
  rdoc.title = 'Unidom Geo China'
12
12
  rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.rdoc')
13
+ rdoc.rdoc_files.include('README.md')
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
@@ -20,5 +20,5 @@ load 'rails/tasks/statistics.rake'
20
20
 
21
21
 
22
22
 
23
- Bundler::GemHelper.install_tasks
23
+ require 'bundler/gem_tasks'
24
24
 
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/unidom/geo/china .js
2
+ //= link_directory ../stylesheets/unidom/geo/china .css
@@ -5,7 +5,7 @@
5
5
  // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
9
  //
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
@@ -6,9 +6,9 @@
6
6
  * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
12
  *
13
13
  *= require_self
14
14
  */
@@ -1,2 +1,3 @@
1
1
  class Unidom::Geo::China::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Unidom::Geo::China::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Unidom::Geo::China::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Unidom::Geo::China::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -18,7 +18,7 @@
18
18
  # 省、自治区、直辖市、特别行政区的字母码用两位大写字母表示。
19
19
  # 市、地区、自治州、盟、县、自治县、县级市、旗、自治旗、市辖区、林区、特区的字母码用三位大写字母表示。
20
20
 
21
- class Unidom::Geo::China::Region < ActiveRecord::Base
21
+ class Unidom::Geo::China::Region < Unidom::Geo::China::ApplicationRecord
22
22
 
23
23
  # MDUCG = MUNICIPALITY DIRECT UNDER CENTRAL GOVERNMENT
24
24
  MDUCG_CODES = [ '11', '12', '31', '50' ].freeze
@@ -1,6 +1,6 @@
1
1
  # Town 是乡或者镇。
2
2
 
3
- class Unidom::Geo::China::Town < ActiveRecord::Base
3
+ class Unidom::Geo::China::Town < Unidom::Geo::China::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_china_towns'
6
6
 
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Geo
3
3
  module China
4
- VERSION = '0.4'.freeze
4
+ VERSION = '0.4.1'.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.4'
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-02 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.6'
27
27
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
28
  The China Contact domain model engine includes Mobile Phone Number and its relative
29
29
  models. Unidom (统一领域对象模型)是一系列的领域模型引擎。中国地理领域模型引擎包括中国大陆的行政区划及其相关的模型。
@@ -36,10 +36,14 @@ files:
36
36
  - MIT-LICENSE
37
37
  - README.md
38
38
  - Rakefile
39
+ - app/assets/config/unidom-geo-china_manifest.js
39
40
  - app/assets/javascripts/unidom/geo/china/application.js
40
41
  - app/assets/stylesheets/unidom/geo/china/application.css
41
42
  - app/controllers/unidom/geo/china/application_controller.rb
42
43
  - app/helpers/unidom/geo/china/application_helper.rb
44
+ - app/jobs/unidom/geo/china/application_job.rb
45
+ - app/mailers/unidom/geo/china/application_mailer.rb
46
+ - app/models/unidom/geo/china/application_record.rb
43
47
  - app/models/unidom/geo/china/concerns/as_inferior_region.rb
44
48
  - app/models/unidom/geo/china/concerns/as_superior_region.rb
45
49
  - app/models/unidom/geo/china/region.rb