leadlight 0.0.5 → 0.0.6

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 (58) hide show
  1. data/Gemfile.lock +20 -18
  2. data/default.gems +1 -1
  3. data/leadlight.gemspec +24 -4
  4. data/lib/leadlight.rb +4 -5
  5. data/lib/leadlight/connection_builder.rb +29 -0
  6. data/lib/leadlight/errors.rb +11 -5
  7. data/lib/leadlight/hyperlinkable.rb +31 -10
  8. data/lib/leadlight/lib_ext.rb +3 -0
  9. data/lib/leadlight/lib_ext/faraday/README +6 -0
  10. data/lib/leadlight/lib_ext/faraday/adapter.rb +7 -0
  11. data/lib/leadlight/lib_ext/faraday/builder.rb +47 -0
  12. data/lib/leadlight/lib_ext/faraday/connection.rb +40 -0
  13. data/lib/leadlight/lib_ext/faraday/middleware.rb +7 -0
  14. data/lib/leadlight/link.rb +91 -4
  15. data/lib/leadlight/link_template.rb +13 -5
  16. data/lib/leadlight/null_link.rb +21 -0
  17. data/lib/leadlight/param_hash.rb +42 -0
  18. data/lib/leadlight/representation.rb +23 -3
  19. data/lib/leadlight/request.rb +42 -10
  20. data/lib/leadlight/service.rb +11 -9
  21. data/lib/leadlight/service_class_methods.rb +11 -3
  22. data/lib/leadlight/tint_helper.rb +32 -2
  23. data/spec/cassettes/Leadlight/authorized_GitHub_example/_user/has_the_expected_content.yml +72 -54
  24. data/spec/cassettes/Leadlight/authorized_GitHub_example/_user/indicates_the_expected_oath_scopes.yml +73 -55
  25. data/spec/cassettes/Leadlight/authorized_GitHub_example/adding_and_removing_team_members.yml +353 -265
  26. data/spec/cassettes/Leadlight/authorized_GitHub_example/adding_and_removing_teams.yml +75 -175
  27. data/spec/cassettes/Leadlight/authorized_GitHub_example/team_list/should_have_a_link_back_to_the_org.yml +196 -0
  28. data/spec/cassettes/Leadlight/authorized_GitHub_example/test_team/.yml +152 -108
  29. data/spec/cassettes/Leadlight/authorized_GitHub_example/test_team/has_a_root_link.yml +197 -0
  30. data/spec/cassettes/Leadlight/basic_GitHub_example/_root/.yml +15 -43
  31. data/spec/cassettes/Leadlight/basic_GitHub_example/_root/__location__/.yml +15 -43
  32. data/spec/cassettes/Leadlight/basic_GitHub_example/_root/should_be_a_204_no_content.yml +15 -43
  33. data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/.yml +15 -43
  34. data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/__location__/.yml +15 -43
  35. data/spec/cassettes/Leadlight/tinted_GitHub_example/_root/should_be_a_204_no_content.yml +15 -43
  36. data/spec/cassettes/Leadlight/tinted_GitHub_example/_user/has_the_expected_content.yml +35 -90
  37. data/spec/cassettes/Leadlight/tinted_GitHub_example/bad_links/enables_custom_error_matching.yml +25 -17
  38. data/spec/cassettes/Leadlight/tinted_GitHub_example/bad_links/should_raise_ResourceNotFound.yml +26 -90
  39. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/.yml +57 -140
  40. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_able_to_follow_next_link.yml +79 -192
  41. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_enumerable.yml +279 -350
  42. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_be_enumerable_over_page_boundaries.yml +98 -243
  43. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_followers/should_have_next_and_last_links.yml +59 -142
  44. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_link/exists.yml +15 -43
  45. data/spec/cassettes/Leadlight/tinted_GitHub_example/user_link/links_to_the_expected_URL.yml +15 -43
  46. data/spec/leadlight/hyperlinkable_spec.rb +50 -4
  47. data/spec/leadlight/link_spec.rb +70 -10
  48. data/spec/leadlight/link_template_spec.rb +20 -4
  49. data/spec/leadlight/null_link_spec.rb +14 -0
  50. data/spec/leadlight/param_hash_spec.rb +26 -0
  51. data/spec/leadlight/representation_spec.rb +36 -4
  52. data/spec/leadlight/request_spec.rb +39 -22
  53. data/spec/leadlight/service_spec.rb +14 -13
  54. data/spec/leadlight/tint_helper_spec.rb +36 -2
  55. data/spec/leadlight_spec.rb +31 -17
  56. data/spec/support/link_matchers.rb +59 -0
  57. data/spec/support/misc.rb +9 -0
  58. metadata +49 -34
@@ -45,9 +45,9 @@ module Leadlight
45
45
  # Declare a new type mapping. Either pass a converter ("type")
46
46
  # class, or pass a block which defines #decode and #encode
47
47
  # methods.
