Module: SimpleCrowd
- Defined in:
- lib/simple_crowd/mock_client.rb,
lib/simple_crowd.rb,
lib/simple_crowd/user.rb,
lib/simple_crowd/group.rb,
lib/simple_crowd/client.rb,
lib/simple_crowd/version.rb,
lib/simple_crowd/crowd_error.rb,
lib/simple_crowd/crowd_entity.rb,
lib/simple_crowd/cache/null_store.rb
Overview
Client with basic functions mocked out to stop calls from going to the server during tests
Defined Under Namespace
Modules: Cache
Classes: Client, CrowdEntity, CrowdError, Group, MockClient, User
Constant Summary
collapse
- VERSION =
"1.2.1"
Class Method Summary
collapse
Class Method Details
.config(&config_block) ⇒ Object
14
15
16
|
# File 'lib/simple_crowd.rb', line 14
def config &config_block
config_block.call(options)
end
|
.config_file_options ⇒ Object
43
44
45
46
47
48
49
|
# File 'lib/simple_crowd.rb', line 43
def config_file_options
@config_file_options ||= begin
(File.exists?('config/crowd.yml') &&
yml = (YAML.load_file('config/crowd.yml')[ENV["RAILS_ENV"] || "development"] || {}) and
yml.symbolize_keys!) || {}
end
end
|
.default_crowd_options ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/simple_crowd.rb', line 34
def default_crowd_options
@default_crowd_options ||= {
:service_url => "http://localhost:8095/crowd/",
:app_name => "crowd",
:app_password => "",
:cache_prefix => "simple_crowd.",
}
defined?(IRB) ? @default_crowd_options.merge(config_file_options) : @default_crowd_options
end
|
.options(app_options = {}) ⇒ Object
18
19
20
21
|
# File 'lib/simple_crowd.rb', line 18
def options app_options = {}
c = soap_options.merge(default_crowd_options).merge(app_options) and
c.merge(:service_url => c[:service_url] + 'services/SecurityServer')
end
|
.soap_options ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/simple_crowd.rb', line 22
def soap_options
@soap_options ||= {
:service_ns => "urn:SecurityServer",
:service_namespaces => {
'xmlns:auth' => 'http://authentication.integration.crowd.atlassian.com',
'xmlns:ex' => 'http://exception.integration.crowd.atlassian.com',
'xmlns:int' => 'http://soap.integration.crowd.atlassian.com',
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance'
}
}
end
|