Class: Rabbit::Config

Inherits:
Object
  • Object
show all
Includes:
Tainbox
Defined in:
lib/rabbit.rb

Instance Method Summary collapse

Instance Method Details

#app_nameObject Also known as: read_queue



57
58
59
# File 'lib/rabbit.rb', line 57

def app_name
  [group_id, project_id].join(".")
end

#skip_publish?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/rabbit.rb', line 53

def skip_publish?
  skip_publishing_in.include?(environment)
end

#validate!Object

Raises:



43
44
45
46
47
48
49
50
51
# File 'lib/rabbit.rb', line 43

def validate!
  raise InvalidConfig, "missing project_id" unless project_id
  raise InvalidConfig, "missing group_id" unless group_id
  raise InvalidConfig, "missing exception_notifier" unless exception_notifier

  unless environment.in? %i[test development production]
    raise "environment should be one of (test, development, production)"
  end
end