48
- def type_mapping(enctype_patterns,
49
- object_patterns,
50
- converter_class=make_converter_class,
48
+ def type_mapping(enctype_patterns,
49
+ object_patterns,
50
+ converter_class=make_converter_class,
51
51
  &converter_definition)
52
52
  converter_class.module_eval(&converter_definition) if converter_definition
53
53
  on_init do
@@ -59,6 +59,14 @@ module Leadlight
59
59
  @connection_stack = block
60
60
  end
61
61
 
62
+ def http_adapter(*http_adapter_options)
63
+ if http_adapter_options.empty?
64
+ @http_adapter ||= [:net_http]
65
+ else
66
+ @http_adapter = http_adapter_options
67
+ end
68
+ end
69
+
62
70
  def make_converter_class
63
71
  Class.new do
64
72
  include BasicConverter
@@ -22,14 +22,20 @@ module Leadlight
22
22
  end
23
23
 
24
24
  def match_path(pattern)
25
- match{ pattern === __location__.path }
25
+ matcher = path_matcher(pattern)
26
+ match{ matcher.call(pattern, __location__.path, __captures__) }
26
27
  end
27
28
 
28
29
  def match_template(path_template)
29
30
  path_url = Addressable::URI.parse(path_template)
30
31
  full_url = __location__ + path_url
31
32
  template = Addressable::Template.new(full_url.to_s)
32
- match { template.match(__location__) }
33
+ match {
34
+ match_data = template.match(__location__)
35
+ if match_data
36
+ __captures__.merge!(match_data.mapping)
37
+ end
38
+ }
33
39
  end
34
40
 
35
41
  def match_content_type(pattern)
@@ -86,5 +92,29 @@ module Leadlight
86
92
  end
87
93
  }
88
94
  end
95
+
96
+ def path_matcher(object)
97
+ case object
98
+ when Regexp then method(:match_path_with_regexp)
99
+ else method(:match_path_generic)
100
+ end
101
+ end
102
+
103
+ def match_path_with_regexp(pattern, path, captures)
104
+ capture_names = pattern.names
105
+ match_data = pattern.match(path)
106
+ if match_data
107
+ capture_names.each do |name|
108
+ value = match_data[name]
109
+ captures[name] = value if value
110
+ end
111
+ end
112
+ end
113
+
114
+ def match_path_generic(pattern, path, captures)
115
+ # We can't capture any values if we don't know what kind of
116
+ # matcher this is
117
+ pattern === path
118
+ end
89
119
  end
90
120
  end
@@ -1,75 +1,93 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
5
  uri: https://api.github.com/
6
- body: ""
7
- headers:
8
- Authorization:
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
9
11
  - <AUTH FILTERED>
10
- Accept:
11
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
12
- response:
13
- status:
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ response:
16
+ status:
14
17
  code: 204
15
18
  message:
16
- headers:
17
- server:
18
- - nginx/1.0.4
19
- date:
20
- - Sun, 15 Jan 2012 19:38:44 GMT
21
- connection:
19
+ headers:
20
+ server:
21
+ - nginx/1.0.13
22
+ date:
23
+ - Wed, 01 Aug 2012 19:39:00 GMT
24
+ connection:
22
25
  - close
23
- status:
26
+ status:
24
27
  - 204 No Content
25
- x-ratelimit-limit:
26
- - "5000"
27
- etag:
28
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
29
- x-oauth-scopes:
28
+ x-oauth-scopes:
30
29
  - repo
31
- x-ratelimit-remaining:
32
- - "4994"
33
- body: ""
30
+ x-ratelimit-remaining:
31
+ - '4985'
32
+ cache-control:
33
+ - ''
34
+ x-ratelimit-limit:
35
+ - '5000'
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
34
39
  http_version:
35
- recorded_at: Sun, 15 Jan 2012 19:38:44 GMT
36
- - request:
40
+ recorded_at: Wed, 01 Aug 2012 19:38:49 GMT
41
+ - request:
37
42
  method: get
38
43
  uri: https://api.github.com/users/avdi
39
- body: ""
40
- headers:
41
- Authorization:
44
+ body:
45
+ encoding: US-ASCII
46
+ string: ''
47
+ headers:
48
+ Authorization:
42
49
  - <AUTH FILTERED>
43
- Accept:
44
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
45
- response:
46
- status:
50
+ Accept:
51
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
52
+ text/plain
53
+ response:
54
+ status:
47
55
  code: 200
48
56
  message:
49
- headers:
50
- server:
51
- - nginx/1.0.4
52
- date:
53
- - Sun, 15 Jan 2012 19:38:45 GMT
54
- content-type:
57
+ headers:
58
+ server:
59
+ - nginx/1.0.13
60
+ date:
61
+ - Wed, 01 Aug 2012 19:39:01 GMT
62
+ content-type:
55
63
  - application/json; charset=utf-8
56
- transfer-encoding:
64
+ transfer-encoding:
57
65
  - chunked
58
- connection:
66
+ connection:
59
67
  - close
60
- status:
68
+ status:
61
69
  - 200 OK
62
- x-ratelimit-limit:
63
- - "5000"
64
- etag:
65
- - "\"3318aa5883e462e54c8e97cb1e76accf\""
66
- x-oauth-scopes:
70
+ etag:
71
+ - ! '"ddb253ed98ca6098d5078df699ed28ee"'
72
+ cache-control:
73
+ - private, max-age=60
74
+ vary:
75
+ - Accept, Authorization, Cookie
76
+ x-ratelimit-remaining:
77
+ - '4984'
78
+ last-modified:
79
+ - Tue, 31 Jul 2012 06:09:16 GMT
80
+ x-oauth-scopes:
67
81
  - repo
68
- x-ratelimit-remaining:
69
- - "4993"
70
- x-accepted-oauth-scopes:
82
+ x-ratelimit-limit:
83
+ - '5000'
84
+ x-accepted-oauth-scopes:
71
85
  - user
