octokit 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/CHANGELOG.md +2 -0
- data/lib/faraday/response/raise_octokit_error.rb +3 -3
- data/lib/octokit/request.rb +1 -1
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +1 -1
- data/spec/octokit/client/objects_spec.rb +1 -1
- metadata +88 -28
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
* [1.0.3 - April 18, 2012](https://github.com/pengwynn/octokit/compare/v1.0.2...v1.0.3)
|
4
|
+
* [1.0.2 - March 31, 2012](https://github.com/pengwynn/octokit/compare/v1.0.1...v1.0.2)
|
3
5
|
* [1.0.1 - March 31, 2012](https://github.com/pengwynn/octokit/compare/v1.0.0...v1.0.1)
|
4
6
|
* [1.0.0 - February 12, 2012](https://github.com/pengwynn/octokit/compare/v0.6.5...v1.0.0)
|
5
7
|
* [0.6.5 - October 15, 2011](https://github.com/pengwynn/octokit/compare/v0.6.4...v0.6.5)
|
@@ -30,9 +30,9 @@ module Faraday
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def error_message(response)
|
33
|
-
message = if (
|
34
|
-
if body.is_a?
|
35
|
-
body =
|
33
|
+
message = if (body = response[:body]) && !body.empty?
|
34
|
+
if body.is_a?(String)
|
35
|
+
body = MultiJson.load(body, :symbolize_keys => true)
|
36
36
|
end
|
37
37
|
": #{body[:error] || body[:message] || ''}"
|
38
38
|
else
|
data/lib/octokit/request.rb
CHANGED
@@ -32,7 +32,7 @@ module Octokit
|
|
32
32
|
when :patch, :post, :put
|
33
33
|
request.path = path
|
34
34
|
if 3 == version && !force_urlencoded
|
35
|
-
request.body = MultiJson.
|
35
|
+
request.body = MultiJson.dump(options) unless options.empty?
|
36
36
|
else
|
37
37
|
request.body = options unless options.empty?
|
38
38
|
end
|
data/lib/octokit/version.rb
CHANGED
data/octokit.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.add_dependency 'faraday', '~> 0.7'
|
7
7
|
gem.add_dependency 'faraday_middleware', '~> 0.8'
|
8
8
|
gem.add_dependency 'hashie', '~> 1.2'
|
9
|
-
gem.add_dependency 'multi_json', '~> 1.
|
9
|
+
gem.add_dependency 'multi_json', '~> 1.3'
|
10
10
|
gem.add_development_dependency 'json'
|
11
11
|
gem.add_development_dependency 'maruku'
|
12
12
|
gem.add_development_dependency 'rake'
|
@@ -70,7 +70,7 @@ describe Octokit::Client::Objects do
|
|
70
70
|
to_return(:body => fixture("v2/raw.txt"))
|
71
71
|
raw = @client.raw("sferik/rails_admin", "3cdfabd973bc3caac209cba903cfdb3bf6636bcd")
|
72
72
|
lambda {
|
73
|
-
|
73
|
+
MultiJson.load(raw)
|
74
74
|
}.should raise_error
|
75
75
|
end
|
76
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-04-
|
14
|
+
date: 2012-04-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
18
|
-
requirement:
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,15 @@ dependencies:
|
|
23
23
|
version: '2.2'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements:
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ~>
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '2.2'
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: faraday
|
29
|
-
requirement:
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
30
35
|
none: false
|
31
36
|
requirements:
|
32
37
|
- - ~>
|
@@ -34,10 +39,15 @@ dependencies:
|
|
34
39
|
version: '0.7'
|
35
40
|
type: :runtime
|
36
41
|
prerelease: false
|
37
|
-
version_requirements:
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.7'
|
38
48
|
- !ruby/object:Gem::Dependency
|
39
49
|
name: faraday_middleware
|
40
|
-
requirement:
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
41
51
|
none: false
|
42
52
|
requirements:
|
43
53
|
- - ~>
|
@@ -45,10 +55,15 @@ dependencies:
|
|
45
55
|
version: '0.8'
|
46
56
|
type: :runtime
|
47
57
|
prerelease: false
|
48
|
-
version_requirements:
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ~>
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.8'
|
49
64
|
- !ruby/object:Gem::Dependency
|
50
65
|
name: hashie
|
51
|
-
requirement:
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
52
67
|
none: false
|
53
68
|
requirements:
|
54
69
|
- - ~>
|
@@ -56,21 +71,31 @@ dependencies:
|
|
56
71
|
version: '1.2'
|
57
72
|
type: :runtime
|
58
73
|
prerelease: false
|
59
|
-
version_requirements:
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1.2'
|
60
80
|
- !ruby/object:Gem::Dependency
|
61
81
|
name: multi_json
|
62
|
-
requirement:
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
63
83
|
none: false
|
64
84
|
requirements:
|
65
85
|
- - ~>
|
66
86
|
- !ruby/object:Gem::Version
|
67
|
-
version: '1.
|
87
|
+
version: '1.3'
|
68
88
|
type: :runtime
|
69
89
|
prerelease: false
|
70
|
-
version_requirements:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.3'
|
71
96
|
- !ruby/object:Gem::Dependency
|
72
97
|
name: json
|
73
|
-
requirement:
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
74
99
|
none: false
|
75
100
|
requirements:
|
76
101
|
- - ! '>='
|
@@ -78,10 +103,15 @@ dependencies:
|
|
78
103
|
version: '0'
|
79
104
|
type: :development
|
80
105
|
prerelease: false
|
81
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
82
112
|
- !ruby/object:Gem::Dependency
|
83
113
|
name: maruku
|
84
|
-
requirement:
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
85
115
|
none: false
|
86
116
|
requirements:
|
87
117
|
- - ! '>='
|
@@ -89,10 +119,15 @@ dependencies:
|
|
89
119
|
version: '0'
|
90
120
|
type: :development
|
91
121
|
prerelease: false
|
92
|
-
version_requirements:
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
93
128
|
- !ruby/object:Gem::Dependency
|
94
129
|
name: rake
|
95
|
-
requirement:
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
96
131
|
none: false
|
97
132
|
requirements:
|
98
133
|
- - ! '>='
|
@@ -100,10 +135,15 @@ dependencies:
|
|
100
135
|
version: '0'
|
101
136
|
type: :development
|
102
137
|
prerelease: false
|
103
|
-
version_requirements:
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
104
144
|
- !ruby/object:Gem::Dependency
|
105
145
|
name: rspec
|
106
|
-
requirement:
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
107
147
|
none: false
|
108
148
|
requirements:
|
109
149
|
- - ~>
|
@@ -111,10 +151,15 @@ dependencies:
|
|
111
151
|
version: '2.8'
|
112
152
|
type: :development
|
113
153
|
prerelease: false
|
114
|
-
version_requirements:
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '2.8'
|
115
160
|
- !ruby/object:Gem::Dependency
|
116
161
|
name: simplecov
|
117
|
-
requirement:
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
118
163
|
none: false
|
119
164
|
requirements:
|
120
165
|
- - ! '>='
|
@@ -122,10 +167,15 @@ dependencies:
|
|
122
167
|
version: '0'
|
123
168
|
type: :development
|
124
169
|
prerelease: false
|
125
|
-
version_requirements:
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
126
176
|
- !ruby/object:Gem::Dependency
|
127
177
|
name: webmock
|
128
|
-
requirement:
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
129
179
|
none: false
|
130
180
|
requirements:
|
131
181
|
- - ! '>='
|
@@ -133,10 +183,15 @@ dependencies:
|
|
133
183
|
version: '0'
|
134
184
|
type: :development
|
135
185
|
prerelease: false
|
136
|
-
version_requirements:
|
186
|
+
version_requirements: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
188
|
+
requirements:
|
189
|
+
- - ! '>='
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
137
192
|
- !ruby/object:Gem::Dependency
|
138
193
|
name: yard
|
139
|
-
requirement:
|
194
|
+
requirement: !ruby/object:Gem::Requirement
|
140
195
|
none: false
|
141
196
|
requirements:
|
142
197
|
- - ! '>='
|
@@ -144,7 +199,12 @@ dependencies:
|
|
144
199
|
version: '0'
|
145
200
|
type: :development
|
146
201
|
prerelease: false
|
147
|
-
version_requirements:
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
204
|
+
requirements:
|
205
|
+
- - ! '>='
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
148
208
|
description: Simple wrapper for the GitHub API (v2 and v3)
|
149
209
|
email:
|
150
210
|
- wynn.netherland@gmail.com
|
@@ -295,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
355
|
version: 1.3.6
|
296
356
|
requirements: []
|
297
357
|
rubyforge_project:
|
298
|
-
rubygems_version: 1.8.
|
358
|
+
rubygems_version: 1.8.22
|
299
359
|
signing_key:
|
300
360
|
specification_version: 3
|
301
361
|
summary: Wrapper for the GitHub API
|