Skip to content

Commit

Permalink
Define options method for MiddlemanRefinery.options
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Nov 4, 2016
1 parent 5af4eff commit 268f92f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/middleman-refinery/commands/refinery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ def self.exit_on_failure?
def refinery
::Middleman::Application.new

reference = MiddlemanRefinery.options.release
reference = options.release

Dir.mkdir('data') unless File.exists?('data')

FileUtils.rm_rf(Dir.glob('data/refinery_*'))

::Refinery::API.configure do |conf|
conf.api_token = MiddlemanRefinery.options.api_token
conf.api_url = MiddlemanRefinery.options.api_url
conf.api_path = MiddlemanRefinery.options.api_path
conf.api_token = options.api_token
conf.api_url = options.api_url
conf.api_path = options.api_path
end

# api = ::Refinery::API.configure(MiddlemanRefinery.options.api_url)
Expand Down Expand Up @@ -94,6 +94,10 @@ def logger
::Middleman::Logger.singleton
end

def options
MiddlemanRefinery.options
end

Base.register(self, 'refinery', 'refinery [--rebuild]', 'Import Refinery data to your Data folder')

end
Expand Down

0 comments on commit 268f92f

Please sign in to comment.