72
- body: "{\"type\":\"User\",\"public_repos\":61,\"public_gists\":72,\"created_at\":\"2008-02-26T19:54:34Z\",\"email\":\"avdi@avdi.org\",\"url\":\"https://api.github.com/users/avdi\",\"login\":\"avdi\",\"followers\":181,\"following\":33,\"hireable\":false,\"bio\":null,\"name\":\"Avdi Grimm\",\"blog\":\"http://avdi.org/devblog/\",\"avatar_url\":\"https://secure.gravatar.com/avatar/4dea430d31b993abaf41cd9b54f8128d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"location\":\"Pennsylvania, USA\",\"id\":982,\"html_url\":\"https://github.com/avdi\",\"company\":\"ShipRise\",\"gravatar_id\":\"4dea430d31b993abaf41cd9b54f8128d\"}"
86
+ body:
87
+ encoding: ASCII-8BIT
88
+ string: ! '{"followers":302,"type":"User","blog":"http://avdi.org/devblog/","gravatar_id":"4dea430d31b993abaf41cd9b54f8128d","following":34,"location":"Pennsylvania,
89
+ USA","hireable":false,"login":"avdi","public_repos":71,"html_url":"https://github.com/avdi","name":"Avdi
90
+ Grimm","email":"avdi@avdi.org","url":"https://api.github.com/users/avdi","avatar_url":"https://secure.gravatar.com/avatar/4dea430d31b993abaf41cd9b54f8128d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_gists":86,"created_at":"2008-02-26T19:54:34Z","company":"ShipRise","bio":null,"id":982}'
73
91
  http_version:
74
- recorded_at: Sun, 15 Jan 2012 19:38:45 GMT
75
- recorded_with: VCR 2.0.0.rc1
92
+ recorded_at: Wed, 01 Aug 2012 19:38:51 GMT
93
+ recorded_with: VCR 2.2.4
@@ -1,75 +1,93 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
5
  uri: https://api.github.com/
6
- body: ""
7
- headers:
8
- Authorization:
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
9
11
  - <AUTH FILTERED>
10
- Accept:
11
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
12
- response:
13
- status:
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ response:
16
+ status:
14
17
  code: 204
15
18
  message:
16
- headers:
17
- server:
18
- - nginx/1.0.4
19
- date:
20
- - Sun, 15 Jan 2012 19:38:45 GMT
21
- connection:
19
+ headers:
20
+ server:
21
+ - nginx/1.0.13
22
+ date:
23
+ - Wed, 01 Aug 2012 19:39:02 GMT
24
+ connection:
22
25
  - close
23
- status:
26
+ status:
24
27
  - 204 No Content
25
- x-ratelimit-limit:
26
- - "5000"
27
- etag:
28
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
29
- x-oauth-scopes:
28
+ x-ratelimit-limit:
29
+ - '5000'
30
+ cache-control:
31
+ - ''
32
+ x-ratelimit-remaining:
33
+ - '4983'
34
+ x-oauth-scopes:
30
35
  - repo
31
- x-ratelimit-remaining:
32
- - "4992"
33
- body: ""
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
34
39
  http_version:
35
- recorded_at: Sun, 15 Jan 2012 19:38:45 GMT
36
- - request:
40
+ recorded_at: Wed, 01 Aug 2012 19:38:51 GMT
41
+ - request:
37
42
  method: get
38
43
  uri: https://api.github.com/users/avdi
39
- body: ""
40
- headers:
41
- Authorization:
44
+ body:
45
+ encoding: US-ASCII
46
+ string: ''
47
+ headers:
48
+ Authorization:
42
49
  - <AUTH FILTERED>
43
- Accept:
44
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
45
- response:
46
- status:
50
+ Accept:
51
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
52
+ text/plain
53
+ response:
54
+ status:
47
55
  code: 200
48
56
  message:
49
- headers:
50
- server:
51
- - nginx/1.0.4
52
- date:
53
- - Sun, 15 Jan 2012 19:38:45 GMT
54
- content-type:
57
+ headers:
58
+ server:
59
+ - nginx/1.0.13
60
+ date:
61
+ - Wed, 01 Aug 2012 19:39:08 GMT
62
+ content-type:
55
63
  - application/json; charset=utf-8
56
- transfer-encoding:
64
+ transfer-encoding:
57
65
  - chunked
58
- connection:
66
+ connection:
59
67
  - close
60
- status:
68
+ status:
61
69
  - 200 OK
62
- x-ratelimit-limit:
63
- - "5000"
64
- etag:
65
- - "\"f750a3b07a1f183f7b1332b16f2dba2e\""
66
- x-oauth-scopes:
67
- - repo
68
- x-ratelimit-remaining:
69
- - "4991"
70
- x-accepted-oauth-scopes:
70
+ vary:
71
+ - Accept, Authorization, Cookie
72
+ etag:
73
+ - ! '"ddb253ed98ca6098d5078df699ed28ee"'
74
+ x-accepted-oauth-scopes:
71
75
  - user
