unidom-accession 1.3.1 → 2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c28c9f6045d2d26687c9c0c144431b548bb6b38
|
4
|
+
data.tar.gz: 1ea4ec65b881937750d5c89f0b9894d9a6410d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aab5f807680d486711cb1bdfbe7fba3c5e5f2c9f0ba6bfd213c5fa7a4c472669b892eac47120761484f10bb013c838b7e8a076e92c05eabc14e70243b2e1b55
|
7
|
+
data.tar.gz: c01c78df846db8535aa4be82039d1646a73aca72858fce4fd17c81443bcfd4dea586897898a25c0d2ead66a5a304cffc76d6a72b09a47a212b1bcc7cedd32457
|
data/README.md
CHANGED
@@ -40,10 +40,10 @@ include Unidom::Accession::Concerns::AsPostFulfiller
|
|
40
40
|
The As Post Fulfilled concern do the following tasks for the includer automatically:
|
41
41
|
1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled``
|
42
42
|
2. Define the has_many :fulfiller_people macro as: ``has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'``
|
43
|
-
3. Define the #is_fulfilled_as_post! method as: ``def is_fulfilled_as_post!(by:
|
43
|
+
3. Define the #is_fulfilled_as_post! method as: ``def is_fulfilled_as_post!(by: nil, at: Time.now)``
|
44
44
|
|
45
45
|
### As Post Fulfiller concern
|
46
46
|
The As Post Fulfiller concern do the following tasks for the includer automatically:
|
47
47
|
1. Define the has_many :post_fulfillments macro as: ``has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller``
|
48
48
|
2. Define the has_many :fulfilled_posts macro as: ``has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'``
|
49
|
-
3.
|
49
|
+
3. Define the #fulfill_post! method as: ``def fulfill_post!(post, at: Time.now)``
|
@@ -2,23 +2,23 @@ module Unidom::Accession::Concerns::AsPostFulfilled
|
|
2
2
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
5
|
+
included do |includer|
|
6
6
|
|
7
7
|
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfilled
|
8
8
|
has_many :fulfiller_people, through: :post_fulfillments, source: :fulfiller, source_type: 'Unidom::Party::Person'
|
9
9
|
|
10
|
-
def is_fulfilled_as_post!(by: nil, opened_at: Time.now)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
#def is_fulfilled_as_post!(by: nil, at: Time.now)
|
17
|
-
# raise ArgumentError.new('The by argument is required.') if by.blank?
|
18
|
-
# raise ArgumentError.new('The at argument is required.') if at.blank?
|
19
|
-
# post_fulfillments.create! fulfiller: by, opened_at: at
|
10
|
+
#def is_fulfilled_as_post!(by: nil, opened_at: Time.now)
|
11
|
+
# raise ArgumentError.new('The argument "by" is required.') if by.blank?
|
12
|
+
# raise ArgumentError.new('The argument "opened_at" is required.') if opened_at.blank?
|
13
|
+
# post_fulfillments.create! fulfiller: by, opened_at: opened_at
|
20
14
|
#end
|
21
15
|
|
16
|
+
def is_fulfilled_as_post!(by: nil, at: Time.now)
|
17
|
+
raise ArgumentError.new('The by argument is required.') if by.blank?
|
18
|
+
raise ArgumentError.new('The at argument is required.') if at.blank?
|
19
|
+
post_fulfillments.create! fulfiller: by, opened_at: at
|
20
|
+
end
|
21
|
+
|
22
22
|
end
|
23
23
|
|
24
24
|
end
|
@@ -2,23 +2,23 @@ module Unidom::Accession::Concerns::AsPostFulfiller
|
|
2
2
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
5
|
+
included do |includer|
|
6
6
|
|
7
7
|
has_many :post_fulfillments, class_name: 'Unidom::Accession::PostFulfillment', as: :fulfiller
|
8
8
|
has_many :fulfilled_posts, through: :post_fulfillments, source: :fulfilled, source_type: 'Unidom::Position::Post'
|
9
9
|
|
10
|
-
def fulfill_post!(post: nil, opened_at: Time.now)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
#def fulfill_post!(post, at: Time.now)
|
17
|
-
# raise ArgumentError.new('The post argument is required.') if post.blank?
|
18
|
-
# raise ArgumentError.new('The at argument is required.' ) if at.blank?
|
19
|
-
# post_fulfillments.create! fulfilled: post, opened_at: at
|
10
|
+
#def fulfill_post!(post: nil, opened_at: Time.now)
|
11
|
+
# raise ArgumentError.new('The argument "post" is required.') if post.blank?
|
12
|
+
# raise ArgumentError.new('The argument "opened_at" is required.') if opened_at.blank?
|
13
|
+
# post_fulfillments.create! fulfilled: post, opened_at: opened_at
|
20
14
|
#end
|
21
15
|
|
16
|
+
def fulfill_post!(post, at: Time.now)
|
17
|
+
raise ArgumentError.new('The post argument is required.') if post.blank?
|
18
|
+
raise ArgumentError.new('The at argument is required.' ) if at.blank?
|
19
|
+
post_fulfillments.create! fulfilled: post, opened_at: at
|
20
|
+
end
|
21
|
+
|
22
22
|
end
|
23
23
|
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-accession
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '2.0'
|
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-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|