diff --git a/config/config.yml b/config/config.yml index edfbda1..6e29839 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,4 +1,15 @@ -name: Dan Barber Photo -page_title: Dan Barber Photography -meta_description: "" -meta_keywords: "" +development: &default + name: Dan Barber Photography + page_title: Dan Barber Photography + meta_description: "" + meta_keywords: "" + + ssl_hostname: secure.danbarberphoto.dev + +test: + <<: *default + +production: + <<: *default + + ssl_hostname: danbarberphoto.herokuapp.com diff --git a/config/environments/development.rb b/config/environments/development.rb index 3adc909..ead02ca 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -40,5 +40,5 @@ DanBarberPhoto::Application.configure do } config.action_mailer.default_url_options = { :host => "danbarberphoto.dev" } - + end diff --git a/config/initializers/load_config.rb b/config/initializers/load_config.rb index 4a362bc..6de2b1f 100644 --- a/config/initializers/load_config.rb +++ b/config/initializers/load_config.rb @@ -1,2 +1,2 @@ # Load the app config from the config.yml file. -APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml") \ No newline at end of file +APP_CONFIG = YAML.load_file("#{Rails.root}/config/config.yml")[Rails.env].with_indifferent_access diff --git a/config/initializers/paperclip.rb_ b/config/initializers/paperclip.rb_ new file mode 100644 index 0000000..71c245e --- /dev/null +++ b/config/initializers/paperclip.rb_ @@ -0,0 +1,9 @@ +Paperclip.interpolates(:s3_eu_url) do |att, style| + "#{att.s3_protocol}://s3-eu-west-1.amazonaws.com/#{att.bucket_name}/#{att.path(style)}" +end + +module AWS + module S3 + DEFAULT_HOST = "s3-eu-west-1.amazonaws.com" + end +end