gh 0.13.3 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gh/lazy_loader.rb +1 -1
- data/lib/gh/nested_resources.rb +1 -1
- data/lib/gh/remote.rb +2 -1
- data/lib/gh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af2e529d7301065889daa1e1ba6690662e37a71c
|
4
|
+
data.tar.gz: ee8723c7221de6ef184f9702fe6e74bf9a7cf646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bd70a3d15130459e5dd573b673477f39abdea64c54dd442938b394905ed63295516997b265f39c4b9fd9ea0a08a8d245831eb517297664cfcd033ed1681628e
|
7
|
+
data.tar.gz: 874fb8258eea02135cd481b6f081057bf70a2a89d6825f1404aac297f6dc9cc6639b7fa1ea866575da25d450abbf68c2d82f9fedb454abb15dfc2180e8c2fe88
|
data/lib/gh/lazy_loader.rb
CHANGED
@@ -8,7 +8,7 @@ module GH
|
|
8
8
|
|
9
9
|
def modify_hash(hash, loaded = false)
|
10
10
|
hash = super(hash)
|
11
|
-
link = hash['_links']
|
11
|
+
link = hash['_links']['self'] unless loaded or hash['_links'].nil?
|
12
12
|
setup_lazy_loading(hash, link['href']) if link
|
13
13
|
hash
|
14
14
|
rescue Exception => error
|
data/lib/gh/nested_resources.rb
CHANGED
@@ -8,7 +8,7 @@ module GH
|
|
8
8
|
|
9
9
|
def modify_hash(hash, loaded = false)
|
10
10
|
hash = super(hash)
|
11
|
-
link = hash['_links']
|
11
|
+
link = hash['_links']['self'] unless loaded or hash['_links'].nil?
|
12
12
|
set_links hash, Addressable::URI.parse(link['href']) if link
|
13
13
|
hash
|
14
14
|
end
|
data/lib/gh/remote.rb
CHANGED
@@ -68,7 +68,8 @@ module GH
|
|
68
68
|
# Internal: ...
|
69
69
|
def generate_response(key, response)
|
70
70
|
body, headers = response.body, response.headers
|
71
|
-
url = response.
|
71
|
+
url = response.env[:url] if response.respond_to? :env and response.env
|
72
|
+
url = response.url if response.respond_to?(:url)
|
72
73
|
url = frontend.full_url(key) if url.to_s.empty?
|
73
74
|
modify(body, headers, url)
|
74
75
|
end
|
data/lib/gh/version.rb
CHANGED
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.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|