manifests-cf-plugin 0.7.0.rc2 → 0.7.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/manifests-cf-plugin.rb +0 -2
- data/lib/manifests-cf-plugin/loader/normalizer.rb +0 -4
- data/lib/manifests-cf-plugin/plugin.rb +0 -2
- data/lib/manifests-cf-plugin/version.rb +1 -1
- data/spec/manifests-cf-plugin/loader/normalizer_spec.rb +5 -20
- data/spec/manifests-cf-plugin_spec.rb +0 -10
- metadata +12 -12
data/lib/manifests-cf-plugin.rb
CHANGED
@@ -148,8 +148,6 @@ module CFManifests
|
|
148
148
|
def create_manifest_for(app, path)
|
149
149
|
meta = {
|
150
150
|
"name" => app.name,
|
151
|
-
"framework" => app.framework.name,
|
152
|
-
"runtime" => app.runtime.name,
|
153
151
|
"memory" => human_size(app.memory * 1024 * 1024, 0),
|
154
152
|
"instances" => app.total_instances,
|
155
153
|
"url" => app.url ? app.url.sub(target_base, '${target-base}') : "none",
|
@@ -70,8 +70,6 @@ class ManifestsPlugin < CF::App::Base
|
|
70
70
|
app.total_instances = input[:instances] if input.has?(:instances)
|
71
71
|
app.command = input[:command] if input.has?(:command)
|
72
72
|
app.production = input[:plan].upcase.start_with?("P") if input.has?(:plan)
|
73
|
-
app.framework = input[:framework] if input.has?(:framework)
|
74
|
-
app.runtime = input[:runtime] if input.has?(:runtime)
|
75
73
|
app.buildpack = input[:buildpack] if input.has?(:buildpack)
|
76
74
|
end
|
77
75
|
|
@@ -87,20 +87,19 @@ describe CFManifests::Normalizer do
|
|
87
87
|
|
88
88
|
context 'and applications' do
|
89
89
|
let(:manifest) {
|
90
|
-
{ "
|
91
|
-
"applications" => {
|
90
|
+
{ "applications" => {
|
92
91
|
"./foo" => { "name" => "foo" },
|
93
92
|
"./bar" => { "name" => "bar" },
|
94
|
-
"./baz" => { "name" => "baz"
|
93
|
+
"./baz" => { "name" => "baz" }
|
95
94
|
}
|
96
95
|
}
|
97
96
|
}
|
98
97
|
|
99
98
|
it "merges the toplevel attributes into the applications" do
|
100
99
|
expect(subject[:applications]).to match_array [
|
101
|
-
{ :name => "foo", :path => "./foo"
|
102
|
-
{ :name => "bar", :path => "./bar"
|
103
|
-
{ :name => "baz", :path => "./baz"
|
100
|
+
{ :name => "foo", :path => "./foo" },
|
101
|
+
{ :name => "bar", :path => "./bar" },
|
102
|
+
{ :name => "baz", :path => "./baz" }
|
104
103
|
]
|
105
104
|
end
|
106
105
|
end
|
@@ -151,20 +150,6 @@ describe CFManifests::Normalizer do
|
|
151
150
|
manifest
|
152
151
|
end
|
153
152
|
|
154
|
-
context 'with framework as a hash' do
|
155
|
-
let(:manifest) {
|
156
|
-
{ "name" => "foo",
|
157
|
-
"framework" => { "name" => "ruby19", "mem" => "64M" }
|
158
|
-
}
|
159
|
-
}
|
160
|
-
|
161
|
-
it 'sets the framework to just the name' do
|
162
|
-
expect(subject).to eq(
|
163
|
-
"name" => "foo",
|
164
|
-
"framework" => "ruby19")
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
153
|
context 'with mem instead of memory' do
|
169
154
|
let(:manifest) { { "name" => "foo", "mem" => "128M" } }
|
170
155
|
|
@@ -47,8 +47,6 @@ describe CFManifests do
|
|
47
47
|
describe '#create_manifest_for' do
|
48
48
|
let(:app) {
|
49
49
|
fake :app,
|
50
|
-
:framework => fake(:framework),
|
51
|
-
:runtime => fake(:runtime),
|
52
50
|
:memory => 2048,
|
53
51
|
:total_instances => 2,
|
54
52
|
:command => "ruby main.rb",
|
@@ -76,8 +74,6 @@ describe CFManifests do
|
|
76
74
|
subject { cmd.create_manifest_for(app, "some-path") }
|
77
75
|
|
78
76
|
its(["name"]) { should eq app.name }
|
79
|
-
its(["framework"]) { should eq app.framework.name }
|
80
|
-
its(["runtime"]) { should eq app.runtime.name }
|
81
77
|
its(["memory"]) { should eq "2G" }
|
82
78
|
its(["instances"]) { should eq 2 }
|
83
79
|
its(["path"]) { should eq "some-path" }
|
@@ -113,8 +109,6 @@ describe CFManifests do
|
|
113
109
|
context 'when there is no url' do
|
114
110
|
let(:app) {
|
115
111
|
fake :app,
|
116
|
-
:framework => fake(:framework),
|
117
|
-
:runtime => fake(:runtime),
|
118
112
|
:memory => 2048,
|
119
113
|
:total_instances => 2
|
120
114
|
}
|
@@ -125,8 +119,6 @@ describe CFManifests do
|
|
125
119
|
context 'when there is no command' do
|
126
120
|
let(:app) {
|
127
121
|
fake :app,
|
128
|
-
:framework => fake(:framework),
|
129
|
-
:runtime => fake(:runtime),
|
130
122
|
:memory => 2048,
|
131
123
|
:total_instances => 2
|
132
124
|
}
|
@@ -137,8 +129,6 @@ describe CFManifests do
|
|
137
129
|
context 'when there are no service bindings' do
|
138
130
|
let(:app) {
|
139
131
|
fake :app,
|
140
|
-
:framework => fake(:framework),
|
141
|
-
:runtime => fake(:runtime),
|
142
132
|
:memory => 2048,
|
143
133
|
:total_instances => 2
|
144
134
|
}
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manifests-cf-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3579415619
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
9
|
- 0
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 0.7.0.
|
11
|
+
- 3
|
12
|
+
version: 0.7.0.rc3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Alex Suraci
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2013-03-
|
20
|
+
date: 2013-03-23 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: cfoundry
|
@@ -27,21 +27,21 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 3579415671
|
31
31
|
segments:
|
32
32
|
- 0
|
33
|
-
-
|
34
|
-
-
|
33
|
+
- 5
|
34
|
+
- 3
|
35
35
|
- rc
|
36
|
-
-
|
37
|
-
version: 0.
|
36
|
+
- 5
|
37
|
+
version: 0.5.3.rc5
|
38
38
|
- - <
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
hash:
|
40
|
+
hash: 7
|
41
41
|
segments:
|
42
42
|
- 0
|
43
|
-
-
|
44
|
-
version: "0.
|
43
|
+
- 6
|
44
|
+
version: "0.6"
|
45
45
|
type: :runtime
|
46
46
|
version_requirements: *id001
|
47
47
|
- !ruby/object:Gem::Dependency
|