formstack-api 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/formstack/api/version.rb +1 -1
  3. data/lib/formstack/api.rb +169 -1
  4. data/spec/fs-logo.png +0 -0
  5. data/spec/support/vcr.rb +34 -7
  6. data/spec/vcr/Formstack_API/_copy_form/adds_COPY_at_the_end_of_the_form_name.yml +434 -0
  7. data/spec/vcr/Formstack_API/_create_field/creates_a_field_with_embeded_code.yml +43 -0
  8. data/spec/vcr/Formstack_API/_create_field/creates_a_text_field.yml +43 -0
  9. data/spec/vcr/Formstack_API/_delete_submission/deletes_a_submission.yml +142 -0
  10. data/spec/vcr/Formstack_API/_edit_submission_data/edits_a_submission_succesfully.yml +373 -0
  11. data/spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_if_fields_are_non_numeric.yml +66 -0
  12. data/spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match.yml +66 -0
  13. data/spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match_reversed.yml +66 -0
  14. data/spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_with_a_bad_timestamp.yml +66 -0
  15. data/spec/vcr/Formstack_API/_form_submissions/gets_submissions_default.yml +388 -245
  16. data/spec/vcr/Formstack_API/_form_submissions/raises_an_error_if_page_number_is_not_working.yml +79 -0
  17. data/spec/vcr/Formstack_API/_form_submissions/returns_data_if_specified.yml +245 -0
  18. data/spec/vcr/Formstack_API/_form_submissions/returns_no_data_by_default.yml +65 -0
  19. data/spec/vcr/Formstack_API/_get_submission_details/gets_the_right_submission_from_the_right_form.yml +43 -0
  20. data/spec/vcr/Formstack_API/_submit_form/creates_a_submission_into_a_form.yml +46 -0
  21. data/spec/vcr/Formstack_API/_submit_form/uploads_an_image.yml +44 -0
  22. data/spec/wrapper_spec.rb +217 -20
  23. metadata +32 -2
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://www.formstack.com/api/v2/form/<UPLOAD_FORM_ID>/submission.json
6
+ body:
7
+ encoding: UTF-8
8
+ string: read=0&field_<UPLOAD_FIELD_IDS>=fs-logo.png%3BiVBORw0KGgoAAAANSUhEUgAAANcAAAAnCAIAAAFkinptAAAAGXRFWHRTb2Z0%0Ad2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9i%0AZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2Vo%0AaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6%0AbnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2%0ALjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpS%0AREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJk%0AZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIg%0AeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8i%0AIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5%0AcGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5j%0Ab20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRp%0AZDpGNzdGMTE3NDA3MjA2ODExODIyQUNFM0M5MkIxRjVFNiIgeG1wTU06RG9j%0AdW1lbnRJRD0ieG1wLmRpZDpDQkFFNDVGQTJGNjMxMUUyQTAxQTk5RDVFRUY1%0ANjQwQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1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
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - nginx
19
+ Date:
20
+ - Mon, 17 Nov 2014 15:34:19 GMT
21
+ Content-Type:
22
+ - application/json
23
+ Content-Length:
24
+ - '366'
25
+ Connection:
26
+ - keep-alive
27
+ P3p:
28
+ - CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI
29
+ DSP COR"
30
+ Set-Cookie:
31
+ - FormstackAdmin=u1kjhtlil4iugt0t7quu889ic5; path=/api/; secure; HttpOnly
32
+ Location:
33
+ - https://www.formstack.com/api/v2/form/<UPLOAD_FORM_ID>/submission/172271098.json
34
+ Cache-Control:
35
+ - no-cache
36
+ X-Robots-Tag:
37
+ - noindex, nofollow
38
+ body:
39
+ encoding: UTF-8
40
+ string: '{"id":"172271098","message":"<p>The form was submitted successfully.<\/p>","timestamp":"2014-11-17
41
+ 16:34:18","user_agent":"","remote_addr":"89.202.154.170","payment_status":"","form":"<UPLOAD_FORM_ID>","latitude":null,"longitude":null,"data":[{"field":"<UPLOAD_FIELD_IDS>","value":"https:\/\/s3.amazonaws.com\/files.formstack.com\/uploads\/<UPLOAD_FORM_ID>\/<UPLOAD_FIELD_IDS>\/172271098\/fs-logo.png"}]}'
42
+ http_version:
43
+ recorded_at: Mon, 17 Nov 2014 15:34:18 GMT
44
+ recorded_with: VCR 2.9.3
data/spec/wrapper_spec.rb CHANGED
@@ -1,12 +1,23 @@
1
1
  require_relative '../lib/formstack/api'
