wicked 0.6.0 → 0.6.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/CHANGELOG.md +4 -0
- data/README.md +16 -16
- data/VERSION +1 -1
- data/lib/wicked/wizard/translated.rb +1 -1
- data/test/dummy/app/views/i18n/second.html.erb +3 -4
- data/test/integration/i18n_test.rb +12 -0
- data/wicked.gemspec +3 -3
- metadata +140 -91
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -288,31 +288,31 @@ use `wizard_value` method.
|
|
288
288
|
For example, if you had this in your controller, and you converted it to
|
289
289
|
a use Wicked translations, so this will not work:
|
290
290
|
|
291
|
-
```
|
292
|
-
|
291
|
+
```ruby
|
292
|
+
steps :confirm_password, :confirm_profile, :find_friends
|
293
293
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
end
|
299
|
-
render_wizard
|
294
|
+
def show
|
295
|
+
case step
|
296
|
+
when :find_friends
|
297
|
+
@friends = current_user.find_friends
|
300
298
|
end
|
299
|
+
render_wizard
|
300
|
+
end
|
301
301
|
```
|
302
302
|
|
303
303
|
Instead you need to use `wizard_value` to get the "reverse translation" in your controller code like this:
|
304
304
|
|
305
305
|
|
306
|
-
```
|
307
|
-
|
306
|
+
```ruby
|
307
|
+
steps :confirm_password, :confirm_profile, :find_friends
|
308
308
|
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
end
|
314
|
-
render_wizard
|
309
|
+
def show
|
310
|
+
case wizard_value(step)
|
311
|
+
when :find_friends
|
312
|
+
@friends = current_user.find_friends
|
315
313
|
end
|
314
|
+
render_wizard
|
315
|
+
end
|
316
316
|
```
|
317
317
|
|
318
318
|
The important thing to remember is that `step` and the values in `steps` are
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
@@ -1,7 +1,6 @@
|
|
1
|
-
<%= "Hey ya'll we're looking at: #{I18n.t('wicked.second')}"
|
2
|
-
|
1
|
+
<%= "Hey ya'll we're looking at: #{I18n.t('wicked.second')}" %><br />
|
3
2
|
|
3
|
+
<%= "wizard_value for first: #{wizard_value(I18n.t('wicked.first').to_sym)}" %><br />
|
4
|
+
<%= "wizard_value for second: #{wizard_value(I18n.t('wicked.second').to_sym)}" %><br />
|
4
5
|
|
5
6
|
<%= render :partial => "step_positions/step_position" %>
|
6
|
-
|
7
|
-
|
@@ -30,4 +30,16 @@ class I18nTest < ActiveSupport::IntegrationCase
|
|
30
30
|
assert true # previous_step?
|
31
31
|
assert has_content?('second step is the next step') # next_step?
|
32
32
|
end
|
33
|
+
|
34
|
+
test 'wizard_value works on i18n pages' do
|
35
|
+
step = :dos
|
36
|
+
visit(i18n_path(step, :locale => :es))
|
37
|
+
assert has_content?("wizard_value for first: first")
|
38
|
+
assert has_content?("wizard_value for second: second")
|
39
|
+
|
40
|
+
step = :second
|
41
|
+
visit(i18n_path(step, :locale => :en))
|
42
|
+
assert has_content?("wizard_value for first: first")
|
43
|
+
assert has_content?("wizard_value for second: second")
|
44
|
+
end
|
33
45
|
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.6.
|
8
|
+
s.version = "0.6.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 = "2013-
|
12
|
+
s.date = "2013-05-05"
|
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 = [
|
@@ -108,7 +108,7 @@ Gem::Specification.new do |s|
|
|
108
108
|
s.homepage = "http://github.com/schneems/wicked"
|
109
109
|
s.licenses = ["MIT"]
|
110
110
|
s.require_paths = ["lib"]
|
111
|
-
s.rubygems_version = "1.8.
|
111
|
+
s.rubygems_version = "1.8.24"
|
112
112
|
s.summary = "Use Wicked to turn your controller into a wizard"
|
113
113
|
|
114
114
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,122 +1,165 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: wicked
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 6
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- schneems
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
date: 2013-05-05 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
prerelease: false
|
22
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
23
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 9
|
28
|
+
segments:
|
29
|
+
- 3
|
30
|
+
- 0
|
31
|
+
- 7
|
21
32
|
version: 3.0.7
|
22
33
|
type: :runtime
|
34
|
+
name: activesupport
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
23
37
|
prerelease: false
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rails
|
27
|
-
requirement: &70158799315260 !ruby/object:Gem::Requirement
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 9
|
44
|
+
segments:
|
45
|
+
- 3
|
46
|
+
- 0
|
47
|
+
- 7
|
32
48
|
version: 3.0.7
|
33
49
|
type: :runtime
|
50
|
+
name: rails
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
34
53
|
prerelease: false
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: rake
|
38
|
-
requirement: &70158799314780 !ruby/object:Gem::Requirement
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
55
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
44
63
|
type: :development
|
64
|
+
name: rake
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
45
67
|
prerelease: false
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: jeweler
|
49
|
-
requirement: &70158799314300 !ruby/object:Gem::Requirement
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
69
|
none: false
|
51
|
-
requirements:
|
70
|
+
requirements:
|
52
71
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 7
|
74
|
+
segments:
|
75
|
+
- 1
|
76
|
+
- 6
|
77
|
+
- 4
|
54
78
|
version: 1.6.4
|
55
79
|
type: :development
|
80
|
+
name: jeweler
|
81
|
+
version_requirements: *id004
|
82
|
+
- !ruby/object:Gem::Dependency
|
56
83
|
prerelease: false
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
59
|
-
name: rcov
|
60
|
-
requirement: &70158799313820 !ruby/object:Gem::Requirement
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
85
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
66
93
|
type: :development
|
94
|
+
name: rcov
|
95
|
+
version_requirements: *id005
|
96
|
+
- !ruby/object:Gem::Dependency
|
67
97
|
prerelease: false
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: capybara
|
71
|
-
requirement: &70158799313340 !ruby/object:Gem::Requirement
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
99
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 15
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
- 4
|
107
|
+
- 0
|
76
108
|
version: 0.4.0
|
77
109
|
type: :development
|
110
|
+
name: capybara
|
111
|
+
version_requirements: *id006
|
112
|
+
- !ruby/object:Gem::Dependency
|
78
113
|
prerelease: false
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: launchy
|
82
|
-
requirement: &70158799312860 !ruby/object:Gem::Requirement
|
114
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
115
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
hash: 3
|
120
|
+
segments:
|
121
|
+
- 0
|
122
|
+
version: "0"
|
88
123
|
type: :development
|
124
|
+
name: launchy
|
125
|
+
version_requirements: *id007
|
126
|
+
- !ruby/object:Gem::Dependency
|
89
127
|
prerelease: false
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: sqlite3
|
93
|
-
requirement: &70158799312380 !ruby/object:Gem::Requirement
|
128
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
129
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
hash: 3
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
version: "0"
|
99
137
|
type: :development
|
138
|
+
name: sqlite3
|
139
|
+
version_requirements: *id008
|
140
|
+
- !ruby/object:Gem::Dependency
|
100
141
|
prerelease: false
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: activerecord-jdbcsqlite3-adapter
|
104
|
-
requirement: &70158799311900 !ruby/object:Gem::Requirement
|
142
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
143
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
hash: 3
|
148
|
+
segments:
|
149
|
+
- 0
|
150
|
+
version: "0"
|
110
151
|
type: :development
|
111
|
-
|
112
|
-
version_requirements: *
|
152
|
+
name: activerecord-jdbcsqlite3-adapter
|
153
|
+
version_requirements: *id009
|
113
154
|
description: Wicked is a Rails engine for producing easy wizard controllers
|
114
155
|
email: richard.schneeman@gmail.com
|
115
156
|
executables: []
|
157
|
+
|
116
158
|
extensions: []
|
117
|
-
|
159
|
+
|
160
|
+
extra_rdoc_files:
|
118
161
|
- README.md
|
119
|
-
files:
|
162
|
+
files:
|
120
163
|
- .rvmrc
|
121
164
|
- .travis.yml
|
122
165
|
- CHANGELOG.md
|
@@ -206,31 +249,37 @@ files:
|
|
206
249
|
- test/wicked_test.rb
|
207
250
|
- wicked.gemspec
|
208
251
|
homepage: http://github.com/schneems/wicked
|
209
|
-
licenses:
|
252
|
+
licenses:
|
210
253
|
- MIT
|
211
254
|
post_install_message:
|
212
255
|
rdoc_options: []
|
213
|
-
|
256
|
+
|
257
|
+
require_paths:
|
214
258
|
- lib
|
215
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
260
|
none: false
|
217
|
-
requirements:
|
218
|
-
- -
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
|
221
|
-
segments:
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
hash: 3
|
265
|
+
segments:
|
222
266
|
- 0
|
223
|
-
|
224
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
|
+
version: "0"
|
268
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
225
269
|
none: false
|
226
|
-
requirements:
|
227
|
-
- -
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
|
270
|
+
requirements:
|
271
|
+
- - ">="
|
272
|
+
- !ruby/object:Gem::Version
|
273
|
+
hash: 3
|
274
|
+
segments:
|
275
|
+
- 0
|
276
|
+
version: "0"
|
230
277
|
requirements: []
|
278
|
+
|
231
279
|
rubyforge_project:
|
232
|
-
rubygems_version: 1.8.
|
280
|
+
rubygems_version: 1.8.24
|
233
281
|
signing_key:
|
234
282
|
specification_version: 3
|
235
283
|
summary: Use Wicked to turn your controller into a wizard
|
236
284
|
test_files: []
|
285
|
+
|