This repository was archived by the owner on Jun 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ = 2.2.1 / 2014-10-16
2+
3+ * Make "User Group" matches case in-sensitive
4+
15= 2.2.0 / 2014-10-07
26
37 * [Feature] Bandiera *should* now support all RDBMs supported by Sequel (note: we ONLY test on MySQL at present)
Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ def percentage_enabled_for_user?(user)
7878 end
7979
8080 def cleaned_user_groups_list
81- user_groups_list . reject { |elm | elm . nil? || elm . empty? }
81+ user_groups_list . reject { |elm | elm . nil? || elm . empty? } . map ( & :downcase )
8282 end
8383
8484 def user_group_within_list? ( user_group )
85- !user_groups_list . empty? && cleaned_user_groups_list . include? ( user_group )
85+ !user_groups_list . empty? && cleaned_user_groups_list . include? ( user_group . downcase )
8686 end
8787
8888 def user_group_match_regex? ( user_group )
Original file line number Diff line number Diff line change 11module Bandiera
2- VERSION = '2.2.0 '
2+ VERSION = '2.2.1 '
33end
Original file line number Diff line number Diff line change 5454 it 'if the user_group is in the list' do
5555 expect ( subject . enabled? ( user_group : user_group ) ) . to eq true
5656 end
57+
58+ it 'if the user_group is in the list regardless of case' do
59+ expect ( subject . enabled? ( user_group : user_group . upcase ) ) . to eq true
60+ end
5761 end
5862
5963 context 'returns false' do
You can’t perform that action at this time.
0 commit comments