validating-workflow 0.7.9 → 0.7.10

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
- SHA1:
3
- metadata.gz: d130757849316ba07bb518d99578f4184f59dbb3
4
- data.tar.gz: 8b8fae7c226937dd0a5029ea9ae53cd05dd7688c
2
+ SHA256:
3
+ metadata.gz: e002646fa9b136ecb39c052f9db11c7585ee36821f7cc307a2c3c3de1c75b5e6
4
+ data.tar.gz: cfe527f565f7df6006f7fd248bfd031d12c1ffa62bd1a2497f2f77a600a19293
5
5
  SHA512:
6
- metadata.gz: d2df156fe39c4a35538e4ee5d9d2ba42684f808357257e16b3c814f781ac24b69f46696f3ae56ad4066c49020b9d41202b7cc4f1bab74a3cfa35d55b1e3af08b
7
- data.tar.gz: bfcfbc6ba0c6c45e8db8119180f21dcdeeeddcfb22a74d1b85e97fb70e859977bbbae10172dd076ebb0d427a5e3e229388caeef06bdfb5a6ca7889c89da6902d
6
+ metadata.gz: f7ca7d5b30e7c5a65fd1c583d88cda457b95f4f858849caa2a52ea099067c89b7e837b5d0a14ead59e9abe9bf394cf686e465c2aa97827c691a769b0af7e7675
7
+ data.tar.gz: e5836bbf5498aa8097ad641c090e163015d6d622a77a4e2e7a10619329af2c18b9120229468a11e4fdcb9f1b85ed391e565f68d18f591b999a59340f21046cb8
@@ -5,16 +5,16 @@ module Workflow
5
5
  module StateDependency
6
6
 
7
7
  def self.included(base)
8
- base.send :alias_method_chain, :validate, :state_dependency
9
- end
10
-
11
- def validate_with_state_dependency(record)
12
- if not record.respond_to?(:current_state) or
13
- perform_validation_for_state?(record.current_state) or
14
- perform_validation_for_transition?(record.in_transition) or
15
- perform_validation_for_transition?("#{record.in_exit}_exit") or
16
- perform_validation_for_transition?("#{record.in_entry}_entry")
17
- validate_without_state_dependency(record)
8
+ base.prepend Module.new do
9
+ def validate(record)
10
+ if not record.respond_to?(:current_state) or
11
+ perform_validation_for_state?(record.current_state) or
12
+ perform_validation_for_transition?(record.in_transition) or
13
+ perform_validation_for_transition?("#{record.in_exit}_exit") or
14
+ perform_validation_for_transition?("#{record.in_entry}_entry")
15
+ super(record)
16
+ end
17
+ end
18
18
  end
19
19
  end
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validating-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dobriakov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-24 00:00:00.000000000 Z
12
+ date: 2018-04-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |
15
15
  Validating-Workflow is a finite-state-machine-inspired API for modeling and interacting
@@ -32,6 +32,7 @@ files:
32
32
  - README.markdown
33
33
  - Rakefile
34
34
  - VERSION
35
+ - lib/validating-workflow.rb
35
36
  - lib/workflow.rb
36
37
  - lib/workflow/active_model_persistence.rb
37
38
  - lib/workflow/mongoid_persistence.rb
@@ -44,7 +45,6 @@ files:
44
45
  - test/readme_example.rb
45
46
  - test/test_helper.rb
46
47
  - test/without_active_record_test.rb
47
- - validating-workflow.rb
48
48
  - workflow.rb
49
49
  homepage: http://www.geekq.net/workflow/
50
50
  licenses:
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  requirements: []
69
69
  rubyforge_project:
70
- rubygems_version: 2.5.2
70
+ rubygems_version: 2.7.6
71
71
  signing_key:
72
72
  specification_version: 3
73
73
  summary: A replacement for acts_as_state_machine, an enhancement of workflow.