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: dcc3ece423f7862c4e1ffc5032c877eb994bc456
4
- data.tar.gz: 27344f3ac986c0de354b64c5c36330489f33929f
3
+ metadata.gz: 2c28c9f6045d2d26687c9c0c144431b548bb6b38
4
+ data.tar.gz: 1ea4ec65b881937750d5c89f0b9894d9a6410d62
5
5
  SHA512:
6
- metadata.gz: e2da31e20a880cad7fa80ad150fd8c35c24f0a740b624fb735e9194e0f8e72fa1162a4a6f0a2a7de4e9d49d449ac4c0893a1f77c3ab0881b0dae377b2705e52e
7
- data.tar.gz: 654eabd63a78200de617a1eb36747d71169f239e7e823c42f92d0ebcdb0317df2b68fe45d8f69340404b42a79b62901441208babb3a575dff798140a6990f6d5
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: fulfiller, opened_at: Time.now)``
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
- self.included do |includer|
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
- 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
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
- self.included do |includer|
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
- 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
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
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Accession
3
- VERSION = '1.3.1'.freeze
3
+ VERSION = '2.0'.freeze
4
4
  end
5
5
  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: 1.3.1
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-10 00:00:00.000000000 Z
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common