iterable-api-client 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b456f80ce650910ada263cdb96b28a5fd188dd5afcc4aa44813e0b3892d5d946
4
- data.tar.gz: 308c15224339eb8a859cf3d9f6491907595d58da5d8bcc46c3f8223ddd356660
3
+ metadata.gz: d04be11184926b2bcffba1f777270fc08fbf83e676babb5c1e79756e33915464
4
+ data.tar.gz: 07723ae603767edd511e37a3c682f0348e6a9262ca435e881fd4d86a7e77b515
5
5
  SHA512:
6
- metadata.gz: 57c4ad6a3f16d3f7ab4b490bedf27b028f24f2ae1c1de9d79815740d3398d04aeffa0b42543de150a1bec6a988f3821f6f970605beb5da9a7a7890e95fcb49a2
7
- data.tar.gz: ae76c13bcb47302c41ca6b4a763b6dd53b6669da101b53f927500c73584facd143c0dbbedd922baacfea6806b82f52da84f2c2592f3255d6e7fed580ad152c36
6
+ metadata.gz: dc7f30727eaa45240f3a0f683e58128184397a305214e29e719ae34d0794ee04421bfb0bf496865a285f85edede66691d40e3f0e19a24652261efe38e1b6fa82
7
+ data.tar.gz: a90443045373add4a10ffd3ddbfb74114e71102b6be4f9f8392af1b179a02813e9432d15c3d743499ccb7ae27a8fcbb2e548fb43ec826aff3e1b4211b29a4e27
checksums.yaml.gz.sig CHANGED
Binary file
@@ -14,6 +14,7 @@ module Iterable
14
14
  # catalog = Iterable::CatalogFieldMappings.new("catalog-name", config)
15
15
  class CatalogFieldMappings < ApiResource
16
16
  attr_reader :catalog
17
+
17
18
  ##
18
19
  #
19
20
  # Initialize CatalogFieldMappings with a catalog name **currently in Beta only**
@@ -14,6 +14,7 @@ module Iterable
14
14
  # catalog = Iterable::Catalogs.new("catalog-name", config)
15
15
  class Catalogs < ApiResource
16
16
  attr_reader :name
17
+
17
18
  ##
18
19
  #
19
20
  # Initialize Catalogs with a catalog name **currently in Beta only**
@@ -13,6 +13,7 @@ module Iterable
13
13
  # templates = Iterable::Experiments.new([1, 2, 3], config)
14
14
  class Experiments < ApiResource
15
15
  attr_reader :experiment_ids
16
+
16
17
  ##
17
18
  #
18
19
  # Initialize Experiments with an array of experiment ids
@@ -57,7 +57,7 @@ module Iterable
57
57
  # @param conf [Iterable::Config] A config to optionally pass for requests
58
58
  #
59
59
  # @return [Iterable::Export]
60
- def initialize(data_type, only_fields = [], omit_fields = [], campaign_id = nil, conf = nil)
60
+ def initialize(data_type, only_fields = [], omit_fields = [], campaign_id = nil, conf = nil) # rubocop:disable Metrics/ParameterLists
61
61
  @data_type = data_type
62
62
  @only_fields = only_fields
63
63
  @omit_fields = omit_fields
@@ -13,6 +13,7 @@ module Iterable
13
13
  # templates = Iterable::MetadataTable.new("table-name", config)
14
14
  class MetadataTable < ApiResource
15
15
  attr_reader :name
16
+
16
17
  ##
17
18
  #
18
19
  # Initialize a MetadataTable with a table name
@@ -49,7 +49,8 @@ module Iterable
49
49
  end
50
50
 
51
51
  private def connection(verb, body = {}, headers = {})
52
- conn_headers = DEFAULT_HEADERS.merge(headers)
52
+ conn_headers = DEFAULT_HEADERS.dup.merge(headers)
53
+ conn_headers['Api-Key'] = @config.token if @config.token
53
54
  req = Net::HTTP.const_get(verb.to_s.capitalize, false).new(@uri, conn_headers)
54
55
  req.body = JSON.dump(body)
55
56
  req
@@ -65,8 +66,7 @@ module Iterable
65
66
  private def build_uri(path, params = {})
66
67
  uri = @config.uri
67
68
  uri.path += path
68
- params['api_key'] = @config.token
69
- uri.query = URI.encode_www_form(params)
69
+ uri.query = URI.encode_www_form(params) unless params.empty?
70
70
  uri
71
71
  end
72
72
 
data/lib/iterable.rb CHANGED
@@ -52,10 +52,8 @@ module Iterable
52
52
  # Iterable.configure do |conf|
53
53
  # conf.token = 'secret-token'
54
54
  # end
55
- module_function def configure
56
- config.tap do |conf|
57
- yield conf
58
- end
55
+ module_function def configure(&block)
56
+ config.tap(&block)
59
57
  end
60
58
 
61
59
  ##
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iterable-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chavez
@@ -35,7 +35,7 @@ cert_chain:
35
35
  skirV2p91csPqqACuQCX2oK9r29QZtt95aAnVdsdBMA+evI2nVknO0OhYDqNA0wR
36
36
  SkUCdTSDgV9CsbN/vy6DeR0eX1kP6OrntZJjKnrncbkKZnrJ5fjzKtUyj3I=
37
37
  -----END CERTIFICATE-----
38
- date: 2022-05-16 00:00:00.000000000 Z
38
+ date: 2022-06-08 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: multi_json
@@ -52,173 +52,173 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: 1.12.0
54
54
  - !ruby/object:Gem::Dependency
