form_stalker 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/lib/form_stalker/client.rb +0 -1
- data/lib/form_stalker/data/base.rb +28 -0
- data/lib/form_stalker/data/form.rb +17 -0
- data/lib/form_stalker/data/form_field.rb +10 -0
- data/lib/form_stalker/data/parser.rb +47 -0
- data/lib/form_stalker/response.rb +1 -1
- data/lib/form_stalker/version.rb +1 -1
- data/lib/form_stalker.rb +8 -0
- metadata +4 -33
- data/.gitignore +0 -50
- data/.rspec +0 -4
- data/.rubocop.yml +0 -11
- data/.ruby-version +0 -1
- data/.travis.yml +0 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -79
- data/LICENSE +0 -21
- data/Rakefile +0 -10
- data/form_stalker.gemspec +0 -30
- data/spec/fixtures/vcr_cassettes/form_fields_invalid_id.yml +0 -58
- data/spec/fixtures/vcr_cassettes/form_fields_valid_id.yml +0 -97
- data/spec/fixtures/vcr_cassettes/form_invalid_id.yml +0 -58
- data/spec/fixtures/vcr_cassettes/form_valid_id.yml +0 -538
- data/spec/fixtures/vcr_cassettes/invalid_oauth_token.yml +0 -52
- data/spec/form_stalker/client_spec.rb +0 -92
- data/spec/form_stalker/form_stalker_spec.rb +0 -53
- data/spec/form_stalker/request_spec.rb +0 -22
- data/spec/spec_helper.rb +0 -34
- data/spec/support/helpers.rb +0 -9
@@ -1,97 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://www.formstack.com/api/v2/form/2178204/field.json?oauth_token=valid_oauth_token
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
Host:
|
17
|
-
- www.formstack.com
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Cache-Control:
|
24
|
-
- no-cache
|
25
|
-
Content-Type:
|
26
|
-
- application/json; charset=UTF-8
|
27
|
-
Date:
|
28
|
-
- Fri, 29 Jul 2016 14:12:04 GMT
|
29
|
-
P3p:
|
30
|
-
- CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI
|
31
|
-
DSP COR"
|
32
|
-
Server:
|
33
|
-
- nginx
|
34
|
-
Set-Cookie:
|
35
|
-
- FormstackAdmin=v4t1tmg5nii9rqvvtmdjs688i0; path=/api/; secure; HttpOnly
|
36
|
-
- rgemail=subs%40streetbees.com; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
37
|
-
- rgfirstname=Queen; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
38
|
-
- rgfullname=Bee; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
39
|
-
- rgisanonymous=false; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
40
|
-
- rgisanonymous=false; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
41
|
-
- rgisanonymous=true; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
42
|
-
- rguserid=642682; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
43
|
-
- rguserid=f630ba0f-52ee-4cce-9a49-798de1d31a1b; expires=Sun, 28-Aug-2016 14:12:04
|
44
|
-
GMT; Max-Age=2592000
|
45
|
-
- rguuid=false; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
46
|
-
- rguuid=true; expires=Sun, 28-Aug-2016 14:12:04 GMT; Max-Age=2592000
|
47
|
-
X-Robots-Tag:
|
48
|
-
- noindex, nofollow
|
49
|
-
Content-Length:
|
50
|
-
- '2166'
|
51
|
-
Connection:
|
52
|
-
- keep-alive
|
53
|
-
body:
|
54
|
-
encoding: ASCII-8BIT
|
55
|
-
string: '[{"id":"37314714","label":"Short Answer","hide_label":"0","description":"Here
|
56
|
-
is a sample tooltip","name":"short_answer","type":"text","options":"","required":"1","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"0","default":"","text_size":50,"maxlength":0,"placeholder":"What
|
57
|
-
is your short answer?"},{"id":"37314722","label":"Longer Text Answer","hide_label":"0","description":"","name":"longer_text_answer","type":"textarea","options":"","required":"1","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"1","default":"","rows":10,"cols":50,"maxlength":0,"placeholder":""},{"id":"40963803","label":"Date\/Time","hide_label":"0","description":"","name":"datetime","type":"datetime","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"2","default":{"default":null},"date_format":"M
|
58
|
-
d, Y","time_format":"h:i A","year_minus":5,"year_plus":5},{"id":"44337087","label":"Select
|
59
|
-
(Radio Buttons) - Optional","hide_label":"0","description":"","name":"select_radio_buttons__optional","type":"radio","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"3","default":"","option_layout":"vertical","option_other":"0","randomize_options":0,"option_store":"value","option_show_values":0},{"id":"37314734","label":"Select
|
60
|
-
(Radio Buttons) - Required","hide_label":"0","description":"","name":"select_radio_buttons__required","type":"radio","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"1","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"4","default":"","option_layout":"vertical","option_other":"1","randomize_options":0,"option_store":"value","option_show_values":0},{"id":"37314736","label":"Select
|
61
|
-
(Dropdown List)","hide_label":"0","description":"","name":"select_dropdown_list","type":"select","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"5","default":"","select_size":1,"option_layout":"vertical","option_other":0,"randomize_options":0,"option_store":"value","option_show_values":0},{"id":"40952921","label":"Show
|
62
|
-
Dropdown (if Dropdown is not Option1)","hide_label":"0","description":"","name":"show_dropdown_if_dropdown_is_not_option1","type":"select","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"6","default":"","select_size":1,"option_layout":"vertical","option_other":0,"randomize_options":0,"option_store":"value","option_show_values":0},{"id":"37314733","label":"Select
|
63
|
-
(Checkbox)","hide_label":"0","description":"","name":"select_checkbox","type":"checkbox","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"7","default":"","option_layout":"vertical","option_other":"1","option_checkall":"0","randomize_options":0,"option_store":"value","option_show_values":0},{"id":"41111633","label":"Here''s
|
64
|
-
a checkbox question that is just so long the text goes on and on and on. I''m
|
65
|
-
just going to keep typing until the question is so large that some of the
|
66
|
-
text is no longer readable because it goes off the screen. How is a user supposed
|
67
|
-
to answers a question like this when they can''t see most of it. This is particularly
|
68
|
-
problematic on small iOS phones. So I''ll just type for a little while longer
|
69
|
-
until this text is so large that it 100%, definitely, positively will take
|
70
|
-
up at least the whole screen. Let''s hope this is enough.","hide_label":"0","description":"","name":"heres_a_checkbox_question_that_is_just_so_long_the_text_goes_on_and_on_and_on_im_just_going_to_keep_typing_until_the_question_is_so_large_that_some_of_the_text_is_no_longer_readable_because_it_goes_off_the_screen_how_is_a_user_supposed_to_answers_a_question_like_this_when_they_cant_see_most_of_it_this_is_particularly_problematic_on_small_ios_phones_so_ill_just_type_for_a_little_while_longer_until_this_text_is_so_large_that_it_100_definitely_positively_will_take_up_at_least_the_whole_screen_lets_hope_this_is_enough","type":"checkbox","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"8","default":"","option_layout":"vertical","option_other":0,"option_checkall":0,"randomize_options":0,"option_store":"value","option_show_values":0},{"id":"41111634","label":"Here''s
|
71
|
-
a checkbox question that has really long answers to see how they look on the
|
72
|
-
screen","hide_label":"0","description":"","name":"heres_a_checkbox_question_that_has_really_long_answers_to_see_how_they_look_on_the_screen","type":"checkbox","options":[{"label":"Option1
|
73
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option1
|
74
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option2
|
75
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option2
|
76
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option3
|
77
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option3
|
78
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option4
|
79
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option4
|
80
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option5
|
81
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option5
|
82
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option6
|
83
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option6
|
84
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option7
|
85
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option7
|
86
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option8
|
87
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option8
|
88
|
-
- the answer to this is long enough that it spreads over multiple lines"},{"label":"Option9
|
89
|
-
- the answer to this is long enough that it spreads over multiple lines","value":"Option9
|
90
|
-
- the answer to this is long enough that it spreads over multiple lines"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"9","default":"","option_layout":"vertical","option_other":0,"option_checkall":0,"randomize_options":0,"option_store":"value","option_show_values":0},{"id":"37314784","label":"Number","hide_label":"0","description":"","name":"number","type":"number","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"10","default":"","text_size":5,"min_value":"","max_value":"","currency":"pound","decimals":"2","slider":"0","placeholder":""},{"id":"37314745","label":"Number
|
91
|
-
Slider","hide_label":"0","description":"","name":"number_slider","type":"number","options":"","required":"1","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"11","default":"","text_size":5,"min_value":"0","max_value":"10","currency":"","decimals":"0","slider":"1","placeholder":""},{"id":"37383929","label":"Name","hide_label":"0","description":"","name":"name","type":"name","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"12","default":"","text_size":50,"show_prefix":0,"show_middle":0,"show_initial":0,"show_suffix":0},{"id":"37314768","label":"Phone","hide_label":"0","description":"","name":"phone","type":"phone","options":"","required":"0","uniq":"1","hidden":"0","readonly":"0","colspan":"1","sort":"13","default":"","text_size":"20","format":"UK","phone_format":"national","placeholder":""},{"id":"37383914","label":"Email","hide_label":"0","description":"","name":"email","type":"email","options":[{"label":"Option1","value":"Option1"},{"label":"Option2","value":"Option2"},{"label":"Option3","value":"Option3"}],"required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"14","default":"","text_size":50,"maxlength":0,"confirm":0,"placeholder":""},{"id":"37314884","label":"Image","hide_label":"0","description":"","name":"image","type":"file","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"15","default":"","text_size":"30","file_types":"jpg,jpeg,gif,png,bmp,tif,psd,pdf,doc,docx,xls,xlsx,txt,mp3,mp4,aac,wav,au,wmv,avi,mpg,mpeg,zip,gz,rar,z,tgz,tar,sitx"},{"id":"37750813","label":"Video","hide_label":"0","description":"","name":"video","type":"file","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"16","default":"","text_size":"30","file_types":"avi,mpg,mpeg"},{"id":"40559422","label":"Matrix","hide_label":"0","description":"","name":"matrix","type":"matrix","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"17","default":{"Item
|
92
|
-
1":[],"Item 2":[],"Item 3":[]},"row_choices":"Item 1\nItem 2\nItem 3","column_choices":"Very
|
93
|
-
Good\nGood\nFair\nPoor\nVery Poor","one_per_row":"1","one_per_column":"0","randomize_rows":"0"},{"id":"37314777","label":"Signature","hide_label":"0","description":"Use
|
94
|
-
your mouse or finger to draw your signature above","name":"signature","type":"signature","options":"","required":"0","uniq":"0","hidden":"0","readonly":"0","colspan":"1","sort":"18","default":""}]'
|
95
|
-
http_version:
|
96
|
-
recorded_at: Fri, 29 Jul 2016 14:12:04 GMT
|
97
|
-
recorded_with: VCR 3.0.3
|
@@ -1,58 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://www.formstack.com/api/v2/form/-1.json?oauth_token=valid_oauth_token
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
16
|
-
Host:
|
17
|
-
- www.formstack.com
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Cache-Control:
|
24
|
-
- no-cache
|
25
|
-
Content-Type:
|
26
|
-
- application/json; charset=UTF-8
|
27
|
-
Date:
|
28
|
-
- Fri, 29 Jul 2016 14:12:02 GMT
|
29
|
-
P3p:
|
30
|
-
- CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI
|
31
|
-
DSP COR"
|
32
|
-
Server:
|
33
|
-
- nginx
|
34
|
-
Set-Cookie:
|
35
|
-
- FormstackAdmin=57sr0dp842igbclka8btmda491; path=/api/; secure; HttpOnly
|
36
|
-
- rgemail=subs%40streetbees.com; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
37
|
-
- rgfirstname=Queen; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
38
|
-
- rgfullname=Bee; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
39
|
-
- rgisanonymous=false; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
40
|
-
- rgisanonymous=false; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
41
|
-
- rgisanonymous=true; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
42
|
-
- rguserid=642682; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
43
|
-
- rguserid=d56eaa23-042a-4a91-84c3-3b6931b9db00; expires=Sun, 28-Aug-2016 14:12:02
|
44
|
-
GMT; Max-Age=2592000
|
45
|
-
- rguuid=false; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
46
|
-
- rguuid=true; expires=Sun, 28-Aug-2016 14:12:02 GMT; Max-Age=2592000
|
47
|
-
X-Robots-Tag:
|
48
|
-
- noindex, nofollow
|
49
|
-
Content-Length:
|
50
|
-
- '51'
|
51
|
-
Connection:
|
52
|
-
- keep-alive
|
53
|
-
body:
|
54
|
-
encoding: UTF-8
|
55
|
-
string: '{"status":"error","error":"The form was not found"}'
|
56
|
-
http_version:
|
57
|
-
recorded_at: Fri, 29 Jul 2016 14:12:03 GMT
|
58
|
-
recorded_with: VCR 3.0.3
|