promoter 0.1.8 → 0.1.9

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: 8c64eec01edb7194390f6c905a3f0b2c1c5bd069
4
- data.tar.gz: 2206223ddd7d844f3414974145efd72651590a84
3
+ metadata.gz: 1bc0ad6413d70db9e8c90fd3fbb892350aaa8810
4
+ data.tar.gz: ec101558dc9fd53bfe8d63c18f397bae9a7b6f1e
5
5
  SHA512:
6
- metadata.gz: 185366e12c7af55af70f00959019814016fd43e42e2791b7f01539851cd374402018d807895b30816e1185677a751f47fb6d293bb263d21d17b91ae01ca1df5a
7
- data.tar.gz: f307b36a0ffb83cbda8c05daa93d9073e0b3731b07c4532541a4fc7f5b69f198fb8fcdb3f799cdad4b4173f727fb69f56153400b8208add9c60af6328bd2391d
6
+ metadata.gz: 015822735ba7e70eb7360245419bdb77b8364238e2cfed146cb7049ccff7d0b60b8959eeeb8b454d57b70b56aa7a308abc7e4211747645bab624d2c6c1e77f1c
7
+ data.tar.gz: ba6b5340519a0e9b8e873636ed9ec40d8e7728443fab30948ae461eec77824ca049c07a058cb4ed38ebfa2f0e40ee5af1cb511ead9437f019ebec650845a4310
@@ -75,15 +75,25 @@ module Promoter
75
75
  # be added correctly. Otherwise, the contact will
76
76
  # be associated to a default generated contact list
77
77
  # for your given organization.
78
- def self.create(attributes)
79
- response = Request.post(API_URL + "/", attributes)
78
+ def self.create(params)
79
+ # ensure the values of the 'attributes' param are strings
80
+ if params[:attributes]
81
+ params[:attributes] = values_to_string(params[:attributes])
82
+ end
83
+
84
+ response = Request.post(API_URL + "/", params)
80
85
  new(response)
81
86
  end
82
87
 
83
- def self.survey(attributes)
84
- response = Request.post(API_URL + "/survey/", attributes)
88
+ def self.survey(params)
89
+ response = Request.post(API_URL + "/survey/", params)
85
90
  new(response)
86
91
  end
87
92
 
93
+ # used for ensuring the values of the attributes hashes are strings
94
+ def self.values_to_string(hash)
95
+ hash.each{ |key, value| hash[key] = value.to_s }
96
+ end
97
+
88
98
  end
89
99
  end
@@ -1,3 +1,3 @@
1
1
  module Promoter
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Promoter::VERSION
9
9
  spec.authors = ["Chris O'Sullivan"]
10
10
  spec.email = ["thechrisoshow@gmail.com"]
11
+ spec.homepage = "https://developers.promoter.io/"
11
12
 
12
13
  spec.summary = %q{promoter is a wrapper for the promoter.io REST API}
13
14
  spec.license = "MIT"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promoter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris O'Sullivan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-24 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,7 +119,7 @@ files:
119
119
  - lib/promoter/request.rb
120
120
  - lib/promoter/version.rb
121
121
  - promoter.gemspec
122
- homepage:
122
+ homepage: https://developers.promoter.io/
123
123
  licenses:
124
124
  - MIT
125
125
  metadata: {}
@@ -139,9 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.5.1
142
+ rubygems_version: 2.6.8
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: promoter is a wrapper for the promoter.io REST API
146
146
  test_files: []
147
- has_rdoc: