rubber 2.6.3 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea9c4664c7c0e3bda464394ec4629938c17d3def
4
- data.tar.gz: 80eb42ae9aa0625382878b683fc4ec6d1f708236
3
+ metadata.gz: 5114eacd77e6f57f82ea071185bba2526ecb1684
4
+ data.tar.gz: 4dc0cb1cabc07928b0ba0c31ada5d585c1194797
5
5
  SHA512:
6
- metadata.gz: 38f7bb115c0a64ead7ba2a959bdd5c79ce92ae2239546fbd287b08a8eaf18d6bbac483e4d6ce720b0e065731bb4892df37ee49254b25bfd13f9b775787358e21
7
- data.tar.gz: 0115c2d6b31efd08592c940265926080231d42d9284efb45e19f57cf09dcf7d8eaa6155f9b222c69c8c47b9e8acc833a1897ca2955cedbacda414784b9f872d9
6
+ metadata.gz: 5986315d8ad24328de8c556f3e2eaf4bccc5b61117b98721a9ef19c9600b4a4c34c1d5420f4d2e3a24639099ba15c99783f9655ef4b7beb7df9076f8e70d4156
7
+ data.tar.gz: 1124e91c5d0fd869bb78de77e1db76a267bde4b570d0dd4b5c66e39996f41a67570fe92448dd54386b23cbfb3728d65cb1f999b560afb51cb6152c369271f753
@@ -13,8 +13,7 @@ rvm:
13
13
  - jruby-18mode
14
14
  - jruby-19mode
15
15
  - jruby-head
16
- - rbx-18mode
17
- - rbx-19mode
16
+ - rbx-2
18
17
 
19
18
  matrix:
20
19
  exclude:
@@ -34,15 +33,11 @@ matrix:
34
33
  gemfile: Gemfile.1.8.7
35
34
  - rvm: jruby-head
36
35
  gemfile: Gemfile.1.8.7
37
- - rvm: rbx-18mode
38
- gemfile: Gemfile
39
- - rvm: rbx-19mode
36
+ - rvm: rbx-2
40
37
  gemfile: Gemfile.1.8.7
41
38
 
42
39
  allow_failures:
43
- - rvm: ruby-head
44
- - rvm: jruby-head
45
- - rvm: rbx-18mode
40
+ - rvm: rbx-2
46
41
 
47
42
  # script: bundle exec rspec spec
48
43
  env:
data/CHANGELOG CHANGED
@@ -1,3 +1,18 @@
1
+ 2.6.4 (12/23/2013)
2
+
3
+ Improvements:
4
+ ============
5
+
6
+ [base] Upgraded ruby-build from 20131122.1 to 20131220.1. <c869c00>
7
+ [base] Upgraded default ruby from 1.9.3-p448 to 1.9.3-p484. <d843c0c>
8
+
9
+ Bug Fixes:
10
+ =========
11
+
12
+ [core] :only => { :primary => true } getting clobbered <a9814c9>
13
+ [core] Clear out potentially cached state upon initialization if initializing Rubber twice in the same runtime. <1d9fe51>
14
+
15
+
1
16
  2.6.3 (11/19/2013)
2
17
 
3
18
  Improvements:
@@ -0,0 +1,26 @@
1
+ # Overrides a method in Capistrano::Configuration::Servers. That method allows for configured default_run_options to
2
+ # override the options defined on the task itself. The problem is it doesn't do a deep merge, so any option that is
3
+ # a hash ends up being completely overwritten rather than being merged itself. What we're doing here does break the
4
+ # defined contract for Capistrano, but should be equivalent in non-deep merge scenarios. We need the deep merge in
5
+ # order to specify both a :platform (as a default_run_option) and :primary (as a task option) hash value for the
6
+ # :only option. NB: For simplicity we're only "deep merging" one level deep, in order to meet our immediate use case.
7
+ #
8
+ # We shouldn't make a habit of patching Capistrano in Rubber. But since Capistrano 2.x is effectively a dead project,
9
+ # getting this fixed upstream is extremely unlikely.
10
+
11
+ module Capistrano
12
+ class Configuration
13
+ def find_servers_for_task(task, options = {})
14
+ find_options = task.options.dup
15
+ options.each do |k, v|
16
+ if find_options[k].is_a?(Hash)
17
+ find_options[k].merge!(v)
18
+ else
19
+ find_options[k] = v
20
+ end
21
+ end
22
+
23
+ find_servers(find_options)
24
+ end
25
+ end
26
+ end
@@ -8,6 +8,9 @@ module Rubber
8
8
  def self.initialize(project_root, project_env)
