crowdskout 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/crowdskout.gemspec +1 -1
- data/lib/crowdskout/services/profile_service.rb +12 -4
- data/lib/crowdskout/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: 4040ed9acd282cfdaeab2a53f60fb53df027a696
|
4
|
+
data.tar.gz: 0d3be13070cfdaf9b3d298120baf434d83ec8d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d129b6c3a1aaf6770ce35c9de31dc3929a22f58664193fb1a6e6203456d2c21dd9c80ff0b67fdec911186e537587775ca0cb61a7649b14b7ec966e18fba4d80b
|
7
|
+
data.tar.gz: df3ef7467d1261f24cfa687d4eed5166f33dd1eb489e5be79ad6d3ed050936027d875f25c1b1cc67b00f17023bdcd50986006a92a0a3db1df5dccbfb5d6f46bd
|
data/crowdskout.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "crowdskout"
|
8
|
-
s.version = '0.0.
|
8
|
+
s.version = '0.0.7'
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.authors = ["Crowdskout", "Revv","Kyle Schutt"]
|
11
11
|
s.homepage = "https://github.com/revvco/crowdskout"
|
@@ -37,7 +37,9 @@ module Crowdskout
|
|
37
37
|
raise Exceptions::ServiceException, "Profile object must not be nil." if profile.nil?
|
38
38
|
url = Util::Config.get('endpoints.base_url') + Util::Config.get('endpoints.profile')
|
39
39
|
url = build_url(url)
|
40
|
-
payload =
|
40
|
+
payload = {
|
41
|
+
profile: profile.to_hash
|
42
|
+
}.to_json
|
41
43
|
response = RestClient.post(url, payload, get_headers())
|
42
44
|
Components::Profile.create(JSON.parse(response.body)["data"])
|
43
45
|
end
|
@@ -51,7 +53,9 @@ module Crowdskout
|
|
51
53
|
raise Exceptions::ServiceException, "Must be an array of profiles." if profiles.nil? || !profiles.is_a?(Array)
|
52
54
|
url = Util::Config.get('endpoints.base_url') + Util::Config.get('endpoints.profile_bulk')
|
53
55
|
url = build_url(url)
|
54
|
-
payload =
|
56
|
+
payload = {
|
57
|
+
profiles: profiles.collect(&:to_hash)
|
58
|
+
}.to_json
|
55
59
|
response = RestClient.post(url, payload, get_headers())
|
56
60
|
body = JSON.parse(response.body)
|
57
61
|
|
@@ -71,7 +75,9 @@ module Crowdskout
|
|
71
75
|
raise Exceptions::ServiceException, "Profile object must not be nil." if profile.nil?
|
72
76
|
url = Util::Config.get('endpoints.base_url') + sprintf(Util::Config.get('endpoints.crud_profile'), profile.id)
|
73
77
|
url = build_url(url)
|
74
|
-
payload =
|
78
|
+
payload = {
|
79
|
+
profile: profile.to_hash
|
80
|
+
}.to_json
|
75
81
|
response = RestClient.put(url, payload, get_headers())
|
76
82
|
Components::Profile.create(JSON.parse(response.body)["data"])
|
77
83
|
end
|
@@ -84,7 +90,9 @@ module Crowdskout
|
|
84
90
|
raise Exceptions::ServiceException, "Must be an array of profiles." if profiles.nil? || !profiles.is_a?(Array)
|
85
91
|
url = Util::Config.get('endpoints.base_url') + Util::Config.get('endpoints.profile_bulk')
|
86
92
|
url = build_url(url)
|
87
|
-
payload =
|
93
|
+
payload = {
|
94
|
+
profiles: profiles.collect(&:to_hash)
|
95
|
+
}.to_json
|
88
96
|
response = RestClient.put(url, payload, get_headers())
|
89
97
|
body = JSON.parse(response.body)
|
90
98
|
|
data/lib/crowdskout/version.rb
CHANGED