unidom-accession 2.1 → 2.2
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 +4 -4
- data/README.md +3 -0
- data/app/models/unidom/accession/post_fulfillment.rb +3 -0
- data/lib/unidom/accession/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fac5a377dcd1674c04524568cdc5907da9a9d533
|
4
|
+
data.tar.gz: 9bc341f3a66552a6a2d77d0176484d2b762a58d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceac71f14c063463326cf22d1b184507db0fc6e93092b542a307175aa49ed06e797412fed8761b28253e0958c043d38ca84c4f6a059e4e37bad5fa43e1aa3270
|
7
|
+
data.tar.gz: 45c35c9e4bbb1e845f0f5094499a19d95efffcb3d2059eafffac3090f26cdadc0e091a2d3c70fcd8e67d8757f2eb8d4a78d6d78eb9c5b38f4d018c4b73eed9d3
|
data/README.md
CHANGED
@@ -28,6 +28,9 @@ post_fulfillment = Unidom::Accession::PostFulfillment.valid_at.alive.first
|
|
28
28
|
post_fulfillment = Unidom::Accession::PostFulfillment.fulfill! fulfiller: fulfiller, fulfilled: post, opened_at: Time.now
|
29
29
|
# or like the following source codes, which opened_at is optional
|
30
30
|
post_fulfillment = Unidom::Accession::PostFulfillment.fulfill! fulfiller: fulfiller, fulfilled: post
|
31
|
+
|
32
|
+
part_time_fulfillments = Unidom::Accession::PostFulfillment.part_time.temporary(false) # all part time & permanent post fulfillments
|
33
|
+
temporary_fulfillments = Unidom::Accession::PostFulfillment.part_time(false).temporary # all full time & temporary post fulfillments
|
31
34
|
```
|
32
35
|
|
33
36
|
## Include the Concern
|
@@ -12,6 +12,9 @@ class Unidom::Accession::PostFulfillment < ActiveRecord::Base
|
|
12
12
|
scope :fulfilled_by, ->(fulfiller) { where fulfiller: fulfiller }
|
13
13
|
scope :fulfilled_is, ->(fulfilled) { where fulfilled: fulfilled }
|
14
14
|
|
15
|
+
scope :part_time, ->(part_time = true) { where part_time: part_time }
|
16
|
+
scope :temporary, ->(temporary = true) { where temporary: temporary }
|
17
|
+
|
15
18
|
def self.fulfill!(fulfilled: nil, fulfiller: nil, opened_at: Time.now)
|
16
19
|
raise ArgumentError.new('Argument fulfilled is required.') if fulfilled.blank?
|
17
20
|
raise ArgumentError.new('Argument fulfiller is required.') if fulfiller.blank?
|
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: '2.
|
4
|
+
version: '2.2'
|
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-
|
11
|
+
date: 2016-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|