Skip to content

Commit

Permalink
Move serverside version into its own file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Delcambre & Samuel Merritt committed Aug 25, 2010
1 parent c4c481e commit fc0ec0a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/engineyard.rb
@@ -1,6 +1,7 @@
module EY
require 'engineyard/ruby_ext'
require 'engineyard/version'
require 'engineyard/serverside_version'

autoload :API, 'engineyard/api'
autoload :Collection, 'engineyard/collection'
Expand Down
1 change: 0 additions & 1 deletion lib/engineyard/model/instance.rb
Expand Up @@ -3,7 +3,6 @@
module EY
module Model
class Instance < ApiStruct.new(:id, :role, :name, :status, :amazon_id, :public_hostname, :environment)
ENGINEYARD_SERVERSIDE_VERSION = ENV["ENGINEYARD_SERVERSIDE_VERSION"] || "1.2.0"
EXIT_STATUS = Hash.new { |h,k| raise EY::Error, "engineyard-serverside version checker exited with unknown status code #{k}" }
EXIT_STATUS.merge!({
255 => :ssh_failed,
Expand Down
3 changes: 3 additions & 0 deletions lib/engineyard/serverside_version.rb
@@ -0,0 +1,3 @@
module EY
ENGINEYARD_SERVERSIDE_VERSION = ENV["ENGINEYARD_SERVERSIDE_VERSION"] || "1.2.0"
end
2 changes: 1 addition & 1 deletion spec/support/shared_behavior.rb
Expand Up @@ -187,7 +187,7 @@ def exiting_ssh(exit_code)
it "does not try to install engineyard-serverside if it's already there" do
run_ey({:env => 'giblets'}, {:prepend_to_path => {'ssh' => exiting_ssh(0)}})
@ssh_commands.should_not have_command_like(/gem install engineyard-serverside/)
ver = Regexp.quote(EY::Model::Instance::ENGINEYARD_SERVERSIDE_VERSION)
ver = Regexp.quote(EY::ENGINEYARD_SERVERSIDE_VERSION)
@ssh_commands.should have_command_like(/engineyard-serverside _#{ver}_ deploy/)
end
end
Expand Down

0 comments on commit fc0ec0a

Please sign in to comment.