rubber 2.0.0.pre4 → 2.0.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module Rubber
34
34
  end
35
35
 
36
36
  def create_spot_instance_request(spot_price, ami, ami_type, security_groups, availability_zone)
37
- response = @compute_provider.spot_requests.create(:spot_price => spot_price,
37
+ response = @compute_provider.spot_requests.create(:price => spot_price,
38
38
  :image_id => ami,
39
39
  :flavor_id => ami_type,
40
40
  :groups => security_groups,
@@ -1,4 +1,4 @@
1
1
  module Rubber
2
- VERSION = "2.0.0.pre4"
2
+ VERSION = "2.0.0.pre5"
3
3
  end
4
4
 
@@ -36,6 +36,7 @@ set :push_instance_config, Rubber.env != 'production'
36
36
  # Allows the tasks defined to fail gracefully if there are no hosts for them.
37
37
  # Comment out or use "required_task" for default cap behavior of a hard failure
38
38
  rubber.allow_optional_tasks(self)
39
+
39
40
  # Wrap tasks in the deploy namespace that have roles so that we can use FILTER
40
41
  # with something like a deploy:cold which tries to run deploy:migrate but can't
41
42
  # because we filtered out the :db role
@@ -48,6 +49,17 @@ namespace :deploy do
48
49
  end
49
50
  end
50
51
 
52
+ namespace :deploy do
53
+ namespace :assets do
54
+ rubber.allow_optional_tasks(self)
55
+ tasks.values.each do |t|
56
+ if t.options[:roles]
57
+ task t.name, t.options, &t.body
58
+ end
59
+ end
60
+ end
61
+ end
62
+
51
63
  # load in the deploy scripts installed by vulcanize for each rubber module
52
64
  Dir["#{File.dirname(__FILE__)}/rubber/deploy-*.rb"].each do |deploy_file|
53
65
  load deploy_file
@@ -67,7 +67,7 @@ namespace :rubber do
67
67
  fi
68
68
  ENDSCRIPT
69
69
  end
70
-
70
+
71
71
  task :install_graphite_from_repo, :roles => [:graphite_server, :graphite_web] do
72
72
  rubber.sudo_script 'install_graphite_from_repo', <<-ENDSCRIPT
73
73
  if [[ ! -d "/opt/graphite" ]]; then
@@ -14,7 +14,7 @@ web_tools_proxies:
14
14
  role: graphite_web
15
15
  port: "#{graphite_web_port}"
16
16
  path: /
17
-
17
+
18
18
  roles:
19
19
  graphite_web:
20
20
  packages: [python-django python-django-tagging apache2 libapache2-mod-wsgi python-cairo python-memcache memcached sqlite3 bzr zip]
@@ -101,7 +101,7 @@ namespace :rubber do
101
101
  end
102
102
 
103
103
  pairs = {}
104
- [*parents, *children].each {|item| pairs[item.uid] ||= []; pairs[item.uid] << item}
104
+ (parents + children).each {|item| pairs[item.uid] ||= []; pairs[item.uid] << item}
105
105
  stuck_parents = pairs.select{|item| item.size == 1 && item.first.type == :parent}
106
106
  stuck_children = pairs.select{|item| item.size == 1 && item.first.type == :child}
107
107
 
@@ -140,7 +140,7 @@ namespace :rubber do
140
140
  ages = children.group_by do |item|
141
141
  runtime = Time.now.to_i - item.start_time
142
142
  runtime = 0 if item.start_time == 0
143
- [*times, *slow_times].find {|t| runtime < (t * 60)}
143
+ (times + slow_times).find {|t| runtime < (t * 60)}
144
144
  end
145
145
 
146
146
  times.each do |t|
@@ -3,7 +3,7 @@ require 'resque/pool/tasks'
3
3
  # this task will get called before resque:pool:setup
4
4
  # and preload the rails environment in the pool manager
5
5
  task "resque:setup" => :environment do
6
- # generic worker setup, e.g. Hoptoad for failed jobs
6
+ # generic worker setup, e.g. Airbrake for failed jobs
7
7
  end
8
8
 
9
9
  task "resque:pool:setup" do
@@ -14,5 +14,7 @@ task "resque:pool:setup" do
14
14
  Resque::Pool.after_prefork do |job|
15
15
  ActiveRecord::Base.establish_connection
16
16
  Resque.redis = YAML.load_file(Rails.root.join('config', 'resque.yml'))[Rails.env]
17
+
18
+ NewRelic::Agent.after_fork(:force_reconnect => true) if defined?(NewRelic)
17
19
  end
18
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre4
4
+ version: 2.0.0.pre5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-19 00:00:00.000000000 Z
13
+ date: 2012-02-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capistrano
17
- requirement: &27783840 !ruby/object:Gem::Requirement
17
+ requirement: &8846840 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 2.8.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *27783840
25
+ version_requirements: *8846840
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: thor
28
- requirement: &27783420 !ruby/object:Gem::Requirement
28
+ requirement: &8845920 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *27783420
36
+ version_requirements: *8845920
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: clamp
39
- requirement: &27782960 !ruby/object:Gem::Requirement
39
+ requirement: &8844220 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *27782960
47
+ version_requirements: *8844220
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: open4
50
- requirement: &27782540 !ruby/object:Gem::Requirement
50
+ requirement: &8842980 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *27782540
58
+ version_requirements: *8842980
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: fog
61
- requirement: &27782040 !ruby/object:Gem::Requirement
61
+ requirement: &8840680 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.0.0
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *27782040
69
+ version_requirements: *8840680
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake
72
- requirement: &27781620 !ruby/object:Gem::Requirement
72
+ requirement: &8839740 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *27781620
80
+ version_requirements: *8839740
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: test-unit
83
- requirement: &27781160 !ruby/object:Gem::Requirement
83
+ requirement: &13573900 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *27781160
91
+ version_requirements: *13573900
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: shoulda-context
94
- requirement: &27780740 !ruby/object:Gem::Requirement
94
+ requirement: &13573480 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *27780740
102
+ version_requirements: *13573480
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: mocha
105
- requirement: &27780320 !ruby/object:Gem::Requirement
105
+ requirement: &13573060 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *27780320
113
+ version_requirements: *13573060
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: ruby-debug19
116
- requirement: &27779900 !ruby/object:Gem::Requirement
116
+ requirement: &13572640 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,7 +121,7 @@ dependencies:
121
121
  version: '0'
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *27779900
124
+ version_requirements: *13572640
125
125
  description: ! " The rubber plugin enables relatively complex multi-instance deployments
126
126
  of RubyOnRails applications to\n Amazon's Elastic Compute Cloud (EC2). Like
127
127
  capistrano, rubber is role based, so you can define a set\n of configuration
@@ -506,7 +506,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
506
506
  version: '0'
507
507
  segments:
508
508
  - 0
509
- hash: 1903448208957765126
509
+ hash: 509756412491793944
510
510
  required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  none: false
512
512
  requirements: