Class: Conjure::Postgres
- Inherits:
-
Object
- Object
- Conjure::Postgres
- Defined in:
- lib/conjure/postgres.rb
Instance Method Summary collapse
- #container_link ⇒ Object
-
#initialize(container_host) ⇒ Postgres
constructor
A new instance of Postgres.
- #install ⇒ Object
- #pending_files ⇒ Object
- #rails_config ⇒ Object
Constructor Details
#initialize(container_host) ⇒ Postgres
Returns a new instance of Postgres.
6 7 8 9 10 |
# File 'lib/conjure/postgres.rb', line 6 def initialize(container_host) @container_host = container_host @name = "conjure_db_#{SecureRandom.hex 8}" @password = new_password end |
Instance Method Details
#container_link ⇒ Object
27 28 29 |
# File 'lib/conjure/postgres.rb', line 27 def container_link {container_name => container_name} end |
#install ⇒ Object
12 13 14 |
# File 'lib/conjure/postgres.rb', line 12 def install server_template.start(@container_host, "/sbin/my_init", ) end |
#pending_files ⇒ Object
31 32 33 |
# File 'lib/conjure/postgres.rb', line 31 def pending_files [] end |
#rails_config ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/conjure/postgres.rb', line 16 def rails_config { "adapter" => "postgresql", "database" => @name, "host" => container_name, "username" => "db", "password" => @password, "template" => "template0", } end |