Skip to content

Commit

Permalink
revised commit. moved require block
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorshp committed May 13, 2015
1 parent b68246f commit 3e9fc2d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/chef/knife/s3_source.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
class Chef
class Knife
class S3Source < Knife
class S3Source
attr_accessor :url

deps do
require 'fog'
end

def self.fetch(url)
source = Chef::Knife::S3Source.new
source.url = url
Expand All @@ -32,6 +28,7 @@ def path
end

def fog
require 'fog'
@fog ||= Fog::Storage::AWS.new(
aws_access_key_id: Chef::Config[:knife][:aws_access_key_id],
aws_secret_access_key: Chef::Config[:knife][:aws_secret_access_key]
Expand Down

0 comments on commit 3e9fc2d

Please sign in to comment.