apcera-stager-api 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.travis.yml +15 -0
  4. data/CHANGELOG.md +17 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE +21 -0
  7. data/README.md +86 -0
  8. data/Rakefile +8 -0
  9. data/apcera-stager-api-contrib.gemspec +25 -0
  10. data/lib/apcera-stager-api.rb +1 -0
  11. data/lib/apcera/stager/error.rb +8 -0
  12. data/lib/apcera/stager/loader.rb +11 -0
  13. data/lib/apcera/stager/stager.rb +335 -0
  14. data/spec/apcera/stager/stager_spec.rb +571 -0
  15. data/spec/fixtures/cassettes/complete.yml +55 -0
  16. data/spec/fixtures/cassettes/dependencies_add.yml +101 -0
  17. data/spec/fixtures/cassettes/dependencies_remove.yml +101 -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 +53 -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 +55 -0
  47. data/spec/spec_helper.rb +31 -0
  48. data/spec/tmp/.gitkeep +0 -0
  49. metadata +190 -0
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
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: 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,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: 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: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,28 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 404
13
+ message: OK
14
+ headers:
15
+ Date:
16
+ - Wed, 14 Aug 2013 08:52:04 GMT
17
+ Transfer-Encoding:
18
+ - chunked
19
+ Content-Type:
20
+ - application/json;charset=UTF-8
21
+ body:
22
+ encoding: UTF-8
23
+ string: |-
24
+ {
25
+ }
26
+ http_version:
27
+ recorded_at: Wed, 14 Aug 2013 08:52:04 GMT
28
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=provides&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: put
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=provides&action=remove&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/relaunch
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:57 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:57 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:57 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/snapshot
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
+ response:
36
+ status:
37
+ code: 404
38
+ message: OK
39
+ headers:
40
+ Content-Type:
41
+ - text/html; charset=ISO-8859-1
42
+ Date:
43
+ - Mon, 25 Aug 2014 02:00:57 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:57 GMT
53
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=templates&action=add&path=/path/to/template&left_delimiter={{&right_delimiter=}}
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: put
5
+ uri: http://example.com/meta
6
+ body:
7
+ encoding: US-ASCII
8
+ string: resource=templates&action=remove&path=/path/to/template&left_delimiter={{&right_delimiter=}}
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,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
+ Content-Type:
11
+ - application/octet-stream
12
+ response:
13
+ status:
14
+ code: 404
15
+ message: OK
16
+ headers:
17
+ Content-Type:
18
+ - text/html
19
+ Content-Length:
20
+ - '2'
21
+ Connection:
22
+ - close
23
+ Date:
24
+ - Mon, 25 Aug 2014 02:37:56 GMT
25
+ body:
26
+ encoding: US-ASCII
27
+ string: OK
28
+ http_version:
29
+ recorded_at: Mon, 25 Aug 2014 02:37:56 GMT
30
+ - request:
31
+ method: post
32
+ uri: http://example.com/failed
33
+ body:
34
+ encoding: US-ASCII
35
+ string: ''
36
+ headers: {}
37
+ response:
38
+ status:
39
+ code: 200
40
+ message: OK
41
+ headers:
42
+ Content-Type:
43
+ - text/html; charset=ISO-8859-1
44
+ Date:
45
+ - Mon, 25 Aug 2014 02:00:57 GMT
46
+ Content-Length:
47
+ - '2'
48
+ Connection:
49
+ - close
50
+ body:
51
+ encoding: US-ASCII
52
+ string: OK
53
+ http_version:
54
+ recorded_at: Mon, 25 Aug 2014 02:00:57 GMT
55
+ recorded_with: VCR 2.9.2