Skip to content

Commit

Permalink
default strategy update
Browse files Browse the repository at this point in the history
  • Loading branch information
kowal committed Sep 8, 2019
1 parent f753a1d commit 53a193c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/filmdb/cli/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def self.job_status(workers_ids)
def self.create_report(options)
options.merge!(CLI_DEFAULT_OPTIONS)
Report.new(options).tap do |report|
report.build!(:background)
report.build!(:default)
end
end

Expand Down
3 changes: 2 additions & 1 deletion lib/filmdb/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def build!(strategy_name = :default)
end

def select_strategy(strategy)
FilmDb.strategies[strategy].new
strategy_class = FilmDb.strategies[strategy] || (raise BuildError, "Strategy '#{strategy}' is not registered!")
strategy_class.new
end

def select_source(movies_url)
Expand Down

0 comments on commit 53a193c

Please sign in to comment.