cfoundry 1.5.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cfoundry/test_support.rb +2 -2
- data/lib/cfoundry/v2/app.rb +3 -6
- data/lib/cfoundry/v2/model.rb +1 -0
- data/lib/cfoundry/version.rb +1 -1
- data/spec/cfoundry/client_spec.rb +1 -1
- data/spec/cfoundry/rest_client_spec.rb +1 -1
- data/spec/cfoundry/trace_helpers_spec.rb +6 -6
- data/spec/cfoundry/upload_helpers_spec.rb +125 -137
- data/spec/cfoundry/v2/app_event_spec.rb +63 -59
- data/spec/cfoundry/v2/app_spec.rb +195 -188
- data/spec/cfoundry/v2/client_spec.rb +60 -56
- data/spec/cfoundry/v2/domain_spec.rb +9 -6
- data/spec/cfoundry/v2/model_magic/model_magic/attribute_spec.rb +89 -88
- data/spec/cfoundry/v2/model_magic/model_magic/has_summary_spec.rb +12 -13
- data/spec/cfoundry/v2/model_magic/model_magic/to_many_spec.rb +46 -52
- data/spec/cfoundry/v2/model_magic/model_magic/to_one_spec.rb +96 -87
- data/spec/cfoundry/v2/model_spec.rb +236 -241
- data/spec/cfoundry/v2/organization_spec.rb +20 -22
- data/spec/cfoundry/v2/quota_definition_spec.rb +45 -47
- data/spec/cfoundry/v2/route_spec.rb +28 -25
- data/spec/cfoundry/v2/space_spec.rb +9 -11
- data/spec/cfoundry/validator_spec.rb +69 -67
- data/spec/factories/app_events_factory.rb +7 -0
- data/spec/factories/apps_factory.rb +11 -0
- data/spec/factories/clients_factory.rb +5 -0
- data/spec/factories/domains_factory.rb +7 -0
- data/spec/factories/organizations_factory.rb +11 -0
- data/spec/factories/quota_definitions_factory.rb +8 -0
- data/spec/factories/routes_factory.rb +10 -0
- data/spec/factories/spaces_factory.rb +10 -0
- data/spec/factories/users_factory.rb +10 -0
- data/spec/spec_helper.rb +5 -4
- data/spec/support/factory_girl.rb +6 -0
- data/spec/support/shared_examples/model_summary_examples.rb +7 -7
- data/spec/support/test_model_builder.rb +10 -0
- metadata +83 -71
- data/spec/fakes/app_fake.rb +0 -5
- data/spec/fakes/domain_fake.rb +0 -5
- data/spec/fakes/framework_fake.rb +0 -5
- data/spec/fakes/organization_fake.rb +0 -5
- data/spec/fakes/route_fake.rb +0 -5
- data/spec/fakes/runtime_fake.rb +0 -5
- data/spec/fakes/service_fake.rb +0 -5
- data/spec/fakes/service_instance_fake.rb +0 -5
- data/spec/fakes/service_plan_fake.rb +0 -5
- data/spec/fakes/space_fake.rb +0 -5
- data/spec/fakes/user_fake.rb +0 -5
- data/spec/support/fake_helper.rb +0 -248
- data/spec/support/randoms.rb +0 -3
data/spec/spec_helper.rb
CHANGED
@@ -10,11 +10,12 @@ require "active_support/core_ext"
|
|
10
10
|
require "cc_api_stub"
|
11
11
|
require "shoulda/matchers/integrations/rspec" # requiring all of shoulda matchers makes test unit run
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
require "support/shared_examples/cc_api_stub_request_examples"
|
14
|
+
require "support/shared_examples/client_login_examples"
|
15
|
+
require "support/shared_examples/model_summary_examples"
|
16
|
+
require "support/factory_girl"
|
17
|
+
require "support/test_model_builder"
|
16
18
|
|
17
19
|
RSpec.configure do |c|
|
18
|
-
c.include Fake::FakeMethods
|
19
20
|
c.mock_with :rr
|
20
21
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
require "multi_json"
|
2
2
|
|
3
|
-
shared_examples_for
|
4
|
-
describe
|
3
|
+
shared_examples_for "a summarizeable model" do
|
4
|
+
describe "#summary" do
|
5
5
|
let(:summary_endpoint) {
|
6
6
|
[ client.target,
|
7
7
|
"v2",
|
8
|
-
|
9
|
-
|
8
|
+
subject.class.plural_object_name,
|
9
|
+
subject.guid,
|
10
10
|
"summary"
|
11
11
|
].join("/")
|
12
12
|
}
|
13
13
|
|
14
|
-
it
|
14
|
+
it "returns the summary endpoint payload" do
|
15
15
|
req = stub_request(:get, summary_endpoint).to_return :status => 200,
|
16
16
|
:body => MultiJson.encode(summary_attributes)
|
17
17
|
|
@@ -20,8 +20,8 @@ shared_examples_for 'a summarizeable model' do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
describe
|
24
|
-
it
|
23
|
+
describe "#summarize!" do
|
24
|
+
it "defines basic attributes via #summary" do
|
25
25
|
stub(subject).summary { summary_attributes }
|
26
26
|
|
27
27
|
subject.summarize!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,16 +10,16 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: activemodel
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 3.2.13
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,15 +27,15 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 3.2.13
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
|
-
name:
|
32
|
+
name: cf-uaa-lib
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
none: false
|
35
35
|
requirements:
|
36
36
|
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: 1.3.10
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,15 +43,15 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 1.3.10
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: multi_json
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.7'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,15 +59,15 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '1.7'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: multipart-post
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 1.
|
70
|
+
version: '1.1'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -75,15 +75,15 @@ dependencies:
|
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 1.
|
78
|
+
version: '1.1'
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
|
-
name:
|
80
|
+
name: rubyzip
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
none: false
|
83
83
|
requirements:
|
84
84
|
- - ~>
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
86
|
+
version: '0.9'
|
87
87
|
type: :runtime
|
88
88
|
prerelease: false
|
89
89
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -91,15 +91,15 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: '0.9'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
96
|
+
name: factory_girl
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
100
100
|
- - ! '>='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0
|
102
|
+
version: '0'
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -107,31 +107,31 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: gem-release
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ! '>='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ! '>='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
126
|
+
version: '0'
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
|
-
name:
|
128
|
+
name: json_pure
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
none: false
|
131
131
|
requirements:
|
132
132
|
- - ~>
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version: '1.
|
134
|
+
version: '1.8'
|
135
135
|
type: :development
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -139,47 +139,47 @@ dependencies:
|
|
139
139
|
requirements:
|
140
140
|
- - ~>
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: '1.
|
142
|
+
version: '1.8'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
|
-
name:
|
144
|
+
name: rake
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - ! '>='
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: '
|
150
|
+
version: '0.9'
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - ! '>='
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
158
|
+
version: '0.9'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
160
|
+
name: rspec
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
166
|
+
version: '2.11'
|
167
167
|
type: :development
|
168
168
|
prerelease: false
|
169
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
170
|
none: false
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - ~>
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
174
|
+
version: '2.11'
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
176
|
+
name: rr
|
177
177
|
requirement: !ruby/object:Gem::Requirement
|
178
178
|
none: false
|
179
179
|
requirements:
|
180
180
|
- - ~>
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: 0
|
182
|
+
version: '1.0'
|
183
183
|
type: :development
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -187,7 +187,7 @@ dependencies:
|
|
187
187
|
requirements:
|
188
188
|
- - ~>
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version: 0
|
190
|
+
version: '1.0'
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: shoulda-matchers
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,13 +205,13 @@ dependencies:
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: 1.5.6
|
207
207
|
- !ruby/object:Gem::Dependency
|
208
|
-
name:
|
208
|
+
name: timecop
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
210
210
|
none: false
|
211
211
|
requirements:
|
212
212
|
- - ~>
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
214
|
+
version: 0.6.1
|
215
215
|
type: :development
|
216
216
|
prerelease: false
|
217
217
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -219,7 +219,23 @@ dependencies:
|
|
219
219
|
requirements:
|
220
220
|
- - ~>
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version:
|
222
|
+
version: 0.6.1
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: webmock
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
none: false
|
227
|
+
requirements:
|
228
|
+
- - ~>
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '1.9'
|
231
|
+
type: :development
|
232
|
+
prerelease: false
|
233
|
+
version_requirements: !ruby/object:Gem::Requirement
|
234
|
+
none: false
|
235
|
+
requirements:
|
236
|
+
- - ~>
|
237
|
+
- !ruby/object:Gem::Version
|
238
|
+
version: '1.9'
|
223
239
|
description:
|
224
240
|
email:
|
225
241
|
- vcap-dev@googlegroups.com
|
@@ -322,17 +338,15 @@ files:
|
|
322
338
|
- spec/cfoundry/v2/route_spec.rb
|
323
339
|
- spec/cfoundry/v2/space_spec.rb
|
324
340
|
- spec/cfoundry/validator_spec.rb
|
325
|
-
- spec/
|
326
|
-
- spec/
|
327
|
-
- spec/
|
328
|
-
- spec/
|
329
|
-
- spec/
|
330
|
-
- spec/
|
331
|
-
- spec/
|
332
|
-
- spec/
|
333
|
-
- spec/
|
334
|
-
- spec/fakes/space_fake.rb
|
335
|
-
- spec/fakes/user_fake.rb
|
341
|
+
- spec/factories/app_events_factory.rb
|
342
|
+
- spec/factories/apps_factory.rb
|
343
|
+
- spec/factories/clients_factory.rb
|
344
|
+
- spec/factories/domains_factory.rb
|
345
|
+
- spec/factories/organizations_factory.rb
|
346
|
+
- spec/factories/quota_definitions_factory.rb
|
347
|
+
- spec/factories/routes_factory.rb
|
348
|
+
- spec/factories/spaces_factory.rb
|
349
|
+
- spec/factories/users_factory.rb
|
336
350
|
- spec/fixtures/apps/with_cfignore/ambiguous_ignored
|
337
351
|
- spec/fixtures/apps/with_cfignore/ignored_dir/file_in_ignored_dir.txt
|
338
352
|
- spec/fixtures/apps/with_cfignore/ignored_file.txt
|
@@ -380,11 +394,11 @@ files:
|
|
380
394
|
- spec/fixtures/fake_cc_user_organizations.json
|
381
395
|
- spec/fixtures/fake_cc_user_with_managers.json
|
382
396
|
- spec/spec_helper.rb
|
383
|
-
- spec/support/
|
384
|
-
- spec/support/randoms.rb
|
397
|
+
- spec/support/factory_girl.rb
|
385
398
|
- spec/support/shared_examples/cc_api_stub_request_examples.rb
|
386
399
|
- spec/support/shared_examples/client_login_examples.rb
|
387
400
|
- spec/support/shared_examples/model_summary_examples.rb
|
401
|
+
- spec/support/test_model_builder.rb
|
388
402
|
homepage: http://github.com/cloudfoundry/cfoundry
|
389
403
|
licenses: []
|
390
404
|
post_install_message:
|
@@ -399,7 +413,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
399
413
|
version: '0'
|
400
414
|
segments:
|
401
415
|
- 0
|
402
|
-
hash:
|
416
|
+
hash: -1645166221720147184
|
403
417
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
404
418
|
none: false
|
405
419
|
requirements:
|
@@ -449,17 +463,15 @@ test_files:
|
|
449
463
|
- spec/cfoundry/v2/route_spec.rb
|
450
464
|
- spec/cfoundry/v2/space_spec.rb
|
451
465
|
- spec/cfoundry/validator_spec.rb
|
452
|
-
- spec/
|
453
|
-
- spec/
|
454
|
-
- spec/
|
455
|
-
- spec/
|
456
|
-
- spec/
|
457
|
-
- spec/
|
458
|
-
- spec/
|
459
|
-
- spec/
|
460
|
-
- spec/
|
461
|
-
- spec/fakes/space_fake.rb
|
462
|
-
- spec/fakes/user_fake.rb
|
466
|
+
- spec/factories/app_events_factory.rb
|
467
|
+
- spec/factories/apps_factory.rb
|
468
|
+
- spec/factories/clients_factory.rb
|
469
|
+
- spec/factories/domains_factory.rb
|
470
|
+
- spec/factories/organizations_factory.rb
|
471
|
+
- spec/factories/quota_definitions_factory.rb
|
472
|
+
- spec/factories/routes_factory.rb
|
473
|
+
- spec/factories/spaces_factory.rb
|
474
|
+
- spec/factories/users_factory.rb
|
463
475
|
- spec/fixtures/apps/with_cfignore/ambiguous_ignored
|
464
476
|
- spec/fixtures/apps/with_cfignore/ignored_dir/file_in_ignored_dir.txt
|
465
477
|
- spec/fixtures/apps/with_cfignore/ignored_file.txt
|
@@ -507,8 +519,8 @@ test_files:
|
|
507
519
|
- spec/fixtures/fake_cc_user_organizations.json
|
508
520
|
- spec/fixtures/fake_cc_user_with_managers.json
|
509
521
|
- spec/spec_helper.rb
|
510
|
-
- spec/support/
|
511
|
-
- spec/support/randoms.rb
|
522
|
+
- spec/support/factory_girl.rb
|
512
523
|
- spec/support/shared_examples/cc_api_stub_request_examples.rb
|
513
524
|
- spec/support/shared_examples/client_login_examples.rb
|
514
525
|
- spec/support/shared_examples/model_summary_examples.rb
|
526
|
+
- spec/support/test_model_builder.rb
|