Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Swap to fog-aws #542

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ group :development do
end

group :plugins do
gem "vagrant-aws" , path: "."
gemspec
end
2 changes: 1 addition & 1 deletion lib/vagrant-aws/action/connect_aws.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "fog"
require "fog-aws"
require "log4r"

module VagrantPlugins
Expand Down
16 changes: 4 additions & 12 deletions lib/vagrant-aws/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -525,25 +525,17 @@ def get_aws_info(profile, location)
private

def read_aws_files(profile, aws_config, aws_creds)
# determine section in config ini file
if profile == 'default'
ini_profile = profile
else
ini_profile = 'profile ' + profile
end
# get info from config ini file for selected profile
data = File.read(aws_config)
doc_cfg = IniParse.parse(data)
aws_region = doc_cfg[ini_profile]['region']
aws_region = doc_cfg[profile]['region']

# determine section in credentials ini file
ini_profile = profile
# get info from credentials ini file for selected profile
data = File.read(aws_creds)
doc_cfg = IniParse.parse(data)
aws_id = doc_cfg[ini_profile]['aws_access_key_id']
aws_secret = doc_cfg[ini_profile]['aws_secret_access_key']
aws_token = doc_cfg[ini_profile]['aws_session_token']
aws_id = doc_cfg[profile]['aws_access_key_id']
aws_secret = doc_cfg[profile]['aws_secret_access_key']
aws_token = doc_cfg[profile]['aws_session_token']

return aws_region, aws_id, aws_secret, aws_token
end
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-aws/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module AWS
VERSION = '0.7.2'
VERSION = '0.8.0'
end
end
6 changes: 4 additions & 2 deletions vagrant-aws.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$:.unshift File.expand_path("../lib", __FILE__)
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "vagrant-aws/version"

Gem::Specification.new do |s|
Expand All @@ -15,7 +17,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "vagrant-aws"

s.add_runtime_dependency "fog", "~> 1.22"
s.add_runtime_dependency "fog-aws", "~> 3.0"
s.add_runtime_dependency "iniparse", "~> 1.4", ">= 1.4.2"

s.add_development_dependency "rake"
Expand Down