72
- body: "{\"type\":\"User\",\"created_at\":\"2008-02-26T19:54:34Z\",\"email\":\"avdi@avdi.org\",\"bio\":null,\"public_repos\":61,\"url\":\"https://api.github.com/users/avdi\",\"login\":\"avdi\",\"followers\":181,\"blog\":\"http://avdi.org/devblog/\",\"following\":33,\"gravatar_id\":\"4dea430d31b993abaf41cd9b54f8128d\",\"avatar_url\":\"https://secure.gravatar.com/avatar/4dea430d31b993abaf41cd9b54f8128d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"public_gists\":72,\"html_url\":\"https://github.com/avdi\",\"name\":\"Avdi Grimm\",\"location\":\"Pennsylvania, USA\",\"id\":982,\"company\":\"ShipRise\",\"hireable\":false}"
76
+ x-ratelimit-remaining:
77
+ - '4982'
78
+ x-oauth-scopes:
79
+ - repo
80
+ last-modified:
81
+ - Tue, 31 Jul 2012 06:09:16 GMT
82
+ x-ratelimit-limit:
83
+ - '5000'
84
+ cache-control:
85
+ - private, max-age=60
86
+ body:
87
+ encoding: ASCII-8BIT
88
+ string: ! '{"public_gists":86,"followers":302,"type":"User","avatar_url":"https://secure.gravatar.com/avatar/4dea430d31b993abaf41cd9b54f8128d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4dea430d31b993abaf41cd9b54f8128d","following":34,"location":"Pennsylvania,
89
+ USA","hireable":false,"bio":null,"login":"avdi","html_url":"https://github.com/avdi","name":"Avdi
90
+ Grimm","email":"avdi@avdi.org","url":"https://api.github.com/users/avdi","created_at":"2008-02-26T19:54:34Z","company":"ShipRise","id":982,"public_repos":71,"blog":"http://avdi.org/devblog/"}'
73
91
  http_version:
74
- recorded_at: Sun, 15 Jan 2012 19:38:45 GMT
75
- recorded_with: VCR 2.0.0.rc1
92
+ recorded_at: Wed, 01 Aug 2012 19:38:57 GMT
93
+ recorded_with: VCR 2.2.4
@@ -1,373 +1,461 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: get
5
5
  uri: https://api.github.com/
6
- body: ""
7
- headers:
8
- Authorization:
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
9
11
  - <AUTH FILTERED>
10
- Accept:
11
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
12
- response:
13
- status:
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ response:
16
+ status:
14
17
  code: 204
15
18
  message:
16
- headers:
17
- server:
18
- - nginx/1.0.4
19
- date:
20
- - Sun, 15 Jan 2012 19:38:43 GMT
21
- connection:
19
+ headers:
20
+ server:
21
+ - nginx/1.0.13
22
+ date:
23
+ - Wed, 01 Aug 2012 19:38:56 GMT
24
+ connection:
22
25
  - close
23
- status:
26
+ status:
24
27
  - 204 No Content
25
- x-ratelimit-limit:
26
- - "5000"
27
- etag:
28
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
29
- x-oauth-scopes:
28
+ cache-control:
29
+ - ''
30
+ x-ratelimit-remaining:
31
+ - '4995'
32
+ x-ratelimit-limit:
33
+ - '5000'
34
+ x-oauth-scopes:
30
35
  - repo
31
- x-ratelimit-remaining:
32
- - "4999"
33
- body: ""
36
+ body:
37
+ encoding: US-ASCII
38
+ string: ''
34
39
  http_version:
35
- recorded_at: Sun, 15 Jan 2012 19:38:43 GMT
36
- - request:
40
+ recorded_at: Wed, 01 Aug 2012 19:38:45 GMT
41
+ - request:
37
42
  method: get
38
43
  uri: https://api.github.com/users/leadlight-test
39
- body: ""
40
- headers:
41
- Authorization:
44
+ body:
45
+ encoding: US-ASCII
46
+ string: ''
47
+ headers:
48
+ Authorization:
42
49
  - <AUTH FILTERED>
43
- Accept:
44
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
45
- response:
46
- status:
50
+ Accept:
51
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
52
+ text/plain
53
+ response:
54
+ status:
47
55
  code: 200
48
56
  message:
49
- headers:
50
- server:
51
- - nginx/1.0.4
52
- date:
53
- - Sun, 15 Jan 2012 19:38:43 GMT
54
- content-type:
57
+ headers:
58
+ server:
59
+ - nginx/1.0.13
60
+ date:
61
+ - Wed, 01 Aug 2012 19:38:56 GMT
62
+ content-type:
55
63
  - application/json; charset=utf-8
56
- transfer-encoding:
64
+ transfer-encoding:
57
65
  - chunked
58
- connection:
66
+ connection:
59
67
  - close
60
- status:
68
+ status:
61
69
  - 200 OK
62
- x-ratelimit-limit:
63
- - "5000"
64
- etag:
65
- - "\"9f36bc2e54d4dfe4cce0040c2c1a4594\""
66
- x-oauth-scopes:
67
- - repo
68
- x-ratelimit-remaining:
69
- - "4998"
70
- x-accepted-oauth-scopes:
70
+ etag:
71
+ - ! '"eafac876698e5fee8675ae11fe3ef9fd"'
72
+ x-accepted-oauth-scopes:
71
73
  - user
