simple_workflow 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,25 @@
1
+ == 0.3.0 2012-03-20
2
+
3
+ === Features
4
+
5
+ * Added test helper method "add_stored_detour" to simulate returning from a detour.
6
+
7
+
8
+ == 0.2.2 2012-03-07
9
+
10
+ === Internal
11
+
12
+ * Removed obsolete manifest.txt and Postinstall.txt
13
+ * Renamed History.txt to History.rdoc to reflect the internal format.
14
+
15
+
16
+ == 0.2.1 2012-03-07
17
+
18
+ === Internal
19
+
20
+ * Started documenting
21
+
22
+
1
23
  == 0.2.0 2012-03-06
2
24
 
3
25
  === Features
data/README.rdoc CHANGED
@@ -17,6 +17,16 @@ Extension to Rails to allow detours with returns.
17
17
  detour_to :controller => :my_models, :action => :create
18
18
  back_or_redirect_to :controller => :my_models, :action => :index
19
19
 
20
+ In your tests:
21
+
22
+ def test_valid_login_redirects_as_specified
23
+ add_stored_detour "/bogus/location"
24
+ post :login, :user => { :login => "tesla", :password => "atest" }
25
+ assert_logged_in users(:tesla)
26
+ assert_response :redirect
27
+ assert_redirected_to "http://#{request.host}/bogus/location"
28
+ end
29
+
20
30
  == REQUIREMENTS:
21
31
 
22
32
  * Rails
@@ -15,3 +15,7 @@ class ActionController::Base
15
15
  include SimpleWorkflow::Controller
16
16
  before_filter :store_detour_from_params
17
17
  end
18
+
19
+ class ActiveSupport::TestCase
20
+ include SimpleWorkflow::Helper
21
+ end
@@ -1,6 +1,5 @@
1
1
  module SimpleWorkflow::Controller
2
- ##
3
- # Like ActionController::Base#redirect_to, but stores where we come from, enabling returning here later.
2
+ # Like ActionController::Base#redirect_to, but stores the location we come from, enabling returning here later.
4
3
  def detour_to(options)
5
4
  store_detour(params)
6
5
  redirect_to(options)
@@ -0,0 +1,5 @@
1
+ module SimpleWorkflow::TestHelper
2
+ def add_stored_detour(location = {:controller => :bogus, :action => :location})
3
+ @request.session[:detours] = [location]
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module SimpleWorkflow
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_workflow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Uwe Kubosch
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-07 00:00:00 Z
18
+ date: 2012-03-20 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -42,13 +42,12 @@ extensions: []
42
42
  extra_rdoc_files: []
43
43
 
44
44
  files:
45
- - History.txt
46
- - Manifest.txt
47
- - PostInstall.txt
45
+ - History.rdoc
48
46
  - Rakefile
49
47
  - README.rdoc
50
48
  - lib/simple_workflow/controller.rb
51
49
  - lib/simple_workflow/helper.rb
50
+ - lib/simple_workflow/test_helper.rb
52
51
  - lib/simple_workflow/version.rb
53
52
  - lib/simple_workflow.rb
54
53
  - test/test_helper.rb
data/Manifest.txt DELETED
@@ -1,12 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- PostInstall.txt
4
- README.rdoc
5
- Rakefile
6
- lib/simple_workflow.rb
7
- lib/simple_workflow/simple_workflow_helper.rb
8
- script/console
9
- script/destroy
10
- script/generate
11
- test/test_helper.rb
12
- test/test_simple_workflow.rb
data/PostInstall.txt DELETED
@@ -1,7 +0,0 @@
1
-
2
- For more information on simple_workflow, see http://ruby-shoppe.rubyforge.org
3
-
4
- NOTE: Change this information in PostInstall.txt
5
- You can also delete it if you don't want it.
6
-
7
-