simple_workflow 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +40 -40
- data/lib/simple_workflow/detour.rb +12 -6
- data/lib/simple_workflow/middleware.rb +1 -1
- data/lib/simple_workflow/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7ebe25ee6377081e1645abaf25fd641880185acbb47f82dc7a8bd4215d3f17c6
|
4
|
+
data.tar.gz: 74a3bb2743303b8975a1b4635a942992b5aa043686c728f3147c5d4cc5f17e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92b56c0557b9d76f13790f456bff4ee44fe01e23d4b10dc21e8e17267bb386f074d767b57c46c074146b58d6c0b7a7f8e322e60b93b6fd8e09005a2ed86786de
|
7
|
+
data.tar.gz: 6beb61cb7cd7649d36d38f9e53cf290cd6220089fdd6533159a8b11452c00522b75dd74b14aa03b555735eb45cd032eb9efa28a8366d987907b79b9bda8225ce
|
data/Gemfile.lock
CHANGED
@@ -1,49 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_workflow (1.6.
|
4
|
+
simple_workflow (1.6.1)
|
5
5
|
rails (>= 4.2, < 5.3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (5.2.
|
11
|
-
actionpack (= 5.2.
|
10
|
+
actioncable (5.2.1)
|
11
|
+
actionpack (= 5.2.1)
|
12
12
|
nio4r (~> 2.0)
|
13
13
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailer (5.2.
|
15
|
-
actionpack (= 5.2.
|
16
|
-
actionview (= 5.2.
|
17
|
-
activejob (= 5.2.
|
14
|
+
actionmailer (5.2.1)
|
15
|
+
actionpack (= 5.2.1)
|
16
|
+
actionview (= 5.2.1)
|
17
|
+
activejob (= 5.2.1)
|
18
18
|
mail (~> 2.5, >= 2.5.4)
|
19
19
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (5.2.
|
21
|
-
actionview (= 5.2.
|
22
|
-
activesupport (= 5.2.
|
20
|
+
actionpack (5.2.1)
|
21
|
+
actionview (= 5.2.1)
|
22
|
+
activesupport (= 5.2.1)
|
23
23
|
rack (~> 2.0)
|
24
24
|
rack-test (>= 0.6.3)
|
25
25
|
rails-dom-testing (~> 2.0)
|
26
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
-
actionview (5.2.
|
28
|
-
activesupport (= 5.2.
|
27
|
+
actionview (5.2.1)
|
28
|
+
activesupport (= 5.2.1)
|
29
29
|
builder (~> 3.1)
|
30
30
|
erubi (~> 1.4)
|
31
31
|
rails-dom-testing (~> 2.0)
|
32
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
33
|
-
activejob (5.2.
|
34
|
-
activesupport (= 5.2.
|
33
|
+
activejob (5.2.1)
|
34
|
+
activesupport (= 5.2.1)
|
35
35
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (5.2.
|
37
|
-
activesupport (= 5.2.
|
38
|
-
activerecord (5.2.
|
39
|
-
activemodel (= 5.2.
|
40
|
-
activesupport (= 5.2.
|
36
|
+
activemodel (5.2.1)
|
37
|
+
activesupport (= 5.2.1)
|
38
|
+
activerecord (5.2.1)
|
39
|
+
activemodel (= 5.2.1)
|
40
|
+
activesupport (= 5.2.1)
|
41
41
|
arel (>= 9.0)
|
42
|
-
activestorage (5.2.
|
43
|
-
actionpack (= 5.2.
|
44
|
-
activerecord (= 5.2.
|
42
|
+
activestorage (5.2.1)
|
43
|
+
actionpack (= 5.2.1)
|
44
|
+
activerecord (= 5.2.1)
|
45
45
|
marcel (~> 0.3.1)
|
46
|
-
activesupport (5.2.
|
46
|
+
activesupport (5.2.1)
|
47
47
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
48
|
i18n (>= 0.7, < 2)
|
49
49
|
minitest (~> 5.1)
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
erubi (1.7.1)
|
59
59
|
globalid (0.4.1)
|
60
60
|
activesupport (>= 4.2.0)
|
61
|
-
i18n (1.0
|
61
|
+
i18n (1.1.0)
|
62
62
|
concurrent-ruby (~> 1.0)
|
63
63
|
json (2.1.0)
|
64
64
|
loofah (2.2.2)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
mimemagic (~> 0.3.2)
|
71
71
|
method_source (0.9.0)
|
72
72
|
mimemagic (0.3.2)
|
73
|
-
mini_mime (1.0.
|
73
|
+
mini_mime (1.0.1)
|
74
74
|
mini_portile2 (2.3.0)
|
75
75
|
minitest (5.10.3)
|
76
76
|
minitest-reporters (1.2.0)
|
@@ -88,30 +88,30 @@ GEM
|
|
88
88
|
rack (2.0.5)
|
89
89
|
rack-test (1.1.0)
|
90
90
|
rack (>= 1.0, < 3)
|
91
|
-
rails (5.2.
|
92
|
-
actioncable (= 5.2.
|
93
|
-
actionmailer (= 5.2.
|
94
|
-
actionpack (= 5.2.
|
95
|
-
actionview (= 5.2.
|
96
|
-
activejob (= 5.2.
|
97
|
-
activemodel (= 5.2.
|
98
|
-
activerecord (= 5.2.
|
99
|
-
activestorage (= 5.2.
|
100
|
-
activesupport (= 5.2.
|
91
|
+
rails (5.2.1)
|
92
|
+
actioncable (= 5.2.1)
|
93
|
+
actionmailer (= 5.2.1)
|
94
|
+
actionpack (= 5.2.1)
|
95
|
+
actionview (= 5.2.1)
|
96
|
+
activejob (= 5.2.1)
|
97
|
+
activemodel (= 5.2.1)
|
98
|
+
activerecord (= 5.2.1)
|
99
|
+
activestorage (= 5.2.1)
|
100
|
+
activesupport (= 5.2.1)
|
101
101
|
bundler (>= 1.3.0)
|
102
|
-
railties (= 5.2.
|
102
|
+
railties (= 5.2.1)
|
103
103
|
sprockets-rails (>= 2.0.0)
|
104
104
|
rails-dom-testing (2.0.3)
|
105
105
|
activesupport (>= 4.2.0)
|
106
106
|
nokogiri (>= 1.6)
|
107
107
|
rails-html-sanitizer (1.0.4)
|
108
108
|
loofah (~> 2.2, >= 2.2.2)
|
109
|
-
railties (5.2.
|
110
|
-
actionpack (= 5.2.
|
111
|
-
activesupport (= 5.2.
|
109
|
+
railties (5.2.1)
|
110
|
+
actionpack (= 5.2.1)
|
111
|
+
activesupport (= 5.2.1)
|
112
112
|
method_source
|
113
113
|
rake (>= 0.8.7)
|
114
|
-
thor (>= 0.
|
114
|
+
thor (>= 0.19.0, < 2.0)
|
115
115
|
rainbow (3.0.0)
|
116
116
|
rake (12.3.1)
|
117
117
|
rubocop (0.54.0)
|
@@ -3,19 +3,25 @@
|
|
3
3
|
# Utility methods to manage the breadcrumb history
|
4
4
|
module SimpleWorkflow::Detour
|
5
5
|
def store_detour_in_session(session, options)
|
6
|
-
if session[:detours]
|
7
|
-
|
8
|
-
|
6
|
+
if session[:detours]
|
7
|
+
if session[:detours].last == options
|
8
|
+
Rails.logger.try(:debug, "Ignored duplicate detour: #{options.inspect}")
|
9
|
+
return
|
10
|
+
end
|
11
|
+
if session[:detours].delete(options)
|
12
|
+
Rails.logger.try(:debug, "Deleted duplicate detour: #{options.inspect}")
|
13
|
+
end
|
14
|
+
else
|
15
|
+
session[:detours] = []
|
9
16
|
end
|
10
|
-
session[:detours] ||= []
|
11
17
|
session[:detours] << options
|
12
18
|
Rails.logger.try(:debug, "Added detour (#{session[:detours].try(:size) || 0}): #{options.inspect}")
|
13
19
|
end
|
14
20
|
|
15
|
-
def pop_detour(session)
|
21
|
+
def pop_detour(session, origin_options = nil)
|
16
22
|
detours = session[:detours]
|
17
23
|
return nil unless detours
|
18
|
-
detour = detours.pop
|
24
|
+
detour = detours.delete(origin_options) || detours.pop
|
19
25
|
Rails.logger.debug "popped detour: #{detour.inspect} #{session[:detours].size} more"
|
20
26
|
reset_workflow(session) if detours.empty?
|
21
27
|
detour
|
@@ -105,6 +105,6 @@ class SimpleWorkflow::Middleware
|
|
105
105
|
def store_detour_from_params(env)
|
106
106
|
store_detour_in_session(session(env), params(env)[:detour]) if params(env)[:detour]
|
107
107
|
return unless params(env)[:return_from_detour] && session(env)[:detours]
|
108
|
-
pop_detour(session(env))
|
108
|
+
pop_detour(session(env), params(env).to_h.reject { |k, _v| %i[detour return_from_detour].include? k.to_sym })
|
109
109
|
end
|
110
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uwe Kubosch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project: donv/simple_workflow
|
119
|
-
rubygems_version: 2.6
|
119
|
+
rubygems_version: 2.7.6
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Add simple breadcrumbs "detour" workflow to Ruby On Rails.
|