github_api 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/README.md +78 -59
  2. data/features/cassettes/repos/assets/delete.yml +52 -0
  3. data/features/cassettes/repos/assets/edit.yml +65 -0
  4. data/features/cassettes/repos/assets/get.yml +74 -0
  5. data/features/cassettes/repos/assets/list.yml +73 -0
  6. data/features/cassettes/repos/assets/upload.yml +66 -0
  7. data/features/cassettes/repos/list_org.yml +167 -0
  8. data/features/cassettes/repos/list_org_instance.yml +300 -0
  9. data/features/cassettes/repos/releases/create.yml +64 -0
  10. data/features/cassettes/repos/releases/delete.yml +52 -0
  11. data/features/cassettes/repos/releases/edit.yml +63 -0
  12. data/features/cassettes/repos/releases/get.yml +78 -0
  13. data/features/cassettes/repos/releases/list.yml +81 -0
  14. data/features/cassettes/search/code.yml +252 -0
  15. data/features/cassettes/search/code_query.yml +65 -0
  16. data/features/cassettes/search/issues.yml +616 -170
  17. data/features/cassettes/search/legacy/email.yml +72 -0
  18. data/features/cassettes/search/legacy/issues.yml +119 -0
  19. data/features/cassettes/search/legacy/repos.yml +394 -0
  20. data/features/cassettes/search/legacy/users.yml +72 -0
  21. data/features/cassettes/search/legacy/users_keyword.yml +63 -0
  22. data/features/cassettes/search/repos.yml +375 -364
  23. data/features/cassettes/search/users.yml +40 -22
  24. data/features/cassettes/search/users_keyword.yml +51 -56
  25. data/features/repos.feature +22 -0
  26. data/features/repos/assets.feature +59 -0
  27. data/features/repos/releases.feature +58 -0
  28. data/features/search.feature +24 -13
  29. data/features/search/legacy.feature +59 -0
  30. data/features/settings.yml +2 -5
  31. data/features/step_definitions/github_api_steps.rb +12 -0
  32. data/lib/github_api/configuration.rb +3 -1
  33. data/lib/github_api/error.rb +6 -17
  34. data/lib/github_api/error/unknown_media.rb +18 -0
  35. data/lib/github_api/params_hash.rb +20 -10
  36. data/lib/github_api/repos.rb +26 -15
  37. data/lib/github_api/repos/releases.rb +146 -0
  38. data/lib/github_api/repos/releases/assets.rb +126 -0
  39. data/lib/github_api/request.rb +14 -9
  40. data/lib/github_api/resource.rb +8 -1
  41. data/lib/github_api/search.rb +68 -27
  42. data/lib/github_api/search/legacy.rb +94 -0
  43. data/lib/github_api/ssl_certs/cacert.pem +41 -0
  44. data/lib/github_api/ssl_certs/cacerts.pem +2183 -0
  45. data/lib/github_api/version.rb +2 -2
  46. data/spec/fixtures/repos/asset.json +12 -0
  47. data/spec/fixtures/repos/assets.json +14 -0
  48. data/spec/fixtures/repos/release.json +15 -0
  49. data/spec/fixtures/repos/releases.json +17 -0
  50. data/spec/fixtures/search/code.json +76 -0
  51. data/spec/fixtures/search/issues.json +47 -16
  52. data/spec/fixtures/search/issues_legacy.json +23 -0
  53. data/spec/fixtures/search/repos.json +39 -0
  54. data/spec/fixtures/search/{repositories.json → repos_legacy.json} +0 -0
  55. data/spec/fixtures/search/users.json +15 -19
  56. data/spec/fixtures/search/users_legacy.json +24 -0
  57. data/spec/github/configuration_spec.rb +2 -0
  58. data/spec/github/error/unknown_media_spec.rb +21 -0
  59. data/spec/github/git_data/references/create_spec.rb +1 -1
  60. data/spec/github/git_data/references/get_spec.rb +6 -4
  61. data/spec/github/git_data/references/list_spec.rb +6 -16
  62. data/spec/github/pagination/iterator/number_spec.rb +2 -2
  63. data/spec/github/pagination/iterator/sha_spec.rb +2 -2
  64. data/spec/github/params_hash_spec.rb +6 -0
  65. data/spec/github/repos/assets/delete_spec.rb +40 -0
  66. data/spec/github/repos/assets/edit_spec.rb +40 -0
  67. data/spec/github/repos/assets/get_spec.rb +45 -0
  68. data/spec/github/repos/assets/list_spec.rb +55 -0
  69. data/spec/github/repos/assets/upload_spec.rb +44 -0
  70. data/spec/github/repos/downloads/upload_spec.rb +5 -5
  71. data/spec/github/repos/releases/create_spec.rb +44 -0
  72. data/spec/github/repos/releases/delete_spec.rb +40 -0
  73. data/spec/github/repos/releases/edit_spec.rb +40 -0
  74. data/spec/github/repos/releases/get_spec.rb +45 -0
  75. data/spec/github/repos/releases/list_spec.rb +54 -0
  76. data/spec/github/request/endpoint_spec.rb +1 -3
  77. data/spec/github/request/request_spec.rb +4 -8
  78. data/spec/github/request_spec.rb +3 -3
  79. data/spec/github/response_wrapper_spec.rb +3 -3
  80. data/spec/github/s3_uploader_spec.rb +2 -3
  81. data/spec/github/search/code_spec.rb +38 -0
  82. data/spec/github/search/issues_spec.rb +38 -0
  83. data/spec/github/search/legacy/email_spec.rb +34 -0
  84. data/spec/github/search/legacy/issues_spec.rb +39 -0
  85. data/spec/github/search/legacy/repos_spec.rb +36 -0
  86. data/spec/github/search/legacy/users_spec.rb +36 -0
  87. data/spec/github/search/repos_spec.rb +38 -0
  88. data/spec/github/search/users_spec.rb +38 -0
  89. data/spec/github/users/get_spec.rb +1 -1
  90. data/spec/github/validations/presence_spec.rb +2 -5
  91. data/spec/integration/repos_spec.rb +4 -0
  92. data/spec/integration/search_spec.rb +12 -0
  93. metadata +122 -62
  94. data/features/cassettes/search/email.yml +0 -99
  95. data/spec/github/search_spec.rb +0 -102
@@ -2,53 +2,71 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://<BASIC_AUTH>@api.github.com/legacy/user/search/wycats?access_token=<TOKEN>
5
+ uri: https://<BASIC_AUTH>@api.github.com/search/users?access_token=<TOKEN>&q=wycats
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ""
9
9
  headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
10
  Accept:
13
- - "*/*"
11
+ - application/vnd.github.preview
12
+ Accept-Charset:
13
+ - utf-8
14
14
  User-Agent:
15
- - Ruby
15
+ - Github Ruby Gem 0.10.2
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
18
  response:
17
19
  status:
18
20
  code: 200
19
21
  message: OK
20
22
  headers:
21
23
  Server:
22
- - nginx/1.0.13
24
+ - GitHub.com
23
25
  Date:
24
- - Sat, 09 Jun 2012 17:10:15 GMT
26
+ - Mon, 23 Sep 2013 06:13:48 GMT
25
27
  Content-Type:
26
28
  - application/json; charset=utf-8
27
29
  Transfer-Encoding:
28
30
  - chunked
29
- Connection:
30
- - keep-alive
31
31
  Status:
32
32
  - 200 OK
33
33
  X-Ratelimit-Limit:
34
- - "5000"
35
- Etag:
36
- - "\"a934f063ddc0a5ee9ac2a1e367e74385\""
34
+ - "20"
37
35
  X-Ratelimit-Remaining:
38
- - "4997"
36
+ - "19"
37
+ X-Ratelimit-Reset:
38
+ - "1379916888"
39
+ Cache-Control:
40
+ - no-cache
41
+ X-Github-Media-Type:
42
+ - github.preview
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ Access-Control-Allow-Credentials:
46
+ - "true"
47
+ Access-Control-Expose-Headers:
48
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ X-Github-Request-Id:
52
+ - 568653B5:4E85:E52DC5:523FDC1C
53
+ Vary:
54
+ - Accept-Encoding
39
55
  Content-Encoding:
40
56
  - gzip
41
57
  body:
42
58
  encoding: ASCII-8BIT
43
59
  string: !binary |