9
9
  return if defined?(RUBBER_ROOT) && defined?(RUBBER_ENV)
10
10
 
11
+ @config = nil
12
+ @instances = nil
13
+
11
14
  @@root = project_root
12
15
  @@env = project_env
13
16
  Object.const_set('RUBBER_ENV', project_env)
@@ -80,8 +83,8 @@ module Rubber
80
83
 
81
84
  end
82
85
 
83
-
84
86
  require 'rubber/version'
87
+ require 'rubber/platforms'
85
88
  require 'rubber/thread_safe_proxy'
86
89
  require 'rubber/configuration'
87
90
  require 'rubber/environment'
@@ -55,7 +55,7 @@ module Rubber
55
55
  instance[:state] = item.state
56
56
  instance[:zone] = item.availability_zone
57
57
  instance[:provider] = 'aws'
58
- instance[:platform] = item.platform || 'linux'
58
+ instance[:platform] = item.platform || Rubber::Platforms::LINUX
59
59
  instance[:root_device_type] = item.root_device_type
60
60
  instances << instance
61
61
  end
@@ -84,7 +84,7 @@ module Rubber
84
84
  instance[:internal_ip] = item.public_ip_address
85
85
  instance[:region_id] = item.region_id
86
86
  instance[:provider] = 'digital_ocean'
87
- instance[:platform] = 'linux'
87
+ instance[:platform] = Rubber::Platforms::LINUX
88
88
  instances << instance
89
89
  end
90
90
 
@@ -33,7 +33,7 @@ module Rubber
33
33
  instance[:external_ip] = capistrano.rubber.get_env('EXTERNAL_IP', "External IP address for host '#{instance_alias}'", true)
34
34
  instance[:internal_ip] = capistrano.rubber.get_env('INTERNAL_IP', "Internal IP address for host '#{instance_alias}'", true, instance[:external_ip])
35
35
  instance[:provider] = 'generic'
36
- instance[:platform] = 'linux'
36
+ instance[:platform] = Rubber::Platforms::LINUX
37
37
 
38
38
  Generic.add_instance(instance)
39
39
 
@@ -137,7 +137,7 @@ module Rubber
137
137
 
138
138
  instance[:region_id] = item.datacenter
139
139
  instance[:provider] = 'vsphere'
140
- instance[:platform] = 'linux'
140
+ instance[:platform] = Rubber::Platforms::LINUX
141
141
  instances << instance
142
142
  end
143
143
 
@@ -253,19 +253,19 @@ module Rubber
253
253
 
254
254
  def platform
255
255
  # Deal with old instance configurations that don't have a platform value persisted.
256
- @platform || 'linux'
256
+ @platform || Rubber::Platforms::LINUX
257
257
  end
258
258
 
259
259
  def linux?
260
- platform == 'linux'
260
+ platform == Rubber::Platforms::LINUX
261
261
  end
262
262
 
263
263
  def mac?
264
- platform == 'mac'
264
+ platform == Rubber::Platforms::MAC
265
265
  end
266
266
 
267
267
  def windows?
268
- platform == 'windows'
268
+ platform == Rubber::Platforms::WINDOWS
269
269
  end
270
270
  end
271
271
 
