rubber 2.5.3 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01552c1465c4b0aa4ed066f0125ce367b0a00407
4
- data.tar.gz: a7a618e9599de68a09172bad4500a822443b042e
3
+ metadata.gz: 5eee7ca6b10464295c9a962aef561ca84f03579d
4
+ data.tar.gz: 7e592fc7c63e42e11a5d05aa7e031fbca679a46b
5
5
  SHA512:
6
- metadata.gz: 24595ac3976eb6a51785b00e11a3f360223275f83fc8ab4b83aef4b35635af0800070f15a4b95490a144882956bb844ceb3daf95e3de9f7cd3b0ac1df4746be2
7
- data.tar.gz: 4f8d3265b289f7c7a5bcc6aabd3b5a9aadd669788113cffa244219dff6dd087a64d6c3ee7cfed8a2c2538baf105bd2a5734175dd555f0b9c2d581f68a9a8e020
6
+ metadata.gz: 29bb8877ceb4e3542829197561418cd1a07e8d5872ffb94a0a2459bb64c7caea67584dd4cf41d6da380381a250f80da213a38636235f2d0477a70f7f280568b6
7
+ data.tar.gz: fe9a45483916c0c9812a5c28c325d0c119cbb351e135f07dcf5404faa9e4a54e8adc4a857df59dc4847db76ee97151deb9489907aa2a242c91acb8ba4563f565
@@ -1,4 +1,9 @@
1
1
  language: ruby
2
+
3
+ gemfile:
4
+ - Gemfile
5
+ - Gemfile.1.8.7
6
+
2
7
  rvm:
3
8
  - 1.8.7
4
9
  - 1.9.2
@@ -12,13 +17,35 @@ rvm:
12
17
  - rbx-19mode
13
18
 
14
19
  matrix:
15
- allow_failures:
20
+ exclude:
21
+ - rvm: 1.8.7
22
+ gemfile: Gemfile
23
+ - rvm: 1.9.2
24
+ gemfile: Gemfile.1.8.7
25
+ - rvm: 1.9.3
26
+ gemfile: Gemfile.1.8.7
27
+ - rvm: 2.0.0
28
+ gemfile: Gemfile.1.8.7
29
+ - rvm: ruby-head
30
+ gemfile: Gemfile.1.8.7
31
+ - rvm: jruby-18mode
32
+ gemfile: Gemfile
33
+ - rvm: jruby-19mode
34
+ gemfile: Gemfile.1.8.7
35
+ - rvm: jruby-head
36
+ gemfile: Gemfile.1.8.7
16
37
  - rvm: rbx-18mode
38
+ gemfile: Gemfile
17
39
  - rvm: rbx-19mode
40
+ gemfile: Gemfile.1.8.7
41
+
42
+ allow_failures:
43
+ - rvm: ruby-head
18
44
 
19
45
  # script: bundle exec rspec spec
20
46
  env:
21
- - JAVA_OPTS="-server -Djruby.cext.enabled=false -Djruby.compile.invokedynamic=false"
47
+ global:
48
+ - JAVA_OPTS="-server -Djruby.cext.enabled=false -Djruby.compile.invokedynamic=false"
22
49
 
23
50
  notifications:
24
51
  irc: "irc.freenode.net#rubberec2"
data/CHANGELOG CHANGED
@@ -1,3 +1,25 @@
1
+ 2.5.4 (09/26/2013)
2
+
3
+ Improvements:
4
+ ============
5
+
6
+ [base] Upgdate AWS region options <9857010>
7
+ [base] Upgrade ruby-build to 20130923 <5c053cb>
8
+ [core] Far more efficient multi-port IPTables rules <1b13728, e15eb86>
9
+ [core] Handle new platforms, such as Mac, more gracefully <74d5831>
10
+ [redis] Upgraded redis from 2.6.13 to 2.6.16 <b18a89f>
11
+ [web_tools] Handle more redirect scenarios for proxied services <c73bcce>
12
+
13
+ Bug Fixes:
14
+ =========
15
+
16
+ [core] Fixed fail-fast behavior with nohup on AWS operations <cc1e299>
17
+ [core] Wait up until 2 minutes for EC2 tag creation <3b6819a>
18
+ [core] Set AWS region options for S3 <3bd20cd>
19
+ [passenger_nginx] Removed conflicting passenger_min_instances configuration <cd7b006>
20
+ [redis] Fixed redis download link <8a2a47d>
21
+
22
+
1
23
  2.5.3 (07/11/2013)
