active_ldap-dynamic_finders 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8523fa2d033ac9941a40baf787196ae487c62434
4
+ data.tar.gz: 11e71511d89147c8f302625afdee5cacc26a762a
5
+ SHA512:
6
+ metadata.gz: b8589264cf061cb05831ded0ef7b88c3348195940848a49b24f39682e6b301e9b3995d8f521552338ab6311f390a9d1e70c3490e95468f29d8b477cf7372c56e
7
+ data.tar.gz: 470686f40baa0e67fd471fec087dd9dd0601c90c34d364de351c8f54e25a17a9d6d7281c1437348bdc22c41aed0f77a76419778f7ff7071fa1376ff565768dd2
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in active_ldap-dynamic_finders.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Christian Nennemann
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,67 @@
1
+
2
+ # ActiveLdap::DynamicFinders
3
+
4
+ Dynamic finders for [ActiveLdap](https://github.com/activeldap/activeldap)
5
+
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'active_ldap-dynamic_finders'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install active_ldap-dynamic_finders
20
+
21
+ ## Usage
22
+
23
+ Add it to your ActiveLdap model:
24
+
25
+ ```ruby
26
+ class User < ActiveLdap::Base
27
+
28
+ include ActiveLdap::DynamicFinders # <- Add this line
29
+
30
+ ...
31
+ end
32
+ ```
33
+
34
+ Then you have `.find_by_*` and `.find_by_*_and_*` methods. _Replace * with any attribute available in your ActiveDirectory_
35
+
36
+ ```ruby
37
+ User.find_by_cn('jim')
38
+ ```
39
+ ```ruby
40
+ User.find_by_cn_and_mail('jim', 'jim@example.com')
41
+ ```
42
+
43
+ ## Code Status
44
+ * [![Build Status](https://travis-ci.org/XORwell/activeldap-dynamic_finders.png)](https://travis-ci.org/XORwell/activeldap-dynamic_finders)
45
+ * [![Code Climate](https://codeclimate.com/repos/52840661c7f3a31afb022567/badges/ef5745b61ee31ef9a4dc/gpa.png)](https://codeclimate.com/repos/52840661c7f3a31afb022567/feed)
46
+ * [![Dependency Status](https://gemnasium.com/XORwell/activeldap-dynamic_finders.png)](https://gemnasium.com/XORwell/activeldap-dynamic_finders)
47
+
48
+ ## License
49
+ ActiveLdap::DynamicFinders is released under the [MIT License](http://opensource.org/licenses/MIT).
50
+
51
+ Copyright © 2013 Christian Nennemann _(christian.nennemann@gmail.com)_
52
+
53
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59
+ THE SOFTWARE.
60
+
61
+ ## Thanks
62
+
63
+ This list may not be correct. If you notice mistakes of this list,
64
+ please point out.
65
+
66
+ * Kouhei Sutou for maintaining [ActiveLdap](https://github.com/activeldap/activeldap)
67
+ * ...
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ task :default => :spec
8
+ task :test => :spec
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'active_ldap/dynamic_finders/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "active_ldap-dynamic_finders"
8
+ spec.version = ActiveLdap::DynamicFinders::VERSION
9
+ spec.authors = ["Christian Nennemann"]
10
+ spec.email = ["christian.nennemann@gmail.com"]
11
+ spec.description = %q{ActiveLdap dynamic finders}
12
+ spec.summary = %q{Adds dynamic finder methods to ActiveLdap}
13
+ spec.homepage = "https://github.com/XORwell/activeldap-dynamic_finders"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "activesupport" #, ">= 4.0.0"
22
+ spec.add_dependency "activeldap" #, ">= 4.0.0"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "rspec"
27
+ spec.add_development_dependency "github-ldap", "~> 1.0.13"
28
+ spec.add_development_dependency "ladle"
29
+ end
@@ -0,0 +1,47 @@
1
+ require "active_ldap/dynamic_finders/version"
2
+ require 'active_support/concern'
3
+
4
+ module ActiveLdap
5
+ module DynamicFinders
6
+
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ if self.superclass.eql?(ActiveLdap::Base)
11
+ class << self
12
+
13
+ # Respond to dynamic finders
14
+ def respond_to?(meth)
15
+ if meth.to_s =~ /^find_by_.*$/
16
+ true
17
+ else
18
+ super
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ # Override method_missing to run dynamic finder
25
+ def method_missing(meth, *args, &block)
26
+ if meth.to_s =~ /^find_by_(.+)$/
27
+ run_find_by_method(Regexp.last_match[1], *args)
28
+ else
29
+ super
30
+ end
31
+ end
32
+
33
+ # Run dynamic finder
34
+ def run_find_by_method(attrs, *args)
35
+ attrs = attrs.split('_and_')
36
+
37
+ raise(ArgumentError, "wrong number of arguments (#{args.size} for #{attrs.size})") if attrs.size != args.size
38
+
39
+ attrs_with_args = [attrs, args].transpose
40
+ conditions = Hash[attrs_with_args]
41
+ self.find(:all, filter: [:and, conditions])
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,5 @@
1
+ module ActiveLdap
2
+ module DynamicFinders
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ test:
2
+ host: 127.0.0.1
3
+ port: 3897
4
+ base: DC=activeldap,DC=com
5
+ bind_dn: cn=admin,dc=activeldap,dc=com
6
+ password: secret
@@ -0,0 +1,94 @@
1
+ require 'spec_helper'
2
+
3
+ describe ActiveLdap::DynamicFinders do
4
+
5
+ include_context "ldap"
6
+
7
+ let!(:al_class){ User.new }
8
+ let!(:not_al_class){ class Other; include ActiveLdap::DynamicFinders end }
9
+
10
+ describe 'test data attributes' do
11
+ it { expect(User.first.attribute_names).to include('cn') }
12
+ it { expect(User.first.attribute_names).to include('displayName') }
13
+ it { expect(User.first.attribute_names).to include('givenName') }
14
+ end
15
+
16
+
17
+ describe 'find_by_*' do
18
+
19
+ context 'with matching attributes' do
20
+ describe 'single attr finder' do
21
+ it "does return searched entry" do
22
+ expect(User.find_by_sn('jim-sn')).to have(1).items
23
+ end
24
+ end
25
+ describe 'multiple attr finder' do
26
+ it "does return searched entry" do
27
+ expect(User.find_by_cn_and_sn('jim', 'jim-sn')).to have(1).items
28
+ end
29
+ end
30
+ end
31
+
32
+ context 'with mismatching attributes' do
33
+ describe 'single attr finder' do
34
+ it "does NOT return searched entry" do
35
+ expect(User.find_by_sn('wrong_name')).to have(0).items
36
+ end
37
+ end
38
+ describe 'multiple attr finder' do
39
+ it "does NOT return searched entry" do
40
+ expect(User.find_by_cn_and_sn('jim', 'wrong_name')).to have(0).items
41
+ end
42
+ end
43
+ end
44
+ end
45
+
46
+ describe 'respond_to?' do
47
+
48
+ context "dynamic finders" do
49
+ [:find_by_mail, :find_by_givenName, :find_by_cn_and_sn].each{ |finder|
50
+ context 'ActiveLdap::Base inherited class' do
51
+ it "Class DOES respond to find_by prefixed methods: #{finder}" do
52
+ expect(User.respond_to?(finder)).to be_true
53
+ end
54
+ it "Instance does NOT respond to find_by prefixed methods: #{finder}" do
55
+ expect(User.new.respond_to?(finder)).to be_false
56
+ end
57
+ end
58
+ context 'Not ActiveLdap::Base inherited class' do
59
+ it "Class does NOT respond to find_by prefixed methods: #{finder}" do
60
+ expect(not_al_class.respond_to?(finder)).to be_false
61
+ end
62
+ it "Instance does NOT respond to find_by prefixed methods: #{finder}" do
63
+ expect(not_al_class.respond_to?(finder)).to be_false
64
+ end
65
+ end
66
+ }
67
+
68
+ it "does NOT respond to find_by_* without attr" do
69
+ expect(al_class.respond_to?('find_by_')).to be_false
70
+ end
71
+ it "does NOT respond to find_by" do
72
+ expect(al_class.respond_to?('find_by')).to be_false
73
+ end
74
+ end
75
+ end
76
+
77
+ describe 'run_find_by_method' do
78
+ context 'on missing arguments' do
79
+ it { expect{ User.find_by_cn_and_sn() }.to raise_error(ArgumentError, 'wrong number of arguments (0 for 2)') }
80
+ it { expect{ User.find_by_cn_and_sn('jim') }.to raise_error(ArgumentError, 'wrong number of arguments (1 for 2)') }
81
+ it { expect{ User.find_by_cn_and_sn('jim', '') }.to_not raise_error }
82
+ end
83
+ end
84
+
85
+ describe 'method_missing' do
86
+ it "does NOT bubble errors for find_by.." do
87
+ expect{ User.find_by_cn_and_sn('jim', '') }.to_not raise_error
88
+ end
89
+ it "DOES bubble errors for other missing methods" do
90
+ expect{ User.any_other_method }.to raise_error
91
+ end
92
+ end
93
+
94
+ end
@@ -0,0 +1,76 @@
1
+ version: 1
2
+
3
+ #######################
4
+ # Organizations
5
+ #######################
6
+ dn: dc=activeldap,dc=com
7
+ objectClass: dcObject
8
+ objectClass: organization
9
+ dc: activeldap
10
+ o: Activeldap Community
11
+
12
+ dn: ou=Group,dc=activeldap,dc=com
13
+ objectclass: organizationalUnit
14
+ ou: Group
15
+
16
+ dn: ou=Users,dc=activeldap,dc=com
17
+ objectclass: organizationalUnit
18
+ ou: Users
19
+
20
+ #######################
21
+ # Groups
22
+ #######################
23
+ dn: cn=People,ou=Group,dc=activeldap,dc=com
24
+ cn: People
25
+ objectClass: groupOfNames
26
+ member: cn=jim,ou=Users,dc=activeldap,dc=com
27
+
28
+ dn: cn=Enterprise,ou=Group,dc=activeldap,dc=com
29
+ cn: Enterprise
30
+ objectClass: groupOfNames
31
+ member: cn=firstBob,ou=Users,dc=activeldap,dc=com
32
+
33
+
34
+ #######################
35
+ # Users
36
+ #######################
37
+ dn: cn=admin,dc=activeldap,dc=com
38
+ cn: admin
39
+ objectClass: top
40
+ objectClass: person
41
+ objectClass: organizationalPerson
42
+ objectClass: inetOrgPerson
43
+ sn: administrator
44
+ displayName: Directory Superuser
45
+ userPassword: secret
46
+
47
+ dn: cn=firstBob,ou=Users,dc=activeldap,dc=com
48
+ cn: firstBob
49
+ sn: firstBob-sn
50
+ userPassword: secret
51
+ mail: firstBob@activeldap.com
52
+ objectClass: inetOrgPerson
53
+ displayName: firstBob_displayname
54
+ userPassword: secret
55
+ givenName: Bob
56
+
57
+ dn: cn=otherBob,ou=Users,dc=activeldap,dc=com
58
+ cn: otherBob
59
+ sn: otherBob-sn
60
+ userPassword: secret
61
+ mail: otherBob@activeldap.com
62
+ objectClass: inetOrgPerson
63
+ displayName: otherBob_displayname
64
+ userPassword: secret
65
+ givenName: Bob
66
+
67
+ dn: cn=jim,ou=Users,dc=activeldap,dc=com
68
+ cn: jim
69
+ sn: jim-sn
70
+ userPassword: secret
71
+ mail: jim@activeldap.com
72
+ objectClass: inetOrgPerson
73
+ displayName: jim_displayname
74
+ userPassword: secret
75
+ givenName: Jim
76
+
@@ -0,0 +1,20 @@
1
+ require 'active_ldap'
2
+ require 'active_ldap/dynamic_finders'
3
+ # Requires supporting ruby files with custom matchers and macros, etc,
4
+ # in spec/support/ and its subdirectories.
5
+ Dir.glob(File.expand_path("spec/support/**/*.rb")).each{ |f| require f }
6
+
7
+ RSpec.configure do |config|
8
+ # Use color in STDOUT
9
+ config.color_enabled = true
10
+
11
+ # Use color not only in STDOUT but also in pagers and files
12
+ config.tty = true
13
+
14
+ # Use the specified formatter
15
+ config.formatter = :documentation # :progress, :html, :textmate
16
+
17
+ # Include macros
18
+ config.include LdapMacros
19
+ end
20
+
@@ -0,0 +1,36 @@
1
+ module LdapMacros
2
+ require 'github/ldap'
3
+ require 'github/ldap/server'
4
+
5
+ def ldap_setup
6
+ ldap_server_start
7
+ setup_connection
8
+ end
9
+
10
+ def ldap_teardown
11
+ ldap_server_stop
12
+ end
13
+
14
+ def setup_connection
15
+ ActiveLdap::Base.setup_connection YAML.load_file('spec/config/ldap.yml')['test']
16
+ end
17
+
18
+ def ldap_server_start
19
+ GitHub::Ldap.start_server \
20
+ user_fixtures: 'spec/fixtures/ldap.ldif',
21
+ user_domain: 'dc=activeldap,dc=com',
22
+ admin_user: 'cn=admin,dc=activeldap,dc=com',
23
+ admin_password: 'secret',
24
+ uid: 'cn'
25
+ end
26
+
27
+ def ldap_server_stop
28
+ GitHub::Ldap.stop_server
29
+ end
30
+
31
+ def ldap_server_restart
32
+ ldap_server_stop
33
+ ldap_server_start
34
+ end
35
+
36
+ end
@@ -0,0 +1,11 @@
1
+ shared_context "ldap" do
2
+
3
+ before(:all) do
4
+ ldap_setup
5
+ end
6
+
7
+ after(:all) do
8
+ ldap_teardown
9
+ end
10
+
11
+ end
@@ -0,0 +1,8 @@
1
+ class User < ActiveLdap::Base
2
+ include ActiveLdap::DynamicFinders
3
+
4
+ ldap_mapping :dn_attribute => 'cn',
5
+ :prefix => 'ou=Users',
6
+ :classes => ['top', 'person'],
7
+ :scope => :one
8
+ end
metadata ADDED
@@ -0,0 +1,165 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active_ldap-dynamic_finders
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Christian Nennemann
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activeldap
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: github-ldap
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 1.0.13
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.13
97
+ - !ruby/object:Gem::Dependency
98
+ name: ladle
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: ActiveLdap dynamic finders
112
+ email:
113
+ - christian.nennemann@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - .gitignore
119
+ - .travis.yml
120
+ - Gemfile
121
+ - LICENSE.txt
122
+ - README.md
123
+ - Rakefile
124
+ - active_ldap-dynamic_finders.gemspec
125
+ - lib/active_ldap/dynamic_finders.rb
126
+ - lib/active_ldap/dynamic_finders/version.rb
127
+ - spec/config/ldap.yml
128
+ - spec/dynamic_finders_spec.rb
129
+ - spec/fixtures/ldap.ldif
130
+ - spec/spec_helper.rb
131
+ - spec/support/ldap_macros.rb
132
+ - spec/support/shared_contexts/ldap_context.rb
133
+ - spec/support/user.rb
134
+ homepage: https://github.com/XORwell/activeldap-dynamic_finders
135
+ licenses:
136
+ - MIT
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '>='
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 2.0.3
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: Adds dynamic finder methods to ActiveLdap
158
+ test_files:
159
+ - spec/config/ldap.yml
160
+ - spec/dynamic_finders_spec.rb
161
+ - spec/fixtures/ldap.ldif
162
+ - spec/spec_helper.rb
163
+ - spec/support/ldap_macros.rb
164
+ - spec/support/shared_contexts/ldap_context.rb
165
+ - spec/support/user.rb