Commit 36a3ef9
Changed files (2)
lib
scim
kit
v2
spec
scim
kit
lib/scim/kit/v2/parser.rb
@@ -87,7 +87,7 @@ subAttr = "." ATTRNAME
rule(:less_than) { str("lt") }
rule(:greater_than_equals) { str("ge") }
rule(:less_than_equals) { str("le") }
- rule(:string) { (alpha | single_quote).repeat(1) }
+ rule(:string) { (alpha | single_quote | str('@') | dot).repeat(1) }
rule(:lparen) { str('(') >> space? }
rule(:rparen) { str(')') >> space? }
rule(:lbracket) { str('[') >> space? }
spec/scim/kit/v2/parser_spec.rb
@@ -33,6 +33,7 @@ RSpec.describe Scim::Kit::V2::Parser do
end
end
+ specify { expect(subject.parse_with_debug("userName eq \"jeramy@ziemann.biz\"")).to be_truthy }
specify { expect(subject.parse_with_debug(%Q(title pr and userType eq "Employee"))).to be_truthy }
specify { expect(subject.attribute_expression.parse_with_debug(%Q(title pr and userType eq "Employee"))).not_to be_truthy }
specify { expect(subject.logical_expression.parse_with_debug(%Q(title pr and userType eq "Employee"))).to be_truthy }
@@ -128,4 +129,11 @@ RSpec.describe Scim::Kit::V2::Parser do
].each do |x|
specify { expect(subject).to parse(x) }
end
+
+ [
+ 'Tsuyoshi',
+ 'hello@example.org',
+ ].each do |x|
+ specify { expect(subject.string).to parse(x) }
+ end
end