opi 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opi/resource.rb +7 -1
- data/lib/opi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b7f01c02b84e5a661ba8a40c1df8c1f4ac7761
|
4
|
+
data.tar.gz: 06b261defb82e1d4b097c0614b49da332f8dfad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b5f22c221190b7c317b04ce5b8223f6ff31882ad3e6609f162e8f9af2c1f2e2464c0bcc1cfaa4308d6aa3c79833063a84260add2dce940d022e8d05776b7508
|
7
|
+
data.tar.gz: 538affbc696026dc7da2879d4ab2fb48c436f3ce9e4663b65431fbecb03ed0cb3685fbca1de79575596fc90e6cc4fabcb3420563bdc4d286dec60460a139c78c
|
data/lib/opi/resource.rb
CHANGED
@@ -39,7 +39,13 @@ module Opi
|
|
39
39
|
def resource(path, options={}, &block)
|
40
40
|
# TODO: clean this up, should be able to determine the child resource path
|
41
41
|
root = "#{self.root}/#{path}"
|
42
|
-
|
42
|
+
# TODO: should be able to determine parent resource name, need to store name separately
|
43
|
+
unless self.root.empty?
|
44
|
+
# TODO: need to singularize ...
|
45
|
+
parent_resource = self.root.split('/').last.gsub(/s$/, '')
|
46
|
+
puts parent_resource
|
47
|
+
root = "#{self.root}/:#{parent_resource}_id/#{path}"
|
48
|
+
end
|
43
49
|
resources << Resource.new(
|
44
50
|
root,
|
45
51
|
self.options.merge(options),
|
data/lib/opi/version.rb
CHANGED