72
- body: "{\"type\":\"User\",\"public_gists\":0,\"created_at\":\"2012-01-09T02:38:20Z\",\"avatar_url\":\"https://secure.gravatar.com/avatar/71a3f4f0d28bcb9c10fe96bbfce8fef8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"url\":\"https://api.github.com/users/leadlight-test\",\"login\":\"leadlight-test\",\"followers\":0,\"following\":0,\"html_url\":\"https://github.com/leadlight-test\",\"id\":1314019,\"public_repos\":0,\"gravatar_id\":\"71a3f4f0d28bcb9c10fe96bbfce8fef8\"}"
74
+ vary:
75
+ - Accept, Authorization, Cookie
76
+ cache-control:
77
+ - private, max-age=60
78
+ x-ratelimit-limit:
79
+ - '5000'
80
+ x-ratelimit-remaining:
81
+ - '4994'
82
+ last-modified:
83
+ - Mon, 09 Jan 2012 02:38:20 GMT
84
+ x-oauth-scopes:
85
+ - repo
86
+ body:
87
+ encoding: ASCII-8BIT
88
+ string: ! '{"type":"User","gravatar_id":"71a3f4f0d28bcb9c10fe96bbfce8fef8","login":"leadlight-test","following":0,"avatar_url":"https://secure.gravatar.com/avatar/71a3f4f0d28bcb9c10fe96bbfce8fef8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","public_gists":0,"created_at":"2012-01-09T02:38:20Z","html_url":"https://github.com/leadlight-test","public_repos":0,"followers":0,"url":"https://api.github.com/users/leadlight-test","id":1314019}'
73
89
  http_version:
74
- recorded_at: Sun, 15 Jan 2012 19:38:43 GMT
75
- - request:
90
+ recorded_at: Wed, 01 Aug 2012 19:38:46 GMT
91
+ - request:
76
92
  method: get
77
93
  uri: https://api.github.com/
78
- body: ""
79
- headers:
80
- Authorization:
94
+ body:
95
+ encoding: US-ASCII
96
+ string: ''
97
+ headers:
98
+ Authorization:
81
99
  - <AUTH FILTERED>
82
- Accept:
83
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
84
- response:
85
- status:
100
+ Accept:
101
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
102
+ text/plain
103
+ response:
104
+ status:
86
105
  code: 204
87
106
  message:
88
- headers:
89
- server:
90
- - nginx/1.0.4
91
- date:
92
- - Sun, 15 Jan 2012 19:38:43 GMT
93
- connection:
107
+ headers:
108
+ server:
109
+ - nginx/1.0.13
110
+ date:
111
+ - Wed, 01 Aug 2012 19:38:56 GMT
112
+ connection:
94
113
  - close
95
- status:
114
+ status:
96
115
  - 204 No Content
97
- x-ratelimit-limit:
98
- - "5000"
99
- etag:
100
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
101
- x-oauth-scopes:
116
+ x-oauth-scopes:
102
117
  - repo
103
- x-ratelimit-remaining:
104
- - "4997"
105
- body: ""
118
+ x-ratelimit-remaining:
119
+ - '4993'
120
+ cache-control:
121
+ - ''
122
+ x-ratelimit-limit:
123
+ - '5000'
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ''
106
127
  http_version:
107
- recorded_at: Sun, 15 Jan 2012 19:38:43 GMT
108
- - request:
128
+ recorded_at: Wed, 01 Aug 2012 19:38:46 GMT
129
+ - request:
109
130
  method: get
110
131
  uri: https://api.github.com/orgs/shiprise
111
- body: ""
112
- headers:
113
- Authorization:
132
+ body:
133
+ encoding: US-ASCII
134
+ string: ''
135
+ headers:
136
+ Authorization:
114
137
  - <AUTH FILTERED>
115
- Accept:
116
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
117
- response:
118
- status:
138
+ Accept:
139
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
140
+ text/plain
141
+ response:
142
+ status:
119
143
  code: 200
120
144
  message:
121
- headers:
122
- server:
123
- - nginx/1.0.4
124
- date:
125
- - Sun, 15 Jan 2012 19:38:44 GMT
126
- content-type:
145
+ headers:
146
+ server:
147
+ - nginx/1.0.13
148
+ date:
149
+ - Wed, 01 Aug 2012 19:38:57 GMT
150
+ content-type:
127
151
  - application/json; charset=utf-8
128
- transfer-encoding:
152
+ transfer-encoding:
129
153
  - chunked
130
- connection:
154
+ connection:
131
155
  - close
132
- status:
156
+ status:
133
157
  - 200 OK
134
- x-ratelimit-limit:
135
- - "5000"
136
- etag:
137
- - "\"5e3c5fb8b3ef2d076c983277730720d0\""
138
- x-oauth-scopes:
158
+ x-oauth-scopes:
139
159
  - repo
140
- x-ratelimit-remaining:
141
- - "4996"
142
- x-accepted-oauth-scopes:
160
+ x-accepted-oauth-scopes:
143
161
  - repo
144
- body: "{\"type\":\"Organization\",\"collaborators\":0,\"created_at\":\"2011-10-27T20:49:51Z\",\"email\":\"avdi@shiprise.net\",\"total_private_repos\":1,\"public_repos\":0,\"url\":\"https://api.github.com/orgs/ShipRise\",\"login\":\"ShipRise\",\"plan\":{\"private_repos\":10,\"space\":2516582,\"name\":\"bronze\"},\"followers\":0,\"blog\":\"http://shiprise.net\",\"owned_private_repos\":1,\"following\":0,\"billing_email\":\"avdi@shiprise.net\",\"avatar_url\":\"https://secure.gravatar.com/avatar/6dd3c12e97a46ff08c358542cae955e2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png\",\"disk_usage\":552,\"public_gists\":0,\"html_url\":\"https://github.com/ShipRise\",\"name\":\"ShipRise\",\"location\":null,\"id\":1156570,\"private_gists\":0,\"company\":null}"
162
+ etag:
163
+ - ! '"5d02babf97893a4583b7052dec00a037"'
164
+ x-ratelimit-remaining:
165
+ - '4992'
166
+ last-modified:
167
+ - Fri, 27 Jul 2012 04:06:17 GMT
168
+ cache-control:
169
+ - private, max-age=60
170
+ vary:
171
+ - Accept, Authorization, Cookie
172
+ x-ratelimit-limit:
173
+ - '5000'
174
+ body:
175
+ encoding: ASCII-8BIT
176
+ string: ! '{"disk_usage":22816,"public_repos":0,"type":"Organization","login":"ShipRise","private_gists":0,"following":0,"location":null,"email":null,"created_at":"2011-10-27T20:49:51Z","avatar_url":"https://secure.gravatar.com/avatar/6dd3c12e97a46ff08c358542cae955e2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","blog":"http://shiprise.net","total_private_repos":5,"html_url":"https://github.com/ShipRise","company":null,"owned_private_repos":5,"collaborators":0,"plan":{"space":2516582,"name":"bronze","private_repos":10},"followers":0,"name":"ShipRise","url":"https://api.github.com/orgs/ShipRise","billing_email":"avdi@shiprise.net","id":1156570,"public_gists":0}'
145
177
  http_version:
