runcible 0.0.1

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 (87) hide show
  1. data/.gitignore +18 -0
  2. data/Gemfile +19 -0
  3. data/LICENSE +22 -0
  4. data/README.md +29 -0
  5. data/Rakefile +37 -0
  6. data/lib/runcible.rb +25 -0
  7. data/lib/runcible/base.rb +113 -0
  8. data/lib/runcible/extensions/repository.rb +67 -0
  9. data/lib/runcible/oauth_setup.rb +29 -0
  10. data/lib/runcible/resources/repository.rb +82 -0
  11. data/lib/runcible/resources/role.rb +46 -0
  12. data/lib/runcible/resources/task.rb +49 -0
  13. data/lib/runcible/resources/user.rb +50 -0
  14. data/lib/runcible/version.rb +3 -0
  15. data/rel-eng/packages/.readme +3 -0
  16. data/rel-eng/tito.props +5 -0
  17. data/runcible.gemspec +17 -0
  18. data/runcible.spec +48 -0
  19. data/test/.gitkeep +0 -0
  20. data/test/integration/extensions/repository_test.rb +117 -0
  21. data/test/integration/fixtures/repositories/zoo5/.treeinfo +12 -0
  22. data/test/integration/fixtures/repositories/zoo5/CHANGESET +11 -0
  23. data/test/integration/fixtures/repositories/zoo5/PULP_MANIFEST +1 -0
  24. data/test/integration/fixtures/repositories/zoo5/cheetah-0.3-0.8.noarch.rpm +0 -0
  25. data/test/integration/fixtures/repositories/zoo5/create.sh +20 -0
  26. data/test/integration/fixtures/repositories/zoo5/elephant-0.3-0.8.noarch.rpm +0 -0
  27. data/test/integration/fixtures/repositories/zoo5/empty.iso +0 -0
  28. data/test/integration/fixtures/repositories/zoo5/giraffe-0.3-0.8.noarch.rpm +0 -0
  29. data/test/integration/fixtures/repositories/zoo5/images/test1.img +0 -0
  30. data/test/integration/fixtures/repositories/zoo5/images/test2.img +0 -0
  31. data/test/integration/fixtures/repositories/zoo5/lion-0.3-0.8.noarch.rpm +0 -0
  32. data/test/integration/fixtures/repositories/zoo5/monkey-0.3-0.8.noarch.rpm +0 -0
  33. data/test/integration/fixtures/repositories/zoo5/penguin-0.3-0.8.noarch.rpm +0 -0
  34. data/test/integration/fixtures/repositories/zoo5/repodata/06661e2a9839cf0beebcf409410ca4f93c09081f4e772fd0d03e1faf62705a11-comps.xml +39 -0
  35. data/test/integration/fixtures/repositories/zoo5/repodata/0c4d57a68f9a3b13dabc6f8b01ca8958aa796167cececee04717edfc26d02f2d-other.xml.gz +0 -0
  36. data/test/integration/fixtures/repositories/zoo5/repodata/298ce23f48b3613e030d19f3d9c2ff2df31c2f08479bdf94cebb87c208e48c0e-filelists.xml.gz +0 -0
  37. data/test/integration/fixtures/repositories/zoo5/repodata/32c0e38317aade0c057b173ff62344e912e1bd650409c6ac31aecee78e3413af-comps.xml.gz +0 -0
  38. data/test/integration/fixtures/repositories/zoo5/repodata/34d954906c7ce7aa2254e24d7be0a9049e0a2f436add023ca056123a2d48e30e-updateinfo.xml.gz +0 -0
  39. data/test/integration/fixtures/repositories/zoo5/repodata/63aedd074d9f0daf7c6be8c61f91d76a962bb6ceda86b9abd2140f154c320fa2-other.sqlite.bz2 +0 -0
  40. data/test/integration/fixtures/repositories/zoo5/repodata/69d65cdebffc6199d3adb3e38b06ca9abaae6c1c7366805099987b28f182178d-filelists.sqlite.bz2 +0 -0
  41. data/test/integration/fixtures/repositories/zoo5/repodata/799241a518a4a6b11a68f8e6fbdb719875f87832f60accc0851ced0d6a0497c6-updateinfo.xml.gz +0 -0
  42. data/test/integration/fixtures/repositories/zoo5/repodata/a4ea9fcdce31dc8673c7a9ba66c086bd6a16e1eff717e3896dd1cac444a1423c-primary.xml.gz +0 -0
  43. data/test/integration/fixtures/repositories/zoo5/repodata/fb9b9508e148368d0edf7e03dc905b343937fd958e6531cce6380933d18c3455-primary.sqlite.bz2 +0 -0
  44. data/test/integration/fixtures/repositories/zoo5/repodata/repomd.xml +75 -0
  45. data/test/integration/fixtures/repositories/zoo5/squirrel-0.3-0.8.noarch.rpm +0 -0
  46. data/test/integration/fixtures/repositories/zoo5/updateinfo.xml +26 -0
  47. data/test/integration/fixtures/repositories/zoo5/walrus-0.3-0.8.noarch.rpm +0 -0
  48. data/test/integration/fixtures/vcr_cassettes/extensions/pulp_repository_extensions.yml +137 -0
  49. data/test/integration/fixtures/vcr_cassettes/pulp_consumer.yml +1529 -0
  50. data/test/integration/fixtures/vcr_cassettes/pulp_consumer_group.yml +430 -0
  51. data/test/integration/fixtures/vcr_cassettes/pulp_consumer_helper.yml +120 -0
  52. data/test/integration/fixtures/vcr_cassettes/pulp_distribution.yml +77 -0
  53. data/test/integration/fixtures/vcr_cassettes/pulp_errata.yml +77 -0
  54. data/test/integration/fixtures/vcr_cassettes/pulp_filter.yml +233 -0
  55. data/test/integration/fixtures/vcr_cassettes/pulp_filter_helper.yml +81 -0
  56. data/test/integration/fixtures/vcr_cassettes/pulp_package.yml +155 -0
  57. data/test/integration/fixtures/vcr_cassettes/pulp_package_group.yml +40 -0
  58. data/test/integration/fixtures/vcr_cassettes/pulp_package_group_category.yml +40 -0
  59. data/test/integration/fixtures/vcr_cassettes/pulp_ping.yml +40 -0
  60. data/test/integration/fixtures/vcr_cassettes/pulp_repository.yml +1196 -0
  61. data/test/integration/fixtures/vcr_cassettes/pulp_repository_helper.yml +8659 -0
  62. data/test/integration/fixtures/vcr_cassettes/pulp_repository_sync.yml +215 -0
  63. data/test/integration/fixtures/vcr_cassettes/pulp_role.yml +133 -0
  64. data/test/integration/fixtures/vcr_cassettes/pulp_roles.yml +120 -0
  65. data/test/integration/fixtures/vcr_cassettes/pulp_task.yml +943 -0
  66. data/test/integration/fixtures/vcr_cassettes/pulp_user.yml +288 -0
  67. data/test/integration/fixtures/vcr_cassettes/pulp_user_helper.yml +195 -0
  68. data/test/integration/resources/helpers/consumer_helper.rb +49 -0
  69. data/test/integration/resources/helpers/filter_helper.rb +44 -0
  70. data/test/integration/resources/helpers/repository_helper.rb +127 -0
  71. data/test/integration/resources/pulp_consumer_group_test.rb +182 -0
  72. data/test/integration/resources/pulp_consumer_test.rb +200 -0
  73. data/test/integration/resources/pulp_distribution_test.rb +55 -0
  74. data/test/integration/resources/pulp_errata_test.rb +60 -0
  75. data/test/integration/resources/pulp_filter_test.rb +92 -0
  76. data/test/integration/resources/pulp_package_group_category_test.rb +55 -0
  77. data/test/integration/resources/pulp_package_group_test.rb +56 -0
  78. data/test/integration/resources/pulp_package_test.rb +79 -0
  79. data/test/integration/resources/pulp_ping_test.rb +31 -0
  80. data/test/integration/resources/pulp_repository_test.rb +307 -0
  81. data/test/integration/resources/pulp_role_test.rb +62 -0
  82. data/test/integration/resources/pulp_task_test.rb +79 -0
  83. data/test/integration/resources/pulp_user_test.rb +105 -0
  84. data/test/integration/test_runner.rb +113 -0
  85. data/test/integration/vcr_setup.rb +22 -0
  86. data/test/unit/test_base.rb +62 -0
  87. metadata +218 -0
