sml-rubber 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.10
1
+ 0.9.11
@@ -2,31 +2,40 @@
2
2
 
3
3
  env = ENV['RUBBER_ENV'] || ENV['RAILS_ENV'] || 'development'
4
4
  root = '.'
5
- RAILS_ENV = ENV['RAILS_ENV'] = env
6
- RAILS_ROOT = ENV['RAILS_ROOT'] = root
7
5
 
8
- # need a minimal rails environment for generators to run
9
- require 'rubygems'
10
- gem 'rails'
11
- module Rails
12
- class << self
13
- def vendor_rails?
14
- false
6
+ # if in a rails project, then use standard generate, otherwise
7
+ # we need a minimal rails environment for generators to run
8
+ #
9
+ if File.exist?(File.join(root, 'config', 'environment.rb'))
10
+ ARGV.insert(0, 'vulcanize')
11
+ require File.join(root, 'config', 'boot')
12
+ require 'commands/generate'
13
+ else
14
+ RAILS_ENV = ENV['RAILS_ENV'] = env
15
+ RAILS_ROOT = ENV['RAILS_ROOT'] = root
16
+
17
+ require 'rubygems'
18
+ gem 'rails'
19
+ module Rails
20
+ class << self
21
+ def vendor_rails?
22
+ false
23
+ end
15
24
  end
16
25
  end
17
- end
18
26
 
19
- require 'initializer'
20
- class Rails::Initializer
21
- def load_environment; end
22
- end
27
+ require 'initializer'
28
+ class Rails::Initializer
29
+ def load_environment; end
30
+ end
23
31
 
24
- Rails::Initializer.run do |config|
25
- config.frameworks -= [:active_record, :action_controller]
26
- end
32
+ Rails::Initializer.run do |config|
33
+ config.frameworks -= [:active_record, :action_controller]
34
+ end
27
35
 
28
- require 'rails_generator'
29
- require 'rails_generator/scripts/generate'
36
+ require 'rails_generator'
37
+ require 'rails_generator/scripts/generate'
30
38
 
31
- ARGV.shift if ['--help', '-h'].include?(ARGV[0])
32
- Rails::Generator::Scripts::Generate.new.run(['vulcanize'] + ARGV)
39
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
40
+ Rails::Generator::Scripts::Generate.new.run(['vulcanize'] + ARGV)
41
+ end
@@ -135,21 +135,6 @@ auto_security_groups: true
135
135
  # account, or even multiple apps
136
136
  isolate_security_groups: true
137
137
 
138
- # OPTIONAL: Automatically provision and assign instances to a Cloud provided
139
- # load balancer.
140
- load_balancers:
141
- my_lb_name:
142
- listeners:
143
- - protocol: http
144
- port: 80
145
- instance_port: 8080
146
- - protocol: tcp
147
- port: 443
148
- instance_port: 8080
149
- target_roles: [app]
150
-
151
- isolate_load_balancers: true
152
-
153
138
  # OPTIONAL: Set if you want to use Ruby Enterprise Edition instead of the standard ubuntu one
154
139
  use_enterprise_ruby: false
155
140
 
@@ -330,7 +330,7 @@ namespace :rubber do
330
330
  rubber_env.role_dependencies.each do |k, v|
331
331
  rhs = Array(v).collect {|r| Rubber::Configuration::RoleItem.parse(r)}
332
332
  deps[Rubber::Configuration::RoleItem.parse(k)] = rhs
333
- end
333
+ end if rubber_env.role_dependencies
334
334
  return deps
335
335
  end
336
336
 
@@ -1,21 +1,38 @@
1
1
  namespace :rubber do
2
2
 
3
- desc <<-DESC
4
- Sets up the network load balancers
5
- DESC
6
- required_task :setup_load_balancers do
7
- setup_load_balancers()
8
- end
9
-
10
- desc <<-DESC
11
- Describes the network load balancers
12
- DESC
13
- required_task :describe_load_balancers do
14
- lbs = cloud.describe_load_balancers()
15
- pp lbs
16
- end
3
+ #desc <<-DESC
4
+ # Sets up the network load balancers
5
+ #DESC
6
+ #required_task :setup_load_balancers do
7
+ # setup_load_balancers()
8
+ #end
9
+ #
10
+ #desc <<-DESC
11
+ # Describes the network load balancers
12
+ #DESC
13
+ #required_task :describe_load_balancers do
14
+ # lbs = cloud.describe_load_balancers()
15
+ # pp lbs
16
+ #end
17
17
 
18
18
  def setup_load_balancers
19
+ # OPTIONAL: Automatically provision and assign instances to a Cloud provided
20
+ # load balancer.
21
+ #load_balancers:
22
+ # my_lb_name:
23
+ # listeners:
24
+ # - protocol: http
25
+ # port: 80
26
+ # instance_port: 8080
27
+ # - protocol: tcp
28
+ # port: 443
29
+ # instance_port: 8080
30
+ # target_roles: [app]
31
+ #
32
+ #isolate_load_balancers: true
33
+
34
+
35
+
19
36
  # get remote lbs
20
37
  # for each local not in remote, add it
21
38
  # get all zones for all instances for roles, and make sure in lb
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sml-rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-15 00:00:00 -07:00
12
+ date: 2009-09-16 00:00:00 -07:00
13
13
  default_executable: vulcanize
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency