ldap-relations 0.1.1 → 0.1.2
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.
- data/lib/ldap-relations/and.rb +16 -0
- data/lib/ldap-relations/or.rb +16 -0
- data/lib/ldap-relations/version.rb +1 -1
- data/spec/ldap-relations/and_spec.rb +16 -0
- data/spec/ldap-relations/or_spec.rb +16 -0
- metadata +7 -1
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ldap-relations/and'
|
3
|
+
|
4
|
+
module Ldap::Relations
|
5
|
+
describe And do
|
6
|
+
let(:left) { stub 'Relation', to_filter: '(user=test)' }
|
7
|
+
let(:right) { stub 'Relation', to_filter: '(mail=test)' }
|
8
|
+
let(:and_group) { And.new left, right }
|
9
|
+
|
10
|
+
describe '#to_filter' do
|
11
|
+
subject { and_group.to_filter }
|
12
|
+
|
13
|
+
it { should == '(&(user=test)(mail=test))' }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ldap-relations/or'
|
3
|
+
|
4
|
+
module Ldap::Relations
|
5
|
+
describe Or do
|
6
|
+
let(:left) { stub 'Relation', to_filter: '(name=test)' }
|
7
|
+
let(:right) { stub 'Relation', to_filter: '(mail=test)' }
|
8
|
+
let(:or_group) { Or.new left, right }
|
9
|
+
|
10
|
+
describe '#to_filter' do
|
11
|
+
subject { or_group.to_filter }
|
12
|
+
|
13
|
+
it { should == "(|(name=test)(mail=test))" }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ldap-relations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -58,11 +58,15 @@ files:
|
|
58
58
|
- Rakefile
|
59
59
|
- ldap-relations.gemspec
|
60
60
|
- lib/ldap-relations.rb
|
61
|
+
- lib/ldap-relations/and.rb
|
62
|
+
- lib/ldap-relations/or.rb
|
61
63
|
- lib/ldap-relations/relation.rb
|
62
64
|
- lib/ldap-relations/relation_manager.rb
|
63
65
|
- lib/ldap-relations/version.rb
|
64
66
|
- spec/.rspec
|
67
|
+
- spec/ldap-relations/and_spec.rb
|
65
68
|
- spec/ldap-relations/integration_spec.rb
|
69
|
+
- spec/ldap-relations/or_spec.rb
|
66
70
|
- spec/ldap-relations/relation_manager_spec.rb
|
67
71
|
- spec/ldap-relations/relation_spec.rb
|
68
72
|
- spec/spec_helper.rb
|
@@ -92,7 +96,9 @@ specification_version: 3
|
|
92
96
|
summary: Abstraction of filters to use with an LDAP library.
|
93
97
|
test_files:
|
94
98
|
- spec/.rspec
|
99
|
+
- spec/ldap-relations/and_spec.rb
|
95
100
|
- spec/ldap-relations/integration_spec.rb
|
101
|
+
- spec/ldap-relations/or_spec.rb
|
96
102
|
- spec/ldap-relations/relation_manager_spec.rb
|
97
103
|
- spec/ldap-relations/relation_spec.rb
|
98
104
|
- spec/spec_helper.rb
|