Skip to content

Commit

Permalink
Update stager to use new staging gem.
Browse files Browse the repository at this point in the history
Change-Id: I49f571bf7630a48401bb6e9aa46bf0ff2a1655b1
  • Loading branch information
mpage committed Sep 2, 2011
1 parent ec30e94 commit 57a0c66
Show file tree
Hide file tree
Showing 76 changed files with 120 additions and 2,974 deletions.
2 changes: 1 addition & 1 deletion cloud_controller/config/initializers/staging.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'secure_user_manager'
require 'vcap/staging/plugin/common'

ENV['STAGING_CONFIG_DIR'] = AppConfig[:directories][:staging_manifests]
StagingPlugin.manifest_root = AppConfig[:directories][:staging_manifests]
# Activates the staging plugins and loads all included YAML files
StagingPlugin.load_all_manifests

Expand Down
17 changes: 15 additions & 2 deletions cloud_controller/script/run_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
require 'rubygems'
require 'bundler/setup'

require 'yajl'

require 'vcap/staging/plugin/common'

unless ARGV.length > 0
Expand All @@ -12,6 +14,17 @@
end

name = ARGV.shift
args = ARGV.dup

if args.length > 2
begin
args[2] = Yajl::Parser.parse(args[2], :symbolize_keys => true)
rescue => e
puts "ERROR DECODING ENVIRONMENT: #{e}"
exit 1
end
end

plugin_class = StagingPlugin.load_plugin_for(name)
plugin_class.validate_arguments!
plugin_class.new(*ARGV).stage_application
plugin_class.validate_arguments!(*args)
plugin_class.new(*args).stage_application
Binary file modified cloud_controller/vendor/cache/vcap_staging-0.1.0.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/services/api/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HandleUpdateRequest < JsonMessage
end

class ListHandlesResponse < JsonMessage
required :handles, [JsonSchema::WILDCARD]
required :handles, [::JsonSchema::WILDCARD]
end

#
Expand Down
4 changes: 1 addition & 3 deletions stager/Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
source :rubygems

gem 'active_support'
gem 'i18n' # Active support apparently requires this but it isn't in the Gemfile??
gem 'nats'
gem 'nokogiri', '>= 1.4.4'
gem 'rake'
gem 'redis'
gem 'resque'
gem 'yajl-ruby', '>= 0.7.9'

gem 'vcap_common', :path => '../common'
gem 'vcap_logging', '>= 0.1.1'
gem 'vcap_staging'

group :test do
gem 'rspec'
Expand Down
10 changes: 2 additions & 8 deletions stager/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ PATH
GEM
remote: http://rubygems.org/
specs:
active_support (3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
addressable (2.2.6)
crack (0.1.8)
daemons (1.1.4)
diff-lcs (1.1.2)
eventmachine (0.12.10)
i18n (0.6.0)
json (1.5.3)
json_pure (1.5.3)
little-plugger (1.1.2)
Expand All @@ -30,7 +26,6 @@ GEM
daemons (>= 1.1.0)
eventmachine (>= 0.12.10)
json_pure (>= 1.5.1)
nokogiri (1.5.0)
posix-spawn (0.3.6)
rack (1.3.2)
rake (0.9.2)
Expand Down Expand Up @@ -59,6 +54,7 @@ GEM
rack (>= 1.0.0)
tilt (1.3.2)
vcap_logging (0.1.1)
vcap_staging (0.1.0)
vegas (0.1.8)
rack (>= 1.0.0)
webmock (1.6.4)
Expand All @@ -70,16 +66,14 @@ PLATFORMS
ruby

DEPENDENCIES
active_support
i18n
nats
nokogiri (>= 1.4.4)
rake
redis
resque
rspec
sinatra
vcap_common!
vcap_logging (>= 0.1.1)
vcap_staging
webmock
yajl-ruby (>= 0.7.9)
2 changes: 1 addition & 1 deletion stager/bin/run_plugin
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require 'bundler/setup'

$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))

require 'vcap/stager/plugin'
require 'vcap/staging/plugin/common'

unless ARGV.length == 2
puts "Usage: run_staging_plugin [plugin name] [plugin config file]"
Expand Down
1 change: 0 additions & 1 deletion stager/lib/vcap/stager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

require 'vcap/stager/errors'
require 'vcap/stager/config'
require 'vcap/stager/plugin'
require 'vcap/stager/task'
require 'vcap/stager/task_logger'
require 'vcap/stager/task_result'
Expand Down
11 changes: 0 additions & 11 deletions stager/lib/vcap/stager/plugin.rb

This file was deleted.

Loading

0 comments on commit 57a0c66

Please sign in to comment.