unidom-geo 1.4 → 1.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: ef2bfa130c2c1219eced8085052aba3bfa3f1f4e
4
- data.tar.gz: 3cfe505c19dba47dea2265a846a27c7fae009fd6
3
+ metadata.gz: f43ce4959128f69dde005ce0a2527a23fa147762
4
+ data.tar.gz: 6ed35f3d144825642e51f770e6e3fe2aacb2c462
5
5
  SHA512:
6
- metadata.gz: 35df8578a40282b6557edc4b82d3b1dc8aa096a12087be1cbd3a75ad8cf69a64ec903f5eb48d56eaf481949757c62b2a4ad9183b157e955da5ae294df29fb13e
7
- data.tar.gz: eabc82f76daa696d99d87538d5c4ac1a51feab32861310e39dde170f95ca8d563a877ff3509e1a7e2fc9970d18d9ab547ef8165ceffae85135d7b7ac3bce170c
6
+ metadata.gz: 389f91971c6f1e2f225df25299aead403ef68f8f70604929f1b8e018b021edfcf3fb305fae63fde816174cc7fd7387368ad218bbee177a41da55c571d4857803
7
+ data.tar.gz: 6a0c59005bba469944624ec369f6217634a7ef8c1721f7640ba36afde6ce45ceb9e7f16fb6a8e76cff13afb304e97fecb5a55aa0450dd07a7b3958b4664e4978
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.svg)](https://badge.fury.io/rb/unidom-geo)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-geo.svg)](https://gemnasium.com/github.com/topbitdu/unidom-geo)
5
6
 
6
7
  Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Geo domain model engine includes Town and Location models.
7
8
  Unidom (统一领域对象模型)是一系列的领域模型引擎。地理领域模型引擎包括乡镇和街道地址的模型。
@@ -59,6 +60,7 @@ include Unidom::Geo::Concerns::AsRegion
59
60
  ```
60
61
 
61
62
  ### As Located concern
63
+
62
64
  The As Located concern do the following tasks for the includer automatically:
63
65
  1. Define the has_many :locatings macro as: ``has_many :locatings, class_name: 'Unidom::Geo::Locating', as: :located``
64
66
  2. Define the has_many :locations macro as: ``has_many :locations, through: :locatings, source: :location``
@@ -66,12 +68,14 @@ The As Located concern do the following tasks for the includer automatically:
66
68
  4. Define the #is_located? method as: ``is_located?(to: nil, at: Time.now)``
67
69
 
68
70
  ### As Locator concern
71
+
69
72
  The As Locator concern do the following tasks for the includer automatically:
70
73
  1. Define the has_many :locatings macro as: ``has_many :locatings, class_name: 'Unidom::Geo::Locating', as: :locator``
71
74
  2. Define the has_many :locations macro as: ``has_many :locations, through: :locatings, source: :location``
72
75
  3. Define the #locate! method as: ``locate!(it, to: nil, at: Time.now)``
73
76
 
74
77
  ### As Region concern
78
+
75
79
  The As Region concern do the following tasks for the includer automatically:
76
80
  1. Define the has_many :locations macro as: ``has_many :locations, class_name: 'Unidom::Geo::Location'``
77
81
  2. Define the has_many :locatings macro as: ``has_many :locatings, through: :locations, source: :locatings``
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'
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 .js
2
+ //= link_directory ../stylesheets/unidom/geo .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::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Unidom::Geo::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Unidom::Geo::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Unidom::Geo::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,6 +1,6 @@
1
1
  # Locating 是地理定位,表示地理位置和被定位物体之间的关联。
2
2
 
3
- class Unidom::Geo::Locating < ActiveRecord::Base
3
+ class Unidom::Geo::Locating < Unidom::Geo::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_locatings'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Location 是地理位置。具体对应到某一个街道地址。
2
2
 
3
- class Unidom::Geo::Location < ActiveRecord::Base
3
+ class Unidom::Geo::Location < Unidom::Geo::ApplicationRecord
4
4
 
5
5
  self.table_name = 'unidom_locations'
6
6
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Geo
3
- VERSION = '1.4'.freeze
3
+ VERSION = '1.4.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-geo
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: 1.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-03 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 Geo domain model engine includes Region, Town, and Location models. Unidom (统一领域对象模型)是一系列的领域模型引擎。地理领域模型引擎包括行政区划、乡镇和街道地址的模型。
29
29
  email:
@@ -35,10 +35,14 @@ files:
35
35
  - MIT-LICENSE
36
36
  - README.md
37
37
  - Rakefile
38
+ - app/assets/config/unidom-geo_manifest.js
38
39
  - app/assets/javascripts/unidom/geo/application.js
39
40
  - app/assets/stylesheets/unidom/geo/application.css
40
41
  - app/controllers/unidom/geo/application_controller.rb
41
42
  - app/helpers/unidom/geo/application_helper.rb
43
+ - app/jobs/unidom/geo/application_job.rb
44
+ - app/mailers/unidom/geo/application_mailer.rb
45
+ - app/models/unidom/geo/application_record.rb
42
46
  - app/models/unidom/geo/concerns/as_located.rb
43
47
  - app/models/unidom/geo/concerns/as_locator.rb
44
48
  - app/models/unidom/geo/concerns/as_region.rb