2
24
 
3
25
  Improvements:
@@ -12,7 +34,7 @@ Bug Fixes:
12
34
  =========
13
35
 
14
36
  [core] Allow the Vagrant plugin to interact with the local ruby installation when RVM is used. <98a061a>
15
- [core] Make sure we note the vagrant provider was used in the instance file. <d1573fe>
37
+ [core] Make sure we note the Vagrant provider was used in the instance file. <d1573fe>
16
38
 
17
39
 
18
40
  2.5.2 (06/13/2013)
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'jruby-openssl', :platforms => :jruby
3
+ gem 'jruby-openssl', :platform => :jruby
4
+ gem 'unlimited-strength-crypto', :platform => :jruby
4
5
 
5
6
  # Specify your gem's dependencies in rubber.gemspec
6
7
  gemspec
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'jruby-openssl', :platform => :jruby
4
+ gem 'unlimited-strength-crypto', :platform => :jruby
5
+ gem 'nokogiri', '~>1.5.0'
6
+
7
+ # Specify your gem's dependencies in rubber.gemspec
8
+ gemspec
@@ -26,6 +26,8 @@ module Rubber
26
26
 
27
27
  compute_credentials[:provider] = 'AWS' # We need to set the provider after the SimpleDB init because it fails if the provider value is specified.
28
28
 
29
+ storage_credentials[:region] = env.region
30
+
29
31
  env['compute_credentials'] = compute_credentials
30
32
  env['storage_credentials'] = storage_credentials
31
33
  super(env, capistrano)
@@ -75,7 +77,7 @@ module Rubber
75
77
  def after_create_instance(instance)
76
78
  # Sometimes tag creation will fail, indicating that the instance doesn't exist yet even though it does. It seems to
77
79
  # be a propagation delay on Amazon's end, so the best we can do is wait and try again.
78
- Rubber::Util.retry_on_failure(StandardError, :retry_sleep => 0.5, :retry_count => 100) do
80
+ Rubber::Util.retry_on_failure(StandardError, :retry_sleep => 1, :retry_count => 120) do
79
81
  Rubber::Tag::update_instance_tags(instance.name)
80
82
  end
81
83
  end
@@ -83,7 +85,7 @@ module Rubber
83
85
  def after_refresh_instance(instance)
84
86
  # Sometimes tag creation will fail, indicating that the instance doesn't exist yet even though it does. It seems to
85
87
  # be a propagation delay on Amazon's end, so the best we can do is wait and try again.
86
- Rubber::Util.retry_on_failure(StandardError, :retry_sleep => 0.5, :retry_count => 100) do
88
+ Rubber::Util.retry_on_failure(StandardError, :retry_sleep => 1, :retry_count => 120) do
87
89
  Rubber::Tag::update_instance_tags(instance.name)
88
90
  end
89
91
  end
@@ -135,14 +137,17 @@ module Rubber
135
137
  export RUBYLIB=/usr/lib/site_ruby/
136
138
  unset RUBYOPT
137
139
  nohup ec2-bundle-vol --batch -d /mnt -k #{ec2_pk_dest} -c #{ec2_cert_dest} -u #{env.account} -p #{image_name} -r #{arch} &> /tmp/ec2-bundle-vol.log &
140
+ bg_pid=$!
138
141
  sleep 1
139
142
 
140
143
  echo "Creating image from instance volume..."
141
- while true; do
142
- if ! ps ax | grep -q "[e]c2-bundle-vol"; then exit; fi
144
+ while kill -0 $bg_pid &> /dev/null; do
143
145
  echo -n .
144
146
  sleep 5
145
147
  done
