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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3104c7e69499c8bd1be1b1603b861c0f07da7ec3
4
- data.tar.gz: 10135ef6fe2c5c252987a0670d1ebb6ab07e05ac
3
+ metadata.gz: 2c21c6a37d5be72502e3f589b9c6ad01dc1f7482
4
+ data.tar.gz: a4b590a320c721a3f8be2aab3d14c4a80ecd07d7
5
5
  SHA512:
6
- metadata.gz: a95c19a64ad16447255555baa50e9122b9ffbf856033976e5cc78e772c5ec5f890ec811a5fb8f7e282b84cec56d7357711ced340154a6628c4d2f7735a65b033
7
- data.tar.gz: 71105105b4ff105931465d806bf87225b27d293af7f2ecc9f62083621accc144d4298506ce9b964fd3e8a132caaecbf1a675e7fadf3be6aa13b098320581ef40
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.png?branch=master)](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
@@ -1,3 +1,7 @@
1
+ ## 0.0.5 (06/06/2014)
2
+
3
+ - Ughhhh, re-push 0.0.4 with changes from origin master :)
4
+
1
5
  ## 0.0.4 (06/06/2014)
2
6
 
3
7
  - Fix github auth check
@@ -12,7 +12,7 @@ module GitHubBub
12
12
  RETRIES = 1
13
13
 
14
14
  def initialize(url, query = {}, options = {})
15
- self.url = url.include?("http") ? url : File.join(BASE_URI, 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]|| {})
@@ -1,3 +1,3 @@
1
1
  module GitHubBub
2
- VERSION = "0.0.4"
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
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-06-06 00:00:00.000000000 Z
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: