crowdskout 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23a7dcaaa6dc1c5c7a3f36f2926b986e869bef96
4
- data.tar.gz: dd8a9c09d0e8834837f65fa03e787d9bf0325d25
3
+ metadata.gz: 4040ed9acd282cfdaeab2a53f60fb53df027a696
4
+ data.tar.gz: 0d3be13070cfdaf9b3d298120baf434d83ec8d13
5
5
  SHA512:
6
- metadata.gz: 381d154794cadddc34323a8db6f38caeecf65b46a103b6f22188a3bf738424102ccf3c90084fa053275747bb015d58a587769edea1e70679354a36676f74b96c
7
- data.tar.gz: a04ad3753758141ddf0bff915f3db526259fd70c71d9d8885b44f1a11712df6846f83b6b223abaa708490fdb68fc98adf51d3b95cd13296212af433d1c039bb5
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.6'
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 = profile.to_json
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 = profiles.to_json
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 = profile.to_json
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 = profiles.to_json
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
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Crowdskout
22
- VERSION = '0.0.6'
22
+ VERSION = '0.0.7'
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdskout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crowdskout