wicked 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of wicked might be problematic. Click here for more details.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/app/controllers/wicked/wizard_controller.rb +0 -27
- data/lib/wicked.rb +3 -0
- data/lib/wicked/wizard.rb +24 -0
- data/wicked.gemspec +3 -2
- metadata +20 -19
data/README.md
CHANGED
@@ -74,7 +74,7 @@ The wizard is set to call steps in order in the show action, you can specify cus
|
|
74
74
|
|
75
75
|
You'll need to call `render_wizard` at the end of your action to get the correct views to show up.
|
76
76
|
|
77
|
-
By default the wizard will render a view with the same name as the step. So for our controller `AfterSignupController` with a view path of `/views/
|
77
|
+
By default the wizard will render a view with the same name as the step. So for our controller `AfterSignupController` with a view path of `/views/after_signup/` if call the :confirm_password step, our wizard will render `/views/after_signup/confirm_password.html.erb`
|
78
78
|
|
79
79
|
Then in your view you can use the helpers to get to the next step.
|
80
80
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -1,30 +1,3 @@
|
|
1
|
-
module Wicked
|
2
|
-
module Wizard
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
# Include the modules!!
|
6
|
-
include Wicked::Controller::Concerns::Path
|
7
|
-
include Wicked::Controller::Concerns::RenderRedirect
|
8
|
-
include Wicked::Controller::Concerns::Steps
|
9
|
-
|
10
|
-
included do
|
11
|
-
# Give our Views helper methods!
|
12
|
-
helper_method :wizard_path, :next_wizard_path
|
13
|
-
# Set @step and @next_step variables
|
14
|
-
before_filter :setup_wizard
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
def setup_wizard
|
19
|
-
@step = params[:id].try(:to_sym) || steps.first
|
20
|
-
@next_step = next_step(@step)
|
21
|
-
end
|
22
|
-
public
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
|
-
|
28
1
|
# Please don't re-use any patterns found in this controller,
|
29
2
|
# they work, but are not very good practices.
|
30
3
|
# If you have a better way to do this, please let me know
|
data/lib/wicked.rb
CHANGED
@@ -3,9 +3,12 @@ module Wicked
|
|
3
3
|
module Concerns
|
4
4
|
end
|
5
5
|
end
|
6
|
+
module Wizard
|
7
|
+
end
|
6
8
|
end
|
7
9
|
|
8
10
|
require 'wicked/controller/concerns/render_redirect'
|
9
11
|
require 'wicked/controller/concerns/steps'
|
10
12
|
require 'wicked/controller/concerns/path'
|
13
|
+
require 'wicked/wizard'
|
11
14
|
require 'wicked/engine'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Wicked
|
2
|
+
module Wizard
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
# Include the modules!!
|
6
|
+
include Wicked::Controller::Concerns::Path
|
7
|
+
include Wicked::Controller::Concerns::RenderRedirect
|
8
|
+
include Wicked::Controller::Concerns::Steps
|
9
|
+
|
10
|
+
included do
|
11
|
+
# Give our Views helper methods!
|
12
|
+
helper_method :wizard_path, :next_wizard_path
|
13
|
+
# Set @step and @next_step variables
|
14
|
+
before_filter :setup_wizard
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
def setup_wizard
|
19
|
+
@step = params[:id].try(:to_sym) || steps.first
|
20
|
+
@next_step = next_step(@step)
|
21
|
+
end
|
22
|
+
public
|
23
|
+
end
|
24
|
+
end
|
data/wicked.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "wicked"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["schneems"]
|
12
|
-
s.date = "2012-03-
|
12
|
+
s.date = "2012-03-15"
|
13
13
|
s.description = "Wicked is a Rails engine for producing easy wizard controllers"
|
14
14
|
s.email = "richard.schneeman@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"lib/wicked/controller/concerns/render_redirect.rb",
|
31
31
|
"lib/wicked/controller/concerns/steps.rb",
|
32
32
|
"lib/wicked/engine.rb",
|
33
|
+
"lib/wicked/wizard.rb",
|
33
34
|
"test/dummy/Rakefile",
|
34
35
|
"test/dummy/app/controllers/application_controller.rb",
|
35
36
|
"test/dummy/app/controllers/bar_controller.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wicked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &70201537409420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.0.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70201537409420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rails
|
27
|
-
requirement: &
|
27
|
+
requirement: &70201537408840 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 3.0.7
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70201537408840
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70201537408240 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.6.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70201537408240
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70201537407640 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70201537407640
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rcov
|
60
|
-
requirement: &
|
60
|
+
requirement: &70201537407040 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70201537407040
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capybara
|
71
|
-
requirement: &
|
71
|
+
requirement: &70201537406420 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.4.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70201537406420
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sqlite3
|
82
|
-
requirement: &
|
82
|
+
requirement: &70201537405940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70201537405940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: launchy
|
93
|
-
requirement: &
|
93
|
+
requirement: &70201537405460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70201537405460
|
102
102
|
description: Wicked is a Rails engine for producing easy wizard controllers
|
103
103
|
email: richard.schneeman@gmail.com
|
104
104
|
executables: []
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/wicked/controller/concerns/render_redirect.rb
|
121
121
|
- lib/wicked/controller/concerns/steps.rb
|
122
122
|
- lib/wicked/engine.rb
|
123
|
+
- lib/wicked/wizard.rb
|
123
124
|
- test/dummy/Rakefile
|
124
125
|
- test/dummy/app/controllers/application_controller.rb
|
125
126
|
- test/dummy/app/controllers/bar_controller.rb
|
@@ -181,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
182
|
version: '0'
|
182
183
|
segments:
|
183
184
|
- 0
|
184
|
-
hash:
|
185
|
+
hash: 1692442805010936287
|
185
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
187
|
none: false
|
187
188
|
requirements:
|