Skip to content

Commit

Permalink
Initial stab at using the openstudio-aws-gem instead of the old aws.r…
Browse files Browse the repository at this point in the history
…b script, uncomment lines 529 and 530 to use the gem after installing it in the ruby-2.0.0-aws-win32 like so (note bundle does not seem to install gems to the correct location):

E:\openstudio-aws-gem>C:\working\openstudio\build\OpenStudioCore-prefix\src\OpenStudioCore-build\ruby-2.0.0-aws-win32\bin\gem install aws-sdk-core:2.0.0.rc14
E:\openstudio-aws-gem>C:\working\openstudio\build\OpenStudioCore-prefix\src\OpenStudioCore-build\ruby-2.0.0-aws-win32\bin\gem install semantic:1.3
E:\openstudio-aws-gem>C:\working\openstudio\build\OpenStudioCore-prefix\src\OpenStudioCore-build\ruby-2.0.0-aws-win32\bin\gem build openstudio-aws.gemspec
E:\openstudio-aws-gem>C:\working\openstudio\build\OpenStudioCore-prefix\src\OpenStudioCore-build\ruby-2.0.0-aws-win32\bin\gem install openstudio-aws-0.2.2.gem

You may also want to comment out line 1793 to preserve the private key file
  • Loading branch information
macumber committed Sep 26, 2014
1 parent 033e207 commit 35e898b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openstudiocore/src/utilities/cloud/AWSProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ namespace openstudio{
if (applicationIsRunningFromBuildDirectory())
{
m_script = getApplicationBuildDirectory() / openstudio::toPath("ruby/cloud/aws.rb");
//m_script = getOpenStudioAWSRubyPath() / openstudio::toPath("lib/ruby/gems/2.0.0/gems/openstudio-aws-0.2.2/lib/openstudio/lib/os-aws.rb");
//m_script = m_script.make_preferred();
} else {
#ifdef Q_OS_LINUX
m_script = getApplicationInstallDirectory() / openstudio::toPath("share/openstudio-" + openStudioVersion() + "/Ruby/cloud/aws.rb");
Expand Down Expand Up @@ -1542,6 +1544,7 @@ namespace openstudio{

QJsonObject options;
options["instance_type"] = QJsonValue(toQString(m_awsSettings.serverInstanceType()));
options["openstudio_version"] = QJsonValue(toQString(openStudioVersion()));
args << QString(QJsonDocument(options).toJson(QJsonDocument::Compact));

p->start(toQString(m_ruby), args);
Expand Down Expand Up @@ -1570,6 +1573,7 @@ namespace openstudio{
options["private_key"] = QJsonValue(m_privateKey.fileName());
m_privateKey.close();
}
options["openstudio_version"] = QJsonValue(toQString(openStudioVersion()));
args << QString(QJsonDocument(options).toJson(QJsonDocument::Compact));

p->start(toQString(m_ruby), args);
Expand Down

0 comments on commit 35e898b

Please sign in to comment.