promoter 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promoter/contact.rb +14 -4
- data/lib/promoter/version.rb +1 -1
- data/promoter.gemspec +1 -0
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc0ad6413d70db9e8c90fd3fbb892350aaa8810
|
4
|
+
data.tar.gz: ec101558dc9fd53bfe8d63c18f397bae9a7b6f1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 015822735ba7e70eb7360245419bdb77b8364238e2cfed146cb7049ccff7d0b60b8959eeeb8b454d57b70b56aa7a308abc7e4211747645bab624d2c6c1e77f1c
|
7
|
+
data.tar.gz: ba6b5340519a0e9b8e873636ed9ec40d8e7728443fab30948ae461eec77824ca049c07a058cb4ed38ebfa2f0e40ee5af1cb511ead9437f019ebec650845a4310
|
data/lib/promoter/contact.rb
CHANGED
@@ -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(
|
79
|
-
|
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(
|
84
|
-
response = Request.post(API_URL + "/survey/",
|
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
|
data/lib/promoter/version.rb
CHANGED
data/promoter.gemspec
CHANGED
@@ -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.
|
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:
|
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.
|
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:
|