146
- recorded_at: Sun, 15 Jan 2012 19:38:44 GMT
147
- - request:
178
+ recorded_at: Wed, 01 Aug 2012 19:38:46 GMT
179
+ - request:
148
180
  method: get
149
181
  uri: https://api.github.com/orgs/shiprise/teams
150
- body: ""
151
- headers:
152
- Authorization:
182
+ body:
183
+ encoding: US-ASCII
184
+ string: ''
185
+ headers:
186
+ Authorization:
153
187
  - <AUTH FILTERED>
154
- Accept:
155
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
156
- response:
157
- status:
188
+ Accept:
189
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
190
+ text/plain
191
+ response:
192
+ status:
158
193
  code: 200
159
194
  message:
160
- headers:
161
- server:
162
- - nginx/1.0.4
163
- date:
164
- - Sun, 15 Jan 2012 19:38:44 GMT
165
- content-type:
195
+ headers:
196
+ server:
197
+ - nginx/1.0.13
198
+ date:
199
+ - Wed, 01 Aug 2012 19:38:57 GMT
200
+ content-type:
166
201
  - application/json; charset=utf-8
167
- transfer-encoding:
202
+ transfer-encoding:
168
203
  - chunked
169
- connection:
204
+ connection:
170
205
  - close
171
- status:
206
+ status:
172
207
  - 200 OK
173
- x-ratelimit-limit:
174
- - "5000"
175
- etag:
176
- - "\"00457d8d71ef8c5f77fd729ddcc288b7\""
177
- x-oauth-scopes:
208
+ vary:
209
+ - Accept, Authorization, Cookie
210
+ etag:
211
+ - ! '"ae0dfae72ca6d563953a4ca8f906e03b"'
212
+ x-accepted-oauth-scopes:
178
213
  - repo
179
- x-ratelimit-remaining:
180
- - "4995"
181
- x-accepted-oauth-scopes:
214
+ x-ratelimit-remaining:
215
+ - '4991'
216
+ x-oauth-scopes:
182
217
  - repo
183
- body: "[{\"url\":\"https://api.github.com/teams/111894\",\"name\":\"BitBindery Development\",\"id\":111894},{\"url\":\"https://api.github.com/teams/127491\",\"name\":\"Leadlight Test Team\",\"id\":127491},{\"url\":\"https://api.github.com/teams/104018\",\"name\":\"Owners\",\"id\":104018}]"
218
+ last-modified:
219
+ - Mon, 09 Jul 2012 22:52:35 GMT
220
+ x-ratelimit-limit:
221
+ - '5000'
222
+ cache-control:
223
+ - private, max-age=60
224
+ body:
225
+ encoding: ASCII-8BIT
226
+ string: ! '[{"url":"https://api.github.com/teams/111894","name":"BitBindery
227
+ Development","id":111894,"permission":"push"},{"url":"https://api.github.com/teams/210238","name":"BitBindery
228
+ Test Team","id":210238,"permission":"pull"},{"url":"https://api.github.com/teams/127491","name":"Leadlight
229
+ Test Team","id":127491,"permission":"pull"},{"url":"https://api.github.com/teams/176711","name":"Objects
230
+ on Rails Readers","id":176711,"permission":"pull"},{"url":"https://api.github.com/teams/104018","name":"Owners","id":104018,"permission":"admin"},{"url":"https://api.github.com/teams/154780","name":"Publishing","id":154780,"permission":"push"},{"url":"https://api.github.com/teams/148656","name":"ShipRise
231
+ Internal","id":148656,"permission":"pull"}]'
184
232
  http_version:
185
- recorded_at: Sun, 15 Jan 2012 19:38:44 GMT
186
- - request:
233
+ recorded_at: Wed, 01 Aug 2012 19:38:46 GMT
234
+ - request:
187
235
  method: get
188
236
  uri: https://api.github.com/teams/127491
189
- body: ""
190
- headers:
191
- Authorization:
237
+ body:
238
+ encoding: US-ASCII
239
+ string: ''
240
+ headers:
241
+ Authorization:
192
242
  - <AUTH FILTERED>
193
- Accept:
194
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
195
- response:
196
- status:
243
+ Accept:
244
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
245
+ text/plain
246
+ response:
247
+ status:
197
248
  code: 200
198
249
  message:
199
- headers:
200
- server:
201
- - nginx/1.0.4
202
- date:
203
- - Sun, 15 Jan 2012 19:39:51 GMT
204
- content-type:
250
+ headers:
251
+ server:
252
+ - nginx/1.0.13
253
+ date:
254
+ - Wed, 01 Aug 2012 19:38:57 GMT
255
+ content-type:
205
256
  - application/json; charset=utf-8
