Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Set store locally with the configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Carrion committed Oct 29, 2010
1 parent c9be0bd commit 4e34832
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/etl/control/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def initialize(control, configuration, definition)
@configuration = configuration
@definition = definition

@store_locally = configuration[:store_locally] || true
@store_locally = true
@store_locally = configuration[:store_locally] unless configuration[:store_locally].nil?
end

# Get an array of errors that occur during reading from the source
Expand Down Expand Up @@ -106,4 +107,4 @@ def read_locally
end
end

Dir[File.dirname(__FILE__) + "/source/*.rb"].each { |file| require(file) }
Dir[File.dirname(__FILE__) + "/source/*.rb"].each { |file| require(file) }

3 comments on commit 4e34832

@thbar
Copy link
Member

@thbar thbar commented on 4e34832 Jun 10, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you remember why this fix was needed ? (I'm updating the CHANGELOG).

@gkfabs
Copy link
Contributor

@gkfabs gkfabs commented on 4e34832 Jun 10, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case we don't set store_locally in the configuration file, we have configuration[:store_locally] == nil, and it set @store_locally to false. Meanwhile the default behaviour should be @store_locally = true.

Thanks

@thbar
Copy link
Member

@thbar thbar commented on 4e34832 Jun 10, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I'll add a test-case around that.

Please sign in to comment.