git_hub_bub 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/changelog.md +4 -0
- data/lib/git_hub_bub/request.rb +1 -1
- data/lib/git_hub_bub/version.rb +2 -2
- data/test/git_hub_bub/request_test.rb +12 -0
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c21c6a37d5be72502e3f589b9c6ad01dc1f7482
|
4
|
+
data.tar.gz: a4b590a320c721a3f8be2aab3d14c4a80ecd07d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23c4836932ced10d6aba5555328b0e7609cf480770e9e772f70ae9417c07bb9ccdc382d86e8fd4059d2f8be8426dac8c3f035a33cd0ff16389762039f6aa8c60
|
7
|
+
data.tar.gz: 8419b8819b7da37d0d99b8bede074f7c43f058db07cb05bc380aabaa1cb025405ffe2532929a5db60fc9ba9151f08f5112f4bc6bcab0642701bf25940086b09a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# GitHubBub
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/schneems/git_hub_bub.
|
3
|
+
[![Build Status](https://travis-ci.org/schneems/git_hub_bub.svg?branch=master)](https://travis-ci.org/schneems/git_hub_bub)
|
4
4
|
|
5
5
|
A low level GitHub client that makes the disgusting issue of header based url pagination simple.
|
6
6
|
|
@@ -213,4 +213,4 @@ A repo that the `WATCH_OWNER` owns. Should be different from `REPO`
|
|
213
213
|
|
214
214
|
## License
|
215
215
|
|
216
|
-
MIT
|
216
|
+
MIT
|
data/changelog.md
CHANGED
data/lib/git_hub_bub/request.rb
CHANGED
@@ -12,7 +12,7 @@ module GitHubBub
|
|
12
12
|
RETRIES = 1
|
13
13
|
|
14
14
|
def initialize(url, query = {}, options = {})
|
15
|
-
self.url = url
|
15
|
+
self.url = url =~ /^http(\w?)\:\/\// ? url : File.join(BASE_URI, url)
|
16
16
|
self.options = BASE_OPTIONS.merge(options || {})
|
17
17
|
self.options[:query] = query if query && !query.empty?
|
18
18
|
self.options[:headers] = BASE_HEADERS.merge(options[:headers]|| {})
|
data/lib/git_hub_bub/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module GitHubBub
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
2
|
+
VERSION = "0.0.5"
|
3
|
+
end
|
@@ -6,6 +6,18 @@ class RequestTest < Test::Unit::TestCase
|
|
6
6
|
GitHubBub::Request.clear_callbacks
|
7
7
|
end
|
8
8
|
|
9
|
+
def test_set_url
|
10
|
+
request = GitHubBub::Request.new('foo')
|
11
|
+
assert_equal "https://api.github.com/foo", request.url
|
12
|
+
request = GitHubBub::Request.new('http://foo.com')
|
13
|
+
assert_equal "http://foo.com", request.url
|
14
|
+
request = GitHubBub::Request.new('https://bar.com')
|
15
|
+
assert_equal "https://bar.com", request.url
|
16
|
+
request = GitHubBub::Request.new('arthurnn/http')
|
17
|
+
assert_equal "https://api.github.com/arthurnn/http", request.url
|
18
|
+
request = GitHubBub::Request.new('arthurnn/https')
|
19
|
+
assert_equal "https://api.github.com/arthurnn/https", request.url
|
20
|
+
end
|
9
21
|
|
10
22
|
def test_set_callback
|
11
23
|
request = GitHubBub::Request.new('foo')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_hub_bub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rrrretry
|
@@ -158,4 +158,3 @@ test_files:
|
|
158
158
|
- test/git_hub_bub/request_test.rb
|
159
159
|
- test/git_hub_bub/response_test.rb
|
160
160
|
- test/test_helper.rb
|
161
|
-
has_rdoc:
|