@@ -0,0 +1,288 @@
1
+ ---
2
+ recorded_with: VCR 2.2.4
3
+ http_interactions:
4
+ - request:
5
+ method: delete
6
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_uer/
7
+ body:
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip, deflate
12
+ Content-Type:
13
+ - application/json
14
+ Accept:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache/2.2.22 (Fedora)
23
+ Content-Type:
24
+ - application/json
25
+ Content-Length:
26
+ - "4"
27
+ Connection:
28
+ - close
29
+ Date:
30
+ - Sun, 09 Sep 2012 00:16:36 GMT
31
+ body:
32
+ string: "null"
33
+ http_version:
34
+ recorded_at: Sun, 09 Sep 2012 00:16:36 GMT
35
+ - request:
36
+ method: delete
37
+ uri: https://admin:admin@localhost/pulp/api/v2users/integration_test_user
38
+ body:
39
+ string: ""
40
+ headers:
41
+ Accept-Encoding:
42
+ - gzip, deflate
43
+ Content-Type:
44
+ - application/json
45
+ Accept:
46
+ - application/json
47
+ response:
48
+ status:
49
+ code: 404
50
+ message: Not Found
51
+ headers:
52
+ Server:
53
+ - Apache/2.2.22 (Fedora)
54
+ Content-Type:
55
+ - text/html; charset=UTF-8
56
+ Content-Length:
57
+ - "9"
58
+ Connection:
59
+ - close
60
+ Date:
61
+ - Sun, 09 Sep 2012 04:31:41 GMT
62
+ body:
63
+ string: not found
64
+ http_version:
65
+ recorded_at: Sun, 09 Sep 2012 04:31:41 GMT
66
+ - request:
67
+ method: get
68
+ uri: https://admin:admin@localhost/pulp/api/v2users/admin
69
+ body:
70
+ string: ""
71
+ headers:
72
+ Accept-Encoding:
73
+ - gzip, deflate
74
+ Content-Type:
75
+ - application/json
76
+ Accept:
77
+ - application/json
78
+ response:
79
+ status:
80
+ code: 404
81
+ message: Not Found
82
+ headers:
83
+ Server:
84
+ - Apache/2.2.22 (Fedora)
85
+ Content-Type:
86
+ - text/html; charset=UTF-8
87
+ Content-Length:
88
+ - "9"
89
+ Connection:
90
+ - close
91
+ Date:
92
+ - Sun, 09 Sep 2012 04:32:39 GMT
93
+ body:
94
+ string: not found
95
+ http_version:
96
+ recorded_at: Sun, 09 Sep 2012 04:32:39 GMT
97
+ - request:
98
+ method: get
99
+ uri: https://admin:admin@localhost/pulp/api/v2/users/admin
100
+ body:
101
+ string: ""
102
+ headers:
103
+ Accept-Encoding:
104
+ - gzip, deflate
105
+ Content-Type:
106
+ - application/json
107
+ Accept:
108
+ - application/json
109
+ response:
110
+ status:
111
+ code: 404
112
+ message: Not Found
113
+ headers:
114
+ Server:
115
+ - Apache/2.2.22 (Fedora)
116
+ Content-Type:
117
+ - text/html; charset=UTF-8
118
+ Content-Length:
119
+ - "9"
120
+ Connection:
121
+ - close
122
+ Date:
123
+ - Sun, 09 Sep 2012 04:33:46 GMT
124
+ body:
125
+ string: not found
126
+ http_version:
127
+ recorded_at: Sun, 09 Sep 2012 04:33:46 GMT
128
+ - request:
129
+ method: post
130
+ uri: https://admin:admin@localhost/pulp/api/v2/users
131
+ body:
132
+ string: "{\"password\":\"integration_test_user\",\"login\":\"integration_test_user\",\"name\":\"integration_test_password\"}"
133
+ headers:
134
+ Accept-Encoding:
135
+ - gzip, deflate
136
+ Content-Type:
137
+ - application/json
138
+ Content-Length:
139
+ - "103"
140
+ Accept:
141
+ - application/json
142
+ response:
143
+ status:
144
+ code: 404
145
+ message: Not Found
146
+ headers:
147
+ Server:
148
+ - Apache/2.2.22 (Fedora)
149
+ Content-Type:
150
+ - text/html; charset=UTF-8
151
+ Content-Length:
152
+ - "9"
153
+ Connection:
154
+ - close
155
+ Date:
156
+ - Sun, 09 Sep 2012 04:33:46 GMT
157
+ body:
158
+ string: not found
159
+ http_version:
160
+ recorded_at: Sun, 09 Sep 2012 04:33:46 GMT
161
+ - request:
162
+ method: get
163
+ uri: https://admin:admin@localhost/pulp/api/v2/users/admin/
164
+ body:
165
+ string: ""
166
+ headers:
167
+ Accept-Encoding:
168
+ - gzip, deflate
169
+ Content-Type:
170
+ - application/json
171
+ Accept:
172
+ - application/json
173
+ response:
174
+ status:
175
+ code: 200
176
+ message: OK
177
+ headers:
178
+ Server:
179
+ - Apache/2.2.22 (Fedora)
180
+ Content-Type:
181
+ - application/json
182
+ Content-Length:
183
+ - "267"
184
+ Connection:
185
+ - close
186
+ Date:
187
+ - Sun, 09 Sep 2012 10:52:52 GMT
188
+ body:
189
+ string: "{\"_id\": {\"$oid\": \"5048f6c5ec6a6d6734000008\"}, \"name\": \"admin\", \"roles\": [\"super-users\"], \"_ns\": \"users\", \"login\": \"admin\", \"password\": \"VVz8lz2wFGM=,TKtfpt6HEXaxzEGRaDeJm5Zo7UsCdf9d26QVyiKKnb4=\", \"id\": \"5048f6c5ec6a6d6734000008\", \"_href\": \"/pulp/api/v2/users/admin/\"}"
190
+ http_version:
191
+ recorded_at: Sun, 09 Sep 2012 10:52:52 GMT
192
+ - request:
193
+ method: get
194
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
195
+ body:
196
+ string: ""
197
+ headers:
198
+ Accept-Encoding:
199
+ - gzip, deflate
200
+ Content-Type:
201
+ - application/json
202
+ Accept:
203
+ - application/json
204
+ response:
205
+ status:
206
+ code: 200
207
+ message: OK
208
+ headers:
209
+ Server:
210
+ - Apache/2.2.22 (Fedora)
211
+ Content-Type:
212
+ - application/json
213
+ Content-Length:
214
+ - "247"
215
+ Connection:
216
+ - close
217
+ Date:
218
+ - Mon, 10 Sep 2012 01:16:08 GMT
219
+ body:
220
+ string: "{\"_id\": {\"$oid\": \"504d3f58ec6a6d697600182e\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": null, \"id\": \"504d3f58ec6a6d697600182e\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
221
+ http_version:
222
+ recorded_at: Mon, 10 Sep 2012 01:16:08 GMT
223
+ - request:
224
+ method: post
225
+ uri: https://admin:admin@localhost/pulp/api/v2/users/
226
+ body:
227
+ string: "{\"login\":\"integration_test_user\"}"
228
+ headers:
229
+ Content-Type:
230
+ - application/json
231
+ Accept-Encoding:
232
+ - gzip, deflate
233
+ Content-Length:
234
+ - "33"
235
+ Accept:
236
+ - application/json
237
+ response:
238
+ status:
239
+ code: 201
240
+ message: Created
241
+ headers:
242
+ Server:
243
+ - Apache/2.2.22 (Fedora)
244
+ Content-Type:
245
+ - application/json
246
+ Location:
247
+ - integration_test_user
248
+ Connection:
249
+ - close
250
+ Content-Length:
251
+ - "229"
252
+ Date:
253
+ - Mon, 10 Sep 2012 01:18:30 GMT
254
+ body:
255
+ string: "{\"_id\": {\"$oid\": \"504d3fe6ec6a6d69760018f5\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"504d3fe6ec6a6d69760018f5\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
256
+ http_version:
257
+ recorded_at: Mon, 10 Sep 2012 01:18:30 GMT
258
+ - request:
259
+ method: delete
260
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
261
+ body:
262
+ string: ""
263
+ headers:
264
+ Content-Type:
265
+ - application/json
266
+ Accept-Encoding:
267
+ - gzip, deflate
268
+ Accept:
269
+ - application/json
270
+ response:
271
+ status:
272
+ code: 200
273
+ message: OK
274
+ headers:
275
+ Server:
276
+ - Apache/2.2.22 (Fedora)
277
+ Content-Type:
278
+ - application/json
279
+ Connection:
280
+ - close
281
+ Content-Length:
282
+ - "4"
283
+ Date:
284
+ - Mon, 10 Sep 2012 01:18:30 GMT
285
+ body:
286
+ string: "null"
287
+ http_version:
288
+ recorded_at: Mon, 10 Sep 2012 01:18:31 GMT
@@ -0,0 +1,195 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://admin:admin@localhost/pulp/api/v2users/integration_test_user
6
+ body:
7
+ string: ""
8
+ headers:
9
+ Accept:
10
+ - application/json
11
+ Content-Type:
12
+ - application/json
13
+ Accept-Encoding:
14
+ - gzip, deflate
15
+ response:
16
+ status:
17
+ code: 404
18
+ message: Not Found
19
+ headers:
20
+ Content-Type:
21
+ - text/html; charset=UTF-8
22
+ Content-Length:
23
+ - "9"
24
+ Date:
25
+ - Sun, 09 Sep 2012 04:32:39 GMT
26
+ Server:
27
+ - Apache/2.2.22 (Fedora)
28
+ Connection:
29
+ - close
30
+ body:
31
+ string: not found
32
+ http_version:
33
+ recorded_at: Sun, 09 Sep 2012 04:32:39 GMT
34
+ - request:
35
+ method: get
36
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user
37
+ body:
38
+ string: ""
39
+ headers:
40
+ Accept:
41
+ - application/json
42
+ Content-Type:
43
+ - application/json
44
+ Accept-Encoding:
45
+ - gzip, deflate
46
+ response:
47
+ status:
48
+ code: 404
49
+ message: Not Found
50
+ headers:
51
+ Content-Type:
52
+ - text/html; charset=UTF-8
53
+ Content-Length:
54
+ - "9"
55
+ Date:
56
+ - Sun, 09 Sep 2012 04:33:47 GMT
57
+ Server:
58
+ - Apache/2.2.22 (Fedora)
59
+ Connection:
60
+ - close
61
+ body:
62
+ string: not found
63
+ http_version:
64
+ recorded_at: Sun, 09 Sep 2012 04:33:47 GMT
65
+ - request:
66
+ method: post
67
+ uri: https://admin:admin@localhost/pulp/api/v2/users
68
+ body:
69
+ string: "{\"password\":\"integration_test_user\",\"login\":\"integration_test_user\",\"name\":\"integration_test_password\"}"
70
+ headers:
71
+ Accept:
72
+ - application/json
73
+ Content-Type:
74
+ - application/json
75
+ Accept-Encoding:
76
+ - gzip, deflate
77
+ Content-Length:
78
+ - "103"
79
+ response:
80
+ status:
81
+ code: 404
82
+ message: Not Found
83
+ headers:
84
+ Content-Type:
85
+ - text/html; charset=UTF-8
86
+ Content-Length:
87
+ - "9"
88
+ Date:
89
+ - Sun, 09 Sep 2012 04:33:47 GMT
90
+ Server:
91
+ - Apache/2.2.22 (Fedora)
92
+ Connection:
93
+ - close
94
+ body:
95
+ string: not found
96
+ http_version:
97
+ recorded_at: Sun, 09 Sep 2012 04:33:47 GMT
98
+ - request:
99
+ method: post
100
+ uri: https://admin:admin@localhost/pulp/api/v2/users/
101
+ body:
102
+ string: "{\"login\":\"integration_test_user\"}"
103
+ headers:
104
+ Accept:
105
+ - application/json
106
+ Content-Type:
107
+ - application/json
108
+ Accept-Encoding:
109
+ - gzip, deflate
110
+ Content-Length:
111
+ - "33"
112
+ response:
113
+ status:
114
+ code: 201
115
+ message: Created
116
+ headers:
117
+ Content-Type:
118
+ - application/json
119
+ Location:
120
+ - integration_test_user
121
+ Content-Length:
122
+ - "229"
123
+ Date:
124
+ - Mon, 10 Sep 2012 01:16:08 GMT
125
+ Server:
126
+ - Apache/2.2.22 (Fedora)
127
+ Connection:
128
+ - close
129
+ body:
130
+ string: "{\"_id\": {\"$oid\": \"504d3f59ec6a6d697600183a\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"id\": \"504d3f59ec6a6d697600183a\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
131
+ http_version:
132
+ recorded_at: Mon, 10 Sep 2012 01:16:09 GMT
133
+ - request:
134
+ method: get
135
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
136
+ body:
137
+ string: ""
138
+ headers:
139
+ Accept:
140
+ - application/json
141
+ Content-Type:
142
+ - application/json
143
+ Accept-Encoding:
144
+ - gzip, deflate
145
+ response:
146
+ status:
147
+ code: 200
148
+ message: OK
149
+ headers:
150
+ Content-Type:
151
+ - application/json
152
+ Content-Length:
153
+ - "302"
154
+ Date:
155
+ - Mon, 10 Sep 2012 01:16:10 GMT
156
+ Server:
157
+ - Apache/2.2.22 (Fedora)
158
+ Connection:
159
+ - close
160
+ body:
161
+ string: "{\"_id\": {\"$oid\": \"504d3f5aec6a6d6976001850\"}, \"name\": \"integration_test_user\", \"roles\": [], \"_ns\": \"users\", \"login\": \"integration_test_user\", \"password\": \"Ud1yuk10NCA=,/dvwUqWKkt7TtOWJ0EEkzcy1+r+eHGKtxelPmLMn86w=\", \"id\": \"504d3f5aec6a6d6976001850\", \"_href\": \"/pulp/api/v2/users/integration_test_user/\"}"
162
+ http_version:
163
+ recorded_at: Mon, 10 Sep 2012 01:16:10 GMT
164
+ - request:
165
+ method: delete
166
+ uri: https://admin:admin@localhost/pulp/api/v2/users/integration_test_user/
167
+ body:
168
+ string: ""
169
+ headers:
170
+ Accept:
171
+ - application/json
172
+ Content-Type:
173
+ - application/json
174
+ Accept-Encoding:
175
+ - gzip, deflate
176
+ response:
177
+ status:
178
+ code: 200
179
+ message: OK
180
+ headers:
181
+ Content-Type:
182
+ - application/json
183
+ Content-Length:
184
+ - "4"
185
+ Date:
186
+ - Mon, 10 Sep 2012 01:16:10 GMT
187
+ Server:
188
+ - Apache/2.2.22 (Fedora)
189
+ Connection:
190
+ - close
191
+ body:
192
+ string: "null"
193
+ http_version:
194
+ recorded_at: Mon, 10 Sep 2012 01:16:10 GMT
195
+ recorded_with: VCR 2.2.4