acts_as_living 0.1.16 → 0.1.17

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
  SHA256:
3
- metadata.gz: 856f21c5919a8fcea61ad831f12fd5b9fb258b29f9ec5a85ce535dedb9d47e51
4
- data.tar.gz: a38410651c7ef62461f70c0f561475f80786a7f7b3a93cc8493f88c20b1a0265
3
+ metadata.gz: 8980c57bb91eee242c77df0474a818135fb99903e23d540aed8f0e5daa666e4c
4
+ data.tar.gz: 34cfee00e11742cde4d7a49c68e22f9282ba58d7f701df218e05cde8e6646b47
5
5
  SHA512:
6
- metadata.gz: ad159cbc05a79900e7d4f2321f3d4bb67a8f2a15becf3e5a44e263f497817472e4693dce0d7bb33bc03698ce7028a56e2a9cb5d1e72f3bb898a46f182cb0ea10
7
- data.tar.gz: c54a511823f00e85594bfc82229aff09f91dddc70b9d089e9fa1cfd0ea0929077b85b268f51de82ed22374c4bcf5cc66628a1d2d1078a246564cfc43d9cc7128
6
+ metadata.gz: 777d163e2a0e02ba0d479a4ecfa571dfe35347ab6abd65afd14400a53e0ba3555e4b50b37d7866fd256782de75d1190e5cd7fcbbfdd77f279709e34fbde0dec2
7
+ data.tar.gz: 5d0134a2b6c6cb0d41b691c2ffde08f9e816619eaebaf669cbfb4decca17fe6dba988181a14fa1cdf8671cc35a8b1d003eef87f9068eee53624e3380d55e8700
@@ -20,7 +20,7 @@ module ActsAsLiving::ActsAsLiving
20
20
  ActsAsLiving::MethodsDefiner.call(self)
21
21
  ActsAsLiving::EnumDefiner.call(self)
22
22
  ActsAsLiving::ScopesDefiner.call(self)
23
- ActsAsLiving::ValidationsDefiner.call(self)
23
+ # ActsAsLiving::ValidationsDefiner.call(self)
24
24
  end
25
25
  end
26
26
  end
@@ -1,32 +1,26 @@
1
1
  module ActsAsLiving::ValidationsDefiner
2
- def self.call(klass)
3
- klass.class_eval do
4
- include InstanceMethods
2
+ # def self.call(klass)
3
+ # klass.class_eval do
4
+ # include InstanceMethods
5
5
 
6
- validates :stage, presence: true
6
+ # validates :stage, presence: true
7
7
 
8
- validate :stage_progression, on: :update, if: :stage_changed?
9
- validate :stage_is_first_stage, on: :create, if: :stage_changed?
10
- end
11
- end
8
+ # validate :stage_progression, on: :update, if: :stage_changed?
9
+ # validate :stage_is_first_stage, on: :create, if: :stage_changed?
10
+ # end
11
+ # end
12
12
 
13
- module InstanceMethods
14
- def stage_progression
15
- return if stage.to_s == self.class.death.to_s || stage == stage_after(stage_was)
13
+ # module InstanceMethods
14
+ # def stage_progression
15
+ # return if stage.to_s == self.class.death.to_s || stage == stage_after(stage_was)
16
16
 
17
- message = if stage_was == self.class.final_stage
18
- "The contract can only be updated to '#{self.class.death}'"
19
- else
20
- "The contract can only be updated to '#{self.class.death}' or '#{stage_after(stage_was)}'"
21
- end
17
+ # message = if stage_was == self.class.final_stage
18
+ # "The contract can only be updated to '#{self.class.death}'"
19
+ # else
20
+ # "The contract can only be updated to '#{self.class.death}' or '#{stage_after(stage_was)}'"
21
+ # end
22
22
 
23
- errors.add(:stage, message)
24
- end
25
-
26
- def stage_is_first_stage
27
- return if first_stage?
28
-
29
- errors.add(:stage, "Contract has to be initialized with '#{first_stage}' stage")
30
- end
31
- end
23
+ # errors.add(:stage, message)
24
+ # end
25
+ # end
32
26
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsLiving
2
- VERSION = "0.1.16"
2
+ VERSION = "0.1.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_living
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Andrade