engineyard 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/engineyard.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module EY
2
2
  require 'engineyard/ruby_ext'
3
3
  require 'engineyard/version'
4
+ require 'engineyard/serverside_version'
4
5
 
5
6
  autoload :API, 'engineyard/api'
6
7
  autoload :Collection, 'engineyard/collection'
@@ -43,7 +43,7 @@ module EY
43
43
 
44
44
  def self.request(path, opts={})
45
45
  require 'rest_client'
46
- require 'json'
46
+ require 'json/pure'
47
47
 
48
48
  url = EY.config.endpoint + "api/v2#{path}"
49
49
  method = ((meth = opts.delete(:method)) && meth.to_s || "get").downcase.to_sym
@@ -43,7 +43,7 @@ module EY
43
43
  # true means migrate w/custom command (if present) or default
44
44
  # a string means migrate with this specific command
45
45
 
46
- default_migration_command = config['migration_command'] || 'rake db:migrate'
46
+ default_migration_command = config['migration_command'] || 'rake db:migrate --trace'
47
47
 
48
48
  migration_from_config = if config.has_key?('migrate')
49
49
  if config['migrate']
@@ -3,7 +3,6 @@ require 'escape'
3
3
  module EY
4
4
  module Model
5
5
  class Instance < ApiStruct.new(:id, :role, :name, :status, :amazon_id, :public_hostname, :environment)
6
- ENGINEYARD_SERVERSIDE_VERSION = ENV["ENGINEYARD_SERVERSIDE_VERSION"] || "1.2.0"
7
6
  EXIT_STATUS = Hash.new { |h,k| raise EY::Error, "engineyard-serverside version checker exited with unknown status code #{k}" }
8
7
  EXIT_STATUS.merge!({
9
8
  255 => :ssh_failed,
@@ -0,0 +1,3 @@
1
+ module EY
2
+ ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '1.2.1'
3
+ end
@@ -1,3 +1,3 @@
1
1
  module EY
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -89,7 +89,7 @@ describe "ey deploy" do
89
89
  it "defaults to 'rake db:migrate'" do
90
90
  ey "deploy"
91
91
  @ssh_commands.last.should =~ /engineyard-serverside.*deploy/
92
- @ssh_commands.last.should =~ /--migrate 'rake db:migrate'/
92
+ @ssh_commands.last.should =~ /--migrate 'rake db:migrate --trace'/
93
93
  end
94
94
 
95
95
  it "can be disabled with --no-migrate" do
@@ -100,7 +100,7 @@ describe "ey deploy" do
100
100
 
101
101
  it "uses the default when --migrate is specified with no value" do
102
102
  ey "deploy --migrate"
103
- @ssh_commands.last.should match(/--migrate 'rake db:migrate'/)
103
+ @ssh_commands.last.should match(/--migrate 'rake db:migrate --trace'/)
104
104
  end
105
105
 
106
106
  context "customized in ey.yml" do
@@ -132,7 +132,7 @@ describe "ey deploy" do
132
132
 
133
133
  it "migrates with the default when --migrate is specified with no value" do
134
134
  ey "deploy --migrate"
135
- @ssh_commands.last.should match(/--migrate 'rake db:migrate'/)
135
+ @ssh_commands.last.should match(/--migrate 'rake db:migrate --trace'/)
136
136
  end
137
137
  end
138
138
 
@@ -142,7 +142,7 @@ describe "ey deploy" do
142
142
 
143
143
  it "migrates with the default" do
144
144
  ey "deploy"
145
- @ssh_commands.last.should match(/--migrate 'rake db:migrate'/)
145
+ @ssh_commands.last.should match(/--migrate 'rake db:migrate --trace'/)
146
146
  end
147
147
  end
148
148
 
@@ -187,7 +187,7 @@ shared_examples_for "it invokes engineyard-serverside" do
187
187
  it "does not try to install engineyard-serverside if it's already there" do
188
188
  run_ey({:env => 'giblets'}, {:prepend_to_path => {'ssh' => exiting_ssh(0)}})
189
189
  @ssh_commands.should_not have_command_like(/gem install engineyard-serverside/)
190
- ver = Regexp.quote(EY::Model::Instance::ENGINEYARD_SERVERSIDE_VERSION)
190
+ ver = Regexp.quote(EY::ENGINEYARD_SERVERSIDE_VERSION)
191
191
  @ssh_commands.should have_command_like(/engineyard-serverside _#{ver}_ deploy/)
192
192
  end
193
193
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 2
8
- - 0
9
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - EY Cloud Team
@@ -14,90 +15,100 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-08-16 00:00:00 -07:00
18
+ date: 2010-08-25 00:00:00 -07:00
18
19
  default_executable: ey
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
22
+ prerelease: false
21
23
  version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ none: false
22
25
  requirements:
23
- - - ">="
26
+ - - ~>
24
27
  - !ruby/object:Gem::Version
28
+ hash: 7
25
29
  segments:
26
- - 0
27
- version: "0"
30
+ - 1
31
+ - 5
32
+ - 2
33
+ version: 1.5.2
28
34
  requirement: *id001
29
- prerelease: false
30
- name: termios
31
35
  type: :runtime
36
+ name: highline
32
37
  - !ruby/object:Gem::Dependency
38
+ prerelease: false
33
39
  version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ none: false
34
41
  requirements:
35
42
  - - ~>
36
43
  - !ruby/object:Gem::Version
44
+ hash: 39
37
45
  segments:
38
- - 1
39
- - 5
40
- - 2
41
- version: 1.5.2
46
+ - 0
47
+ - 14
48
+ - 0
49
+ version: 0.14.0
42
50
  requirement: *id002
43
- prerelease: false
44
- name: highline
45
51
  type: :runtime
52
+ name: thor
46
53
  - !ruby/object:Gem::Dependency
54
+ prerelease: false
47
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ none: false
48
57
  requirements:
49
- - - ~>
58
+ - - ">="
50
59
  - !ruby/object:Gem::Version
60
+ hash: 3
51
61
  segments:
52
62
  - 0
53
- - 14
54
- - 0
55
- version: 0.14.0
63
+ version: "0"
56
64
  requirement: *id003
57
- prerelease: false
58
- name: thor
59
65
  type: :runtime
66
+ name: ruby-termios
60
67
  - !ruby/object:Gem::Dependency
68
+ prerelease: false
61
69
  version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ none: false
62
71
  requirements:
63
72
  - - ~>
64
73
  - !ruby/object:Gem::Version
74
+ hash: 23
65
75
  segments:
66
76
  - 0
67
77
  - 0
68
78
  - 4
69
79
  version: 0.0.4
70
80
  requirement: *id004
71
- prerelease: false
72
- name: escape
73
81
  type: :runtime
82
+ name: escape
74
83
  - !ruby/object:Gem::Dependency
84
+ prerelease: false
75
85
  version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
76
87
  requirements:
77
88
  - - ~>
78
89
  - !ruby/object:Gem::Version
90
+ hash: 7
79
91
  segments:
80
92
  - 1
81
93
  - 4
82
- - 0
83
- version: 1.4.0
94
+ version: "1.4"
84
95
  requirement: *id005
85
- prerelease: false
86
- name: json
87
96
  type: :runtime
97
+ name: rest-client
88
98
  - !ruby/object:Gem::Dependency
99
+ prerelease: false
89
100
  version_requirements: &id006 !ruby/object:Gem::Requirement
101
+ none: false
90
102
  requirements:
91
- - - ~>
103
+ - - ">="
92
104
  - !ruby/object:Gem::Version
105
+ hash: 3
93
106
  segments:
94
- - 1
95
- - 4
96
- version: "1.4"
107
+ - 0
108
+ version: "0"
97
109
  requirement: *id006
98
- prerelease: false
99
- name: rest-client
100
110
  type: :runtime
111
+ name: json_pure
101
112
  description: This gem allows you to deploy your rails application to the Engine Yard cloud directly from the command line.
102
113
  email: cloud@engineyard.com
103
114
  executables:
@@ -120,7 +131,6 @@ files:
120
131
  - lib/engineyard/collection.rb
121
132
  - lib/engineyard/config.rb
122
133
  - lib/engineyard/error.rb
123
- - lib/engineyard/model/#app.rb#
124
134
  - lib/engineyard/model/api_struct.rb
125
135
  - lib/engineyard/model/app.rb
126
136
  - lib/engineyard/model/environment.rb
@@ -129,13 +139,44 @@ files:
129
139
  - lib/engineyard/model.rb
130
140
  - lib/engineyard/repo.rb
131
141
  - lib/engineyard/ruby_ext.rb
142
+ - lib/engineyard/serverside_version.rb
132
143
  - lib/engineyard/thor.rb
133
144
  - lib/engineyard/version.rb
134
145
  - lib/engineyard.rb
135
146
  - LICENSE
136
147
  - README.rdoc
148
+ - spec/engineyard/api_spec.rb
149
+ - spec/engineyard/cli/api_spec.rb
150
+ - spec/engineyard/cli_spec.rb
151
+ - spec/engineyard/collection/apps_spec.rb
152
+ - spec/engineyard/collection/environments_spec.rb
153
+ - spec/engineyard/config_spec.rb
154
+ - spec/engineyard/model/api_struct_spec.rb
155
+ - spec/engineyard/model/environment_spec.rb
156
+ - spec/engineyard/model/instance_spec.rb
157
+ - spec/engineyard/repo_spec.rb
158
+ - spec/engineyard_spec.rb
159
+ - spec/ey/deploy_spec.rb
160
+ - spec/ey/ey_spec.rb
161
+ - spec/ey/list_environments_spec.rb
162
+ - spec/ey/logs_spec.rb
163
+ - spec/ey/rebuild_spec.rb
164
+ - spec/ey/recipes/apply_spec.rb
165
+ - spec/ey/recipes/download_spec.rb
166
+ - spec/ey/recipes/upload_spec.rb
167
+ - spec/ey/rollback_spec.rb
168
+ - spec/ey/ssh_spec.rb
169
+ - spec/ey/web/disable_spec.rb
170
+ - spec/ey/web/enable_spec.rb
171
+ - spec/spec_helper.rb
172
+ - spec/support/bundled_ey
173
+ - spec/support/fake_awsm.ru
174
+ - spec/support/git_repo.rb
175
+ - spec/support/helpers.rb
176
+ - spec/support/ruby_ext.rb
177
+ - spec/support/shared_behavior.rb
137
178
  has_rdoc: true
138
- homepage: http://engineyard.com
179
+ homepage: http://github.com/engineyard/engineyard
139
180
  licenses: []
140
181
 
141
182
  post_install_message:
@@ -144,23 +185,27 @@ rdoc_options: []
144
185
  require_paths:
145
186
  - lib
146
187
  required_ruby_version: !ruby/object:Gem::Requirement
188
+ none: false
147
189
  requirements:
148
190
  - - ">="
149
191
  - !ruby/object:Gem::Version
192
+ hash: 3
150
193
  segments:
151
194
  - 0
152
195
  version: "0"
153
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
+ none: false
154
198
  requirements:
155
199
  - - ">="
156
200
  - !ruby/object:Gem::Version
201
+ hash: 3
157
202
  segments:
158
203
  - 0
159
204
  version: "0"
160
205
  requirements: []
161
206
 
162
207
  rubyforge_project:
163
- rubygems_version: 1.3.6
208
+ rubygems_version: 1.3.7
164
209
  signing_key:
165
210
  specification_version: 3
166
211
  summary: Command-line deployment for the Engine Yard cloud
@@ -1,23 +0,0 @@
1
- bmodule EY
2
- module Model
3
- class App < ApiStruct.new(:name, :repository_uri, :environments, :api)
4
-
5
- def self.from_hash(hash)
6
- super.tap do |app|
7
- app.environments = Environment.from_array(app.environments, :api => app.api)
8
- end
9
- end
10
-
11
- def sole_environment
12
- if environments.size == 1
13
- environments.first
14
- end
15
- end
16
-
17
- def sole_environment!
18
- sole_environment or raise NoSingleEnvironmentError.new(self)
19
- end
20
-
21
- end
22
- end
23
- end