#
# Main configuration file for functionality of a Teambox app instance.
#

# Configuration shared between all environments:
defaults: &defaults
  # The domain from where your app is served
  app_domain: localhost

  # How many activities should activity feeds display?
  activities_per_page: 25

  # Hour of the day at which daily reminders will be sent
  daily_task_reminder_email_time: 6
  
  # Email confirmation is required (will be asked on top of every inside page)
  email_confirmation_require: true

  # Gravatar fallback type in case a user doesn't have an avatar
  # One of: wavatar, monsterid, identicon
  gravatar_default: mm

  # Set to true to use S3 storage instead of local filesystem storage.
  # Automatically true on Heroku.
  # See "config/amazon_s3.yml" for info about credentials.
  amazon_s3: false
  # Upload expiration for public URL, in minutes
  # Take fragment caching into consideration when setting this value
  amazon_s3_expiration: 157680000

  asset_max_file_size: 50 # in megabytes

  # Enable secure signup and logins over HTTPS.
  # Make sure your domain has a valid SSL certificate
  secure_logins: false

  # Enable time tracking
  allow_time_tracking: true
  
  # Enable search (you must have thinking_sphinx installed and configured)
  # See http://wiki.github.com/teambox/teambox/configuring-search for more 
  # information on configuring search
  allow_search: false

  # Default timezone
  time_zone: UTC

  # Default language in which the app is displayed.
  # See translations in "config/locales/"
  default_locale: :en

  # By default, emails are sent in production but not in development
  allow_outgoing_email: true

  # Configuration for outgoing mail
  # With Heroku and the Sendgrid add-on, no configuration is needed here.
  #   $ heroku addons:add sendgrid:free
  smtp_settings:
    :domain:         domain.com         # the domain your emails will come from
    :address:        smtp.sendgrid.net  # SMTP server used to send emails
    :port:           25
    :authentication: :plain
    :user_name:      USER
    :password:       PASSWORD
    :inbox_task_list: Inbox

    # Set to true when using Gmail
    :enable_starttls_auto: false

    # Set to true if you have Net::SMTPSyntaxError errors when sending email.
    # Rails has sometimes a problem when sending email from "Name <address@host.com>".
    # If you are having problems sending email and your host is correctly configured,
    # try setting safe_from to true. You may need to create a user account for no-reply@yourapp.com
    :safe_from: false

  # Set allow to true to allow the "reply to" feature for notifications.
  # This will allow users to post answers and comments by email.
  # When set to true, "reply above this line" notice will be displayed where relevant and accept emails.
  allow_incoming_email: false
  
  delay_data_processing: false

  # You will need to:
  # * Setup catch-all address for email received for any username of the incoming mail server.
  # * Run `rake mail:inbox` periodically from cron to process incoming emails.
  # Important: Email should be received in the same domain it's being sent from.
  incoming_email_settings:
    :type:      POP
    :address:   mail.example.com
    :user_name: USER
    :password:  PASSWORD

  # Allow teambox.com to gather statistics about this installation
  tracking_enabled: true

  # Destination where your users could write to ask for help. Accepts an email or website.
  support: http://help.teambox.com

  help_url: http://help.teambox.com/faqs/using-teambox
  support_url: http://teambox.com/community

  # You can configure standard oauth provider here, or any supported omni-auth provider
  # in the omni-auth initializer.
  #
  # providers:
  # Register your own domain at http://github.com/account/applications
  # Allows login through Github
  # - :provider: github
  #   :key: 
  #   :secret: 
  # Register your own domain at http://dev.twitter.com/apps/new
  # Allows login through Twitter
  # - :provider: twitter
  #   :key: 
  #   :secret: 
  # Register your own domain at http://www.facebook.com/developers
  # Allows login through Facebook
  # - :provider: facebook
  #   :key: 
  #   :secret: 
  # Register your own domain at https://www.google.com/accounts/NewAccount
  # Allows Google Docs integration
  # - :provider: google
  #   :key: 
  #   :secret: 
  # - :provider: google_apps
  # Register your own domain at https://www.linkedin.com/secure/developer
  # Allows login through LinkedIn
  # - :provider: linked_in
  #   :key: 
  #   :secret: 

  heroku: <%= !!ENV['HEROKU_TYPE'] %>
  trimmer_cache_dir: <%=(Rails.root + "public").to_s %>
  trimmer_templates_dir: <%= (Rails.root + "app/templates").to_s %>
  trimmer_allowed_keys: 
  - "*.date"
  - "*.datetime"
  - "*.calendar"
  - "*.time"
  - "*.comments"
  - "*.roles"
  - "*.common"
  - "*.tasks"
  - "*.projects"
  - "*.conversations"
  - "*.date_picker"

development:
  <<: *defaults
  app_domain: localhost:3000
  asset_max_file_size: 1
  allow_outgoing_email: false

production:
  <<: *defaults

test: &test
  <<: *defaults
  providers:
  - :provider: github
    :key: aaaa
    :secret: aaaa
  - :provider: twitter
    :key: aaaa
    :secret: aaaa
  - :provider: facebook
    :key: aaaa
    :secret: aaaa
  - :provider: google
    :key: teambox.com
    :secret: aaaa
  - :provider: linked_in
    :key: aaaa
    :secret: aaaa
  app_domain: 127.0.0.1
  allow_outgoing_email: false
  asset_max_file_size: 1
  amazon_s3: false
  smtp_settings:
    :domain: domain.com
cucumber:
  <<: *test
