gh 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/gh.gemspec +1 -1
- data/lib/gh/error.rb +1 -1
- data/lib/gh/remote.rb +4 -2
- data/lib/gh/version.rb +1 -1
- data/spec/error_spec.rb +1 -1
- metadata +6 -6
data/.travis.yml
CHANGED
data/gh.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency 'webmock'
|
21
21
|
|
22
22
|
s.add_runtime_dependency 'faraday', '~> 0.8'
|
23
|
-
s.add_runtime_dependency 'backports'
|
23
|
+
s.add_runtime_dependency 'backports'
|
24
24
|
s.add_runtime_dependency 'multi_json', '~> 1.0'
|
25
25
|
s.add_runtime_dependency 'addressable'
|
26
26
|
s.add_runtime_dependency 'net-http-persistent', '>= 2.7'
|
data/lib/gh/error.rb
CHANGED
data/lib/gh/remote.rb
CHANGED
@@ -26,13 +26,15 @@ module GH
|
|
26
26
|
api_host = api_host.api_host if api_host.respond_to? :api_host
|
27
27
|
@api_host = Addressable::URI.parse(api_host)
|
28
28
|
@headers = options[:headers].try(:dup) || {
|
29
|
-
|
29
|
+
"User-Agent" => options[:user_agent] || "GH/#{GH::VERSION}",
|
30
30
|
"Accept" => "application/vnd.github.v3.full+json," \
|
31
31
|
"application/vnd.github.beta.full+json;q=0.5," \
|
32
32
|
"application/json;q=0.1",
|
33
|
-
"Accept-Charset" => "utf-8"
|
33
|
+
"Accept-Charset" => "utf-8",
|
34
34
|
}
|
35
35
|
|
36
|
+
@headers['Origin'] = options[:origin] if options[:origin]
|
37
|
+
|
36
38
|
@prefix = ""
|
37
39
|
@prefix << "#{token}@" if token
|
38
40
|
@prefix << "#{username}:#{password}@" if username and password
|
data/lib/gh/version.rb
CHANGED
data/spec/error_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -64,17 +64,17 @@ dependencies:
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: multi_json
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|