rooftop 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rooftop/resource_links/link.rb +4 -0
- data/lib/rooftop/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: 18e9628d0d8e286862e6ac861b3b7a9f8d34952c
|
4
|
+
data.tar.gz: 4b8ae8c01ca97a1a7a2e19338e81abe5f0433db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8df9623412c9eb94feed118e6ef8e37a4e5ec7cf7364c30b4244bf521aefba7cd64b6def9819f52604384e8dbaaae56446394de9747918480605edfa30a5c1ac
|
7
|
+
data.tar.gz: c79a8867347d755a2956309c6e2a53061c7690c7d9f6e2b4a25934b8248ccbd3dc8f1df868c393f2bc9ae90bbebeeda63d89605178106818a2b15f5b429d45e6
|
@@ -16,6 +16,10 @@ module Rooftop
|
|
16
16
|
if respond_to?(:id)
|
17
17
|
return @mapped_class.send(:find, id)
|
18
18
|
else
|
19
|
+
# TODO this is a fudge to get around some hrefs which don't have /wp/v2 in them
|
20
|
+
unless href =~ /wp\/v2/
|
21
|
+
href.gsub!('wp-json','wp-json/wp/v2')
|
22
|
+
end
|
19
23
|
# otherwise we're going to have make a call to the link's href.
|
20
24
|
result = @mapped_class.get(href)
|
21
25
|
result.run_callbacks(:find)
|
data/lib/rooftop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rooftop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|