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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 651906a4431f50ed809b13868afa9f65dbc6609e
4
- data.tar.gz: 53d4d1473af2dc890781611bd8edb47edaaed2dc
3
+ metadata.gz: 8030f5691f07f8778bb27e3bdf05748b3bc813b3
4
+ data.tar.gz: 5f8b07d6ea4c27c8a92c63a2900eefef66509e3b
5
5
  SHA512:
6
- metadata.gz: 6384e7e695087f10e06fc6d20e810d525fdd9b4ca84f61f2976f2c767973af82a5142bc35b7019fa423a46460e047766a45bde7fde8e04f6a48a18be3ce5afc6
7
- data.tar.gz: abf45ec7c79d2f7ec77ba1bbdff0f4723ab5f701ead0d1ae075fa6755671c5b10714d18038ccaf48d1284fd3f5c25a2fd2cfcd7d1f183e069f8d4c66250d3ef9
6
+ metadata.gz: a51f12343fa4e88857cccc5dccaeb819139bb41288ca882dcf213a3525face93ceddec2e02467710a4690bc89e97ef32f3ae26479bd614c9aa4bbd00488fa241
7
+ data.tar.gz: a801fdb39395fa18deb9b33e1e05756efc5ff30b31ef472bc390b367c6c0ece83c0348a790a334b2d9cf9cabdd1f5b8faddb3f7e81c1545c1d1388a677f14d4c
@@ -1,5 +1,7 @@
1
1
  module Incredible
2
2
  class Step
3
+
4
+ attr_accessor :data
3
5
 
4
6
  def initialize(name, data)
5
7
  @name = name.to_s
@@ -1,3 +1,3 @@
1
1
  module Incredible
2
- VERSION = '0.0.6.pre'.freeze
2
+ VERSION = '0.0.7.pre'.freeze
3
3
  end
@@ -3,29 +3,29 @@ module Incredible
3
3
  extend ActiveSupport::Concern
4
4
  include Wicked::Wizard
5
5
 
6
- attr_accessor :wizard_form, :step_data, :template, :rules, :questions
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 :load_step_data, only: %i[show update]
11
+ before_action :load_questions_and_template, only: %i[show update]
12
12
  end
13
13
 
14
14
  def load_step
15
- self.step_data = wizard_form.find_step(params[:id])
15
+ @incredible_step = wizard_form.find_step(params[:id])
16
16
  end
17
17
 
18
- def load_step_data
19
- self.template = step_data.template
20
- self.questions = step_data.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 step_data.rule
25
- @rule = step_data.rule.send(:new, params)
24
+ if incredible_step.rule
25
+ @rule = incredible_step.rule.send(:new, params)
26
26
  process_rule
27
- elsif step_data.next_step
28
- jump_to step_data.next_step
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.6.pre
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-14 00:00:00.000000000 Z
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/dummy/config.ru
237
- - spec/dummy/bin/rake
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/forms/bad-yaml.yml
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/locales/en.yml
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/mime_types.rb
253
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
277
254
  - spec/dummy/config/boot.rb
278
- - spec/dummy/package.json
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