unidom-position 1.5.7 → 1.5.8

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: b02cea0e5e887460b95397e9a23ee799045ae334
4
- data.tar.gz: d965518cca7364debc821b51443b446d7b8b4394
3
+ metadata.gz: b4b642a83456aff849e3458eac64af8bdb5bdec1
4
+ data.tar.gz: f5d49dddcdbc8319310f2a70936843c8efedf953
5
5
  SHA512:
6
- metadata.gz: 5325d6bde25baae6eba36e1c7c3f3638e2d6608d1e5f9b14a968e1c333c7b1f535baab81e9e8bed70c92e06789aa86f7b948f1c8b693d0b42a5dca19c546ef60
7
- data.tar.gz: 7a1d4210e6f3d1699d2d82f242e366e4abf97a6caaf4fbec9b177fe7acc9f4c6d312b2e07b0ffe502035b9f982efe329f3b31aab96f104ee08fe1b1c46f23241
6
+ metadata.gz: '0857c5a2ba065b53eb1a2fff10ce467a77535b25d8536af9b0d029b64546d982c93ff4af59178efd1722e9f0dd6cfcb9c95a0423e2726a4f5dc350716b5a10cf'
7
+ data.tar.gz: 015de50c06d72595d45aa0832313474641af14aa66e09332d3503786a0a014a94568ed0010e0a411272a50202a5ac84abf4e24df105acadc288264c5c377a4f1
@@ -3,7 +3,8 @@
3
3
 
4
4
  module Unidom::Position::Concerns::AsInferiorPost
5
5
 
6
- extend ActiveSupport::Concern
6
+ extend ActiveSupport::Concern
7
+ include Unidom::Common::Concerns::ArgumentValidation
7
8
 
8
9
  included do |includer|
9
10
 
@@ -15,6 +16,9 @@ module Unidom::Position::Concerns::AsInferiorPost
15
16
  # 主要汇报标志是 primary ,缺省为 true 。建立时间是 at ,缺省为当前时间。如:
16
17
  # rails_developer.report_to! project_manager, primary: false
17
18
  def report_to!(superior_post, at: Time.now, primary: true)
19
+
20
+ assert_present! :superior_post, superior_post
21
+
18
22
  superior_post_reporting_structures.superior_post_is(superior_post).valid_at(now: at).alive.first_or_create! elemental: primary, opened_at: at
19
23
  end
20
24
 
@@ -3,7 +3,8 @@
3
3
 
4
4
  module Unidom::Position::Concerns::AsSuperiorPost
5
5
 
6
- extend ActiveSupport::Concern
6
+ extend ActiveSupport::Concern
7
+ include Unidom::Common::Concerns::ArgumentValidation
7
8
 
8
9
  included do |includer|
9
10
 
@@ -15,6 +16,9 @@ module Unidom::Position::Concerns::AsSuperiorPost
15
16
  # 主要汇报标志是 primary ,缺省为 true 。建立时间是 at ,缺省为当前时间。如:
16
17
  # project_manager.is_reported_to! by: rails_developer, primary: false
17
18
  def is_reported_to!(by: nil, at: Time.now, primary: true)
19
+
20
+ assert_present! :by, by
21
+
18
22
  inferior_post_reporting_structures.inferior_post_is(by).valid_at(now: at).alive.first_or_create! elemental: primary, opened_at: at
19
23
  end
20
24
 
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Position
3
- VERSION = '1.5.7'.freeze
3
+ VERSION = '1.5.8'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-position
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.7
4
+ version: 1.5.8
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-04-14 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common