gh 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +2 -0
- data/lib/gh/remote.rb +3 -1
- data/lib/gh/version.rb +1 -1
- data/spec/remote_spec.rb +8 -0
- metadata +2 -3
- data/Gemfile.lock +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2517df4f03a6ef34d397b40196454b49d1e043c5
|
4
|
+
data.tar.gz: 53452297cb9f73175890aed21b7e06b28f5cf851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0adf5c9f3ebf7b7cf93e3c7acb071d0944f99dfccea15399a4849591660789be1b5f8294af825bd97551f755f1701bc98563ba1e7845c72724c5238445a05318
|
7
|
+
data.tar.gz: 23041635dd030d364874e57c3eba40e50737d471bd34d7042ba88b0eb559ee8906c1d38e76f89e00eebaae1d69e29fc539ea5e2c71233e39678b2fbf42edcde0
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/lib/gh/remote.rb
CHANGED
@@ -130,7 +130,9 @@ module GH
|
|
130
130
|
end
|
131
131
|
|
132
132
|
def full_url(key)
|
133
|
-
uri
|
133
|
+
uri = Addressable::URI.parse(key)
|
134
|
+
uri.path = File.join(api_host.path, uri.path) unless uri.absolute? or uri.path.start_with?(api_host.path)
|
135
|
+
uri = api_host + uri
|
134
136
|
raise ArgumentError, "URI out of scope: #{key}" if uri.host != api_host.host
|
135
137
|
uri
|
136
138
|
end
|
data/lib/gh/version.rb
CHANGED
data/spec/remote_spec.rb
CHANGED
@@ -37,4 +37,12 @@ describe GH::Remote do
|
|
37
37
|
wrapper.should_receive(:request).with(:delete, "/foo").and_return GH::Response.new
|
38
38
|
wrapper.delete '/foo'
|
39
39
|
end
|
40
|
+
|
41
|
+
describe :path_for do
|
42
|
+
before { subject.setup("http://localhost/api/v3", {}) }
|
43
|
+
example { subject.path_for("foo") .should be == "/api/v3/foo" }
|
44
|
+
example { subject.path_for("/foo") .should be == "/api/v3/foo" }
|
45
|
+
example { subject.path_for("/api/v3/foo") .should be == "/api/v3/foo" }
|
46
|
+
example { subject.path_for("http://localhost/api/v3/foo") .should be == "/api/v3/foo" }
|
47
|
+
end
|
40
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -132,7 +132,6 @@ files:
|
|
132
132
|
- .gitignore
|
133
133
|
- .travis.yml
|
134
134
|
- Gemfile
|
135
|
-
- Gemfile.lock
|
136
135
|
- LICENSE
|
137
136
|
- README.md
|
138
137
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
gh (0.11.3)
|
5
|
-
addressable
|
6
|
-
backports
|
7
|
-
faraday (~> 0.8)
|
8
|
-
multi_json (~> 1.0)
|
9
|
-
net-http-persistent (>= 2.7)
|
10
|
-
net-http-pipeline
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: http://rubygems.org/
|
14
|
-
specs:
|
15
|
-
addressable (2.3.4)
|
16
|
-
backports (3.3.3)
|
17
|
-
crack (0.3.2)
|
18
|
-
diff-lcs (1.2.4)
|
19
|
-
faraday (0.8.7)
|
20
|
-
multipart-post (~> 1.1)
|
21
|
-
multi_json (1.7.7)
|
22
|
-
multipart-post (1.2.0)
|
23
|
-
net-http-persistent (2.8)
|
24
|
-
net-http-pipeline (1.0.1)
|
25
|
-
rake (10.0.4)
|
26
|
-
rspec (2.13.0)
|
27
|
-
rspec-core (~> 2.13.0)
|
28
|
-
rspec-expectations (~> 2.13.0)
|
29
|
-
rspec-mocks (~> 2.13.0)
|
30
|
-
rspec-core (2.13.1)
|
31
|
-
rspec-expectations (2.13.0)
|
32
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
33
|
-
rspec-mocks (2.13.1)
|
34
|
-
webmock (1.11.0)
|
35
|
-
addressable (>= 2.2.7)
|
36
|
-
crack (>= 0.3.2)
|
37
|
-
|
38
|
-
PLATFORMS
|
39
|
-
ruby
|
40
|
-
|
41
|
-
DEPENDENCIES
|
42
|
-
gh!
|
43
|
-
jruby-openssl
|
44
|
-
rake
|
45
|
-
rspec
|
46
|
-
webmock
|