Class: RubyYacht::Project::DSL
- Inherits:
-
Object
- Object
- RubyYacht::Project::DSL
- Extended by:
- DSL::Base::ClassMethods
- Includes:
- DSL::Base
- Defined in:
- lib/ruby_yacht/dsl/project.rb
Overview
This class provides a DSL for configuring a project.
You can access this inside RubyYacht::Configuration::DSL by calling project. It will create a RubyYacht::Project.
Instance Method Summary collapse
-
#app ⇒ Object
:method: app.
-
#check_out_locally ⇒ Object
:method: check_out_locally.
-
#create_deploy_container ⇒ Object
:method: create_deploy_container.
-
#database ⇒ Object
:method: database.
-
#dns_server ⇒ Object
:method: dns_server.
-
#domain ⇒ Object
:method: domain You can call ‘domain ’test.com’‘ to set the project’s
domainto test.com. -
#initialize(name) ⇒ DSL
constructor
This initializer creates a new project.
-
#rails_environment ⇒ Object
:method: rails_environment.
-
#repository ⇒ Object
:method: repository You can call ‘repository ’github.com’‘ to set the project’s
repositorytogithub.com. -
#secret_key_base ⇒ Object
:method: secret_key_base You can call ‘secret_key_base ’1234kj1234k;lj1234jklh’‘ to set the project’s
secret_key_baseto ‘1234kj1234k;lj1234jklh`. -
#system_prefix ⇒ Object
:method: system_prefix You can call ‘system_prefix ’my-apps’‘ to set the projects system_prefix` to
my-apps.
Methods included from DSL::Base::ClassMethods
add_attribute, add_boolean, add_generic_attribute, add_list, add_object, add_object_list, all_attributes, copied_attributes, created_type, creates_object, default_values, required_attributes
Methods included from DSL::Base
#check_required_attributes, #create_object, #run
Constructor Details
#initialize(name) ⇒ DSL
This initializer creates a new project.
### Parameters
-
*name: String* The name of the project
56 57 58 |
# File 'lib/ruby_yacht/dsl/project.rb', line 56 def initialize(name) @name = name.to_sym end |
Instance Method Details
#app ⇒ Object
:method: app
You can call ‘app ’mars’‘ to add an app called mars. This takes a block for configuring the app, which allows you to call methods in RubyYacht::App::DSL
115 |
# File 'lib/ruby_yacht/dsl/project.rb', line 115 add_object_list :app, 'RubyYacht::App::DSL' |
#check_out_locally ⇒ Object
:method: check_out_locally
You can call check_out_locally to set the project’s check_out_locally flag to true. The default is false.
100 |
# File 'lib/ruby_yacht/dsl/project.rb', line 100 add_boolean :check_out_locally |
#create_deploy_container ⇒ Object
:method: create_deploy_container
You can call create_deploy_container to set the project’s create_deploy_container flag to true. The default is false.
107 |
# File 'lib/ruby_yacht/dsl/project.rb', line 107 add_boolean :create_deploy_container |
#database ⇒ Object
:method: database
You can call database to configure the database for the project. This takes a block for configuring the database, which allows you to call methods in RubyYacht::Database::DSL
You must call this in your project config.
125 |
# File 'lib/ruby_yacht/dsl/project.rb', line 125 add_object :database, 'RubyYacht::Database::DSL' |
#dns_server ⇒ Object
:method: dns_server
You can call dns_server to configure the DNS for the project. This takes a block for configuring the DNS , which allows you to call methods in RubyYacht::DnsServer::DSL
This is optional.
135 |
# File 'lib/ruby_yacht/dsl/project.rb', line 135 add_object :dns_server, 'RubyYacht::DnsServer::DSL', required: false |
#domain ⇒ Object
:method: domain You can call ‘domain ’test.com’‘ to set the project’s domain to test.com
72 |
# File 'lib/ruby_yacht/dsl/project.rb', line 72 add_attribute :domain |
#rails_environment ⇒ Object
:method: rails_environment
You can call ‘rails_environment ’staging’‘ to set the project’s rails_environment to staging.
The default is development.
93 |
# File 'lib/ruby_yacht/dsl/project.rb', line 93 add_attribute :rails_environment, 'development' |
#repository ⇒ Object
:method: repository You can call ‘repository ’github.com’‘ to set the project’s repository to github.com
84 |
# File 'lib/ruby_yacht/dsl/project.rb', line 84 add_attribute :repository |
#secret_key_base ⇒ Object
:method: secret_key_base You can call ‘secret_key_base ’1234kj1234k;lj1234jklh’‘ to set the project’s secret_key_base to ‘1234kj1234k;lj1234jklh`.
78 |
# File 'lib/ruby_yacht/dsl/project.rb', line 78 add_attribute :secret_key_base |
#system_prefix ⇒ Object
:method: system_prefix You can call ‘system_prefix ’my-apps’‘ to set the projects system_prefix` to my-apps
66 |
# File 'lib/ruby_yacht/dsl/project.rb', line 66 add_attribute :system_prefix |