simple_workflow 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +69 -66
- data/Rakefile +1 -0
- data/lib/simple_workflow/helper.rb +13 -2
- data/lib/simple_workflow/middleware.rb +2 -1
- data/lib/simple_workflow/version.rb +1 -1
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9556a1a400f0f30cb7c5618ebbdc193bd8b4ba6d2c475d6a4cb5fa51503a52cf
|
4
|
+
data.tar.gz: 7b678c66af66a9b40339e5015342b4ce499167e9fdbb9bf032ff096918d42c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dac5db9584a5647d1d0203295f6b98ff8e3faf0db5d74ef29d44f7b34be2a2aaf1cfc5b902008d7c9aba4bc4a72fbd4224145b616d43dac90758355ed944785a
|
7
|
+
data.tar.gz: 761c0799055db90e0b6834a092cb55a8deda18dc11ca5fec9091d1c8c81cea459328002b438e10f869d5be9e4d8d24bc6fd12ee69c5baecbba2d2967736dd689
|
data/Gemfile.lock
CHANGED
@@ -1,49 +1,49 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_workflow (1.
|
4
|
+
simple_workflow (1.7.0)
|
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.3)
|
11
|
+
actionpack (= 5.2.3)
|
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.3)
|
15
|
+
actionpack (= 5.2.3)
|
16
|
+
actionview (= 5.2.3)
|
17
|
+
activejob (= 5.2.3)
|
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.3)
|
21
|
+
actionview (= 5.2.3)
|
22
|
+
activesupport (= 5.2.3)
|
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.3)
|
28
|
+
activesupport (= 5.2.3)
|
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.3)
|
34
|
+
activesupport (= 5.2.3)
|
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.3)
|
37
|
+
activesupport (= 5.2.3)
|
38
|
+
activerecord (5.2.3)
|
39
|
+
activemodel (= 5.2.3)
|
40
|
+
activesupport (= 5.2.3)
|
41
41
|
arel (>= 9.0)
|
42
|
-
activestorage (5.2.
|
43
|
-
actionpack (= 5.2.
|
44
|
-
activerecord (= 5.2.
|
42
|
+
activestorage (5.2.3)
|
43
|
+
actionpack (= 5.2.3)
|
44
|
+
activerecord (= 5.2.3)
|
45
45
|
marcel (~> 0.3.1)
|
46
|
-
activesupport (5.2.
|
46
|
+
activesupport (5.2.3)
|
47
47
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
48
|
i18n (>= 0.7, < 2)
|
49
49
|
minitest (~> 5.1)
|
@@ -52,76 +52,78 @@ GEM
|
|
52
52
|
arel (9.0.0)
|
53
53
|
ast (2.4.0)
|
54
54
|
builder (3.2.3)
|
55
|
-
concurrent-ruby (1.
|
55
|
+
concurrent-ruby (1.1.5)
|
56
56
|
crass (1.0.4)
|
57
|
-
docile (1.3.
|
58
|
-
erubi (1.
|
59
|
-
globalid (0.4.
|
57
|
+
docile (1.3.1)
|
58
|
+
erubi (1.8.0)
|
59
|
+
globalid (0.4.2)
|
60
60
|
activesupport (>= 4.2.0)
|
61
|
-
i18n (1.
|
61
|
+
i18n (1.6.0)
|
62
62
|
concurrent-ruby (~> 1.0)
|
63
|
-
|
64
|
-
|
63
|
+
jaro_winkler (1.5.2)
|
64
|
+
json (2.2.0)
|
65
|
+
loofah (2.2.3)
|
65
66
|
crass (~> 1.0.2)
|
66
67
|
nokogiri (>= 1.5.9)
|
67
|
-
mail (2.7.
|
68
|
+
mail (2.7.1)
|
68
69
|
mini_mime (>= 0.1.1)
|
69
|
-
marcel (0.3.
|
70
|
+
marcel (0.3.3)
|
70
71
|
mimemagic (~> 0.3.2)
|
71
|
-
method_source (0.9.
|
72
|
-
mimemagic (0.3.
|
72
|
+
method_source (0.9.2)
|
73
|
+
mimemagic (0.3.3)
|
73
74
|
mini_mime (1.0.1)
|
74
|
-
mini_portile2 (2.
|
75
|
-
minitest (5.
|
76
|
-
minitest-reporters (1.
|
75
|
+
mini_portile2 (2.4.0)
|
76
|
+
minitest (5.11.3)
|
77
|
+
minitest-reporters (1.3.6)
|
77
78
|
ansi
|
78
79
|
builder
|
79
80
|
minitest (>= 5.0)
|
80
81
|
ruby-progressbar
|
81
82
|
nio4r (2.3.1)
|
82
|
-
nokogiri (1.
|
83
|
-
mini_portile2 (~> 2.
|
84
|
-
parallel (1.
|
85
|
-
parser (2.
|
83
|
+
nokogiri (1.10.3)
|
84
|
+
mini_portile2 (~> 2.4.0)
|
85
|
+
parallel (1.17.0)
|
86
|
+
parser (2.6.3.0)
|
86
87
|
ast (~> 2.4.0)
|
87
|
-
|
88
|
-
rack (2.0.5)
|
88
|
+
rack (2.0.7)
|
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.3)
|
92
|
+
actioncable (= 5.2.3)
|
93
|
+
actionmailer (= 5.2.3)
|
94
|
+
actionpack (= 5.2.3)
|
95
|
+
actionview (= 5.2.3)
|
96
|
+
activejob (= 5.2.3)
|
97
|
+
activemodel (= 5.2.3)
|
98
|
+
activerecord (= 5.2.3)
|
99
|
+
activestorage (= 5.2.3)
|
100
|
+
activesupport (= 5.2.3)
|
101
101
|
bundler (>= 1.3.0)
|
102
|
-
railties (= 5.2.
|
102
|
+
railties (= 5.2.3)
|
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.3)
|
110
|
+
actionpack (= 5.2.3)
|
111
|
+
activesupport (= 5.2.3)
|
112
112
|
method_source
|
113
113
|
rake (>= 0.8.7)
|
114
114
|
thor (>= 0.19.0, < 2.0)
|
115
115
|
rainbow (3.0.0)
|
116
|
-
rake (12.3.
|
117
|
-
rubocop (0.
|
116
|
+
rake (12.3.2)
|
117
|
+
rubocop (0.68.1)
|
118
|
+
jaro_winkler (~> 1.5.1)
|
118
119
|
parallel (~> 1.10)
|
119
|
-
parser (>= 2.5)
|
120
|
-
powerpack (~> 0.1)
|
120
|
+
parser (>= 2.5, != 2.5.1.1)
|
121
121
|
rainbow (>= 2.2.2, < 4.0)
|
122
122
|
ruby-progressbar (~> 1.7)
|
123
|
-
unicode-display_width (
|
124
|
-
|
123
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
124
|
+
rubocop-performance (0.0.1)
|
125
|
+
rubocop (>= 0.58.0)
|
126
|
+
ruby-progressbar (1.10.0)
|
125
127
|
simplecov (0.16.1)
|
126
128
|
docile (~> 1.1)
|
127
129
|
json (>= 1.8, < 3)
|
@@ -134,11 +136,11 @@ GEM
|
|
134
136
|
actionpack (>= 4.0)
|
135
137
|
activesupport (>= 4.0)
|
136
138
|
sprockets (>= 3.0.0)
|
137
|
-
thor (0.20.
|
139
|
+
thor (0.20.3)
|
138
140
|
thread_safe (0.3.6)
|
139
141
|
tzinfo (1.2.5)
|
140
142
|
thread_safe (~> 0.1)
|
141
|
-
unicode-display_width (1.
|
143
|
+
unicode-display_width (1.5.0)
|
142
144
|
websocket-driver (0.7.0)
|
143
145
|
websocket-extensions (>= 0.1.0)
|
144
146
|
websocket-extensions (0.1.3)
|
@@ -149,8 +151,9 @@ PLATFORMS
|
|
149
151
|
DEPENDENCIES
|
150
152
|
minitest-reporters (~> 1.0)
|
151
153
|
rubocop (~> 0.49)
|
154
|
+
rubocop-performance (~> 0.0)
|
152
155
|
simple_workflow!
|
153
156
|
simplecov (~> 0.9)
|
154
157
|
|
155
158
|
BUNDLED WITH
|
156
|
-
1.16.
|
159
|
+
1.16.6
|
data/Rakefile
CHANGED
@@ -84,7 +84,12 @@ module SimpleWorkflow::Helper
|
|
84
84
|
!session[:detours].nil?
|
85
85
|
end
|
86
86
|
|
87
|
-
def back_or_link_to(title, options = nil, html_options = nil)
|
87
|
+
def back_or_link_to(title, options = nil, html_options = nil, &block)
|
88
|
+
if block
|
89
|
+
html_options = options
|
90
|
+
options = title
|
91
|
+
title = nil
|
92
|
+
end
|
88
93
|
if session[:detours]
|
89
94
|
link_options = { return_from_detour: true }.update(session[:detours].last)
|
90
95
|
|
@@ -97,7 +102,13 @@ module SimpleWorkflow::Helper
|
|
97
102
|
link_options = options
|
98
103
|
end
|
99
104
|
|
100
|
-
|
105
|
+
if link_options
|
106
|
+
if block
|
107
|
+
link_to(link_options, html_options, &block)
|
108
|
+
else
|
109
|
+
link_to(title, link_options, html_options)
|
110
|
+
end
|
111
|
+
end
|
101
112
|
rescue ActionController::UrlGenerationError => e
|
102
113
|
if session[:detours]
|
103
114
|
logger.error "Exception linking to origin: #{e.class} #{e}"
|
@@ -105,6 +105,7 @@ 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
|
-
|
108
|
+
params_hash = params(env).to_h.reject { |k, _v| %i[detour return_from_detour].include? k.to_sym }
|
109
|
+
pop_detour(session(env), params_hash)
|
109
110
|
end
|
110
111
|
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.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uwe Kubosch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0.49'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rubocop-performance
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.0'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: simplecov
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
129
|
- !ruby/object:Gem::Version
|
116
130
|
version: '0'
|
117
131
|
requirements: []
|
118
|
-
|
119
|
-
rubygems_version: 2.7.6
|
132
|
+
rubygems_version: 3.0.3
|
120
133
|
signing_key:
|
121
134
|
specification_version: 4
|
122
135
|
summary: Add simple breadcrumbs "detour" workflow to Ruby On Rails.
|