unidom-geo 1.3 → 1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45957405107d6cfc8b05b70870e5ab3ca60cb698
4
- data.tar.gz: 02198793be1f7c86e96a8a528421c1075e566dd6
3
+ metadata.gz: ef2bfa130c2c1219eced8085052aba3bfa3f1f4e
4
+ data.tar.gz: 3cfe505c19dba47dea2265a846a27c7fae009fd6
5
5
  SHA512:
6
- metadata.gz: bc95936a4854c65376e68551a9cd9d01e5fc7fe59a784a321b50bf48fe933bee86af029b53f3bff5b7ba42aa82f1689960f6541231749eb8338fc5a2acc8e19c
7
- data.tar.gz: ba8a25a4e547244f893d9ef18b7ced35ed192dee371c5b81c5808ce082fbbd7243455cab215abd1926689efb9e556bfa51f244fd3964e38747e435f532ba722b
6
+ metadata.gz: 35df8578a40282b6557edc4b82d3b1dc8aa096a12087be1cbd3a75ad8cf69a64ec903f5eb48d56eaf481949757c62b2a4ad9183b157e955da5ae294df29fb13e
7
+ data.tar.gz: eabc82f76daa696d99d87538d5c4ac1a51feab32861310e39dde170f95ca8d563a877ff3509e1a7e2fc9970d18d9ab547ef8165ceffae85135d7b7ac3bce170c
data/README.md CHANGED
@@ -69,6 +69,7 @@ The As Located concern do the following tasks for the includer automatically:
69
69
  The As Locator concern do the following tasks for the includer automatically:
70
70
  1. Define the has_many :locatings macro as: ``has_many :locatings, class_name: 'Unidom::Geo::Locating', as: :locator``
71
71
  2. Define the has_many :locations macro as: ``has_many :locations, through: :locatings, source: :location``
72
+ 3. Define the #locate! method as: ``locate!(it, to: nil, at: Time.now)``
72
73
 
73
74
  ### As Region concern
74
75
  The As Region concern do the following tasks for the includer automatically:
@@ -7,16 +7,10 @@ module Unidom::Geo::Concerns::AsLocator
7
7
  has_many :locatings, class_name: 'Unidom::Geo::Locating', as: :locator
8
8
  has_many :locations, through: :locatings, source: :location
9
9
 
10
- =begin
11
- def locate!(to: nil, by: nil, at: Time.now)
12
- locatings.location_is(to).valid_at(now: at).alive.first_or_create! locator: by, opened_at: at
10
+ def locate!(it, to: nil, at: Time.now)
11
+ locatings.location_is(to).located_is(it).valid_at(now: at).alive.first_or_create! opened_at: at
13
12
  end
14
13
 
15
- def locate?(to: nil, at: Time.now)
16
- locatings.location_is(to).valid_at(now: at).alive.exists?
17
- end
18
- =end
19
-
20
14
  end
21
15
 
22
16
  module ClassMethods
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Geo
3
- VERSION = '1.3'.freeze
3
+ VERSION = '1.4'.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.3'
4
+ version: '1.4'
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-09-26 00:00:00.000000000 Z
11
+ date: 2016-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common