2
+ require "base64"
2
3
 
3
4
  RSpec.describe Formstack::API do
4
5
 
5
- subject(:wrapper) { Formstack::API.new(access_token) }
6
6
  let(:access_token) { ACCESS_TOKEN }
7
- let(:valid_form_id) { FORM_ID }
8
7
  let(:invalid_form_id) { 1234 }
9
8
  let(:inaccessible_form_id) { INACCESSIBLE_FORM_ID }
9
+ let(:delete_submission_form) { DELETE_SUBMISSION_FORM }
10
+ let(:submit_form_id) { SUBMIT_FORM_ID }
11
+ let(:upload_form_id) { UPLOAD_FORM_ID }
12
+ let(:upload_field_ids) { [UPLOAD_FIELD_IDS] }
13
+ let(:logo_path) { LOGO_PATH }
14
+ let(:create_field_form_id) { CREATE_FIELD_FORM_ID }
15
+ let(:submission_details_id) { SUBMISSION_DETAILS_ID }
16
+ let(:submission_details_form_id) { SUBMISSION_DETAILS_FORM_ID }
17
+ let(:edit_submission_field_id) { EDIT_SUBMISSION_FIELD_ID }
18
+ let(:edit_submission_array_field_id) { EDIT_SUBMISSION_ARRAY_FIELD_ID }
19
+
20
+ subject(:wrapper) { Formstack::API.new(access_token) }
10
21
 
11
22
  describe '#request', :vcr do
12
23
 
@@ -38,7 +49,7 @@ RSpec.describe Formstack::API do
38
49
 
39
50
  describe '#form_details', :vcr do
40
51
  it 'reads a form name' do
41
- form = wrapper.form_details(valid_form_id)
52
+ form = wrapper.form_details(submit_form_id)
42
53
  expect(form['name']).to eq('Test Form')
43
54
  end
44
55
 
@@ -61,8 +72,8 @@ RSpec.describe Formstack::API do
61
72
 
62
73
  describe '#copy_form', :vcr do
63
74
  it 'adds COPY at the end of the form name' do
64
- form = wrapper.form_details(valid_form_id)
65
- copied_form = wrapper.copy_form(valid_form_id)
75
+ form = wrapper.form_details(submit_form_id)
76
+ copied_form = wrapper.copy_form(submit_form_id)
66
77
  expect(copied_form['name']).to match(/^#{form['name']} - COPY/)
67
78
  end
68
79
 
@@ -79,10 +90,10 @@ RSpec.describe Formstack::API do
79
90
 
80
91
  describe '#form_submissions', :vcr do
81
92
  it 'gets submissions default' do
82
- form = wrapper.form_details(valid_form_id)
93
+ form = wrapper.form_details(submit_form_id)
83
94
  submissions_count = form['submissions'].to_i > 25 ? 25 : form['submissions'].to_i
84
95
 
85
- submissions = wrapper.form_submissions(valid_form_id)
96
+ submissions = wrapper.form_submissions(submit_form_id)
86
97
  expect(submissions_count).to eq(submissions.count)
87
98
  end
88
99
 
@@ -91,55 +102,241 @@ RSpec.describe Formstack::API do
91
102
  end
92
103
 
93
104
  it 'raises an error if min time is invalid' do
94
- expect{wrapper.form_submissions(valid_form_id, '', 'BAD')}.to raise_exception('Invalid value for minTime parameter')
105
+ expect{wrapper.form_submissions(submit_form_id, '', 'BAD')}.to raise_exception('Invalid value for minTime parameter')
95
106
  end
96
107
 
97
108
  it 'raises an error if max time is invalid' do
98
- expect{wrapper.form_submissions(valid_form_id, '', '', 'BAD')}.to raise_exception('Invalid value for maxTime parameter')
109
+ expect{wrapper.form_submissions(submit_form_id, '', '', 'BAD')}.to raise_exception('Invalid value for maxTime parameter')
99
110
  end
100
111
 
101
112
  it 'raises an error for a search mismatch' do
102
113
  field_ids = [1, 2, 3]
103
114
  field_values = ['test-1', 'test-2']
104
- expect{wrapper.form_submissions(valid_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship')
115
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship')
105
116
  end
106
117
 
107
118
  it 'raises an error for a search mismatch reversed' do
108
119
  field_ids = [1, 2]
109
120
  field_values = ['test-1', 'test-2', 'test-3']
110
- expect{wrapper.form_submissions(valid_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship')
121
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('You must have a one to one relationship')
111
122
  end
112
123
 
113
124
  it 'raises an error if field ids are not numeric' do
114
125
  field_ids = [1, 'two']
115
126
  field_values = ['test-1', 'test-2']
116
- expect{wrapper.form_submissions(valid_form_id, '', '', '', field_ids, field_values)}.to raise_exception('Field IDs must be numeric')
127
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', field_ids, field_values)}.to raise_exception('Field IDs must be numeric')
117
128
  end
118
129
 
119
130
  it 'raises an error if per_page is not numeric' do
120
- expect{wrapper.form_submissions(valid_form_id, '', '', '', [], [], 1, 'fail')}.to raise_exception('The perPage value must be numeric')
131
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 'fail')}.to raise_exception('The perPage value must be numeric')
121
132
  end
122
133
 
123
134
  it 'raises an error if requests per page are less than 1' do
124
- expect{wrapper.form_submissions(valid_form_id, '', '', '', [], [], 1, 0)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request')
135
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 0)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request')
125
136
  end
126
137
 
127
138
  it 'raises an error if requests per page are more than 100' do
128
- expect{wrapper.form_submissions(valid_form_id, '', '', '', [], [], 1, 101)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request')
139
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 101)}.to raise_exception('You can only retrieve a minimum of 1 and maximum of 100 submissions per request')
129
140
  end
130
141
 
131
142
  it 'raises an error if page_number is not numeric' do
132
- expect{wrapper.form_submissions(valid_form_id, '', '', '', [], [], 'fail')}.to raise_exception('The pageNumber value must be numeric')
143
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 'fail')}.to raise_exception('The pageNumber value must be numeric')
133
144
  end
134
145
 
135
- it 'raises an error if page number is not working'
146
+ it 'raises an error if page number is not working' do
147
+ page1 = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 1, 'DESC')
148
+ page2 = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 2, 1, 'DESC')
149
+
150
+ expect(page1).not_to eq(page2)
151
+ end
136
152
 
137
153
  it 'raises an error if the sort parameter is invalid' do
138
- expect{wrapper.form_submissions(valid_form_id, '', '', '', [], [], 1, 100, 'fail')}.to raise_exception('The sort parameter must be ASC or DESC')
154
+ expect{wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 100, 'fail')}.to raise_exception('The sort parameter must be ASC or DESC')
155
+ end
156
+
157
+ it 'returns no data by default' do
158
+ submission = wrapper.form_submissions(submit_form_id).first
159
+
160
+ expect(submission.include?('data')).to eq(false)
161
+ end
162
+
163
+ it 'returns data if specified' do
164
+ submission = wrapper.form_submissions(submit_form_id, '', '', '', [], [], 1, 100, 'DESC', true).first
165
+
166
+ expect(submission.include?('data')).to eq(true)
167
+ end
168
+
169
+ end
170
+
171
+ describe '#submit_form', :vcr do
172
+ let(:submit_form_field_ids) { [28705506, 28706107, 28706112] }
173
+ let(:submit_form_field_values) { ['short-answer-test', {'first' => 'first-test', 'last' => 'last-test'}, 'this is a long answer field'] }
174
+
175
+ it 'creates a submission into a form' do
176
+ response = wrapper.submit_form(submit_form_id, submit_form_field_ids, submit_form_field_values)
177
+ expect(response['form'].to_i).to eq(submit_form_id)
178
+
179
+ response['data'].each do |row|
180
+ value = submit_form_field_values.to_a[submit_form_field_ids.index(row['field'].to_i)]
181
+ if value.class == Hash
182
+ clean_hash = {}
183
+ row['value'].to_s.split(/\n/).each do |a|
184
+ key, val = a.split(' = ')
185
+ clean_hash[key] = val
186
+ end
187
+ expect(clean_hash).to eq(value)
188
+ else
189
+ expect(row['value']).to eq(value)
190
+ end
191
+ end
192
+ end
193
+
194
+ it 'raises an error if the form id is non numeric' do
195
+ expect{wrapper.submit_form('fail')}.to raise_exception('Form ID must be numeric')
139
196
  end
