alembic 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9745fd29a830ce8120e72ac117e6ed70668f620a1a8bd73f016dcca369006c19
4
- data.tar.gz: 0b4c9f862d77e9841be71f804a6ce7d97d7a2252accca09de540a34ce5588c99
3
+ metadata.gz: f38cde96366dd41e05b819090a8f5b4de025b4921a08f126aa714c1d04a1e83f
4
+ data.tar.gz: d187ea086b4a84eadc365ff2bcd63e4f5c73fc9b2ec7482ac3f07530177a781d
5
5
  SHA512:
6
- metadata.gz: d3c136947c2ca35cb00702f965965cd4e73c7a6605c44188f7966062602026fdded09c355723b974531397c5fbd9b7232742118123d25bf8501a645e6ada4c9b
7
- data.tar.gz: 24920854c0d867b45620284d65823872fd990561bf0fb025b9a73612bb92e75e86c5255b5b7728b73f5167f007d86175702b8467eb43f6a21625d8b3feba85dc
6
+ metadata.gz: bee97ec86859157faaa3f266278857238d28691c232013d70508728e70e1bf284114927d0fe950100c7093e689ac5eefce71f0775094a72ce0b708d8a6870918
7
+ data.tar.gz: 6ac975ac9a9b66947401d7c77324b46f1d9a8b69cf4db209da5b074d84b70090e79d01a457752bf053656c0efa2921003cd5798d33d0dc36d723abd0499d8248
@@ -18,8 +18,7 @@ module Alembic
18
18
  end
19
19
 
20
20
  def chosen_answer(question)
21
- step = @guide.step(question.id)
22
- Flow::AnswerKey.chosen(step.config.merge("type" => step.type))
21
+ Flow::AnswerKey.chosen(step_settings(question.id))
23
22
  end
24
23
 
25
24
  def shows_answer_values?
@@ -93,7 +93,12 @@ module Alembic
93
93
  end
94
94
 
95
95
  def answered_right?(step, value)
96
- (run&.flow || flow).scored? && Outputs::WeightedSum.weight_of(@guide.step(step).config, value).positive?
96
+ (run&.flow || flow).scored? && Outputs::WeightedSum.weight_of(step_settings(step), value).positive?
97
+ end
98
+
99
+ def step_settings(id)
100
+ step = @guide.step(id)
101
+ step.config.merge("type" => step.type)
97
102
  end
98
103
 
99
104
  def answers_given
@@ -1,3 +1,3 @@
1
1
  module Alembic
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alembic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider