engineyard-cloud-client 0.1.4 → 1.0.0
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.
- data/lib/engineyard-cloud-client.rb +0 -1
- data/lib/engineyard-cloud-client/models/app_environment.rb +1 -6
- data/lib/engineyard-cloud-client/models/deployment.rb +1 -0
- data/lib/engineyard-cloud-client/models/environment.rb +17 -35
- data/lib/engineyard-cloud-client/test/fake_awsm/config.ru +20 -19
- data/lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb +42 -0
- data/lib/engineyard-cloud-client/test/fake_awsm/views/base_app.rabl +4 -0
- data/lib/engineyard-cloud-client/test/fake_awsm/views/deployment.rabl +2 -0
- data/lib/engineyard-cloud-client/test/fake_awsm/views/environments.rabl +3 -4
- data/lib/engineyard-cloud-client/version.rb +1 -1
- data/spec/engineyard-cloud-client/integration/app_environment_spec.rb +17 -1
- data/spec/engineyard-cloud-client/integration/app_spec.rb +6 -0
- data/spec/engineyard-cloud-client/integration/deployment_spec.rb +47 -0
- data/spec/engineyard-cloud-client/integration/environment_spec.rb +71 -6
- data/spec/support/fixture_recipes.tgz +0 -0
- metadata +11 -22
- data/lib/engineyard-cloud-client/ruby_ext.rb +0 -9
- data/lib/engineyard-cloud-client/test/fake_awsm/models/deployments.rb +0 -15
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'launchy'
|
2
1
|
require 'engineyard-cloud-client/models'
|
3
2
|
require 'engineyard-cloud-client/errors'
|
4
3
|
|
@@ -64,7 +63,7 @@ module EY
|
|
64
63
|
app.repository_uri
|
65
64
|
end
|
66
65
|
|
67
|
-
def
|
66
|
+
def hierarchy_name
|
68
67
|
[account_name, app_name, environment_name].join('/')
|
69
68
|
end
|
70
69
|
|
@@ -76,10 +75,6 @@ module EY
|
|
76
75
|
Deployment.from_hash(api, attrs.merge(:app_environment => self))
|
77
76
|
end
|
78
77
|
|
79
|
-
def short_environment_name
|
80
|
-
environment.name.gsub(/^#{Regexp.quote(app.name)}_/, '')
|
81
|
-
end
|
82
|
-
|
83
78
|
end
|
84
79
|
end
|
85
80
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'engineyard-cloud-client/models'
|
2
2
|
require 'engineyard-cloud-client/errors'
|
3
|
+
require 'tempfile'
|
3
4
|
|
4
5
|
module EY
|
5
6
|
class CloudClient
|
@@ -137,30 +138,24 @@ module EY
|
|
137
138
|
bridge
|
138
139
|
end
|
139
140
|
|
140
|
-
def
|
141
|
+
def update
|
141
142
|
api.request("/environments/#{id}/update_instances", :method => :put)
|
143
|
+
true # raises on failure
|
142
144
|
end
|
145
|
+
alias rebuild update
|
143
146
|
|
144
147
|
def run_custom_recipes
|
145
148
|
api.request("/environments/#{id}/run_custom_recipes", :method => :put)
|
149
|
+
true
|
146
150
|
end
|
147
151
|
|
148
152
|
def download_recipes
|
149
|
-
if File.exist?('cookbooks')
|
150
|
-
raise EY::CloudClient::Error, "Could not download, cookbooks already exists"
|
151
|
-
end
|
152
|
-
|
153
|
-
require 'tempfile'
|
154
153
|
tmp = Tempfile.new("recipes")
|
155
|
-
|
154
|
+
data = api.request("/environments/#{id}/recipes")
|
155
|
+
tmp.write(data)
|
156
156
|
tmp.flush
|
157
157
|
tmp.close
|
158
|
-
|
159
|
-
cmd = "tar xzf '#{tmp.path}' cookbooks"
|
160
|
-
|
161
|
-
unless system(cmd)
|
162
|
-
raise EY::CloudClient::Error, "Could not unarchive recipes.\nCommand `#{cmd}` exited with an error."
|
163
|
-
end
|
158
|
+
tmp
|
164
159
|
end
|
165
160
|
|
166
161
|
def upload_recipes_at_path(recipes_path)
|
@@ -172,27 +167,14 @@ module EY
|
|
172
167
|
end
|
173
168
|
end
|
174
169
|
|
175
|
-
|
176
|
-
|
177
|
-
unless File.exist?("cookbooks")
|
178
|
-
raise EY::CloudClient::Error, "Could not find chef recipes. Please run from the root of your recipes repo."
|
179
|
-
end
|
180
|
-
|
181
|
-
recipes_file = Tempfile.new("recipes")
|
182
|
-
cmd = "tar czf '#{recipes_file.path}' cookbooks/"
|
183
|
-
|
184
|
-
unless system(cmd)
|
185
|
-
raise EY::CloudClient::Error, "Could not archive recipes.\nCommand `#{cmd}` exited with an error."
|
186
|
-
end
|
187
|
-
|
188
|
-
upload_recipes(recipes_file)
|
189
|
-
end
|
190
|
-
|
170
|
+
# Expects a File object opened for binary reading.
|
171
|
+
# i.e. File.open(path, 'rb')
|
191
172
|
def upload_recipes(file_to_upload)
|
192
173
|
api.request("/environments/#{id}/recipes", {
|
193
174
|
:method => :post,
|
194
175
|
:params => {:file => file_to_upload}
|
195
176
|
})
|
177
|
+
true
|
196
178
|
end
|
197
179
|
|
198
180
|
def shorten_name_for(app)
|
@@ -202,18 +184,18 @@ module EY
|
|
202
184
|
private
|
203
185
|
|
204
186
|
def request_instances
|
205
|
-
|
206
|
-
|
187
|
+
if instances_count > 0
|
188
|
+
instances_attrs = api.request("/environments/#{id}/instances")["instances"]
|
189
|
+
load_instances(instances_attrs)
|
190
|
+
else
|
191
|
+
[]
|
192
|
+
end
|
207
193
|
end
|
208
194
|
|
209
195
|
def load_instances(instances_attrs)
|
210
196
|
Instance.from_array(api, instances_attrs, 'environment' => self)
|
211
197
|
end
|
212
198
|
|
213
|
-
def no_migrate?(deploy_options)
|
214
|
-
deploy_options.key?('migrate') && deploy_options['migrate'] == false
|
215
|
-
end
|
216
|
-
|
217
199
|
# attrs["cluster_configuration"]["cluster"] can be 'single', 'cluster', or 'custom'
|
218
200
|
# attrs["cluster_configuration"]["ip"] can be
|
219
201
|
# * 'host' (amazon public hostname)
|
@@ -34,6 +34,13 @@ class FakeAwsm < Sinatra::Base
|
|
34
34
|
end
|
35
35
|
|
36
36
|
before do
|
37
|
+
if env['PATH_INFO'] =~ %r#/api/v2#
|
38
|
+
user_agent = env['HTTP_USER_AGENT']
|
39
|
+
unless user_agent =~ %r#^EngineYardCloudClient/\d#
|
40
|
+
$stderr.puts 'No user agent header, expected EngineYardCloudClient/'
|
41
|
+
halt 400, 'No user agent header, expected EngineYardCloudClient/'
|
42
|
+
end
|
43
|
+
end
|
37
44
|
content_type "application/json"
|
38
45
|
token = request.env['HTTP_X_EY_CLOUD_TOKEN']
|
39
46
|
if token
|
@@ -85,7 +92,6 @@ class FakeAwsm < Sinatra::Base
|
|
85
92
|
end
|
86
93
|
|
87
94
|
get "/api/v2/apps" do
|
88
|
-
raise('No user agent header') unless env['HTTP_USER_AGENT'] =~ %r#^EngineYardCloudClient/#
|
89
95
|
@apps = @user.accounts.apps
|
90
96
|
render :rabl, :apps, :format => "json"
|
91
97
|
end
|
@@ -115,7 +121,7 @@ class FakeAwsm < Sinatra::Base
|
|
115
121
|
{
|
116
122
|
"logs" => [
|
117
123
|
{
|
118
|
-
"id" =>
|
124
|
+
"id" => 'i-12345678',
|
119
125
|
"role" => "app_master",
|
120
126
|
"main" => "MAIN LOG OUTPUT",
|
121
127
|
"custom" => "CUSTOM LOG OUTPUT"
|
@@ -168,28 +174,23 @@ class FakeAwsm < Sinatra::Base
|
|
168
174
|
""
|
169
175
|
end
|
170
176
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
"ref" => "HEAD",
|
176
|
-
"resolved_ref" => "HEAD",
|
177
|
-
"commit" => 'a'*40,
|
178
|
-
"user_name" => "User Name",
|
179
|
-
"migrate_command" => "rake db:migrate --trace",
|
180
|
-
"created_at" => Time.now.utc - 3600,
|
181
|
-
"finished_at" => Time.now.utc - 3400,
|
182
|
-
"successful" => true,
|
183
|
-
}
|
184
|
-
}.to_json
|
177
|
+
post "/api/v2/apps/:app_id/environments/:environment_id/deployments" do
|
178
|
+
app_env = @user.accounts.apps.get(params[:app_id]).app_environments.first(:environment_id => params[:environment_id])
|
179
|
+
@deployment = app_env.deployments.create(params[:deployment])
|
180
|
+
render :rabl, :deployment, :format => "json"
|
185
181
|
end
|
186
182
|
|
187
|
-
|
188
|
-
|
183
|
+
get "/api/v2/apps/:app_id/environments/:environment_id/deployments/last" do
|
184
|
+
app_env = @user.accounts.apps.get(params[:app_id]).app_environments.first(:environment_id => params[:environment_id])
|
185
|
+
@deployment = app_env.deployments.last
|
186
|
+
render :rabl, :deployment, :format => "json"
|
189
187
|
end
|
190
188
|
|
191
189
|
put "/api/v2/apps/:app_id/environments/:environment_id/deployments/:deployment_id/finished" do
|
192
|
-
|
190
|
+
app_env = @user.accounts.apps.get(params[:app_id]).app_environments.first(:environment_id => params[:environment_id])
|
191
|
+
@deployment = app_env.deployments.get(params[:deployment_id])
|
192
|
+
@deployment.finished!(params[:deployment])
|
193
|
+
render :rabl, :deployment, :format => "json"
|
193
194
|
end
|
194
195
|
|
195
196
|
post "/api/v2/authenticate" do
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'dm-core'
|
2
|
+
|
3
|
+
class Deployment
|
4
|
+
include DataMapper::Resource
|
5
|
+
|
6
|
+
property :id, Serial
|
7
|
+
property :created_at, DateTime
|
8
|
+
property :finished_at, DateTime
|
9
|
+
property :commit, String, :default => 'abcdef1234'*4
|
10
|
+
property :migrate, String
|
11
|
+
property :migrate_command, String
|
12
|
+
property :ref, String
|
13
|
+
property :successful, Boolean
|
14
|
+
property :output, Text
|
15
|
+
|
16
|
+
belongs_to :app_environment
|
17
|
+
|
18
|
+
def inspect
|
19
|
+
"#<Deployment app_environment:#{app_environment.inspect}>"
|
20
|
+
end
|
21
|
+
|
22
|
+
def user_name
|
23
|
+
app_environment.app.account.user.name
|
24
|
+
end
|
25
|
+
|
26
|
+
# normally a property, but we don't have the code to find this so just pretend
|
27
|
+
def resolved_ref
|
28
|
+
"resolved-#{ref}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def finished?
|
32
|
+
finished_at != nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def finished!(attrs)
|
36
|
+
return true if finished?
|
37
|
+
attrs = attrs.dup
|
38
|
+
attrs['finished_at'] ||= Time.now
|
39
|
+
update(attrs)
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -3,9 +3,8 @@ attributes :id, :ssh_username, :name, :instances_count, :app_server_stack_name,
|
|
3
3
|
child :account do
|
4
4
|
attributes :id, :name
|
5
5
|
end
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
attributes :id, :name
|
6
|
+
node :apps do |m|
|
7
|
+
m.apps.map do |app|
|
8
|
+
partial('base_app', :object => app, :root => nil)
|
10
9
|
end
|
11
10
|
end
|
@@ -9,7 +9,7 @@ describe EY::CloudClient::AppEnvironment do
|
|
9
9
|
describe ".resolve" do
|
10
10
|
it "finds an environment" do
|
11
11
|
api = scenario_cloud_client "Multiple Ambiguous Accounts"
|
12
|
-
result =
|
12
|
+
result = api.resolve_app_environments('app_name' => 'rails232app', 'environment_name' => 'giblets', 'account_name' => 'main')
|
13
13
|
result.should be_one_match
|
14
14
|
end
|
15
15
|
|
@@ -35,4 +35,20 @@ describe EY::CloudClient::AppEnvironment do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
describe "model" do
|
39
|
+
before do
|
40
|
+
api = scenario_cloud_client "Multiple Ambiguous Accounts"
|
41
|
+
result = EY::CloudClient::AppEnvironment.resolve(api, 'app_name' => 'rails232app', 'environment_name' => 'giblets', 'account_name' => 'main')
|
42
|
+
result.should be_one_match
|
43
|
+
@app_env = result.matches.first
|
44
|
+
end
|
45
|
+
|
46
|
+
it "supplies methods to easily access names and attributes" do
|
47
|
+
@app_env.account_name.should == 'main'
|
48
|
+
@app_env.app_name.should == 'rails232app'
|
49
|
+
@app_env.environment_name.should == 'giblets'
|
50
|
+
@app_env.hierarchy_name.should == 'main/rails232app/giblets'
|
51
|
+
@app_env.repository_uri.should == 'user@git.host:path/to/repo.git'
|
52
|
+
end
|
53
|
+
end
|
38
54
|
end
|
@@ -12,6 +12,12 @@ describe EY::CloudClient::App do
|
|
12
12
|
apps = EY::CloudClient::App.all(api)
|
13
13
|
apps.size.should == 1
|
14
14
|
app = apps.first
|
15
|
+
app.name.should == 'rails232app'
|
16
|
+
end
|
17
|
+
|
18
|
+
it "includes environments in all apps" do
|
19
|
+
api = scenario_cloud_client "One App Many Envs"
|
20
|
+
app = api.apps.first
|
15
21
|
app.environments.size.should == 2
|
16
22
|
app.environments.map(&:name).should =~ %w[giblets bakon]
|
17
23
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe EY::CloudClient::AppEnvironment do
|
4
|
+
before(:each) do
|
5
|
+
FakeWeb.allow_net_connect = true
|
6
|
+
EY::CloudClient.endpoint = EY::CloudClient::Test::FakeAwsm.uri
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "deploying" do
|
10
|
+
before do
|
11
|
+
@api = scenario_cloud_client "Multiple Ambiguous Accounts"
|
12
|
+
result = EY::CloudClient::AppEnvironment.resolve(@api, 'app_name' => 'rails232app', 'environment_name' => 'giblets', 'account_name' => 'main')
|
13
|
+
result.should be_one_match
|
14
|
+
@app_env = result.matches.first
|
15
|
+
end
|
16
|
+
|
17
|
+
it "creates a deployment" do
|
18
|
+
deployment = @app_env.new_deployment({
|
19
|
+
:ref => 'master',
|
20
|
+
:migrate => true,
|
21
|
+
:migrate_command => 'rake migrate',
|
22
|
+
:extra_config => {'extra' => 'config'},
|
23
|
+
})
|
24
|
+
deployment.commit.should be_nil
|
25
|
+
deployment.resolved_ref.should be_nil
|
26
|
+
|
27
|
+
deployment.start
|
28
|
+
|
29
|
+
deployment.config.should == {'deployed_by' => 'Multiple Ambiguous Accounts', 'extra' => 'config'}
|
30
|
+
deployment.commit.should_not be_nil
|
31
|
+
deployment.resolved_ref.should_not be_nil
|
32
|
+
deployment.out << "Test output"
|
33
|
+
deployment.out << "Test error"
|
34
|
+
deployment.successful = true
|
35
|
+
deployment.finished
|
36
|
+
deployment.should be_finished
|
37
|
+
|
38
|
+
found_dep = @app_env.last_deployment
|
39
|
+
found_dep.id.should == deployment.id
|
40
|
+
found_dep.should be_finished
|
41
|
+
end
|
42
|
+
|
43
|
+
it "returns nil when a not found deployment is requested" do
|
44
|
+
EY::CloudClient::Deployment.get(@api, @app_env, 0).should be_nil
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -12,13 +12,26 @@ describe EY::CloudClient::Environment do
|
|
12
12
|
envs = EY::CloudClient::Environment.all(api)
|
13
13
|
envs.size.should == 3
|
14
14
|
envs.map(&:name).should =~ %w[giblets bakon beef]
|
15
|
+
envs.map(&:username).should =~ %w[turkey ham hamburger]
|
16
|
+
envs.map(&:account_name).uniq.should == ['main']
|
17
|
+
with_instances = envs.select {|env| env.instances_count > 0 }
|
18
|
+
with_instances.size.should == 1
|
19
|
+
with_instances.first.instances.map(&:amazon_id).should == ['i-ddbbdd92']
|
20
|
+
end
|
21
|
+
|
22
|
+
it "includes apps in environments" do
|
23
|
+
api = scenario_cloud_client "One App Many Envs"
|
24
|
+
envs = api.environments
|
25
|
+
envs.map do |env|
|
26
|
+
env.apps.first && env.apps.first.name
|
27
|
+
end.should == ['rails232app', 'rails232app', nil] # 2 envs with the same app, 1 without
|
15
28
|
end
|
16
29
|
end
|
17
30
|
|
18
31
|
describe ".resolve" do
|
19
32
|
it "finds an environment" do
|
20
33
|
api = scenario_cloud_client "Multiple Ambiguous Accounts"
|
21
|
-
result =
|
34
|
+
result = api.resolve_environments('environment_name' => 'giblets', 'account_name' => 'main' )
|
22
35
|
result.should be_one_match
|
23
36
|
end
|
24
37
|
|
@@ -44,13 +57,65 @@ describe EY::CloudClient::Environment do
|
|
44
57
|
end
|
45
58
|
end
|
46
59
|
|
47
|
-
|
48
|
-
|
60
|
+
context "with an environment" do
|
61
|
+
before do
|
49
62
|
api = scenario_cloud_client "Linked App"
|
50
63
|
result = EY::CloudClient::Environment.resolve(api, 'account_name' => 'main', 'app_name' => 'rails232app', 'environment_name' => 'giblets')
|
51
|
-
env = result.matches.first
|
52
|
-
|
53
|
-
|
64
|
+
@env = result.matches.first
|
65
|
+
end
|
66
|
+
|
67
|
+
it "requests instances when needed" do
|
68
|
+
@env.bridge.role.should == 'app_master'
|
69
|
+
@env.instances.size.should == @env.instances_count
|
70
|
+
end
|
71
|
+
|
72
|
+
it "doesn't request when instances_count is zero" do
|
73
|
+
api = scenario_cloud_client "Linked App Not Running"
|
74
|
+
result = EY::CloudClient::Environment.resolve(api, 'account_name' => 'main', 'app_name' => 'rails232app', 'environment_name' => 'giblets')
|
75
|
+
@env = result.matches.first
|
76
|
+
@env.instances_count.should == 0
|
77
|
+
@env.instances.should == []
|
78
|
+
end
|
79
|
+
|
80
|
+
it "selects deploy_to_instances" do
|
81
|
+
@env.deploy_to_instances.map(&:role).should =~ %w[app_master app util util]
|
82
|
+
end
|
83
|
+
|
84
|
+
it "updates the environment" do
|
85
|
+
@env.update.should be_true
|
86
|
+
end
|
87
|
+
|
88
|
+
it "runs custom recipes" do
|
89
|
+
@env.run_custom_recipes.should be_true
|
90
|
+
end
|
91
|
+
|
92
|
+
it "uploads recipes" do
|
93
|
+
res = @env.upload_recipes(Pathname.new('spec/support/fixture_recipes.tgz').expand_path.open('rb'))
|
94
|
+
res.should be_true
|
95
|
+
end
|
96
|
+
|
97
|
+
it "uploads recipes at path" do
|
98
|
+
res = @env.upload_recipes_at_path(Pathname.new('spec/support/fixture_recipes.tgz').expand_path.to_s)
|
99
|
+
res.should be_true
|
100
|
+
end
|
101
|
+
|
102
|
+
it "raises if uploads recipes path doesn't exist" do
|
103
|
+
path = Pathname.new('spec/support/nothing')
|
104
|
+
lambda {
|
105
|
+
@env.upload_recipes_at_path(path)
|
106
|
+
}.should raise_error(EY::CloudClient::Error, "Recipes file not found: #{path}")
|
107
|
+
end
|
108
|
+
|
109
|
+
it "downloads recipes" do
|
110
|
+
@env.download_recipes
|
111
|
+
end
|
112
|
+
|
113
|
+
it "returns logs" do
|
114
|
+
log = @env.logs.first
|
115
|
+
log.main.should == 'MAIN LOG OUTPUT'
|
116
|
+
log.custom.should == 'CUSTOM LOG OUTPUT'
|
117
|
+
log.role.should == 'app_master'
|
118
|
+
log.instance_name.should == "app_master i-12345678"
|
54
119
|
end
|
55
120
|
end
|
56
121
|
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-cloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
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-05-
|
12
|
+
date: 2012-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -43,22 +43,6 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: launchy
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - '='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 2.0.5
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - '='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.5
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: rspec
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -288,12 +272,11 @@ files:
|
|
288
272
|
- lib/engineyard-cloud-client/models.rb
|
289
273
|
- lib/engineyard-cloud-client/resolver_result.rb
|
290
274
|
- lib/engineyard-cloud-client/rest_client_ext.rb
|
291
|
-
- lib/engineyard-cloud-client/ruby_ext.rb
|
292
275
|
- lib/engineyard-cloud-client/test/fake_awsm/config.ru
|
293
276
|
- lib/engineyard-cloud-client/test/fake_awsm/models/account.rb
|
294
277
|
- lib/engineyard-cloud-client/test/fake_awsm/models/app.rb
|
295
278
|
- lib/engineyard-cloud-client/test/fake_awsm/models/app_environment.rb
|
296
|
-
- lib/engineyard-cloud-client/test/fake_awsm/models/
|
279
|
+
- lib/engineyard-cloud-client/test/fake_awsm/models/deployment.rb
|
297
280
|
- lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
|
298
281
|
- lib/engineyard-cloud-client/test/fake_awsm/models/instance.rb
|
299
282
|
- lib/engineyard-cloud-client/test/fake_awsm/models/user.rb
|
@@ -301,8 +284,10 @@ files:
|
|
301
284
|
- lib/engineyard-cloud-client/test/fake_awsm/scenarios.rb
|
302
285
|
- lib/engineyard-cloud-client/test/fake_awsm/views/accounts.rabl
|
303
286
|
- lib/engineyard-cloud-client/test/fake_awsm/views/apps.rabl
|
287
|
+
- lib/engineyard-cloud-client/test/fake_awsm/views/base_app.rabl
|
304
288
|
- lib/engineyard-cloud-client/test/fake_awsm/views/base_app_environment.rabl
|
305
289
|
- lib/engineyard-cloud-client/test/fake_awsm/views/base_environment.rabl
|
290
|
+
- lib/engineyard-cloud-client/test/fake_awsm/views/deployment.rabl
|
306
291
|
- lib/engineyard-cloud-client/test/fake_awsm/views/environments.rabl
|
307
292
|
- lib/engineyard-cloud-client/test/fake_awsm/views/instances.rabl
|
308
293
|
- lib/engineyard-cloud-client/test/fake_awsm/views/resolve_app_environments.rabl
|
@@ -320,6 +305,7 @@ files:
|
|
320
305
|
- spec/engineyard-cloud-client/integration/account_spec.rb
|
321
306
|
- spec/engineyard-cloud-client/integration/app_environment_spec.rb
|
322
307
|
- spec/engineyard-cloud-client/integration/app_spec.rb
|
308
|
+
- spec/engineyard-cloud-client/integration/deployment_spec.rb
|
323
309
|
- spec/engineyard-cloud-client/integration/environment_spec.rb
|
324
310
|
- spec/engineyard-cloud-client/integration/user_spec.rb
|
325
311
|
- spec/engineyard-cloud-client/models/api_struct_spec.rb
|
@@ -328,6 +314,7 @@ files:
|
|
328
314
|
- spec/engineyard-cloud-client/models/instance_spec.rb
|
329
315
|
- spec/engineyard-cloud-client/models/keypair_spec.rb
|
330
316
|
- spec/spec_helper.rb
|
317
|
+
- spec/support/fixture_recipes.tgz
|
331
318
|
- spec/support/helpers.rb
|
332
319
|
- spec/support/matchers.rb
|
333
320
|
homepage: http://github.com/engineyard/engineyard-cloud-client
|
@@ -344,7 +331,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
344
331
|
version: '0'
|
345
332
|
segments:
|
346
333
|
- 0
|
347
|
-
hash:
|
334
|
+
hash: 3506935384923941414
|
348
335
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
349
336
|
none: false
|
350
337
|
requirements:
|
@@ -353,7 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
340
|
version: '0'
|
354
341
|
segments:
|
355
342
|
- 0
|
356
|
-
hash:
|
343
|
+
hash: 3506935384923941414
|
357
344
|
requirements: []
|
358
345
|
rubyforge_project:
|
359
346
|
rubygems_version: 1.8.24
|
@@ -365,6 +352,7 @@ test_files:
|
|
365
352
|
- spec/engineyard-cloud-client/integration/account_spec.rb
|
366
353
|
- spec/engineyard-cloud-client/integration/app_environment_spec.rb
|
367
354
|
- spec/engineyard-cloud-client/integration/app_spec.rb
|
355
|
+
- spec/engineyard-cloud-client/integration/deployment_spec.rb
|
368
356
|
- spec/engineyard-cloud-client/integration/environment_spec.rb
|
369
357
|
- spec/engineyard-cloud-client/integration/user_spec.rb
|
370
358
|
- spec/engineyard-cloud-client/models/api_struct_spec.rb
|
@@ -373,5 +361,6 @@ test_files:
|
|
373
361
|
- spec/engineyard-cloud-client/models/instance_spec.rb
|
374
362
|
- spec/engineyard-cloud-client/models/keypair_spec.rb
|
375
363
|
- spec/spec_helper.rb
|
364
|
+
- spec/support/fixture_recipes.tgz
|
376
365
|
- spec/support/helpers.rb
|
377
366
|
- spec/support/matchers.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'dm-core'
|
2
|
-
|
3
|
-
class Deployment
|
4
|
-
include DataMapper::Resource
|
5
|
-
|
6
|
-
property :id, Serial
|
7
|
-
property :app_environment_id, Integer
|
8
|
-
|
9
|
-
belongs_to :app_environment
|
10
|
-
|
11
|
-
def inspect
|
12
|
-
"#<Deployment app_environment:#{app_environment.inspect}>"
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|