148
+
149
+ # this returns exit code even if pid has already died, and thus triggers fail fast shell error
150
+ wait $bg_pid
146
151
  CMD
147
152
 
148
153
  capistrano.sudo_script "register_bundle", <<-CMD
@@ -132,9 +132,11 @@ module Rubber
132
132
  source_ips = rule['source_ips']
133
133
 
134
134
  if protocol && from_port && to_port && source_ips
135
- (from_port..to_port).each do |port|
136
- source_ips.each do |source|
137
- script << "\niptables -A INPUT -p #{protocol} --dport #{port} --source #{source} -j ACCEPT -m comment --comment '#{group_name}'"
135
+ source_ips.each do |source|
136
+ if from_port != to_port
137
+ script << "\niptables -A INPUT -p #{protocol} --dport #{from_port}:#{to_port} --source #{source} -j ACCEPT -m comment --comment '#{group_name}'"
138
+ else
139
+ script << "\niptables -A INPUT -p #{protocol} --dport #{to_port} --source #{source} -j ACCEPT -m comment --comment '#{group_name}'"
138
140
  end
139
141
  end
140
142
  end
@@ -19,6 +19,8 @@ module Rubber
19
19
  :aws_secret_access_key => env.cloud_providers.aws.secret_access_key
20
20
  }
21
21
 
22
+ storage_credentials[:region] = env.cloud_providers.aws.region
23
+
22
24
  env['storage_credentials'] = storage_credentials
23
25
  end
24
26
 
@@ -13,6 +13,7 @@ module Rubber
13
13
  :aws_access_key_id => env.cloud_providers.aws.access_key,
14
14
  :aws_secret_access_key => env.cloud_providers.aws.secret_access_key
15
15
  }
16
+ storage_credentials[:region] = env.cloud_providers.aws.region
16
17
 
17
18
  env['storage_credentials'] = storage_credentials
18
19
  end
@@ -256,6 +256,14 @@ module Rubber
256
256
  @platform || 'linux'
257
257
  end
258
258
 
259
+ def linux?
260
+ platform == 'linux'
261
+ end
262
+
263
+ def mac?
264
+ platform == 'mac'
265
+ end
266
+
259
267
  def windows?
260
268
  platform == 'windows'
261
269
  end
@@ -13,7 +13,7 @@ namespace :rubber do
13
13
  # Disable connecting to any Windows instance.
14
14
  alias :original_task :task
15
15
  def task(name, options={}, &block)
16
- original_task(name, options.merge(:except => { :platform => 'windows' }), &block)
16
+ original_task(name, options.merge(:only => { :platform => 'linux' }), &block)
17
17
  end
18
18
 
19
19
  # advise capistrano's task method so that tasks for non-existent roles don't
@@ -26,7 +26,7 @@ namespace :rubber do
26
26
  alias :required_task :task
27
27
  def task(name, options={}, &block)
28
28
  # Disable connecting to any Windows instance.
29
- required_task(name, options.merge(:except => { :platform => 'windows' })) do
29
+ required_task(name, options.merge(:only => { :platform => 'linux' })) do
30
30
  # define empty roles for the case when a task has a role that we don't define anywhere
31
31
  unless options[:roles].respond_to?(:call)
32
32
  [*options[:roles]].each do |r|
@@ -57,7 +57,7 @@ namespace :rubber do
57
57
  # use a pty so we don't get "stdin: is not a tty" error output
58
58
  default_run_options[:pty] = true if default_run_options[:pty].nil?
59
59
  default_run_options[:shell] = "/bin/bash -l" if default_run_options[:shell].nil?
60
- default_run_options[:except] ||= { :platform => 'windows' }
60
+ default_run_options[:only] ||= { :platform => 'linux' }
61
61
 
62
62
  set :cloud, Rubber.cloud(self)
63
63
 
@@ -367,7 +367,7 @@ namespace :rubber do
367
367
  instance_item.root_device_type = instance[:root_device_type]
368
368
  rubber_instances.save()
369
369
 