44
- H4sIAAAAAAAAA21Qy07DMBD8lcrnprI3b38AF27QCyAUbRw3jWTsyImpQtV/
45
- Z51CTj16ZjyPvbIwaT8x+XFlvcdvnNE3Q8cky6ASRYmpViVAmrdYl0IUUEOW
46
- 1VDwmu2ZxS9Nyjd9Dh3unnH+IVB5jbPuGpyJAs6rhItEwJHnMq1kmr6TxjiF
47
- 8+AsKV7R7p48WjVMyhE1htYMqvF6dI1ywZKLANizkzPGXdaqUOYRCMY8LGDQ
48
- 9gH72OwltAt5xol/0stCyRNh68ZIJBm9Yhw5r0nzMsa/kSNmy/1vc08fw3TW
49
- 0QK4gIQXCS+PXEhRSoBDmlX3lf0QJ26ZtNCTdX4QNQdRxFhCyMXSlu1yq+mD
50
- s90+b783LEDtrgEAAA==
60
+ H4sIAAAAAAAAA5WSUWuDMBDHv0ugb8U00RoVxtjLvsGexigxRg3YRJJo6aTf
61
+ fRfd2q4PG4Jg9O73v3/ubkLeeN4dhBm0RwXZIuXl0aHifUKdaZRGBTqdBfcO
62
+ QahCRbJFfOSe28NgOwi23veuwHgXNXYJRMIc8XLECc1IyngsBaM03pc8Z4Sk
63
+ NKdJktN0lz9XT7PAJn7Z0Fd4VCW1V8JoFzXKt0MZ1OA/z1hdpyzntI4lI1VO
64
+ MsJTVrJ9QgmlIup1Aw5/PByCVfRfdQB+X4L36q4sHpy0Dl+v3/pj93Drm8db
65
+ Wm26zpyAfMj9QxxfGbC0nJVuVvPATNj4VsJwwPolNEQ5v8bInD/h8IIeBgUH
66
+ s7ayWmHmmwArJw0uJmxlb2apoXTCqt4rmO8awXsOdIxtuFaffK0OcGGNg501
67
+ 5ed84OQIu7kGXIAJ91aNXJxDC6wUUo3QztViDyRo+XMvYcvfYNShucJY+KRZ
68
+ EpGMpfTycfkC8Qf+Et0DAAA=
51
69
 
52
70
  http_version:
53
- recorded_at: Sat, 09 Jun 2012 17:10:15 GMT
54
- recorded_with: VCR 2.2.0
71
+ recorded_at: Mon, 23 Sep 2013 06:13:48 GMT
72
+ recorded_with: VCR 2.5.0
@@ -1,70 +1,65 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
- uri: https://<BASIC_AUTH>@api.github.com/legacy/user/search/location:Sheffield%20repos:20?access_token=<TOKEN>
6
- body:
5
+ uri: https://<BASIC_AUTH>@api.github.com/search/users?access_token=<TOKEN>&q=location:Sheffield%2520repos:20
6
+ body:
7
7
  encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/vnd.github.v3.full+json,application/vnd.github.beta.full+json;q=0.7,application/vnd.github+json;q=0.5,application/json;q=0.1
12
- Accept-Charset:
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - application/vnd.github.preview
12
+ Accept-Charset:
13
13
  - utf-8
14
- User-Agent:
15
- - Github Ruby Gem 0.9.7
16
- Content-Type:
17
- - application/json
18
- Accept-Encoding:
14
+ User-Agent:
15
+ - Github Ruby Gem 0.10.2
16
+ Accept-Encoding:
19
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
- response:
21
- status:
18
+ response:
19
+ status:
22
20
  code: 200
23
21
  message: OK
24
- headers:
25
- Server:
22
+ headers:
23
+ Server:
26
24
  - GitHub.com
27
- Date:
28
- - Sat, 18 May 2013 13:33:41 GMT
29
- Content-Type:
25
+ Date:
26
+ - Mon, 23 Sep 2013 06:14:16 GMT
27
+ Content-Type:
30
28
  - application/json; charset=utf-8
31
- Transfer-Encoding:
29
+ Transfer-Encoding:
32
30
  - chunked
33
- Connection:
34
- - keep-alive
35
- Status:
31
+ Status:
36
32
  - 200 OK