@@ -0,0 +1,10 @@
1
+ module Rubber
2
+ module Platforms
3
+ LINUX = 'linux'.freeze
4
+ WINDOWS = 'windows'.freeze
5
+ MAC = 'mac'.freeze
6
+
7
+ ALL = [LINUX, WINDOWS, MAC]
8
+ NON_LINUX = ALL# - [LINUX]
9
+ end
10
+ end
@@ -6,6 +6,7 @@ require 'resolv'
6
6
  require 'enumerator'
7
7
  require 'capistrano/hostcmd'
8
8
  require 'capistrano/thread_safety_fix'
9
+ require 'capistrano/find_servers_for_task_fix'
9
10
  require 'pp'
10
11
  require 'rubber'
11
12
 
@@ -15,9 +16,9 @@ namespace :rubber do
15
16
  alias :original_task :task
16
17
  def task(name, options={}, &block)
17
18
  if options.has_key?(:only)
18
- options[:only][:platform] = 'linux'
19
+ options[:only][:platform] = Rubber::Platforms::LINUX
19
20
  else
20
- options[:only] = { :platform => 'linux' }
21
+ options[:only] = { :platform => Rubber::Platforms::LINUX }
21
22
  end
22
23
 
23
24
  original_task(name, options, &block)
@@ -33,9 +34,9 @@ namespace :rubber do
33
34
  alias :required_task :task
34
35
  def task(name, options={}, &block)
35
36
  if options.has_key?(:only)
36
- options[:only][:platform] = 'linux'
37
+ options[:only][:platform] = Rubber::Platforms::LINUX
37
38
  else
38
- options[:only] = { :platform => 'linux' }
39
+ options[:only] = { :platform => Rubber::Platforms::LINUX }
39
40
  end
40
41
 
41
42
  required_task(name, options) do
@@ -71,9 +72,9 @@ namespace :rubber do
71
72
  default_run_options[:shell] = "/bin/bash -l" if default_run_options[:shell].nil?
72
73
 
73
74
  if default_run_options.has_key?(:only)
74
- default_run_options[:only][:platform] = 'linux'
75
+ default_run_options[:only][:platform] = Rubber::Platforms::LINUX
75
76
  else
76
- default_run_options[:only] = { :platform => 'linux' }
77
+ default_run_options[:only] = { :platform => Rubber::Platforms::LINUX }
77
78
  end
78
79
 
79
80
  set :cloud, Rubber.cloud(self)
@@ -1,3 +1,3 @@
1
1
  module Rubber
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.4"
3
3
  end
@@ -12,12 +12,12 @@ packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, z
12
12
 
13
13
  # REQUIRED: The version of ruby-build to use for building ruby.
14
14
  # It must be one of the versions from https://github.com/sstephenson/ruby-build/blob/master/CHANGELOG.md
15
- ruby_build_version: 20131030
15
+ ruby_build_version: 20131220.1
16
16
 
17
17
  # REQUIRED: Set to the version string for the ruby version you wish to use
18
18
  # Run "ruby-build --definitions" to see the list of possible options or look through the list of
19
19
  # recipes online at https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build
20
- ruby_version: 1.9.3-p448
20
+ ruby_version: 1.9.3-p484
21
21
 
22
22
  # REQUIRED: Installation path for ruby.
23
23
  ruby_path: "/usr/local/rubies/#{ruby_version}"
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.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-19 00:00:00.000000000 Z
12
+ date: 2013-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -204,6 +204,7 @@ files:
204
204
  - Rakefile
205
205
  - TODO
206
206
  - bin/rubber
207
+ - lib/capistrano/find_servers_for_task_fix.rb
207
208
  - lib/capistrano/hostcmd.rb
208
209
  - lib/capistrano/thread_safety_fix.rb
209
210
  - lib/rubber.rb
@@ -234,6 +235,7 @@ files:
234
235
  - lib/rubber/environment.rb
235
236
  - lib/rubber/generator.rb
236
237
  - lib/rubber/instance.rb
238
+ - lib/rubber/platforms.rb
237
239
  - lib/rubber/railtie.rb
238
240
  - lib/rubber/recipes/rubber.rb
239
241
  - lib/rubber/recipes/rubber/bundles.rb