370
- unless instance_item.windows?
370
+ if instance_item.linux?
371
371
  # weird cap/netssh bug, sometimes just hangs forever on initial connect, so force a timeout
372
372
  begin
373
373
  Timeout::timeout(30) do
@@ -215,14 +215,17 @@ namespace :rubber do
215
215
  # zero out parition for performance (see amazon DevGuide)
216
216
  echo "Zeroing out raid partitions to improve performance, this may take a while"
217
217
  #{zero_script}
218
+ bg_pid=$!
218
219
  sleep 1
219
220
 
220
221
  echo "Waiting for partitions to zero out"
221
- while true; do
222
- if ! ps ax | grep -q "[d]d.*/dev/zero"; then exit; fi
222
+ while kill -0 $bg_pid &> /dev/null; do
223
223
  echo -n .
224
224
  sleep 5
225
225
  done
226
+
227
+ # this returns exit code even if pid has already died, and thus triggers fail fast shell error
228
+ wait $bg_pid
226
229
  ENDSCRIPT
227
230
  end
228
231
  _zero_partitions
@@ -1,3 +1,3 @@
1
1
  module Rubber
2
- VERSION = "2.5.3"
2
+ VERSION = "2.5.4"
3
3
  end
@@ -117,6 +117,6 @@ NameVirtualHost *:<%= rubber_env.web_tools_ssl_port %>
117
117
  </Location>
118
118
 
119
119
  # Fix any redirects occurring on the backend server, since we're communicating with it via HTTP.
120
- Header edit Location ^http://<%= host_and_port %>/ https://<%= host_and_port %>/
120
+ Header edit Location ^https?://([^/]+)/ https://<%= host_and_port %>/
121
121
  </VirtualHost>
122
122
  <% end %>
@@ -41,13 +41,16 @@ namespace :rubber do
41
41
  echo "Compiling and installing ruby $desired_ruby_ver. This may take a while ..."
42
42
 
43
43
  nohup ruby-build #{rubber_env.ruby_version} #{rubber_env.ruby_path} &> /tmp/install_ruby.log &
44
+ bg_pid=$!
44
45
  sleep 1
45
46
 
46
- while true; do
47
- if ! ps ax | grep -q "[r]uby-build"; then break; fi
47
+ while kill -0 $bg_pid &> /dev/null; do
48
48
  echo -n .
49
49
  sleep 5
50
50
  done
51
+
52
+ # this returns exit code even if pid has already died, and thus triggers fail fast shell error
53
+ wait $bg_pid
51
54
 
52
55
  echo "export RUBYOPT=rubygems\nexport PATH=#{rubber_env.ruby_path}/bin:$PATH" > /etc/profile.d/ruby.sh
53
56
  echo "--- \ngem: --no-ri --no-rdoc" > /etc/gemrc
@@ -11,10 +11,12 @@
11
11
  packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, zlib1g-dev, libssl-dev, libreadline6-dev, libxml2-dev, libyaml-dev]
12
12
 
13
13
  # REQUIRED: The version of ruby-build to use for building ruby.
14
- ruby_build_version: 20130628
14
+ # It must be one of the versions from https://github.com/sstephenson/ruby-build/blob/master/CHANGELOG.md
15
+ ruby_build_version: 20130923
15
16
 
16
17
  # REQUIRED: Set to the version string for the ruby version you wish to use
17
- # Run "ruby-build --definitions" to see the list of possible options
18
+ # Run "ruby-build --definitions" to see the list of possible options or look through the list of
19
+ # recipes online at https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build
18
20
  ruby_version: 1.9.3-p448
19
21
 
20
22
  # REQUIRED: Installation path for ruby.
@@ -43,16 +43,19 @@ domain: foo.com
43
43
  cloud_providers:
44
44
  aws:
45
45
  # REQUIRED The AWS region that you want to use.
46
- #
46
+ #
47
47
  # Options include
