octokit 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +5 -4
- data/lib/octokit/client/labels.rb +6 -4
- data/lib/octokit/connection.rb +2 -2
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +2 -2
- metadata +9 -9
data/.travis.yml
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
1
3
|
module Octokit
|
2
4
|
class Client
|
3
5
|
module Labels
|
@@ -22,7 +24,7 @@ module Octokit
|
|
22
24
|
# @example Get the "V3 Addition" label from pengwynn/octokit
|
23
25
|
# Octokit.labels("pengwynn/octokit")
|
24
26
|
def label(repo, name, options={})
|
25
|
-
get("repos/#{Repository.new(repo)}/labels/#{
|
27
|
+
get("repos/#{Repository.new(repo)}/labels/#{CGI.escape(name)}", options, 3)
|
26
28
|
end
|
27
29
|
|
28
30
|
# Add a label to a repository
|
@@ -50,7 +52,7 @@ module Octokit
|
|
50
52
|
# @example Update the label "Version 1.0" with new color "#cceeaa"
|
51
53
|
# Octokit.update_label("pengwynn/octokit", "Version 1.0", {:color => "cceeaa"})
|
52
54
|
def update_label(repo, label, options={})
|
53
|
-
post("repos/#{Repository.new(repo)}/labels/#{
|
55
|
+
post("repos/#{Repository.new(repo)}/labels/#{CGI.escape(label)}", options, 3)
|
54
56
|
end
|
55
57
|
|
56
58
|
# Delete a label from a repository.
|
@@ -65,7 +67,7 @@ module Octokit
|
|
65
67
|
# @example Delete the label "Version 1.0" from the repository.
|
66
68
|
# Octokit.delete_label!("pengwynn/octokit", "Version 1.0")
|
67
69
|
def delete_label!(repo, label, options={})
|
68
|
-
delete("repos/#{Repository.new(repo)}/labels/#{
|
70
|
+
delete("repos/#{Repository.new(repo)}/labels/#{CGI.escape(label)}", options, 3, true, true)
|
69
71
|
end
|
70
72
|
|
71
73
|
# Remove a label from an Issue
|
@@ -81,7 +83,7 @@ module Octokit
|
|
81
83
|
# @example Remove the label "Version 1.0" from the repository.
|
82
84
|
# Octokit.remove_label("pengwynn/octokit", 23, "Version 1.0")
|
83
85
|
def remove_label(repo, number, label, options={})
|
84
|
-
delete("repos/#{Repository.new(repo)}/issues/#{number}/labels/#{
|
86
|
+
delete("repos/#{Repository.new(repo)}/issues/#{number}/labels/#{CGI.escape(label)}", options, 3, true)
|
85
87
|
end
|
86
88
|
|
87
89
|
# Remove all label from an Issue
|
data/lib/octokit/connection.rb
CHANGED
@@ -24,9 +24,9 @@ module Octokit
|
|
24
24
|
|
25
25
|
connection = Faraday.new(options) do |builder|
|
26
26
|
if version >= 3 && !force_urlencoded
|
27
|
-
builder.
|
27
|
+
builder.request :json
|
28
28
|
else
|
29
|
-
builder.
|
29
|
+
builder.request :url_encoded
|
30
30
|
end
|
31
31
|
builder.use Faraday::Response::RaiseOctokitError
|
32
32
|
unless raw
|
data/lib/octokit/version.rb
CHANGED
data/octokit.gemspec
CHANGED
@@ -3,14 +3,14 @@ require File.expand_path('../lib/octokit/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.add_dependency 'addressable', '~> 2.2'
|
6
|
-
gem.add_dependency 'faraday', '~> 0.
|
6
|
+
gem.add_dependency 'faraday', '~> 0.8'
|
7
7
|
gem.add_dependency 'faraday_middleware', '~> 0.8'
|
8
8
|
gem.add_dependency 'hashie', '~> 1.2'
|
9
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'
|
13
|
-
gem.add_development_dependency 'rspec'
|
13
|
+
gem.add_development_dependency 'rspec'
|
14
14
|
gem.add_development_dependency 'simplecov'
|
15
15
|
gem.add_development_dependency 'webmock'
|
16
16
|
gem.add_development_dependency 'yard'
|
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-04-
|
14
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ~>
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.8'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.8'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: faraday_middleware
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,17 +146,17 @@ dependencies:
|
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - ! '>='
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
151
|
+
version: '0'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
none: false
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ! '>='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
159
|
+
version: '0'
|
160
160
|
- !ruby/object:Gem::Dependency
|
161
161
|
name: simplecov
|
162
162
|
requirement: !ruby/object:Gem::Requirement
|
@@ -355,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
355
355
|
version: 1.3.6
|
356
356
|
requirements: []
|
357
357
|
rubyforge_project:
|
358
|
-
rubygems_version: 1.8.
|
358
|
+
rubygems_version: 1.8.23
|
359
359
|
signing_key:
|
360
360
|
specification_version: 3
|
361
361
|
summary: Wrapper for the GitHub API
|