37
- X-Ratelimit-Limit:
38
- - '5000'
39
- X-Ratelimit-Remaining:
40
- - '4999'
41
- X-Github-Media-Type:
42
- - github.v3; param=full; format=json
43
- X-Content-Type-Options:
33
+ X-Ratelimit-Limit:
34
+ - "20"
35
+ X-Ratelimit-Remaining:
36
+ - "18"
37
+ X-Ratelimit-Reset:
38
+ - "1379916888"
39
+ Cache-Control:
40
+ - no-cache
41
+ X-Github-Media-Type:
42
+ - github.preview
43
+ X-Content-Type-Options:
44
44
  - nosniff
45
- Access-Control-Allow-Credentials:
46
- - 'true'
47
- Access-Control-Expose-Headers:
48
- - Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
49
- Access-Control-Allow-Origin:
50
- - ! '*'
51
- Etag:
52
- - ! '"719c73d7273332047f0d1eacf695cedd"'
53
- Cache-Control:
54
- - max-age=0, private, must-revalidate
55
- Vary:
45
+ Access-Control-Allow-Credentials:
46
+ - "true"
47
+ Access-Control-Expose-Headers:
48
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes
49
+ Access-Control-Allow-Origin:
50
+ - "*"
51
+ X-Github-Request-Id:
52
+ - 568653B5:46FF:E24F03:523FDC37
53
+ Vary:
56
54
  - Accept-Encoding
57
- Content-Encoding:
55
+ Content-Encoding:
58
56
  - gzip
59
- body:
57
+ body:
60
58
  encoding: ASCII-8BIT
61
- string: !binary |-
62
- H4sIAAAAAAAAA3WQ3WrDMAyFXyX4uh124qRJXmEMxn5uNkZQ/JMaHDs49kYp
63
- fffJoYXBNvCFj/Tp6KAzSasKK+nfz8RI0m9yzzmvWEl2ZArwCRHCsPX0WPJO
64
- 1nXDgepW1EDHplNUHpis2453OJDHHcwK6UVFtJpTAHHEjvWTcb/LV/jR+BiK
65
- hxusk7V/d6wXEI3PTs9HpbVRVu6KV2eiksW9cZP0c94Gbkow5RxPaTxhJZ6W
66
- rHJAVEsarRFDUIsfhE8ukr6kO5I1HiN/tbfWf223qZof8obn4ip8QFN2h7wI
67
- CjDDAGhFSsroPr/2hR36ivWUvuHWK/MfcPm4fAP71GbikAEAAA==
68
- http_version: !!null
69
- recorded_at: Sat, 18 May 2013 13:33:41 GMT
70
- recorded_with: VCR 2.4.0
59
+ string: !binary |
60
+ H4sIAAAAAAAAA6tWKskvScyJT84vzStRsjLQUcosSc0tVrKKjq0FAKQh8rEc
61
+ AAAA
62
+
63
+ http_version:
64
+ recorded_at: Mon, 23 Sep 2013 06:14:16 GMT
65
+ recorded_with: VCR 2.5.0
@@ -44,6 +44,28 @@ Feature: Repositories API
44
44
  And the response type should be JSON
45
45
  And the response should not be empty
46
46
 
47
+ Scenario: All repositories for an organization
48
+
49
+ Given I want to list resources
50
+ And I pass the following request options:
51
+ | org |
52
+ | rspec |
53
+ When I make request within a cassette named "repos/list_org"
54
+ Then the response status should be 200
55
+ And the response type should be JSON
56
+ And the response should have 11 items
57
+
58
+ Scenario: All repositories for an organization set on instance
59
+
60
+ Given I set the following attributes of instance:
61
+ | org |
62
+ | rails |
63
+ Given I want to list resources
64
+ When I make request within a cassette named "repos/list_org_instance"
65
+ Then the response status should be 200
66
+ And the response type should be JSON
67
+ And the response should have 30 items
68
+
47
69
  Scenario: All repositories
48
70
 
49
71
  Given I want to list resources with the following params:
@@ -0,0 +1,59 @@
1
+ Feature: Release Assets API
2
+
3
+ Background:
4
+ Given I have "Github::Repos::Releases::Assets" instance
5
+ And I do not verify ssl
6
+
7
+ Scenario: List
8
+
9
+ Given I want to list resources with the following params:
10
+ | owner | repo | id |
11
+ | ase-lab | CocoaLumberjackFramework | 83441 |
12
+ When I make request within a cassette named "repos/assets/list"
13
+ Then the response status should be 200
14
+ And the response type should be JSON
15
+ And the response should not be empty
16
+
17
+ Scenario: Get
18
+
19
+ Given I want to get resource with the following params:
20
+ | owner | repo | id |
21
+ | ase-lab | CocoaLumberjackFramework | 33546 |
22
+ When I make request within a cassette named "repos/assets/get"
23
+ Then the response status should be 200
24
+ And the response type should be JSON
25
+ And the response should not be empty
26
+
27
+ Scenario: Upload
28
+
29
+ Given I want to upload resource with the following params:
30
+ | owner | repo | id | filepath |
31
+ | murek | github_api_test | 54999 | Rakefile |
32
+ And I pass the following request options:
33
+ | name |
34
+ | Rakefile |
35
+ When I make request within a cassette named "repos/assets/upload"
36
+ Then the response status should be 201
37
+ And the response type should be JSON
38
+ And the response should not be empty
39
+
40
+ Scenario: Edit
41
+
42
+ Given I want to edit resource with the following params:
43
+ | owner | repo | id |
44
+ | murek | github_api_test | 46084 |
45
+ And I pass the following request options:
46
+ | name | label |
47
+ | Rake | Ruby code |
48
+ When I make request within a cassette named "repos/assets/edit"
49
+ Then the response status should be 200
50
+ And the response type should be JSON
51
+ And the response should not be empty
52
+
53
+ Scenario: Delete
54
+
55
+ Given I want to delete resource with the following params:
56
+ | owner | repo | id |
57
+ | murek | github_api_test | 46073 |
58
+ When I make request within a cassette named "repos/assets/delete"
59
+ Then the response status should be 204
@@ -0,0 +1,58 @@
1
+ Feature: Releases API
2
+
3
+ Background:
4
+ Given I have "Github::Repos::Releases" instance
5
+
6
+ Scenario: List
7
+
8
+ Given I want to list resources with the following params:
9
+ | owner | repo |
10
+ | ase-lab | CocoaLumberjackFramework |
11
+ When I make request within a cassette named "repos/releases/list"
12
+ Then the response status should be 200
13
+ And the response type should be JSON
14
+ And the response should not be empty
15
+
16
+ Scenario: Get
17
+
18
+ Given I want to get resource with the following params:
19
+ | owner | repo | id |
20
+ | ase-lab | CocoaLumberjackFramework | 16963 |
21
+ When I make request within a cassette named "repos/releases/get"
22
+ Then the response status should be 200
23
+ And the response type should be JSON
24
+ And the response should not be empty
25
+
26
+ Scenario: Create
27
+
28
+ Given I want to create resource with the following params:
29
+ | owner | repo | tag_name |
30
+ | murek | github_api_test | v1.0.0 |
31
+ And I pass the following request options:
32
+ | name | body | draft | target_commitish |
33
+ | v1.0.0 | Main release | false | master |
34
+ When I make request within a cassette named "repos/releases/create"
35
+ Then the response status should be 201
36
+ And the response type should be JSON
37
+ And the response should not be empty
38
+
39
+ Scenario: Edit
40
+
41
+ Given I want to edit resource with the following params:
42
+ | owner | repo | id |
43
+ | murek | github_api_test | 54999 |
44
+ And I pass the following request options:
45
+ | name | body | draft | target_commitish |
46
+ | v1.0.0 | Main release | false | master |
47
+ When I make request within a cassette named "repos/releases/edit"
48
+ Then the response status should be 200
49
+ And the response type should be JSON
50
+ And the response should not be empty
51
+
52
+ Scenario: Delete
53
+
54
+ Given I want to delete resource with the following params:
55
+ | owner | repo | id |
56
+ | murek | github_api_test | 83539 |
57
+ When I make request within a cassette named "repos/releases/delete"
58
+ Then the response status should be 204
@@ -7,8 +7,8 @@ Feature: Search API
7
7
 
8
8
  Given I want issues resource
9
9
  And I pass the following request options:
10
- | owner | repo | state | keyword |
11
- | peter-murach | github | closed | api |
10
+ | q | sort |
11
+ | tty | created |
12
12
  When I make request within a cassette named "search/issues"