48
- # us-east-1
49
- # eu-west-1
50
- # ap-northeast-1
51
- # ap-southeast-1
52
- # ap-southeast-2
48
+ # ap-northeast-1 # Asia Pacific (Tokyo) Region
49
+ # ap-southeast-1 # Asia Pacific (Singapore) Region
50
+ # ap-southeast-2 # Asia Pacific (Sydney) Region
51
+ # eu-west-1 # EU (Ireland) Region
52
+ # sa-east-1 # South America (Sao Paulo) Region
53
+ # us-east-1 # US East (Northern Virginia) Region
54
+ # us-west-1 # US West (Northern California) Region
55
+ # us-west-2 # US West (Oregon) Region
53
56
  #
54
57
  region: us-east-1
55
-
58
+
56
59
  # REQUIRED The amazon keys and account ID (digits only, no dashes) used to access the AWS API
57
60
  #
58
61
  access_key: XXX
@@ -129,7 +132,7 @@ cloud_providers:
129
132
  cloud_provider: aws
130
133
 
131
134
  # OPTIONAL: Where to store instance data.
132
- #
135
+ #
133
136
  # Allowed forms are:
134
137
  # filesystem: "file:#{Rubber.root}/config/rubber/instance-#{Rubber.env}.yml"
135
138
  # cloud storage (s3): "storage:#{cloud_providers.aws.backup_bucket}/RubberInstances_#{app_name}/instance-#{Rubber.env}.yml"
@@ -4,7 +4,6 @@
4
4
 
5
5
  server_name <%= [ rubber_env.domain, rubber_env.web_aliases ].flatten.compact.join(" ") %>;
6
6
  passenger_enabled on;
7
- passenger_min_instances 1;
8
7
  passenger_set_cgi_param HTTP_X_QUEUE_START "t=${msec}000";
9
8
 
10
9
  root <%= Rubber.root + "/public" %>;
@@ -6,6 +6,7 @@ passenger_lib: "#{passenger_root}/ext/nginx"
6
6
  passenger_listen_port: 7000
7
7
  passenger_listen_ssl_port: 7001
8
8
  max_app_connections: 20
9
+ nginx_log_dir: /mnt/nginx/logs
9
10
 
10
11
  use_ssl_key: false
11
12
  #if you use an ssl key, put your cert and key
@@ -10,7 +10,7 @@ namespace :rubber do
10
10
  rubber.sudo_script 'install_redis', <<-ENDSCRIPT
11
11
  if ! redis-server --version | grep "#{rubber_env.redis_server_version}" &> /dev/null; then
12
12
  # Fetch the sources.
13
- wget http://redis.googlecode.com/files/redis-#{rubber_env.redis_server_version}.tar.gz
13
+ wget http://download.redis.io/releases/redis-#{rubber_env.redis_server_version}.tar.gz
14
14
  tar -zxf redis-#{rubber_env.redis_server_version}.tar.gz
15
15
 
16
16
  # Build the binaries.
@@ -36,19 +36,19 @@ namespace :rubber do
36
36
  task :bootstrap, :roles => :redis do
37
37
  exists = capture("echo $(ls #{rubber_env.redis_db_dir} 2> /dev/null)")
38
38
  if exists.strip.size == 0
39
-
39
+
40
40
  rubber.sudo_script 'bootstrap_redis', <<-ENDSCRIPT
41
41
  mkdir -p #{rubber_env.redis_db_dir}
42
42
  chown -R redis:redis #{rubber_env.redis_db_dir}
43
43
  ENDSCRIPT
44
-
44
+
45
45
  # After everything installed on machines, we need the source tree
46
46
  # on hosts in order to run rubber:config for bootstrapping the db
47
47
  rubber.update_code_for_bootstrap
48
-
48
+
49
49
  # Gen just the conf for redis.
50
50
  rubber.run_config(:file => "role/redis/", :force => true, :deploy_path => release_path)
51
-
51
+
52
52
  restart
53
53
  end
54
54
  end
@@ -1,4 +1,4 @@
1
- redis_server_version: 2.6.13
1
+ redis_server_version: 2.6.16
2
2
  redis_server_pid_file: /var/run/redis-server.pid
3
3
  redis_server_conf_file: /etc/redis.conf
4
4
  redis_server_log_file: /var/log/redis-server.log
