simple_workflow 1.0.3 → 1.0.4
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 +4 -4
- data/History.rdoc +8 -0
- data/lib/simple_workflow/helper.rb +13 -6
- data/lib/simple_workflow/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c584a56b66575a882914c51fcaa05bed96a088d
|
4
|
+
data.tar.gz: f0df5c91f58f27bed3fec56af7705838f51c5541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad22ae44d1921866e12608eb93cf76b97f9fe09f8e73bc83863ffa2f8f3aede73944b6c415fa8f59c1beda314901c289fb0c387d6fedcac1f86c87ae9244dbc7
|
7
|
+
data.tar.gz: 7d7f74ddfd991fb44e47219fab444665beb640548faeb06853731e2be10e5ae487435425b9460709b120bd6fd7c22ec8933c779914da025c4027d8258b7940b4
|
data/History.rdoc
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
== 1.0.4 2014-02-28
|
2
|
+
|
3
|
+
=== Feature
|
4
|
+
|
5
|
+
* Added support for setting just the anchor of the originating page in with_detour.
|
6
|
+
|
7
|
+
|
1
8
|
== 1.0.3 2014-02-28
|
2
9
|
|
3
10
|
=== Fixes
|
4
11
|
|
5
12
|
* The second argument to detour_to is optional if a block is given.
|
13
|
+
* Fixed URL overflow error when detour URL was > 4096 characters.
|
6
14
|
|
7
15
|
|
8
16
|
== 1.0.1 2014-02-10
|
@@ -7,8 +7,8 @@ module SimpleWorkflow::Helper
|
|
7
7
|
|
8
8
|
def detour_to(title, options = nil, html_options = nil, &block)
|
9
9
|
if block
|
10
|
-
html_options
|
11
|
-
options
|
10
|
+
html_options = options
|
11
|
+
options = title
|
12
12
|
link_with_detour = link_to(with_detour(options), html_options, &block)
|
13
13
|
else
|
14
14
|
link_with_detour = link_to(title, with_detour(options), html_options)
|
@@ -23,10 +23,17 @@ module SimpleWorkflow::Helper
|
|
23
23
|
link_with_detour
|
24
24
|
end
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
# Takes a link destination and augments it with the current page as origin.
|
27
|
+
# If the optional second argument is given, it is used as the origin.
|
28
|
+
# If the given origin is only an anchor, it is added to the current page.
|
29
|
+
def with_detour(options, origin = origin_options)
|
30
|
+
origin.update(origin_options) if origin.keys == [:anchor]
|
28
31
|
url = url_for(options)
|
29
|
-
|
32
|
+
url + (url =~ /\?/ ? '&' : '?') + origin.to_param('detour')
|
33
|
+
end
|
34
|
+
|
35
|
+
def origin_options
|
36
|
+
params.reject { |k, v| [:detour, :return_from_detour].include? k.to_sym }
|
30
37
|
end
|
31
38
|
|
32
39
|
def image_detour_to(image_source, title, url_options, image_options = nil, link_options = nil)
|
@@ -63,7 +70,7 @@ module SimpleWorkflow::Helper
|
|
63
70
|
|
64
71
|
def back_or_link_to(title, options = nil, html_options = nil)
|
65
72
|
if session[:detours]
|
66
|
-
options
|
73
|
+
options = {:return_from_detour => true}.update(session[:detours].last)
|
67
74
|
options[:id] ||= nil
|
68
75
|
logger.debug "linked return from detour: #{options.inspect}"
|
69
76
|
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.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uwe Kubosch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project: donv/simple_workflow
|
63
|
-
rubygems_version: 2.2.
|
63
|
+
rubygems_version: 2.2.2
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Add simple breadcrumbs "detour" workflow to Ruby On Rails.
|