140
197
 
141
- it 'returns false with no data'
142
- it 'returns true with data'
198
+ it 'raises an eror if the timestamp format is invalid' do
199
+ expect{wrapper.submit_form(submit_form_id, [], [], 'this is not a valid date/time string')}.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS')
200
+ end
201
+
202
+ it 'raises an error for a data array mismatch' do
203
+ field_ids = [1, 2, 3]
204
+ field_values = ['a', 'b']
205
+ expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('There must be a one-to-one relationship between Field IDs and their values')
206
+ end
207
+
208
+ it 'raises an error for a data array mismatch reversed' do
209
+ field_ids = [1, 2]
210
+ field_values = ['a', 'b', 'c']
211
+ expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('There must be a one-to-one relationship between Field IDs and their values')
212
+ end
213
+
214
+ it 'raises an error if field ids are not numeric' do
215
+ field_ids = ['one']
216
+ field_values = ['a']
217
+ expect{wrapper.submit_form(submit_form_id, field_ids, field_values)}.to raise_exception('Field IDs must be numeric')
218
+ end
219
+
220
+ it 'uploads an image' do
221
+ logo_data = File.open(logo_path, 'rb') { |file| file.read }
222
+ upload_field_values = [[logo_data, 'fs-logo.png']]
223
+
224
+ upload_field_values.each_with_index do |field, idx|
225
+ upload_field_values[idx] = "#{upload_field_values[idx][1]};#{Base64.encode64(field[0])}"
226
+ end
227
+
228
+ response = wrapper.submit_form(upload_form_id, upload_field_ids, upload_field_values)
229
+
230
+ expect(response['data']).not_to be_empty
231
+
232
+ response['data'].each_with_index do |row, idx|
233
+ expect(row['field'].to_i).to eq(upload_field_ids[idx])
234
+ expect(row['value']).not_to be_empty
235
+ end
236
+ end
237
+ end
238
+
239
+ describe '#get_submission_details', :vcr do
240
+
241
+ it 'gets the right submission from the right form' do
242
+ submission = wrapper.get_submission_details(submission_details_id)
243
+ expect(submission['form'].to_i).to eq(submission_details_form_id)
244
+ end
245
+
246
+ it 'raises an error if submission id is not numeric' do
247
+ expect{wrapper.get_submission_details('FAIL')}.to raise_exception('Submission ID must be numeric')
248
+ end
249
+ end
250
+
251
+ describe '#edit_submission_data', :vcr do
252
+
253
+ let(:value) { "test#{Time.now}" }
254
+ let(:hash_value) { { 'first' => "#{value}-first", 'last' => "#{value}-last" } }
255
+ let(:edit_submission_id) { get_editable_submission_id }
256
+
257
+ it 'edits a submission succesfully' do
258
+
259
+ response = wrapper.edit_submission_data(edit_submission_id,
260
+ [edit_submission_field_id, edit_submission_array_field_id],
261
+ [value, hash_value])
262
+
263
+ expect(response['success'].to_i).to eq(1)
264
+ expect(response['id'].to_i).to eq(edit_submission_id)
265
+
266
+ submission = wrapper.get_submission_details(edit_submission_id)
267
+
268
+ submission['data'].each do |row|
269
+ if row['field'] == edit_submission_field_id
270
+ expect(row['value']).to eq(value)
271
+ elsif row['field'] == edit_submission_array_field_id
272
+ expect(row['value']).to eq(hash_value)
273
+ end
274
+ end
275
+ end
276
+
277
+ it 'raises an exception when the submission id is non numeric' do
278
+ expect{ wrapper.edit_submission_data('FAIL') }.to raise_exception('Submission ID must be numeric')
279
+ end
280
+
281
+ it 'raises an exception with a bad timestamp' do
282
+ expect{
283
+ wrapper.edit_submission_data(edit_submission_id, [], [], 'Bad Date String')
284
+ }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS')
285
+ end
286
+
287
+ it 'raises an exception when data array and ids don\'t match' do
288
+ expect{
289
+ wrapper.edit_submission_data(edit_submission_id, [1,2,3], ['test-1', 'test-2'], 'Bad Date String')
290
+ }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS')
291
+ end
292
+
293
+ it 'raises an exception when data array and ids don\'t match reversed' do
294
+ expect{
295
+ wrapper.edit_submission_data(edit_submission_id, [1,2], ['test-1', 'test-2', 'test-3'], 'Bad Date String')
296
+ }.to raise_exception('You must use a valid Date/Time string formatted in YYYY-MM-DD HH:MM:SS')
297
+ end
298
+
299
+ it 'raises an exception if fields are non numeric' do
300
+ expect{
301
+ wrapper.edit_submission_data(edit_submission_id, ['fail'], ['test-1'])
302
+ }.to raise_exception('Field IDs must be numeric')
303
+ end
304
+ end
305
+
306
+ describe '#delete_submission', :vcr do
307
+ it 'deletes a submission' do
308
+ submission_to_delete = get_editable_submission_id
309
+ response = wrapper.delete_submission(submission_to_delete)
310
+ expect(response['success'].to_i).to eq(1)
311
+ expect(response['id'].to_i).to eq(submission_to_delete)
312
+ end
313
+
314
+ it 'raises an exception with a non numeric id' do
315
+ expect{wrapper.delete_submission('FAIL')}.to raise_exception('Submission ID must be numeric')
316
+ end
317
+ end
318
+
319
+ describe '#create_field', :vcr do
320
+ it 'creates a text field' do
321
+ field_name = "Test Field #{Time.now}"
322
+ field = wrapper.create_field(create_field_form_id, 'text', field_name)
323
+
324
+ expect(field['label']).to match(/Test Field/)
325
+ expect(field['type']).to eq('text')
326
+ end
327
+
328
+ it 'creates a field with embeded code' do
329
+ attributes = { 'text' => '<script type="text/javascript">alert(\'Woop there it is \');</script>' }
330
+
331
+ field = wrapper.create_field(create_field_form_id, 'embed', '', false, '', false, attributes)
332
+
333
+ expect(field['type']).to eq('embed')
334
+ end
335
+ end
336
+
337
+ # describe '#', :vcr => { :record => :all } do
143
338
 
