Sha256: 5ca745e0d707f78d46527a49f8c15e00240705e5ce4d4d9602e69e5156347a8f

Contents?: true

Size: 1.41 KB

Versions: 2

Compression:

Stored size: 1.41 KB

Contents

#DEFAULTS: &DEFAULTS
#  :styles:
#    :full: '900'
#    :large: '800'
#    :medium: '600'
#    :small: '150x50'

#	:attachment is the attachment name NOT the model name
#	for document they are the same

<% common = "documents/:id/:filename" %>

#>> Rails.root.to_s.split('/')
#=> ["", "var", "lib", "tomcat5", "webapps", "clic", "WEB-INF"]

#>> Rails.root.to_s.split('/')
#=> ["", "Users", "jakewendt", "github_repo", "jakewendt", "ucb_ccls_clic"]

<% 
app_name = ( defined?(RAILS_APP_NAME) ) ? 
	RAILS_APP_NAME :
	Rails.root.to_s.split('/').reject{|x|x ==  "WEB-INF"}.last 
%>

development:
  :path: <%= "#{Rails.root}/development/#{common}" %>
#  <<: *DEFAULTS

test:
  :path: <%= "#{Rails.root}/test/#{common}" %>
#  <<: *DEFAULTS

#production:
#  :path: <%= "/home/tomcat/#{app_name}/:attachment/:id/:filename" %>
##	#  <<: *DEFAULTS

production:
  #	Set the storage class to RRS which is cheaper than 
  #	the default of STANDARD
  :s3_headers:
    x-amz-storage-class: REDUCED_REDUNDANCY
  # public_read or private
  :s3_permissions: :private
  :storage: :s3
  :s3_protocol: https
  :s3_credentials: <%="#{Rails.root}/config/s3.yml" %>
  :bucket: <%= app_name %>
  #	common has a : as the first char so it needs special care
  #	or the string will magically be turned into a symbol
  #	which isn't what we want 
  #	Not anymore.
  :path: <%= common %>
  # S3 must have a defined path or will generate
  # "Stack level too deep" errors

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jakewendt-simply_documents-1.3.4 config/document.yml
jakewendt-documents-0.2.0 config/document.yml