13
13
  Then the response status should be 200
14
14
  And the response type should be JSON
@@ -18,8 +18,8 @@ Feature: Search API
18
18
 
19
19
  Given I want repositories resource
20
20
  And I pass the following request options:
21
- | keyword |
22
- | rails |
21
+ | q | sort |
22
+ | rails | created |
23
23
  When I make request within a cassette named "search/repos"
24
24
  Then the response status should be 200
25
25
  And the response type should be JSON
@@ -29,31 +29,42 @@ Feature: Search API
29
29
 
30
30
  Given I want users resource
31
31
  And I pass the following request options:
32
- | keyword |
33
- | wycats |
32
+ | q |
33
+ | wycats |
34
34
  When I make request within a cassette named "search/users"
35
35
  Then the response status should be 200
36
36
  And the response type should be JSON
37
37
  And the response should not be empty
38
38
 
39
- Scenario: Users with complex keyword
39
+ Scenario: Users with search parameters
40
40
 
41
41
  Given I want users resource
42
42
  And I pass the following request options:
43
- | keyword |
43
+ | q |
44
44
  | location:Sheffield repos:20 |
45
45
  When I make request within a cassette named "search/users_keyword"
46
46
  Then the response status should be 200
47
47
  And the response type should be JSON
48
48
  And the response should not be empty
49
49
 
50
- Scenario: Email
50
+ Scenario: Code
51
51
 
52
- Given I want email resource
52
+ Given I want code resource
53
53
  And I pass the following request options:
54
- | email |
55
- | wycats@gmail.com |
56
- When I make request within a cassette named "search/email"
54
+ | q | sort |
55
+ | tty | indexed |
56
+ When I make request within a cassette named "search/code"
57
+ Then the response status should be 200
58
+ And the response type should be JSON
59
+ And the response should not be empty
60
+
61
+ Scenario: Code with search paramters
62
+
63
+ Given I want code resource
64
+ And I pass the following request options:
65
+ | q | sort |
66
+ | tty repo:peter-murach/tty | indexed |
67
+ When I make request within a cassette named "search/code_query"
57
68
  Then the response status should be 200
58
69
  And the response type should be JSON
59
70
  And the response should not be empty
@@ -0,0 +1,59 @@
1
+ Feature: Legacy Search API
2
+
3
+ Background:
4
+ Given I have "Github::Search::Legacy" instance
5
+
6
+ Scenario: Issues
7
+
8
+ Given I want issues resource
9
+ And I pass the following request options:
10
+ | owner | repo | state | keyword |
11
+ | peter-murach | github | closed | api |
12
+ When I make request within a cassette named "search/legacy/issues"
13
+ Then the response status should be 200
14
+ And the response type should be JSON
15
+ And the response should not be empty
16
+
17
+ Scenario: Repositories
18
+
19
+ Given I want repositories resource
20
+ And I pass the following request options:
21
+ | keyword | language | sort |
22
+ | rails | ruby | stars |
23
+ When I make request within a cassette named "search/legacy/repos"
24
+ Then the response status should be 200
25
+ And the response type should be JSON
26
+ And the response should not be empty
27
+
28
+ Scenario: Users
29
+
30
+ Given I want users resource
31
+ And I pass the following request options:
32
+ | keyword |
33
+ | wycats |
34
+ When I make request within a cassette named "search/legacy/users"
35
+ Then the response status should be 200
36
+ And the response type should be JSON
37
+ And the response should not be empty
38
+
39
+ Scenario: Users with complex keyword
40
+
41
+ Given I want users resource
42
+ And I pass the following request options:
43
+ | keyword |
44
+ | location:Sheffield repos:20 |
45
+ When I make request within a cassette named "search/legacy/users_keyword"
46
+ Then the response status should be 200
47
+ And the response type should be JSON
48
+ And the response should not be empty
49
+
50
+ Scenario: Email
51
+
52
+ Given I want email resource
53
+ And I pass the following request options:
54
+ | email |
55
+ | wycats@gmail.com |
56
+ When I make request within a cassette named "search/legacy/email"
57
+ Then the response status should be 200
58
+ And the response type should be JSON
59
+ And the response should not be empty