55
- name: coveralls
55
+ name: dotenv
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.8.21
60
+ version: 2.7.1
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 0.8.21
67
+ version: 2.7.1
68
68
  - !ruby/object:Gem::Dependency
69
- name: dotenv
69
+ name: gemcutter
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 2.2.0
74
+ version: 0.7.1
75
75
  type: :development
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 2.2.0
81
+ version: 0.7.1
82
82
  - !ruby/object:Gem::Dependency
83
- name: gemcutter
83
+ name: pry
84
84
  requirement: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 0.7.1
88
+ version: 0.14.1
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.7.1
95
+ version: 0.14.1
96
96
  - !ruby/object:Gem::Dependency
97
- name: multi_json
97
+ name: pry-byebug
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.12.1
102
+ version: 3.8.0
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 1.12.1
109
+ version: 3.8.0
110
110
  - !ruby/object:Gem::Dependency
111
- name: pry
111
+ name: pry-doc
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 0.10.4
116
+ version: 1.3.0
117
117
  type: :development
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 0.10.4
123
+ version: 1.3.0
124
124
  - !ruby/object:Gem::Dependency
125
- name: pry-byebug
125
+ name: rake
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 3.4.2
130
+ version: 13.0.0
131
131
  type: :development
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 3.4.2
137
+ version: 13.0.0
138
138
  - !ruby/object:Gem::Dependency
139
- name: pry-doc
139
+ name: redcarpet
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 0.11.1
144
+ version: 3.5.0
145
145
  type: :development
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 0.11.1
151
+ version: 3.5.0
152
152
  - !ruby/object:Gem::Dependency
153
- name: rake
153
+ name: rspec
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 12.0.0
158
+ version: 3.11.0
159
159
  type: :development
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 12.0.0
165
+ version: 3.11.0
166
166
  - !ruby/object:Gem::Dependency
167
- name: redcarpet
167
+ name: rubocop
168
168
  requirement: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: 3.4.0
172
+ version: 1.29.1
173
173
  type: :development
174
174
  prerelease: false
175
175
  version_requirements: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: 3.4.0
179
+ version: 1.29.1
180
180
  - !ruby/object:Gem::Dependency
181
- name: rspec
181
+ name: rubocop-performance
182
182
  requirement: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: 3.6.0
186
+ version: 1.13.3
187
187
  type: :development
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: 3.6.0
193
+ version: 1.13.3
194
194
  - !ruby/object:Gem::Dependency
195
- name: rubocop
195
+ name: rubocop-rspec
196
196
  requirement: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: 0.89.1
200
+ version: 2.11.0
201
201
  type: :development
202
202
  prerelease: false
203
203
  version_requirements: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: 0.89.1
207
+ version: 2.11.0
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: simplecov
210
210
  requirement: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: 0.14.1
214
+ version: 0.21.2
215
215
  type: :development
216
216
  prerelease: false
217
217
  version_requirements: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - "~>"
220
220
  - !ruby/object:Gem::Version
221
- version: 0.14.1
221
+ version: 0.21.2
222
222
  - !ruby/object:Gem::Dependency
223
223
  name: typhoeus
224
224
  requirement: !ruby/object:Gem::Requirement
@@ -253,28 +253,28 @@ dependencies:
253
253
  requirements:
254
254
  - - "~>"
255
255
  - !ruby/object:Gem::Version
256
- version: 3.8.3
256
+ version: 3.14.0
257
257
  type: :development
258
258
  prerelease: false
259
259
  version_requirements: !ruby/object:Gem::Requirement
260
260
  requirements:
261
261
  - - "~>"
262
262
  - !ruby/object:Gem::Version
263
- version: 3.8.3
263
+ version: 3.14.0
264
264
  - !ruby/object:Gem::Dependency
265
265
  name: yard
266
266
  requirement: !ruby/object:Gem::Requirement
267
267
  requirements:
268
268
  - - "~>"
269
269
  - !ruby/object:Gem::Version
270
- version: 0.9.5
270
+ version: 0.9.11
271
271
  type: :development
272
272
  prerelease: false
273
273
  version_requirements: !ruby/object:Gem::Requirement
274
274
  requirements:
275
275
  - - "~>"
276
276
  - !ruby/object:Gem::Version
277
- version: 0.9.5
277
+ version: 0.9.11
278
278
  description: Ruby gem for the Iterable REST API
279
279
  email: contact@el-chavez.me
280
280
  executables: []
@@ -315,10 +315,11 @@ files:
315
315
  - lib/iterable/users.rb
316
316
  - lib/iterable/workflows.rb
317
317
  - lib/iterable_api_client.rb
318
- homepage: http://gitlab.com/mtchavez/iterable
318
+ homepage: https://gitlab.com/mtchavez/iterable
319
319
  licenses:
320
320
  - MIT
321
- metadata: {}
321
+ metadata:
322
+ rubygems_mfa_required: 'true'
322
323
  post_install_message:
323
324
  rdoc_options:
324
325
  - "--charset=UTF-8"
@@ -329,7 +330,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
329
330
  requirements:
330
331
  - - ">="
331
332
  - !ruby/object:Gem::Version
332
- version: 2.4.0
333
+ version: 2.6.0
333
334
  required_rubygems_version: !ruby/object:Gem::Requirement
334
335
  requirements:
335
336
  - - ">="
metadata.gz.sig CHANGED
Binary file