naranya_ecm-sdk 0.0.19 → 0.0.20
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c474a3386e7dec2b9b01242f129bc7292e85a86
|
|
4
|
+
data.tar.gz: 6ca049b6bdde730f7b1d29ad91529bdff5d821c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03eb9d035988b55df0b7be81d8dba4a3f96b643b1f4aea431a3ae968b53a40b978e7715315c84a8f5d5459fcfff12a0f50a419c8c2b67b78458fc3c93b8f7596
|
|
7
|
+
data.tar.gz: bbeb852a3df4476ff34ba862d0a93980fd9daf9485e24237ae7c3d69288dd32317660e321a3e4d60df1474c5231c4bb6ea00d19bf6d4967ea7a77bf96c8c50bc
|
|
@@ -9,28 +9,30 @@ module NaranyaEcm
|
|
|
9
9
|
included do
|
|
10
10
|
|
|
11
11
|
state_machine :lifecycle_state, initial: :draft do
|
|
12
|
+
|
|
12
13
|
state :draft
|
|
13
|
-
state :
|
|
14
|
+
state :awaiting_acceptance
|
|
14
15
|
state :accepted
|
|
15
16
|
state :rejected
|
|
16
17
|
state :published
|
|
17
|
-
state :
|
|
18
|
+
state :superseded
|
|
19
|
+
state :deactivated
|
|
18
20
|
|
|
19
|
-
event :
|
|
20
|
-
transition :draft => :
|
|
21
|
+
event :request_an_acceptance_review do
|
|
22
|
+
transition :draft => :awaiting_acceptance
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
event :accept do
|
|
24
|
-
transition :
|
|
26
|
+
transition :awaiting_acceptance => :accepted
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
event :reject do
|
|
28
|
-
transition [:
|
|
30
|
+
transition [:awaiting_acceptance, :published] => :rejected
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
event :publish do
|
|
32
|
-
transition :draft => :published,
|
|
33
|
-
transition :accepted => :published, if: :
|
|
34
|
+
transition :draft => :published, if: :simple_lifecycle?
|
|
35
|
+
transition :accepted => :published, if: :validatable_lifecycle?
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
event :deactivate do
|
|
@@ -45,7 +47,7 @@ module NaranyaEcm
|
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
def simple_lifecycle?; self.lifecycle_name == 'simple'; end
|
|
48
|
-
def
|
|
50
|
+
def validatable_lifecycle?; self.lifecycle_name == 'validatable'; end
|
|
49
51
|
|
|
50
52
|
def commit_lifecycle_state_change!(transition)
|
|
51
53
|
off_band_changes["#{transition.attribute}_event"] = transition.event
|
|
@@ -20,11 +20,12 @@ module NaranyaEcm
|
|
|
20
20
|
# A managed string that describes the current state of this particular version.
|
|
21
21
|
# Depending on the Content's lifecycle, it changes upon several events.
|
|
22
22
|
# - draft:
|
|
23
|
-
# -
|
|
24
|
-
# -
|
|
25
|
-
# -
|
|
23
|
+
# - awaiting_acceptance:
|
|
24
|
+
# - accepted:
|
|
25
|
+
# - rejected:
|
|
26
26
|
# - published:
|
|
27
27
|
# - superceded:
|
|
28
|
+
# - deactivated:
|
|
28
29
|
field :lifecycle_state, type: String, default: -> { :draft }
|
|
29
30
|
validates :lifecycle_state, presence: true
|
|
30
31
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: naranya_ecm-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Roberto Quintanilla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|