continuum-stager-api 0.1.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.
Files changed (48) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/.travis.yml +15 -0
  4. data/CHANGELOG.md +16 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE +21 -0
  7. data/README.md +37 -0
  8. data/Rakefile +7 -0
  9. data/apcera-stager-api-contrib.gemspec +25 -0
  10. data/lib/apcera/stager/error.rb +6 -0
  11. data/lib/apcera/stager/loader.rb +10 -0
  12. data/lib/apcera/stager/stager.rb +270 -0
  13. data/lib/continuum-stager-api.rb +1 -0
  14. data/spec/apcera/stager/stager_spec.rb +496 -0
  15. data/spec/fixtures/cassettes/complete.yml +55 -0
  16. data/spec/fixtures/cassettes/dependencies_add.yml +53 -0
  17. data/spec/fixtures/cassettes/dependencies_remove.yml +53 -0
  18. data/spec/fixtures/cassettes/done.yml +28 -0
  19. data/spec/fixtures/cassettes/download.yml +37400 -0
  20. data/spec/fixtures/cassettes/environment_add.yml +53 -0
  21. data/spec/fixtures/cassettes/environment_remove.yml +53 -0
  22. data/spec/fixtures/cassettes/fail.yml +28 -0
  23. data/spec/fixtures/cassettes/invalid/complete.yml +55 -0
  24. data/spec/fixtures/cassettes/invalid/dependencies_add.yml +53 -0
  25. data/spec/fixtures/cassettes/invalid/dependencies_remove.yml +53 -0
  26. data/spec/fixtures/cassettes/invalid/done.yml +55 -0
  27. data/spec/fixtures/cassettes/invalid/download.yml +54 -0
  28. data/spec/fixtures/cassettes/invalid/environment_add.yml +53 -0
  29. data/spec/fixtures/cassettes/invalid/environment_remove.yml +53 -0
  30. data/spec/fixtures/cassettes/invalid/fail.yml +28 -0
  31. data/spec/fixtures/cassettes/invalid/metadata.yml +28 -0
  32. data/spec/fixtures/cassettes/invalid/provides_add.yml +53 -0
  33. data/spec/fixtures/cassettes/invalid/provides_remove.yml +53 -0
  34. data/spec/fixtures/cassettes/invalid/relaunch.yml +53 -0
  35. data/spec/fixtures/cassettes/invalid/snapshot.yml +53 -0
  36. data/spec/fixtures/cassettes/invalid/templates_add.yml +53 -0
  37. data/spec/fixtures/cassettes/invalid/templates_remove.yml +53 -0
  38. data/spec/fixtures/cassettes/invalid/upload.yml +55 -0
  39. data/spec/fixtures/cassettes/metadata.yml +51 -0
  40. data/spec/fixtures/cassettes/provides_add.yml +53 -0
  41. data/spec/fixtures/cassettes/provides_remove.yml +116 -0
  42. data/spec/fixtures/cassettes/relaunch.yml +28 -0
  43. data/spec/fixtures/cassettes/snapshot.yml +28 -0
  44. data/spec/fixtures/cassettes/templates_add.yml +53 -0
  45. data/spec/fixtures/cassettes/templates_remove.yml +53 -0
  46. data/spec/fixtures/cassettes/upload.yml +30 -0
  47. data/spec/spec_helper.rb +31 -0
  48. metadata +189 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=environment&action=add&key=TEST_VAR&value=foo
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Date:
20
+ - Mon, 25 Aug 2014 22:37:32 GMT
21
+ Content-Length:
22
+ - '4'
23
+ body:
24
+ encoding: US-ASCII
25
+ string: OK
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 22:37:33 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/done
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers: {}
35
+ response:
36
+ status:
37
+ code: 200
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:56 GMT
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: US-ASCII
50
+ string: OK
51
+ http_version:
52
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=environment&action=remove&key=TEST_VAR&value=foo
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Date:
20
+ - Mon, 25 Aug 2014 22:37:32 GMT
21
+ Content-Length:
22
+ - '4'
23
+ body:
24
+ encoding: US-ASCII
25
+ string: OK
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 22:37:33 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/done
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers: {}
35
+ response:
36
+ status:
37
+ code: 200
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:56 GMT
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: US-ASCII
50
+ string: OK
51
+ http_version:
52
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,28 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/failed
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Content-Type:
16
+ - text/html; charset=ISO-8859-1
17
+ Date:
18
+ - Mon, 25 Aug 2014 02:00:57 GMT
19
+ Content-Length:
20
+ - '2'
21
+ Connection:
22
+ - close
23
+ body:
24
+ encoding: US-ASCII
25
+ string: OK
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 02:00:57 GMT
28
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/data
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 404
13
+ message: OK
14
+ headers:
15
+ Content-Type:
16
+ - text/html; charset=ISO-8859-1
17
+ Date:
18
+ - Mon, 25 Aug 2014 02:00:56 GMT
19
+ Content-Length:
20
+ - '2'
21
+ Connection:
22
+ - close
23
+ body:
24
+ encoding: US-ASCII
25
+ string: OK
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/failed
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers:
35
+ Content-Type:
36
+ - application/octet-stream
37
+ response:
38
+ status:
39
+ code: 200
40
+ message: OK
41
+ headers:
42
+ Content-Type:
43
+ - text/html
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ Date:
49
+ - Mon, 25 Aug 2014 02:37:56 GMT
50
+ body:
51
+ encoding: US-ASCII
52
+ string: OK
53
+ http_version:
54
+ recorded_at: Mon, 25 Aug 2014 02:37:56 GMT
55
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=dependencies&action=add&type=os&name=linux
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded
12
+ response:
13
+ status:
14
+ code: 404
15
+ message:
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Date:
20
+ - Mon, 25 Aug 2014 22:37:32 GMT
21
+ Content-Length:
22
+ - '4'
23
+ body:
24
+ encoding: US-ASCII
25
+ string: ! "OK"
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 22:37:33 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/failed
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers: {}
35
+ response:
36
+ status:
37
+ code: 200
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:56 GMT
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: US-ASCII
50
+ string: OK
51
+ http_version:
52
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=dependencies&action=remove&type=os&name=linux
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded
12
+ response:
13
+ status:
14
+ code: 400
15
+ message:
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Date:
20
+ - Mon, 25 Aug 2014 22:37:32 GMT
21
+ Content-Length:
22
+ - '4'
23
+ body:
24
+ encoding: US-ASCII
25
+ string: ! "OK"
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 22:37:33 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/failed
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers: {}
35
+ response:
36
+ status:
37
+ code: 200
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:56 GMT
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: US-ASCII
50
+ string: OK
51
+ http_version:
52
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/done
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 404
13
+ message: OK
14
+ headers:
15
+ Content-Type:
16
+ - text/html; charset=ISO-8859-1
17
+ Date:
18
+ - Mon, 25 Aug 2014 02:00:56 GMT
19
+ Content-Length:
20
+ - '2'
21
+ Connection:
22
+ - close
23
+ body:
24
+ encoding: US-ASCII
25
+ string: OK
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/failed
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers:
35
+ Content-Type:
36
+ - application/octet-stream
37
+ response:
38
+ status:
39
+ code: 200
40
+ message: OK
41
+ headers:
42
+ Content-Type:
43
+ - text/html
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ Date:
49
+ - Mon, 25 Aug 2014 02:37:56 GMT
50
+ body:
51
+ encoding: US-ASCII
52
+ string: OK
53
+ http_version:
54
+ recorded_at: Mon, 25 Aug 2014 02:37:56 GMT
55
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://example.com/data
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept: []
11
+ response:
12
+ status:
13
+ code: 404
14
+ message: Not Found
15
+ headers:
16
+ Accept-Ranges:
17
+ - bytes
18
+ Content-Type:
19
+ - text/html
20
+ Date:
21
+ - Mon, 25 Aug 2014 03:44:00 GMT
22
+ Content-Length:
23
+ - '4'
24
+ body:
25
+ encoding: US-ASCII
26
+ string: FAKE
27
+ http_version:
28
+ recorded_at: Mon, 25 Aug 2014 03:44:00 GMT
29
+ - request:
30
+ method: post
31
+ uri: http://example.com/failed
32
+ body:
33
+ encoding: US-ASCII
34
+ string: ''
35
+ headers: {}
36
+ response:
37
+ status:
38
+ code: 200
39
+ message: OK
40
+ headers:
41
+ Content-Type:
42
+ - text/html; charset=ISO-8859-1
43
+ Date:
44
+ - Mon, 25 Aug 2014 02:00:57 GMT
45
+ Content-Length:
46
+ - '2'
47
+ Connection:
48
+ - close
49
+ body:
50
+ encoding: US-ASCII
51
+ string: OK
52
+ http_version:
53
+ recorded_at: Mon, 25 Aug 2014 02:00:57 GMT
54
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=environment&action=add&key=TEST_VAR&value=foo
9
+ headers:
10
+ Content-Type:
11
+ - application/x-www-form-urlencoded
12
+ response:
13
+ status:
14
+ code: 404
15
+ message:
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Date:
20
+ - Mon, 25 Aug 2014 22:37:32 GMT
21
+ Content-Length:
22
+ - '4'
23
+ body:
24
+ encoding: US-ASCII
25
+ string: ! "OK"
26
+ http_version:
27
+ recorded_at: Mon, 25 Aug 2014 22:37:33 GMT
28
+ - request:
29
+ method: post
30
+ uri: http://example.com/failed
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ''
34
+ headers: {}
35
+ response:
36
+ status:
37
+ code: 200
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:56 GMT
44
+ Content-Length:
45
+ - '2'
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: US-ASCII
50
+ string: OK
51
+ http_version:
52
+ recorded_at: Mon, 25 Aug 2014 02:00:56 GMT
53
+ recorded_with: VCR 2.9.2