339
+ def get_editable_submission_id
340
+ wrapper.form_submissions(delete_submission_form, '', '', '', [], [], 1, 100, 'ASC').first['id'].to_i
144
341
  end
145
342
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formstack-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauro Morales
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -140,17 +140,32 @@ files:
140
140
  - formstack-api.gemspec
141
141
  - lib/formstack/api.rb
142
142
  - lib/formstack/api/version.rb
143
+ - spec/fs-logo.png
143
144
  - spec/spec_helper.rb
144
145
  - spec/support/vcr.rb
145
146
  - spec/vcr/Formstack_API/_copy_form/adds_COPY_at_the_end_of_the_form_name.yml
146
147
  - spec/vcr/Formstack_API/_copy_form/raises_an_error_if_form_id_is_invalid.yml
148
+ - spec/vcr/Formstack_API/_create_field/creates_a_field_with_embeded_code.yml
149
+ - spec/vcr/Formstack_API/_create_field/creates_a_text_field.yml
150
+ - spec/vcr/Formstack_API/_delete_submission/deletes_a_submission.yml
151
+ - spec/vcr/Formstack_API/_edit_submission_data/edits_a_submission_succesfully.yml
152
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_if_fields_are_non_numeric.yml
153
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match.yml
154
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match_reversed.yml
155
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_with_a_bad_timestamp.yml
147
156
  - spec/vcr/Formstack_API/_form_details/reads_a_form_name.yml
