Class: MuckEngine::Configuration
- Inherits:
-
Object
- Object
- MuckEngine::Configuration
- Defined in:
- lib/muck-engine/config.rb
Instance Attribute Summary collapse
-
#admin_email ⇒ Object
Admin email for your application.
-
#application_name ⇒ Object
Common name for your application.
-
#application_url ⇒ Object
Global application values.
-
#base_domain ⇒ Object
Basedomain that emails will come from.
-
#customer_service_number ⇒ Object
Phone number if you have one (optional).
-
#email_password ⇒ Object
Email server password.
-
#email_server_address ⇒ Object
Email server configuration.
-
#email_user_name ⇒ Object
Email server username.
-
#enable_ssl ⇒ Object
Enable ssl if you have an ssl certificate installed.
-
#from_email ⇒ Object
Emails will come from this address i.e.
-
#from_email_name ⇒ Object
This will show up as the name on emails.
-
#google_tracking_code ⇒ Object
Google Analtyics Configuration.
-
#google_tracking_set_domain ⇒ Object
Returns the value of attribute google_tracking_set_domain.
-
#growl_enabled ⇒ Object
If true then notifications and errors will popup in an overlay div similar to ‘growl’ on the mac.
-
#local_jquery ⇒ Object
Application configuration.
-
#mail_charset ⇒ Object
Email charset.
-
#required_text_mark ⇒ Object
Base domain provided to Google Analytics.
-
#support_email ⇒ Object
Support email for your application.
Instance Method Summary collapse
-
#add_muck_admin_nav_item(name, path, image = '', insert_at = -1)) ⇒ Object
Add an item to the main admin navigation menu Paramters: name: Name for the link path: Url to link to image: Image for the link.
-
#add_muck_dashboard_item(path, locals = {}, insert_at = -1)) ⇒ Object
Add an item to the admin dashboard path: Path to the partial locals: Hash of values to pass as locals to the partial.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #muck_admin_nav_items ⇒ Object
- #muck_dashboard_items ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/muck-engine/config.rb', line 70 def initialize self.application_url = 'localhost:3000' self.application_name = 'My App' self.from_email = '[email protected]' self.from_email_name = 'Example App' self.support_email = '[email protected]' self.admin_email = '[email protected]' self.customer_service_number = '1-800-' self.mail_charset = 'utf-8' self.email_server_address = "smtp.sendgrid.net" self.email_user_name = '[email protected]' self.email_password = 'password' self.base_domain = 'example.com' self.enable_ssl = false self.growl_enabled = false self.local_jquery = false self.required_text_mark = '*' self.google_tracking_code = "" self.google_tracking_set_domain = "example.com" end |
Instance Attribute Details
#admin_email ⇒ Object
Admin email for your application
23 24 25 |
# File 'lib/muck-engine/config.rb', line 23 def admin_email @admin_email end |
#application_name ⇒ Object
Common name for your application. i.e. My App, Billy Bob, etc
19 20 21 |
# File 'lib/muck-engine/config.rb', line 19 def application_name @application_name end |
#application_url ⇒ Object
Global application values. These are used to display the app name, send emails, and configure where system emails go.
18 19 20 |
# File 'lib/muck-engine/config.rb', line 18 def application_url @application_url end |
#base_domain ⇒ Object
Basedomain that emails will come from
36 37 38 |
# File 'lib/muck-engine/config.rb', line 36 def base_domain @base_domain end |
#customer_service_number ⇒ Object
Phone number if you have one (optional)
24 25 26 |
# File 'lib/muck-engine/config.rb', line 24 def customer_service_number @customer_service_number end |
#email_password ⇒ Object
Email server password
35 36 37 |
# File 'lib/muck-engine/config.rb', line 35 def email_password @email_password end |
#email_server_address ⇒ Object
Email server configuration
33 34 35 |
# File 'lib/muck-engine/config.rb', line 33 def email_server_address @email_server_address end |
#email_user_name ⇒ Object
Email server username
34 35 36 |
# File 'lib/muck-engine/config.rb', line 34 def email_user_name @email_user_name end |
#enable_ssl ⇒ Object
Enable ssl if you have an ssl certificate installed. This will provide security between the client and server.
26 27 28 |
# File 'lib/muck-engine/config.rb', line 26 def enable_ssl @enable_ssl end |
#from_email ⇒ Object
Emails will come from this address i.e. [email protected], [email protected], [email protected], etc
20 21 22 |
# File 'lib/muck-engine/config.rb', line 20 def from_email @from_email end |
#from_email_name ⇒ Object
This will show up as the name on emails. i.e. [email protected] <Example>
21 22 23 |
# File 'lib/muck-engine/config.rb', line 21 def from_email_name @from_email_name end |
#google_tracking_code ⇒ Object
Google Analtyics Configuration. This will enable Google Analytics on your site and will be used if your template includes:
<%= render :partial => 'layouts/global/google_analytics' %>
40 41 42 |
# File 'lib/muck-engine/config.rb', line 40 def google_tracking_code @google_tracking_code end |
#google_tracking_set_domain ⇒ Object
Returns the value of attribute google_tracking_set_domain.
41 42 43 |
# File 'lib/muck-engine/config.rb', line 41 def google_tracking_set_domain @google_tracking_set_domain end |
#growl_enabled ⇒ Object
If true then notifications and errors will popup in an overlay div similar to ‘growl’ on the mac. This uses jGrowl which must be included in your layout
30 31 32 |
# File 'lib/muck-engine/config.rb', line 30 def growl_enabled @growl_enabled end |
#local_jquery ⇒ Object
Application configuration
29 30 31 |
# File 'lib/muck-engine/config.rb', line 29 def local_jquery @local_jquery end |
#mail_charset ⇒ Object
Email charset. No need to change this unless you have a good reason to change the encoding.
25 26 27 |
# File 'lib/muck-engine/config.rb', line 25 def mail_charset @mail_charset end |
#required_text_mark ⇒ Object
Base domain provided to Google Analytics. Useful if you are using subdomains but want all traffic recorded into one account.
44 45 46 |
# File 'lib/muck-engine/config.rb', line 44 def required_text_mark @required_text_mark end |
#support_email ⇒ Object
Support email for your application. This is used for contact us etc.
22 23 24 |
# File 'lib/muck-engine/config.rb', line 22 def support_email @support_email end |
Instance Method Details
#add_muck_admin_nav_item(name, path, image = '', insert_at = -1)) ⇒ Object
Add an item to the main admin navigation menu Paramters: name: Name for the link path: Url to link to image: Image for the link
54 55 56 |
# File 'lib/muck-engine/config.rb', line 54 def add_muck_admin_nav_item(name, path, image = '', insert_at = -1) muck_admin_nav_items.insert(insert_at, OpenStruct.new(:name => name, :path => path, :image => image)) end |
#add_muck_dashboard_item(path, locals = {}, insert_at = -1)) ⇒ Object
Add an item to the admin dashboard path: Path to the partial locals: Hash of values to pass as locals to the partial
66 67 68 |
# File 'lib/muck-engine/config.rb', line 66 def add_muck_dashboard_item(path, locals = {}, insert_at = -1) muck_dashboard_items.insert(insert_at, OpenStruct.new(:path => path, :locals => locals)) end |
#muck_admin_nav_items ⇒ Object
45 46 47 |
# File 'lib/muck-engine/config.rb', line 45 def muck_admin_nav_items @@muck_admin_nav_items ||= [] end |
#muck_dashboard_items ⇒ Object
59 60 61 |
# File 'lib/muck-engine/config.rb', line 59 def muck_dashboard_items @@muck_dashboard_items ||= [] end |