Sha256: 829468e985a38e9b1d6a6a04a04bbe6fa86cf4181cf2f1fc0a084acb2c77105e
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require "yaml" module Octopus def self.env() @env ||= defined?(Rails) ? Rails.env.to_s : 'octopus' end def self.config() @config ||= YAML.load_file(Octopus.directory() + "/config/shards.yml") end # Returns the Rails.root_to_s when you are using rails # Running the current directory in a generic Ruby process def self.directory() @directory ||= defined?(Rails) ? Rails.root.to_s : Dir.pwd end # 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 def self.setup yield self end def self.excluded_enviroments=(excluded_enviroments) @excluded_enviroments = excluded_enviroments.map { |element| element.to_s } end def self.excluded_enviroments @excluded_enviroments || ['development',"cucumber", "test"] end end require "octopus/proxy" require "octopus/migration" require "octopus/model" require "octopus/persistence" require "octopus/controller" require "octopus/association" require "octopus/association_collection" require "octopus/scope_proxy" require "octopus/has_and_belongs_to_many_association"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ar-octopus-0.0.15 | lib/octopus.rb |