mas-rad_core 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/serializers/adviser_serializer.rb +9 -1
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/log/test.log +39664 -0
- data/spec/factories/adviser.rb +1 -1
- data/spec/serializers/adviser_serializer_spec.rb +5 -0
- 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: d5464cce0b3dc17ad38930e42ecbc5d55aedb42b
|
4
|
+
data.tar.gz: 947dce5aa900d708140dddd808d584df49aa1dae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0376276354c7add205e317c1f65ba34ee150ef687cf54b72f60d3182b3af846b3540255402dddb8a272d1e6eb6e969a7627742283e30381edffb31addafb90e9
|
7
|
+
data.tar.gz: 512077e1feed2e219aea990b079a92edb72697d49fe61ac66ac40160bb96d6ea7a883a188a3318a89abe300b2096ce1a3070e01f32f3520f51c30b4ad2a6b5da
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AdviserSerializer < ActiveModel::Serializer
|
2
2
|
self.root = false
|
3
3
|
|
4
|
-
attributes :_id, :name, :range, :location
|
4
|
+
attributes :_id, :name, :range, :location, :range_location
|
5
5
|
|
6
6
|
def _id
|
7
7
|
object.id
|
@@ -17,4 +17,12 @@ class AdviserSerializer < ActiveModel::Serializer
|
|
17
17
|
lon: object.longitude
|
18
18
|
}
|
19
19
|
end
|
20
|
+
|
21
|
+
def range_location
|
22
|
+
{
|
23
|
+
type: :circle,
|
24
|
+
coordinates: [object.longitude, object.latitude],
|
25
|
+
radius: "#{object.travel_distance}miles"
|
26
|
+
}
|
27
|
+
end
|
20
28
|
end
|
data/lib/mas/rad_core/version.rb
CHANGED