206
- transfer-encoding:
257
+ transfer-encoding:
207
258
  - chunked
208
- connection:
259
+ connection:
209
260
  - close
210
- status:
261
+ status:
211
262
  - 200 OK
212
- x-ratelimit-limit:
213
- - "5000"
214
- etag:
215
- - "\"c8fb299f3c9bf7ddfd50e5ce06275345\""
216
- x-oauth-scopes:
263
+ x-ratelimit-limit:
264
+ - '5000'
265
+ vary:
266
+ - Accept, Authorization, Cookie
267
+ cache-control:
268
+ - private, max-age=60
269
+ x-ratelimit-remaining:
270
+ - '4990'
271
+ x-accepted-oauth-scopes:
217
272
  - repo
218
- x-ratelimit-remaining:
219
- - "4986"
220
- x-accepted-oauth-scopes:
273
+ etag:
274
+ - ! '"7873ec2b76a99d0d68e8010119dd9e25"'
275
+ x-oauth-scopes:
221
276
  - repo
222
- body: "{\"members_count\":0,\"repos_count\":0,\"url\":\"https://api.github.com/teams/127491\",\"permission\":\"pull\",\"name\":\"Leadlight Test Team\",\"id\":127491}"
277
+ last-modified:
278
+ - Sat, 20 Oct 2007 11:24:19 GMT
279
+ body:
280
+ encoding: ASCII-8BIT
281
+ string: ! '{"repos_count":0,"members_count":0,"permission":"pull","url":"https://api.github.com/teams/127491","name":"Leadlight
282
+ Test Team","id":127491}'
223
283
  http_version:
224
- recorded_at: Sun, 15 Jan 2012 19:39:51 GMT
225
- - request:
284
+ recorded_at: Wed, 01 Aug 2012 19:38:47 GMT
285
+ - request:
226
286
  method: put
227
287
  uri: https://api.github.com/teams/127491/members/leadlight-test
228
- body: ""
229
- headers:
230
- Authorization:
288
+ body:
289
+ encoding: US-ASCII
290
+ string: ''
291
+ headers:
292
+ Authorization:
231
293
  - <AUTH FILTERED>
232
- Accept:
233
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
234
- response:
235
- status:
294
+ Accept:
295
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
296
+ text/plain
297
+ response:
298
+ status:
236
299
  code: 204
237
300
  message:
238
- headers:
239
- server:
240
- - nginx/1.0.4
241
- date:
242
- - Sun, 15 Jan 2012 19:39:51 GMT
243
- connection:
301
+ headers:
302
+ server:
303
+ - nginx/1.0.13
304
+ date:
305
+ - Wed, 01 Aug 2012 19:38:59 GMT
306
+ connection:
244
307
  - close
245
- status:
308
+ status:
246
309
  - 204 No Content
247
- x-ratelimit-limit:
248
- - "5000"
249
- etag:
250
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
251
- x-oauth-scopes:
310
+ x-oauth-scopes:
252
311
  - repo
253
- x-ratelimit-remaining:
254
- - "4985"
255
- x-accepted-oauth-scopes:
312
+ x-accepted-oauth-scopes:
256
313
  - repo
257
- body: ""
314
+ x-ratelimit-remaining:
315
+ - '4989'
316
+ cache-control:
317
+ - ''
318
+ x-ratelimit-limit:
319
+ - '5000'
320
+ body:
321
+ encoding: US-ASCII
322
+ string: ''
258
323
  http_version:
259
- recorded_at: Sun, 15 Jan 2012 19:39:51 GMT
260
- - request:
324
+ recorded_at: Wed, 01 Aug 2012 19:38:48 GMT
325
+ - request:
261
326
  method: get
262
327
  uri: https://api.github.com/teams/127491/members
263
- body: ""
264
- headers:
265
- Authorization:
328
+ body:
329
+ encoding: US-ASCII
330
+ string: ''
331
+ headers:
332
+ Authorization:
266
333
  - <AUTH FILTERED>
267
- Accept:
268
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
269
- response:
270
- status:
334
+ Accept:
335
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
336
+ text/plain
337
+ response:
338
+ status:
271
339
  code: 200
272
340
  message:
273
- headers:
274
- server:
275
- - nginx/1.0.4
276
- date:
277
- - Sun, 15 Jan 2012 19:39:51 GMT
278
- content-type:
341
+ headers:
342
+ server:
343
+ - nginx/1.0.13
344
+ date:
345
+ - Wed, 01 Aug 2012 19:38:59 GMT
346
+ content-type:
279
347
  - application/json; charset=utf-8
280
- transfer-encoding:
348
+ transfer-encoding:
281
349
  - chunked
282
- connection:
350
+ connection:
283
351
  - close
284
- status:
352
+ status:
285
353
  - 200 OK
286
- x-ratelimit-limit:
287
- - "5000"
288
- etag:
289
- - "\"e851f02487ca5c26e7770f526f22e4a1\""
290
- x-oauth-scopes:
354
+ x-ratelimit-remaining:
355
+ - '4988'
356
+ x-oauth-scopes:
291
357
  - repo
292
- x-ratelimit-remaining:
293
- - "4984"
294
- x-accepted-oauth-scopes:
358
+ last-modified:
359
+ - Wed, 01 Aug 2012 19:38:58 GMT
360
+ vary:
361
+ - Accept, Authorization, Cookie
362
+ x-accepted-oauth-scopes:
295
363
  - repo