148
157
  - spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_form_id_doesnt_exist.yml
149
158
  - spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_you_dont_have_access_to_form.yml
150
159
  - spec/vcr/Formstack_API/_form_submissions/gets_submissions_default.yml
160
+ - spec/vcr/Formstack_API/_form_submissions/raises_an_error_if_page_number_is_not_working.yml
161
+ - spec/vcr/Formstack_API/_form_submissions/returns_data_if_specified.yml
162
+ - spec/vcr/Formstack_API/_form_submissions/returns_no_data_by_default.yml
151
163
  - spec/vcr/Formstack_API/_forms/gets_folders_when_asked.yml
152
164
  - spec/vcr/Formstack_API/_forms/responds_with_no_folders_by_default.yml
165
+ - spec/vcr/Formstack_API/_get_submission_details/gets_the_right_submission_from_the_right_form.yml
153
166
  - spec/vcr/Formstack_API/_request/raises_an_exception_with_a_bad_token.yml
167
+ - spec/vcr/Formstack_API/_submit_form/creates_a_submission_into_a_form.yml
168
+ - spec/vcr/Formstack_API/_submit_form/uploads_an_image.yml
154
169
  - spec/wrapper_spec.rb
155
170
  homepage: https://github.com/LAS-IT/formstack-api
156
171
  licenses:
@@ -177,15 +192,30 @@ signing_key:
177
192
  specification_version: 4
178
193
  summary: Formstack API V2 Ruby Wrapper.
179
194
  test_files:
195
+ - spec/fs-logo.png
180
196
  - spec/spec_helper.rb
181
197
  - spec/support/vcr.rb
182
198
  - spec/vcr/Formstack_API/_copy_form/adds_COPY_at_the_end_of_the_form_name.yml
183
199
  - spec/vcr/Formstack_API/_copy_form/raises_an_error_if_form_id_is_invalid.yml
200
+ - spec/vcr/Formstack_API/_create_field/creates_a_field_with_embeded_code.yml
201
+ - spec/vcr/Formstack_API/_create_field/creates_a_text_field.yml
202
+ - spec/vcr/Formstack_API/_delete_submission/deletes_a_submission.yml
203
+ - spec/vcr/Formstack_API/_edit_submission_data/edits_a_submission_succesfully.yml
204
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_if_fields_are_non_numeric.yml
205
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match.yml
206
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_when_data_array_and_ids_don_t_match_reversed.yml
207
+ - spec/vcr/Formstack_API/_edit_submission_data/raises_an_exception_with_a_bad_timestamp.yml
184
208
  - spec/vcr/Formstack_API/_form_details/reads_a_form_name.yml
185
209
  - spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_form_id_doesnt_exist.yml
186
210
  - spec/vcr/Formstack_API/_form_details/responds_with_an_error_if_you_dont_have_access_to_form.yml
187
211
  - spec/vcr/Formstack_API/_form_submissions/gets_submissions_default.yml
212
+ - spec/vcr/Formstack_API/_form_submissions/raises_an_error_if_page_number_is_not_working.yml
213
+ - spec/vcr/Formstack_API/_form_submissions/returns_data_if_specified.yml
214
+ - spec/vcr/Formstack_API/_form_submissions/returns_no_data_by_default.yml
188
215
  - spec/vcr/Formstack_API/_forms/gets_folders_when_asked.yml
189
216
  - spec/vcr/Formstack_API/_forms/responds_with_no_folders_by_default.yml
217
+ - spec/vcr/Formstack_API/_get_submission_details/gets_the_right_submission_from_the_right_form.yml
190
218
  - spec/vcr/Formstack_API/_request/raises_an_exception_with_a_bad_token.yml
219
+ - spec/vcr/Formstack_API/_submit_form/creates_a_submission_into_a_form.yml
220
+ - spec/vcr/Formstack_API/_submit_form/uploads_an_image.yml
191
221
  - spec/wrapper_spec.rb