Module: Octopus
- Defined in:
- lib/octopus.rb
Defined Under Namespace
Modules: Association, Controller, Migration, Model, Persistence
Classes: Proxy, ScopeProxy
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
8
9
10
|
# File 'lib/octopus.rb', line 8
def self.config()
@config ||= YAML.load_file(Octopus.directory() + "/config/shards.yml")
end
|
.directory ⇒ Object
Returns the Rails.root_to_s when you are using rails Running the current directory in a generic Ruby process
14
15
16
|
# File 'lib/octopus.rb', line 14
def self.directory()
@directory ||= defined?(Rails) ? Rails.root.to_s : Dir.pwd
end
|
.env ⇒ Object
4
5
6
|
# File 'lib/octopus.rb', line 4
def self.env()
@env ||= defined?(Rails) ? Rails.env.to_s : 'octopus'
end
|
.excluded_enviroments ⇒ Object
29
30
31
|
# File 'lib/octopus.rb', line 29
def self.excluded_enviroments
@excluded_enviroments || ['development',"cucumber", "test"]
end
|
.excluded_enviroments=(excluded_enviroments) ⇒ Object
25
26
27
|
# File 'lib/octopus.rb', line 25
def self.excluded_enviroments=(excluded_enviroments)
@excluded_enviroments = excluded_enviroments.map { |element| element.to_s }
end
|
.setup {|_self| ... } ⇒ Object
This is the default way to do Octopus Setup Available variables: :excluded_enviroments => the enviroments that octopus will not run. default: :development, :cucumber and :test
21
22
23
|
# File 'lib/octopus.rb', line 21
def self.setup
yield self
end
|