cyrax 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cyrax/decorator.rb +7 -1
- data/lib/cyrax/extensions/has_service.rb +1 -0
- data/lib/cyrax/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjUxOTdlY2I2N2FkZmE0MDVhZWNlNjQwY2IxNTE5OTc4NGQ4MzYxMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDkyNWFmZDk2Y2NhYTQ3ZTYwZWE2MDAzYzM3NmIwZGI2YTE4ZjAxYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZThmZDE0ODA2MTc1YjRkZjRlMTQ5YTU1ODNjZmRiNDAxODc1MjhjYjA0ZDJj
|
10
|
+
YjgwNmNjZjI0MTdiMGM2N2IwY2JkMjg5YWU3NGQ3ZDQ4MDE4ZWUwOTA5Njhi
|
11
|
+
MWM5ODQwZGVjODU2ZThlMWZmZDMwMzZmOGI1NmI5M2JkMjZkYzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmEzYTFhYzAwZWZlM2E2MzZjM2Q1YjM0MWRlY2YyMmQ5NmJjYzM5MTE4ODhl
|
14
|
+
ZjRmYzA0MDFmZDRiNzhlOWJiOGIwN2ZlM2Y5YmM4NWU4NDgxODE3MzIwN2Qy
|
15
|
+
MjdmZWUzMTY0ODU1ODc3NGZkNjMxYjllZTgxMDJlNWM2ZThhMWE=
|
data/lib/cyrax/decorator.rb
CHANGED
@@ -30,7 +30,13 @@ class Cyrax::Decorator
|
|
30
30
|
|
31
31
|
class << self
|
32
32
|
def fetch(resource)
|
33
|
-
resource.
|
33
|
+
if resource.is_a?(ActiveRecord::Relation)
|
34
|
+
resource.to_a
|
35
|
+
elsif resource.respond_to?(:all)
|
36
|
+
resource.all
|
37
|
+
else
|
38
|
+
resource
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
def decorate(resource)
|
data/lib/cyrax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Droidlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|