Module: Racf

Defined in:
lib/racf.rb,
lib/racf/client.rb,
lib/racf/session.rb,
lib/racf/version.rb,
lib/racf/commands/rlist.rb,
lib/racf/commands/search.rb,
lib/racf/commands/listgrp.rb,
lib/racf/commands/listuser.rb,
lib/racf/pagers/ispf_pager.rb,
lib/racf/pagers/cached_ispf_pager.rb,
lib/racf/commands/abstract_command.rb,
lib/racf/commands/listgrp/group_members_parser.rb

Defined Under Namespace

Modules: Commands, Pagers Classes: Client, Session

Constant Summary collapse

LoginError =
Class.new(StandardError)
VERSION =
"0.6.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject



32
33
34
# File 'lib/racf.rb', line 32

def config
  @config ||= symbolize_keys(load_config[env])
end

.config_file_pathObject



37
38
39
# File 'lib/racf.rb', line 37

def config_file_path
  @config_file_path ||= root.join("config", "racf.yml")
end

.dump_file_pathObject



42
43
44
# File 'lib/racf.rb', line 42

def dump_file_path
  @dump_file_path ||= root.join("tmp", config[:dump_file] || "racf_cache_dump.yml")
end

.loggerObject



19
20
21
# File 'lib/racf.rb', line 19

def logger
  @logger ||= default_logger
end

Class Method Details

.envObject



24
25
26
# File 'lib/racf.rb', line 24

def env
  @_env ||= ENV['RAILS_ENV'] || ENV['RACF_ENV'] || "development"
end

.env=(environment) ⇒ Object



28
29
30
# File 'lib/racf.rb', line 28

def env=(environment)
  @_env = environment
end

.rootObject



10
11
12
13
14
15
16
17
# File 'lib/racf.rb', line 10

def root
  @_root ||=
    if defined?(Rails)
      Rails.root
    else
      Pathname.new(File.expand_path("../..", __FILE__))
    end
end