@@ -28,6 +28,23 @@ class AwsTest < Test::Unit::TestCase
28
28
  should "create instance" do
29
29
  assert @cloud.create_instance('', '', '', '', '', '')
30
30
  end
31
+ end
31
32
 
33
+ context "aws with alternative region" do
34
+
35
+ setup do
36
+ @region = "ap-southeast-2"
37
+ env = {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => @region}
38
+ env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
39
+ @cloud = Rubber::Cloud::Aws.new(env, nil)
40
+ end
41
+
42
+ should "set region on compute provider" do
43
+ assert_equal @cloud.compute_provider.region, @region
44
+ end
45
+
46
+ should "set region on storage provider" do
47
+ assert_equal @cloud.storage_provider.region, @region
48
+ end
32
49
  end
33
50
  end
@@ -19,12 +19,12 @@ class DigitalOceanTest < Test::Unit::TestCase
19
19
 
20
20
  context '#create_instance' do
21
21
  should 'create instance' do
22
- assert @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64 Server', '512MB', [], '', 'New York 1')
22
+ assert @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64', '512MB', [], '', 'New York 1')
23
23
  end
24
24
 
25
25
  should 'raise error if invalid region' do
26
26
  begin
27
- @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64 Server', '512MB', [], '', 'Mars 1')
27
+ @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64', '512MB', [], '', 'Mars 1')
28
28
  rescue => e
29
29
  assert_equal 'Invalid region for DigitalOcean: Mars 1', e.message
30
30
  else
@@ -34,7 +34,7 @@ class DigitalOceanTest < Test::Unit::TestCase
34
34
 
35
35
  should 'raise an error if invalid image type' do
36
36
  begin
37
- @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64 Server', 'm1.small', [], '', 'New York 1')
37
+ @cloud.create_instance('my-instance', 'Ubuntu 12.04 x64', 'm1.small', [], '', 'New York 1')
38
38
  rescue => e
39
39
  assert_equal 'Invalid image type for DigitalOcean: m1.small', e.message
40
40
  else
@@ -58,7 +58,7 @@ class DigitalOceanTest < Test::Unit::TestCase
58
58
  env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
59
59
  cloud = Rubber::Cloud::DigitalOcean.new(env, nil)
60
60
 
61
- cloud.create_instance('my-instance', 'Ubuntu 12.04 x64 Server', '512MB', [], '', 'New York 1')
61
+ cloud.create_instance('my-instance', 'Ubuntu 12.04 x64', '512MB', [], '', 'New York 1')
62
62
  rescue => e
63
63
  assert_equal 'Missing key_file for DigitalOcean', e.message
64
64
  else
@@ -67,4 +67,19 @@ class DigitalOceanTest < Test::Unit::TestCase
67
67
  end
68
68
  end
69
69
  end
70
+
71
+ context 'digital ocean with aws storage' do
72
+
73
+ setup do
74
+ env = {'client_key' => "XXX", 'api_key' => "YYY", 'region' => 'New York 1', 'key_file' => "#{File.dirname(__FILE__)}/../fixtures/basic/test.pem"}
75
+ @aws_region = "ap-southeast-2"
76
+ env['cloud_providers'] = {'aws' => {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => @aws_region}}
77
+ env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
78
+ @cloud = Rubber::Cloud::DigitalOcean.new(env, nil)
79
+ end
80
+
81
+ should 'set the region on the aws storage provider' do
82
+ assert_equal @cloud.storage_provider.region, @aws_region
83
+ end
84
+ end
70
85
  end
@@ -0,0 +1,20 @@
1
+ require File.expand_path(File.join(__FILE__, '../..', 'test_helper'))
2
+ require 'rubber/cloud/generic'
3
+ require 'ostruct'
4
+
5
+ class GenericTest < Test::Unit::TestCase
6
+
7
+ context "generic with aws storage with alternative region" do
8
+
9
+ setup do
10
+ @aws_region = "ap-southeast-2"
11
+ env = {'cloud_providers' => {'aws' => {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => @aws_region}}}
12
+ env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
13
+ @cloud = Rubber::Cloud::Generic.new(env, nil)
14
+ end
15
+
16
+ should "set region on storage provider" do
17
+ assert_equal @cloud.storage_provider.region, @aws_region
18
+ end
19
+ end
20
+ end
@@ -3,6 +3,11 @@ require 'rubber/dns/zerigo'
3
3
 
