quby 5.6.4 → 5.6.5

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.
@@ -21,6 +21,20 @@ module Quby::Answers::Services
21
21
  expect(answer.flags).to eq({test_foo: true})
22
22
  end
23
23
 
24
+ it 'does not set flag if dependent is not triggered' do
25
+ questionnaire = inject_questionnaire 'test', <<-END
26
+ flag key: 'bar', description: ''
27
+ flag key: 'foo', description: '', default: true, depends_on: ['test_bar']
28
+ flag key: 'quux', description: '', depends_on: ['test_bar']
29
+ END
30
+
31
+ answer = BuildAnswer.new(questionnaire, {test_quux: true}).build
32
+ expect(answer.flags).to eq({})
33
+
34
+ answer = BuildAnswer.new(questionnaire, {flags: {test_bar: true}}).build
35
+ expect(answer.flags).to eq({test_bar: true, test_foo: true})
36
+ end
37
+
24
38
  it 'sets given flag values' do
25
39
  questionnaire = inject_questionnaire 'test', <<-END
26
40
  flag key: 'foo', description: '', default: true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.4
4
+ version: 5.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-05-27 00:00:00.000000000 Z
14
+ date: 2024-09-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: actionpack
@@ -746,6 +746,7 @@ files:
746
746
  - config/locales/fr.yml
747
747
  - config/locales/nl.yml
748
748
  - config/locales/sr.yml
749
+ - config/locales/tr.yml
749
750
  - config/routes.rb
750
751
  - lib/active_model_modules/array_attribute_valid_validator.rb
751
752
  - lib/active_model_modules/attribute_valid_validator.rb