Browse files

Fix server path configuration in development

This fixes path problems when setting up a local
development environment. In dev, Fog uses the 
local storage provider and Indexer assumes all
operations will result in files being written 
to `Pusher.server_path + "/gems"`. With Fog in the
mix, this actually becomes `Pusher.server_path +
s3_bucket + "/gems"`. (`Pusher.server_path` 
defaults to the `server` directory.)

Removing the s3_bucket name from `rubygems.yml`
and the `'gems'` from `Indexer#fog` means that 
gems and index updates are served out of the
`Pusher.server_path` as expected.

No tests for this as the behavior only occurs in
the development environment.
  • Loading branch information...
1 parent df2d3b4 commit fe362b416bb352eb3bb3de2681c01cb9942905bf @elskwid elskwid committed Nov 24, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/jobs/indexer.rb
  2. +1 −1 config/rubygems.yml
2 app/jobs/indexer.rb
@@ -31,7 +31,7 @@ def directory
def fog
$fog ||
:provider => 'Local',
- :local_root => Pusher.server_path('gems')
+ :local_root => Pusher.server_path
2 config/rubygems.yml
@@ -3,7 +3,7 @@ development:
local_storage: true
redirector: false
delivery_method: :sendmail
- s3_bucket:
+ s3_bucket: ""
asset_cacher: false

0 comments on commit fe362b4

Please sign in to comment.