unidom-accession 2.1 → 2.2

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: d4ff407ff9fe6c66453c9fb208b3535da982f4cf
4
- data.tar.gz: 6b5b87e387d812601ca42b2d691bd83f4ded1c29
3
+ metadata.gz: fac5a377dcd1674c04524568cdc5907da9a9d533
4
+ data.tar.gz: 9bc341f3a66552a6a2d77d0176484d2b762a58d2
5
5
  SHA512:
6
- metadata.gz: 43751b340c76383ed1be89ce21b802127d7683da36662d46cfb5936a9b56d91b1528b6238eb371bc0f1ac0f536cadd2d1c9f1973e9122c600720d085977a83d1
7
- data.tar.gz: c4c560a966bb45bcc951818d03227484950ec810016fa88a6ae178dc7786298f81fd07ea0839f0e504823584e05b628f8f734935e02edb427442096436050578
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?
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Accession
3
- VERSION = '2.1'.freeze
3
+ VERSION = '2.2'.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: '2.1'
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-09 00:00:00.000000000 Z
11
+ date: 2016-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common