From eb615c3e7eedcbd00919fb4d7c27b0d7c1860618 Mon Sep 17 00:00:00 2001 From: cyberkov Date: Wed, 18 May 2011 15:57:02 +0200 Subject: [PATCH 1/3] Added region config to carrierwave to select other regions than US --- config/app_config.yml.example | 1 + config/initializers/carrierwave.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/app_config.yml.example b/config/app_config.yml.example index 393b6e53d..93b162ab9 100644 --- a/config/app_config.yml.example +++ b/config/app_config.yml.example @@ -91,6 +91,7 @@ default: #s3_key: 'key' #s3_secret: 'secret' #s3_bucket: 'my_photos' + #s3_region: 'us-east-1' # If you want normal Rails logs, set this to false in the appropriate environment. # It is false by default in development and test. diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index c350a1a2f..41c59c186 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -3,11 +3,12 @@ # the COPYRIGHT file. CarrierWave.configure do |config| - if AppConfig[:s3_key] && AppConfig[:s3_secret] && AppConfig[:s3_bucket] + if AppConfig[:s3_key] && AppConfig[:s3_secret] && AppConfig[:s3_bucket] && AppConfig[:s3_region] config.storage = :s3 config.s3_access_key_id = AppConfig[:s3_key] config.s3_secret_access_key = AppConfig[:s3_secret] config.s3_bucket = AppConfig[:s3_bucket] + config.s3_region = AppConfig[:s3_region] config.s3_use_ssl = true config.cache_dir = "#{Rails.root}/tmp/uploads" else From 2a449aa8c4d6409ddb878dc4e61ad4d4b2265298 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Wed, 18 May 2011 16:21:54 +0200 Subject: [PATCH 2/3] uncomment the new s3_region setting so that nobody needs to update his app_config.yml when he's using S3 --- config/app_config.yml.example | 2 +- config/initializers/carrierwave.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app_config.yml.example b/config/app_config.yml.example index 7be76f8a3..0e986fdc3 100644 --- a/config/app_config.yml.example +++ b/config/app_config.yml.example @@ -91,7 +91,7 @@ default: #s3_key: 'key' #s3_secret: 'secret' #s3_bucket: 'my_photos' - #s3_region: 'us-east-1' + s3_region: 'us-east-1' # If you want normal Rails logs, set this to false in the appropriate environment. # It is false by default in development and test. diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index 41c59c186..75ed94feb 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -8,7 +8,7 @@ CarrierWave.configure do |config| config.s3_access_key_id = AppConfig[:s3_key] config.s3_secret_access_key = AppConfig[:s3_secret] config.s3_bucket = AppConfig[:s3_bucket] - config.s3_region = AppConfig[:s3_region] + config.s3_region = AppConfig[:s3_region] config.s3_use_ssl = true config.cache_dir = "#{Rails.root}/tmp/uploads" else From d516d0a0f82771adb75823aabb06dd247f1f3f67 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 17 May 2011 19:04:39 -0700 Subject: [PATCH 3/3] migration --- ...ssword_reset_for_accounts_without_usernames.rb | 15 +++++++++++++++ db/schema.rb | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20110518010050_disable_password_reset_for_accounts_without_usernames.rb diff --git a/db/migrate/20110518010050_disable_password_reset_for_accounts_without_usernames.rb b/db/migrate/20110518010050_disable_password_reset_for_accounts_without_usernames.rb new file mode 100644 index 000000000..fca3c53d0 --- /dev/null +++ b/db/migrate/20110518010050_disable_password_reset_for_accounts_without_usernames.rb @@ -0,0 +1,15 @@ +class DisablePasswordResetForAccountsWithoutUsernames < ActiveRecord::Migration + def self.up + execute < 20110517180148) do +ActiveRecord::Schema.define(:version => 20110518010050) do create_table "aspect_memberships", :force => true do |t| t.integer "aspect_id", :null => false