simple_workflow 1.0.8 → 1.0.9
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/Gemfile.lock +1 -4
- data/lib/simple_workflow/controller.rb +1 -1
- data/lib/simple_workflow/version.rb +1 -1
- data/simple_workflow-1.0.8.gem +0 -0
- data/test/controller_test.rb +29 -0
- data/test/{simple_workflow_test.rb → helper_test.rb} +3 -7
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d9618fc3fdb4d342c4d687099c32bdf13953f39
|
4
|
+
data.tar.gz: 1c3c0415df730a8f473b13e2d9c4ba4e80f25e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d8529f0856bd7ccc8d4d80803d7454475364bf444bfc38d85d38cf679a8c14eaeffbba91d5994bad05909ec59c40a4d57a75f2ed1ea6efb5895773321678971
|
7
|
+
data.tar.gz: a85f824076defd8315eb508095d7070b7582f925f0bdc0a354a7063b131c0d1c680ccf529847179055bacabec1c92813682d8f98ea00b3ad2ec4cce11e73832f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_workflow (1.0.
|
4
|
+
simple_workflow (1.0.9)
|
5
5
|
rails (~> 4.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -50,7 +50,6 @@ GEM
|
|
50
50
|
hike (1.2.3)
|
51
51
|
i18n (0.7.0)
|
52
52
|
json (1.8.1)
|
53
|
-
json (1.8.1-java)
|
54
53
|
loofah (2.0.1)
|
55
54
|
nokogiri (>= 1.5.9)
|
56
55
|
mail (2.6.3)
|
@@ -61,7 +60,6 @@ GEM
|
|
61
60
|
multi_json (1.10.1)
|
62
61
|
nokogiri (1.6.5)
|
63
62
|
mini_portile (~> 0.6.0)
|
64
|
-
nokogiri (1.6.5-java)
|
65
63
|
rack (1.6.0)
|
66
64
|
rack-test (0.6.2)
|
67
65
|
rack (>= 1.0)
|
@@ -101,7 +99,6 @@ GEM
|
|
101
99
|
sprockets (>= 2.8, < 4.0)
|
102
100
|
thor (0.19.1)
|
103
101
|
thread_safe (0.3.4)
|
104
|
-
thread_safe (0.3.4-java)
|
105
102
|
tilt (1.4.1)
|
106
103
|
tzinfo (1.2.2)
|
107
104
|
thread_safe (~> 0.1)
|
@@ -25,7 +25,7 @@ module SimpleWorkflow::Controller
|
|
25
25
|
session[:detours] ||= []
|
26
26
|
session[:detours] << options
|
27
27
|
|
28
|
-
if
|
28
|
+
if Rails.application.config.session_store == ActionDispatch::Session::CookieStore
|
29
29
|
encryptor = cookies.signed_or_encrypted.instance_variable_get(:@encryptor)
|
30
30
|
ss = ws = nil
|
31
31
|
loop do
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
require 'rails'
|
3
|
+
|
4
|
+
class ControllerTest < MiniTest::Test
|
5
|
+
include SimpleWorkflow::Controller
|
6
|
+
attr_accessor :cookies, :logger, :session
|
7
|
+
|
8
|
+
def setup
|
9
|
+
options = {encrypted_cookie_salt: 'salt1', encrypted_signed_cookie_salt: 'salt2', secret_key_base: 'secret_key_base'}
|
10
|
+
@cookies = ActionDispatch::Cookies::CookieJar.new(ActiveSupport::KeyGenerator.new('secret'), nil, false, options)
|
11
|
+
@logger = Rails.logger
|
12
|
+
@session = {}
|
13
|
+
Rails.app_class = TestApp
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_store_detour
|
17
|
+
location = {controller: :mycontroller, action: :myaction}
|
18
|
+
|
19
|
+
store_detour(location)
|
20
|
+
|
21
|
+
assert_equal({detours: [location]}, session)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
class TestApp < Rails::Application
|
27
|
+
config.logger = Logger.new($stdout)
|
28
|
+
Rails.logger = config.logger
|
29
|
+
end
|
@@ -1,11 +1,8 @@
|
|
1
|
-
|
1
|
+
require_relative 'test_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class HelperTest < MiniTest::Test
|
4
4
|
include SimpleWorkflow::Helper
|
5
5
|
|
6
|
-
def setup
|
7
|
-
end
|
8
|
-
|
9
6
|
def test_with_detour
|
10
7
|
assert_equal '?detour%5Baction%5D=myaction&detour%5Bcontroller%5D=mycontroller&detour%5Bid%5D=42&detour%5Bquery%5D%5Bnested%5D=criterium',
|
11
8
|
with_detour('')
|
@@ -14,10 +11,9 @@ class SimpleWorkflowTest < MiniTest::Test
|
|
14
11
|
private
|
15
12
|
|
16
13
|
def params
|
17
|
-
{:
|
14
|
+
{controller: 'mycontroller', action: 'myaction', id: 42, query: {nested: 'criterium'}}
|
18
15
|
end
|
19
16
|
|
20
|
-
# FIXME(donv): This should not be faked.
|
21
17
|
def url_for(options)
|
22
18
|
options.to_s
|
23
19
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uwe Kubosch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -47,8 +47,10 @@ files:
|
|
47
47
|
- simple_workflow-1.0.5.gem
|
48
48
|
- simple_workflow-1.0.6.gem
|
49
49
|
- simple_workflow-1.0.7.gem
|
50
|
+
- simple_workflow-1.0.8.gem
|
50
51
|
- simple_workflow.gemspec
|
51
|
-
- test/
|
52
|
+
- test/controller_test.rb
|
53
|
+
- test/helper_test.rb
|
52
54
|
- test/test_helper.rb
|
53
55
|
homepage: https://github.com/donv/simple_workflow
|
54
56
|
licenses:
|