296
- body: "[{\"avatar_url\":\"https://secure.gravatar.com/avatar/71a3f4f0d28bcb9c10fe96bbfce8fef8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"url\":\"https://api.github.com/users/leadlight-test\",\"login\":\"leadlight-test\",\"id\":1314019,\"gravatar_id\":\"71a3f4f0d28bcb9c10fe96bbfce8fef8\"}]"
364
+ cache-control:
365
+ - private, max-age=60
366
+ etag:
367
+ - ! '"6093f9ee30540372345b27ca7c742dac"'
368
+ x-ratelimit-limit:
369
+ - '5000'
370
+ body:
371
+ encoding: ASCII-8BIT
372
+ string: ! '[{"gravatar_id":"71a3f4f0d28bcb9c10fe96bbfce8fef8","login":"leadlight-test","url":"https://api.github.com/users/leadlight-test","avatar_url":"https://secure.gravatar.com/avatar/71a3f4f0d28bcb9c10fe96bbfce8fef8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","id":1314019}]'
297
373
  http_version:
298
- recorded_at: Sun, 15 Jan 2012 19:39:51 GMT
299
- - request:
374
+ recorded_at: Wed, 01 Aug 2012 19:38:48 GMT
375
+ - request:
300
376
  method: delete
301
377
  uri: https://api.github.com/teams/127491/members/leadlight-test
302
- body: ""
303
- headers:
304
- Authorization:
378
+ body:
379
+ encoding: US-ASCII
380
+ string: ''
381
+ headers:
382
+ Authorization:
305
383
  - <AUTH FILTERED>
306
- Accept:
307
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
308
- response:
309
- status:
384
+ Accept:
385
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
386
+ text/plain
387
+ response:
388
+ status:
310
389
  code: 204
311
390
  message:
312
- headers:
313
- server:
314
- - nginx/1.0.4
315
- date:
316
- - Sun, 15 Jan 2012 19:39:52 GMT
317
- connection:
391
+ headers:
392
+ server:
393
+ - nginx/1.0.13
394
+ date:
395
+ - Wed, 01 Aug 2012 19:38:59 GMT
396
+ connection:
318
397
  - close
319
- status:
398
+ status:
320
399
  - 204 No Content
321
- x-ratelimit-limit:
322
- - "5000"
323
- etag:
324
- - "\"d41d8cd98f00b204e9800998ecf8427e\""
325
- x-oauth-scopes:
400
+ x-oauth-scopes:
326
401
  - repo
327
- x-ratelimit-remaining:
328
- - "4983"
329
- x-accepted-oauth-scopes:
402
+ x-accepted-oauth-scopes:
330
403
  - repo
331
- body: ""
404
+ x-ratelimit-remaining:
405
+ - '4987'
406
+ cache-control:
407
+ - ''
408
+ x-ratelimit-limit:
409
+ - '5000'
410
+ body:
411
+ encoding: US-ASCII
412
+ string: ''
332
413
  http_version:
333
- recorded_at: Sun, 15 Jan 2012 19:39:52 GMT
334
- - request:
414
+ recorded_at: Wed, 01 Aug 2012 19:38:48 GMT
415
+ - request:
335
416
  method: get
336
417
  uri: https://api.github.com/teams/127491/members
337
- body: ""
338
- headers:
339
- Authorization:
418
+ body:
419
+ encoding: US-ASCII
420
+ string: ''
421
+ headers:
422
+ Authorization:
340
423
  - <AUTH FILTERED>
341
- Accept:
342
- - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html, text/plain
343
- response:
344
- status:
424
+ Accept:
425
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
426
+ text/plain
427
+ response:
428
+ status:
345
429
  code: 200
346
430
  message:
347
- headers:
348
- server:
349
- - nginx/1.0.4
350
- date:
351
- - Sun, 15 Jan 2012 19:39:52 GMT
352
- content-type:
431
+ headers:
432
+ server:
433
+ - nginx/1.0.13
434
+ date:
435
+ - Wed, 01 Aug 2012 19:38:59 GMT
436
+ content-type:
353
437
  - application/json; charset=utf-8
354
- connection:
438
+ connection:
355
439
  - close
356
- status:
440
+ status:
357
441
  - 200 OK
358
- x-ratelimit-limit:
359
- - "5000"
360
- etag:
361
- - "\"d751713988987e9331980363e24189ce\""
362
- x-oauth-scopes:
442
+ etag:
443
+ - ! '"d751713988987e9331980363e24189ce"'
444
+ content-length:
445
+ - '2'
446
+ x-accepted-oauth-scopes:
363
447
  - repo
364
- x-ratelimit-remaining:
365
- - "4982"
366
- content-length:
367
- - "2"
368
- x-accepted-oauth-scopes:
448
+ x-ratelimit-remaining:
449
+ - '4986'
450
+ x-oauth-scopes:
369
451
  - repo
370
- body: "[]"
452
+ x-ratelimit-limit:
453
+ - '5000'
454
+ cache-control:
455
+ - max-age=0, private, must-revalidate
456
+ body:
457
+ encoding: US-ASCII
458
+ string: ! '[]'
371
459
  http_version:
372
- recorded_at: Sun, 15 Jan 2012 19:39:52 GMT
373
- recorded_with: VCR 2.0.0.rc1
460
+ recorded_at: Wed, 01 Aug 2012 19:38:49 GMT
461
+ recorded_with: VCR 2.2.4