engineyard 2.0.0.pre5.1 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,11 +90,11 @@ module EY
90
90
  end
91
91
 
92
92
  def perform_from_interaction
93
- ui.warn "********************************************************************************"
93
+ ui.warn "**********************************************************************"
94
94
  ui.warn "No default migrate choice for environment: #{env_config.name}"
95
95
  ui.warn "Migrate can be toggled per-deploy using --migrate or --no-migrate."
96
96
  ui.warn "Let's set a default migration choice."
97
- ui.warn "********************************************************************************"
97
+ ui.warn "**********************************************************************"
98
98
  @perform = ui.agree('Migrate every deploy by default? ', true)
99
99
  env_config.migrate = @perform
100
100
  if @perform
@@ -109,6 +109,13 @@ module EY
109
109
  ui.error "Timeout when waiting for input. Maybe this is not a terminal?"
110
110
  ui.error "ey deploy no longer migrates when no default is set in ey.yml."
111
111
  ui.error "Run interactively for step-by-step ey.yml migration setup."
112
+ ui.error ""
113
+ ui.error "Alternatively, you may add ey.yml to your project directly:"
114
+ ui.error "---"
115
+ ui.error "environments:"
116
+ ui.error " #{env_config.name}:"
117
+ ui.error " migrate: true"
118
+ ui.error " migration_command: 'rake db:migrate'"
112
119
  return false
113
120
  end
114
121
 
@@ -1,3 +1,3 @@
1
1
  module EY
2
- VERSION = '2.0.0.pre5.1'
2
+ VERSION = '2.0.0.rc1'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe EY::Repo do
4
- let(:path) { p = Pathname.new(Dir.tmpdir).join('ey-test'); p.mkpath; p }
4
+ let(:path) { p = TMPDIR.join('ey-test'); p.mkpath; p }
5
5
 
6
6
  before(:each) do
7
7
  Dir.chdir(path) { `git init -q` }
@@ -13,7 +13,7 @@ describe "ey web disable" do
13
13
  end
14
14
 
15
15
  def verify_ran(scenario)
16
- @ssh_commands.should have_command_like(/engineyard-serverside.*deploy enable_maintenance_page.*--app #{scenario[:application]}/)
16
+ @ssh_commands.should have_command_like(/engineyard-serverside.*enable_maintenance.*--app #{scenario[:application]}/)
17
17
  end
18
18
 
19
19
  include_examples "it takes an environment name and an app name and an account name"
@@ -13,7 +13,7 @@ describe "ey web enable" do
13
13
  end
14
14
 
15
15
  def verify_ran(scenario)
16
- @ssh_commands.should have_command_like(/engineyard-serverside.*deploy disable_maintenance_page.*--app #{scenario[:application]}/)
16
+ @ssh_commands.should have_command_like(/engineyard-serverside.*disable_maintenance.*--app #{scenario[:application]}/)
17
17
  end
18
18
 
19
19
  include_examples "it takes an environment name and an app name and an account name"
data/spec/spec_helper.rb CHANGED
@@ -35,6 +35,8 @@ Dir[File.join(EY_ROOT,'/spec/support/*.rb')].each do |helper|
35
35
  require helper
36
36
  end
37
37
 
38
+ TMPDIR = Pathname.new(__FILE__).dirname.parent.join('tmp')
39
+
38
40
  RSpec.configure do |config|
39
41
  config.treat_symbols_as_metadata_keys_with_true_values = true
40
42
  config.run_all_when_everything_filtered = true
@@ -47,6 +49,15 @@ RSpec.configure do |config|
47
49
  config.extend SpecHelpers::Given
48
50
  config.extend SpecHelpers::Fixtures
49
51
 
52
+ def clean_tmpdir
53
+ TMPDIR.rmtree if TMPDIR.exist?
54
+ end
55
+
56
+ # Cleaning the tmpdir has to happen outside of the test cycle because git repos
57
+ # last longer than the before/after :all test block in order to speed up specs.
58
+ config.before(:suite) { clean_tmpdir }
59
+ config.after(:suite) { clean_tmpdir }
60
+
50
61
  def clean_eyrc
51
62
  ENV['EYRC'] = File.join('/tmp','eyrc')
52
63
  if ENV['EYRC'] && File.exist?(ENV['EYRC'])
@@ -64,6 +75,11 @@ RSpec.configure do |config|
64
75
  config.before(:each) do
65
76
  EY::CloudClient.default_endpoint!
66
77
  end
78
+
79
+ config.after(:all) do
80
+ clean_eyrc
81
+ end
82
+
67
83
  end
68
84
 
69
85
  EY.define_git_repo("default") do |git_dir|
@@ -12,8 +12,8 @@ module EY
12
12
  return git_repo_dir_cache[name] if git_repo_dir_cache.has_key?(name)
13
13
  raise ArgumentError, "No definition for git repo #{name}" unless git_repo_setup[name]
14
14
 
15
- git_dir = Pathname.new("/tmp/engineyard_test_repo_#{Time.now.tv_sec}_#{Time.now.tv_usec}_#{$$}")
16
- git_dir.mkdir
15
+ git_dir = TMPDIR.join("engineyard_test_repo_#{Time.now.tv_sec}_#{Time.now.tv_usec}_#{$$}")
16
+ git_dir.mkpath
17
17
  Dir.chdir(git_dir) do
18
18
  system("git init -q")
19
19
  system('git config user.email ey@spec.test')
@@ -155,16 +155,16 @@ module SpecHelpers
155
155
  end
156
156
 
157
157
  if path_prepends
158
- tempdir = File.join(Dir.tmpdir, "ey_test_cmds_#{Time.now.tv_sec}#{Time.now.tv_usec}_#{$$}")
159
- Dir.mkdir(tempdir)
158
+ tempdir = TMPDIR.join("ey_test_cmds_#{Time.now.tv_sec}#{Time.now.tv_usec}_#{$$}")
159
+ tempdir.mkpath
160
160
  path_prepends.each do |name, contents|
161
- File.open(File.join(tempdir, name), 'w') do |f|
161
+ tempdir.join(name).open('w') do |f|
162
162
  f.write(contents)
163
163
  f.chmod(0755)
164
164
  end
165
165
  end
166
166
 
167
- ey_env['PATH'] = tempdir + ':' + ENV['PATH']
167
+ ey_env['PATH'] = "#{tempdir}:#{ENV['PATH']}"
168
168
  end
169
169
 
170
170
  eybin = File.expand_path('../bundled_ey', __FILE__)
@@ -254,7 +254,7 @@ shared_examples_for "it invokes engineyard-serverside" do
254
254
  end
255
255
 
256
256
  it "passes --verbose to engineyard-serverside" do
257
- @ssh_commands.should have_command_like(/engineyard-serverside.*deploy.*--verbose/)
257
+ @ssh_commands.should have_command_like(/engineyard-serverside.*--verbose/)
258
258
  end
259
259
 
260
260
  it "passes along instance information to engineyard-serverside" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre5.1
4
+ version: 2.0.0.rc1
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-14 00:00:00.000000000 Z
12
+ date: 2012-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 2.0.0.pre5
101
+ version: 2.0.0.rc1
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 2.0.0.pre5
109
+ version: 2.0.0.rc1
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: engineyard-cloud-client
112
112
  requirement: !ruby/object:Gem::Requirement