4
4
  class ZerigoTest < Test::Unit::TestCase
5
5
 
6
+ # This entire test is disabled because the Zerigo mocks in fog are utterly broken, currently. The following fix
7
+ # needs to be made upstream before these will run again:
8
+ # https://github.com/fog/fog/commit/6f8c0e61201f1f46d568f8e1ebbc1aa0e2c65d32
9
+
10
+ =begin
6
11
  context "fog zerigo dns" do
7
12
 
8
13
  setup do
@@ -182,5 +187,5 @@ class ZerigoTest < Test::Unit::TestCase
182
187
  end
183
188
 
184
189
  end
185
-
190
+ =end
186
191
  end
@@ -18,8 +18,6 @@ class EncryptionTest < Test::Unit::TestCase
18
18
  end
19
19
 
20
20
  should "encrypt data" do
21
- pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
22
-
23
21
  data = "hello"
24
22
  e = encrypt(data, @key)
25
23
  assert e
@@ -28,8 +26,6 @@ class EncryptionTest < Test::Unit::TestCase
28
26
  end
29
27
 
30
28
  should "decrypt data" do
31
- pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
32
-
33
29
  data = "hello"
34
30
  e = encrypt(data, @key)
35
31
  d = decrypt(e, @key)
@@ -37,16 +33,12 @@ class EncryptionTest < Test::Unit::TestCase
37
33
  end
38
34
 
39
35
  should "pretty print large data" do
40
- pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
41
-
42
36
  data = "foo" * 100
43
37
  e = encrypt(data, @key)
44
38
  assert e =~ /\n/
45
39
  end
46
40
 
47
41
  should "roundtrip large data" do
48
- pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
49
-
50
42
  data = "foo" * 100
51
43
  e = encrypt(data, @key)
52
44
  d = decrypt(e, @key)
@@ -140,8 +140,6 @@ class EnvironmentTest < Test::Unit::TestCase
140
140
  end
141
141
 
142
142
  def test_obfuscated_secret_env
143
- pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
144
-
145
143
  env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
146
144
  e = env.bind()
147
145
  assert_nil e['rubber_secret'], 'env should not have secret set'
@@ -11,6 +11,10 @@ require 'ap'
11
11
  require 'tempfile'
12
12
  require 'fog'
13
13
 
14
+ if defined?(JRUBY_VERSION)
15
+ require 'unlimited-strength-crypto'
16
+ end
17
+
14
18
  class Test::Unit::TestCase
15
19
  # ENV['NO_FOG_MOCK'] = 'true'
16
20
 
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.5.3
4
+ version: 2.5.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-07-11 00:00:00.000000000 Z
12
+ date: 2013-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -198,6 +198,7 @@ files:
198
198
  - .travis.yml
199
199
  - CHANGELOG
200
200
  - Gemfile
201
+ - Gemfile.1.8.7
201
202
  - LICENSE
202
203
  - README.md
203
204
  - Rakefile
@@ -629,6 +630,7 @@ files:
629
630
  - test/cloud/digital_ocean_test.rb
630
631
  - test/cloud/fog_storage_test.rb
631
632
  - test/cloud/fog_test.rb
633
+ - test/cloud/generic_test.rb
632
634
  - test/command_test.rb
633
635
  - test/commands/cron_test.rb
634
636
  - test/commands/util_test.rb
@@ -685,7 +687,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
685
687
  version: '0'
686
688
  requirements: []
687
689
  rubyforge_project: rubber
688
- rubygems_version: 2.0.2
690
+ rubygems_version: 2.0.3
689
691
  signing_key:
690
692
  specification_version: 4
691
693
  summary: A capistrano plugin for managing multi-instance deployments to the cloud