Class: MuckEngine::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/muck-engine/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_emailObject

Admin email for your application



23
24
25
# File 'lib/muck-engine/config.rb', line 23

def admin_email
  @admin_email
end

#application_nameObject

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_urlObject

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_domainObject

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_numberObject

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_passwordObject

Email server password



35
36
37
# File 'lib/muck-engine/config.rb', line 35

def email_password
  @email_password
end

#email_server_addressObject

Email server configuration



33
34
35
# File 'lib/muck-engine/config.rb', line 33

def email_server_address
  @email_server_address
end

#email_user_nameObject

Email server username



34
35
36
# File 'lib/muck-engine/config.rb', line 34

def email_user_name
  @email_user_name
end

#enable_sslObject

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_emailObject

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_nameObject

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_codeObject

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_domainObject

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_enabledObject

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_jqueryObject

Application configuration



29
30
31
# File 'lib/muck-engine/config.rb', line 29

def local_jquery
  @local_jquery
end

#mail_charsetObject

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_markObject

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_emailObject

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_itemsObject



45
46
47
# File 'lib/muck-engine/config.rb', line 45

def muck_admin_nav_items
  @@muck_admin_nav_items ||= []
end

#muck_dashboard_itemsObject



59
60
61
# File 'lib/muck-engine/config.rb', line 59

def muck_dashboard_items
  @@muck_dashboard_items ||= []
end