incredible 0.0.6.pre → 0.0.7.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/incredible/step.rb +2 -0
- data/lib/incredible/version.rb +1 -1
- data/lib/incredible/wizard.rb +10 -10
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8030f5691f07f8778bb27e3bdf05748b3bc813b3
|
4
|
+
data.tar.gz: 5f8b07d6ea4c27c8a92c63a2900eefef66509e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a51f12343fa4e88857cccc5dccaeb819139bb41288ca882dcf213a3525face93ceddec2e02467710a4690bc89e97ef32f3ae26479bd614c9aa4bbd00488fa241
|
7
|
+
data.tar.gz: a801fdb39395fa18deb9b33e1e05756efc5ff30b31ef472bc390b367c6c0ece83c0348a790a334b2d9cf9cabdd1f5b8faddb3f7e81c1545c1d1388a677f14d4c
|
data/lib/incredible/step.rb
CHANGED
data/lib/incredible/version.rb
CHANGED
data/lib/incredible/wizard.rb
CHANGED
@@ -3,29 +3,29 @@ module Incredible
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
include Wicked::Wizard
|
5
5
|
|
6
|
-
attr_accessor :wizard_form, :
|
6
|
+
attr_accessor :wizard_form, :incredible_step, :template, :rules, :questions
|
7
7
|
|
8
8
|
included do
|
9
9
|
before_action :load_step, only: %i[show update]
|
10
10
|
before_action :load_next_step, only: :update
|
11
|
-
before_action :
|
11
|
+
before_action :load_questions_and_template, only: %i[show update]
|
12
12
|
end
|
13
13
|
|
14
14
|
def load_step
|
15
|
-
|
15
|
+
@incredible_step = wizard_form.find_step(params[:id])
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
self.template =
|
20
|
-
self.questions =
|
18
|
+
def load_questions_and_template
|
19
|
+
self.template = incredible_step.template
|
20
|
+
self.questions = incredible_step.questions
|
21
21
|
end
|
22
22
|
|
23
23
|
def load_next_step
|
24
|
-
if
|
25
|
-
@rule =
|
24
|
+
if incredible_step.rule
|
25
|
+
@rule = incredible_step.rule.send(:new, params)
|
26
26
|
process_rule
|
27
|
-
elsif
|
28
|
-
jump_to
|
27
|
+
elsif incredible_step.next_step
|
28
|
+
jump_to incredible_step.next_step
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incredible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pezholio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -229,50 +229,50 @@ specification_version: 4
|
|
229
229
|
summary: Build multi-page forms like a General
|
230
230
|
test_files:
|
231
231
|
- spec/loader_spec.rb
|
232
|
-
- spec/step_spec.rb
|
233
|
-
- spec/controllers/forms_controller_spec.rb
|
234
232
|
- spec/form_spec.rb
|
235
233
|
- spec/spec_helper.rb
|
236
|
-
- spec/
|
237
|
-
- spec/dummy/
|
238
|
-
- spec/dummy/bin/rails
|
239
|
-
- spec/dummy/bin/update
|
240
|
-
- spec/dummy/bin/setup
|
241
|
-
- spec/dummy/bin/yarn
|
242
|
-
- spec/dummy/bin/bundle
|
243
|
-
- spec/dummy/Rakefile
|
244
|
-
- spec/dummy/app/rules/step3_rule.rb
|
245
|
-
- spec/dummy/app/rules/step1_rule.rb
|
246
|
-
- spec/dummy/app/controllers/forms_controller.rb
|
247
|
-
- spec/dummy/app/controllers/application_controller.rb
|
248
|
-
- spec/dummy/app/controllers/things_controller.rb
|
249
|
-
- spec/dummy/app/views/forms/foo.html.erb
|
250
|
-
- spec/dummy/app/views/forms/bar.html.erb
|
251
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
252
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
253
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
254
|
-
- spec/dummy/app/models/stub_model.rb
|
255
|
-
- spec/dummy/app/models/application_record.rb
|
234
|
+
- spec/step_spec.rb
|
235
|
+
- spec/dummy/package.json
|
256
236
|
- spec/dummy/config/routes.rb
|
257
|
-
- spec/dummy/config/environment.rb
|
258
|
-
- spec/dummy/config/spring.rb
|
259
|
-
- spec/dummy/config/environments/production.rb
|
260
237
|
- spec/dummy/config/environments/test.rb
|
261
238
|
- spec/dummy/config/environments/development.rb
|
262
|
-
- spec/dummy/config/
|
263
|
-
- spec/dummy/config/forms/form.yml
|
264
|
-
- spec/dummy/config/puma.rb
|
265
|
-
- spec/dummy/config/secrets.yml
|
239
|
+
- spec/dummy/config/environments/production.rb
|
266
240
|
- spec/dummy/config/application.rb
|
241
|
+
- spec/dummy/config/secrets.yml
|
242
|
+
- spec/dummy/config/environment.rb
|
243
|
+
- spec/dummy/config/puma.rb
|
267
244
|
- spec/dummy/config/cable.yml
|
268
|
-
- spec/dummy/config/
|
245
|
+
- spec/dummy/config/spring.rb
|
246
|
+
- spec/dummy/config/initializers/mime_types.rb
|
269
247
|
- spec/dummy/config/initializers/cookies_serializer.rb
|
270
248
|
- spec/dummy/config/initializers/assets.rb
|
271
|
-
- spec/dummy/config/initializers/inflections.rb
|
272
249
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
273
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
274
250
|
- spec/dummy/config/initializers/application_controller_renderer.rb
|
251
|
+
- spec/dummy/config/initializers/inflections.rb
|
275
252
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
276
|
-
- spec/dummy/config/initializers/
|
253
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
277
254
|
- spec/dummy/config/boot.rb
|
278
|
-
- spec/dummy/
|
255
|
+
- spec/dummy/config/locales/en.yml
|
256
|
+
- spec/dummy/config/forms/form.yml
|
257
|
+
- spec/dummy/config/forms/bad-yaml.yml
|
258
|
+
- spec/dummy/app/rules/step1_rule.rb
|
259
|
+
- spec/dummy/app/rules/step3_rule.rb
|
260
|
+
- spec/dummy/app/models/application_record.rb
|
261
|
+
- spec/dummy/app/models/stub_model.rb
|
262
|
+
- spec/dummy/app/controllers/forms_controller.rb
|
263
|
+
- spec/dummy/app/controllers/application_controller.rb
|
264
|
+
- spec/dummy/app/controllers/things_controller.rb
|
265
|
+
- spec/dummy/app/views/layouts/mailer.html.erb
|
266
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
267
|
+
- spec/dummy/app/views/layouts/mailer.text.erb
|
268
|
+
- spec/dummy/app/views/forms/foo.html.erb
|
269
|
+
- spec/dummy/app/views/forms/bar.html.erb
|
270
|
+
- spec/dummy/Rakefile
|
271
|
+
- spec/dummy/bin/rails
|
272
|
+
- spec/dummy/bin/bundle
|
273
|
+
- spec/dummy/bin/update
|
274
|
+
- spec/dummy/bin/setup
|
275
|
+
- spec/dummy/bin/rake
|
276
|
+
- spec/dummy/bin/yarn
|
277
|
+
- spec/dummy/config.ru
|
278
|
+
- spec/controllers/forms_controller_spec.rb
|