whurl_engine 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.markdown +61 -0
- data/Rakefile +39 -0
- data/app/assets/flash/whurl_engine/ZeroClipboard.swf +0 -0
- data/app/assets/flash/whurl_engine/ZeroClipboard10.swf +0 -0
- data/app/assets/flash/whurl_engine/clippy.swf +0 -0
- data/app/assets/images/whurl_engine/add.png +0 -0
- data/app/assets/images/whurl_engine/bg_new.png +0 -0
- data/app/assets/images/whurl_engine/clipboard.png +0 -0
- data/app/assets/images/whurl_engine/container_bg.png +0 -0
- data/app/assets/images/whurl_engine/container_bottom.png +0 -0
- data/app/assets/images/whurl_engine/container_top.png +0 -0
- data/app/assets/images/whurl_engine/copyURL.png +0 -0
- data/app/assets/images/whurl_engine/delete.png +0 -0
- data/app/assets/images/whurl_engine/devil_128x128.png +0 -0
- data/app/assets/images/whurl_engine/devil_16x16.png +0 -0
- data/app/assets/images/whurl_engine/devil_256x256.png +0 -0
- data/app/assets/images/whurl_engine/devil_32x32.png +0 -0
- data/app/assets/images/whurl_engine/devil_64x64.png +0 -0
- data/app/assets/images/whurl_engine/header_button.png +0 -0
- data/app/assets/images/whurl_engine/input_titles.png +0 -0
- data/app/assets/images/whurl_engine/logo.png +0 -0
- data/app/assets/images/whurl_engine/param_button.png +0 -0
- data/app/assets/images/whurl_engine/rails.png +0 -0
- data/app/assets/images/whurl_engine/send_button.jpg +0 -0
- data/app/assets/images/whurl_engine/splash.png +0 -0
- data/app/assets/javascripts/whurl_engine/ZeroClipboard.js +311 -0
- data/app/assets/javascripts/whurl_engine/application.js +159 -0
- data/app/assets/javascripts/whurl_engine/jquery-1.7.1.min.js +4 -0
- data/app/assets/javascripts/whurl_engine/jquery-ui-1.8.16.min.js +791 -0
- data/app/assets/stylesheets/whurl_engine/application.css.scss +7 -0
- data/app/assets/stylesheets/whurl_engine/code.css.scss +13 -0
- data/app/assets/stylesheets/whurl_engine/jquery.ui.autocomplete.css.scss +55 -0
- data/app/assets/stylesheets/whurl_engine/whurls.css.scss +358 -0
- data/app/controllers/whurl_engine/application_controller.rb +4 -0
- data/app/controllers/whurl_engine/whurl_requests_controller.rb +50 -0
- data/app/helpers/whurl_engine/application_helper.rb +32 -0
- data/app/models/whurl_engine/any_client.rb +7 -0
- data/app/models/whurl_engine/whurl_request.rb +37 -0
- data/app/views/layouts/whurl_engine/application.html.haml +56 -0
- data/app/views/whurl_engine/whurl_requests/_form.html.haml +51 -0
- data/app/views/whurl_engine/whurl_requests/_input_set.html.haml +4 -0
- data/app/views/whurl_engine/whurl_requests/edit.html.haml +29 -0
- data/app/views/whurl_engine/whurl_requests/new.html.haml +5 -0
- data/app/views/whurl_engine/whurl_requests/show.html.haml +1 -0
- data/config/initializers/httparty/response.rb +37 -0
- data/config/routes.rb +5 -0
- data/db/migrate/20110209054322_create_whurl_requests_table.rb +14 -0
- data/db/migrate/20111210192724_add_description_to_whurl_requests.rb +9 -0
- data/db/migrate/20111210201607_add_custom_url_to_whurl_requests.rb +9 -0
- data/db/migrate/20111220233800_create_fields_for_whurl_requests.rb +18 -0
- data/db/migrate/20111221010348_copy_data_to_new_fields.rb +39 -0
- data/db/migrate/20111221011145_drop_data_from_whurl_requestss.rb +9 -0
- data/lib/tasks/whurl_engine_tasks.rake +4 -0
- data/lib/whurl_engine.rb +5 -0
- data/lib/whurl_engine/engine.rb +5 -0
- data/lib/whurl_engine/version.rb +3 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/whurl_engine/application.html.haml +56 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.sample.yml +17 -0
- data/test/dummy/config/database.yml +17 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/db/schema.rb +31 -0
- data/test/dummy/log/development.log +5633 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/C1B/810/sprockets%2Ff86f239423289738079ca3c0620b0203 +0 -0
- data/test/dummy/tmp/cache/assets/C3A/230/sprockets%2F86b30811052f3f9107867785fe676b98 +0 -0
- data/test/dummy/tmp/cache/assets/C3C/1E0/sprockets%2F8930cb230c644524697589c895d58c58 +0 -0
- data/test/dummy/tmp/cache/assets/C6D/500/sprockets%2Fa60a126c749b135b047d47c9116f7010 +0 -0
- data/test/dummy/tmp/cache/assets/C6E/690/sprockets%2F541821c1465d0b184df51e0a086c2617 +0 -0
- data/test/dummy/tmp/cache/assets/C71/B70/sprockets%2F2608911ae1a9d40c31128bea84417087 +0 -0
- data/test/dummy/tmp/cache/assets/C85/760/sprockets%2F67d86b8948de011684953a4b2d30c280 +0 -0
- data/test/dummy/tmp/cache/assets/CA5/D90/sprockets%2F718b681081f0c3ab0096b20afc567359 +0 -0
- data/test/dummy/tmp/cache/assets/CB8/FF0/sprockets%2F789d641670bfe15510034f63eb635ff8 +0 -0
- data/test/dummy/tmp/cache/assets/CB9/340/sprockets%2Fc383855f31a6f96cfad737d462029019 +0 -0
- data/test/dummy/tmp/cache/assets/CBD/A60/sprockets%2F8e7fec8543052565b343a93c7b174d78 +0 -0
- data/test/dummy/tmp/cache/assets/CE6/140/sprockets%2F97da5e07430aa9249a9633e88c5073ea +0 -0
- data/test/dummy/tmp/cache/assets/CE8/710/sprockets%2F0578ecd79cad102753e7972f371ea580 +0 -0
- data/test/dummy/tmp/cache/assets/D01/6E0/sprockets%2F3974f4fd239fc76f2d9700899609da7e +0 -0
- data/test/dummy/tmp/cache/assets/D09/700/sprockets%2F68ca75710cc64126df7d1a6638ca16d1 +0 -0
- data/test/dummy/tmp/cache/assets/D18/6A0/sprockets%2Fdf8266a6da92a42ce29b771318176dc9 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/440/sprockets%2Fd5f5cd99df7e614581ec5f2256403e33 +0 -0
- data/test/dummy/tmp/cache/assets/D20/140/sprockets%2F5014845cec156ff8444609f3f9dc84ce +0 -0
- data/test/dummy/tmp/cache/assets/D20/DF0/sprockets%2Fb3f333b87e8897356bf2e2e9138bb4d5 +0 -0
- data/test/dummy/tmp/cache/assets/D2C/DB0/sprockets%2F802a914bb4d275c8c34a3aa5ec134d54 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D37/320/sprockets%2F1c5dd3b8b6b30a68c19225a0915d8c6f +0 -0
- data/test/dummy/tmp/cache/assets/D39/780/sprockets%2F0da3fdc5af08e2938cc21829334b1d48 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/010/sprockets%2F389924c72fa75b369a0e61aacfa230e8 +0 -0
- data/test/dummy/tmp/cache/assets/D47/370/sprockets%2Fdab9545772e7beac9914f404d45c462e +0 -0
- data/test/dummy/tmp/cache/assets/D47/570/sprockets%2F78c33a7e0fcca296909068fb8173cc1f +0 -0
- data/test/dummy/tmp/cache/assets/D4C/8D0/sprockets%2F024e6456c9877ae45cdb28d7d16e06fe +0 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
- data/test/dummy/tmp/cache/assets/D59/1C0/sprockets%2Fdd4546ee9edb36c3647329828e791dfd +0 -0
- data/test/dummy/tmp/cache/assets/D66/D70/sprockets%2Ffdf1533f584b1ba62ce0ca92848b14d3 +0 -0
- data/test/dummy/tmp/cache/assets/D6F/A10/sprockets%2F3fa8ede522a279bfc12817267d1ca57e +0 -0
- data/test/dummy/tmp/cache/assets/D7A/860/sprockets%2F1ee925188e47da5e45dcedfd81f71441 +0 -0
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
- data/test/dummy/tmp/cache/assets/D89/CF0/sprockets%2Fb85f0f6129d17ceff85999cf571f3f1b +0 -0
- data/test/dummy/tmp/cache/assets/D90/E50/sprockets%2Fec69848c01c4dd45c809da4f0bb0a11c +0 -0
- data/test/dummy/tmp/cache/assets/D92/D80/sprockets%2Fada8029522185c3ca0656cf64bccb3fe +0 -0
- data/test/dummy/tmp/cache/assets/D9D/AC0/sprockets%2F082b6d491d42f3a4febe3cb4d0983e6d +0 -0
- data/test/dummy/tmp/cache/assets/DA4/180/sprockets%2F118a85fd98ac4bda49f6485fd41aca44 +0 -0
- data/test/dummy/tmp/cache/assets/DB4/C60/sprockets%2F6ee1d0983f6518ba5dc089797bfc6ffa +0 -0
- data/test/dummy/tmp/cache/assets/DBD/7A0/sprockets%2F872f84e976ebe7654383dfdc7cfec1c6 +0 -0
- data/test/dummy/tmp/cache/assets/DBF/440/sprockets%2F88adba908c22af8b331e4d1a7b5ad07b +0 -0
- data/test/dummy/tmp/cache/assets/DD7/420/sprockets%2F11c951f1c4e2bfc0d7c1b10e0bb1b2be +0 -0
- data/test/dummy/tmp/cache/assets/DD9/530/sprockets%2Fca5bb0d6ddfeec8760903809a7c9bb98 +0 -0
- data/test/dummy/tmp/cache/assets/DE2/AA0/sprockets%2Fd355cc1e9a71d9e9ae68a8a4e48d9ae6 +0 -0
- data/test/dummy/tmp/cache/assets/DED/EF0/sprockets%2Fba8239fd72bb07104cbbac6a91cd70ef +0 -0
- data/test/dummy/tmp/cache/assets/DF6/6E0/sprockets%2Fe6bd0ba980148fb1e6621e7fdda61afb +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E29/F00/sprockets%2F5b6ee8619eacc15eaf00c329cedff60a +0 -0
- data/test/dummy/tmp/cache/assets/E2E/590/sprockets%2Fe4c10fd74fddddb456cc924c38ddc26c +0 -0
- data/test/dummy/tmp/cache/assets/E56/EE0/sprockets%2Fb7fe1dd66e801cfbf780cb27aeece10a +0 -0
- data/test/dummy/tmp/cache/assets/E5D/680/sprockets%2F5ef33ecefc8e09aafd4d2725c0ef0a9c +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/fixtures/whurl_engine/whurl_requests.yml +11 -0
- data/test/functional/whurl_engine/api_call_controller_test.rb +21 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +10 -0
- data/test/unit/helpers/whurl_engine/api_call_helper_test.rb +6 -0
- data/test/unit/whurl_engine/whurl_request_test.rb +9 -0
- data/test/whurl_engine_test.rb +7 -0
- metadata +394 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree
|
7
|
+
*/
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery UI Autocomplete 1.8.16
|
3
|
+
*
|
4
|
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
+
* http://jquery.org/license
|
7
|
+
*
|
8
|
+
* http://docs.jquery.com/UI/Autocomplete#theming
|
9
|
+
*/
|
10
|
+
.ui-autocomplete { position: absolute; cursor: default; }
|
11
|
+
|
12
|
+
/* workarounds */
|
13
|
+
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
14
|
+
|
15
|
+
/*
|
16
|
+
* jQuery UI Menu 1.8.16
|
17
|
+
*
|
18
|
+
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
19
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20
|
+
* http://jquery.org/license
|
21
|
+
*
|
22
|
+
* http://docs.jquery.com/UI/Menu#theming
|
23
|
+
*/
|
24
|
+
.ui-menu {
|
25
|
+
list-style:none;
|
26
|
+
padding: 2px;
|
27
|
+
margin: 0;
|
28
|
+
display:block;
|
29
|
+
float: left;
|
30
|
+
background-color: white;
|
31
|
+
font-size: 12px;
|
32
|
+
}
|
33
|
+
.ui-menu .ui-menu {
|
34
|
+
margin-top: -3px;
|
35
|
+
}
|
36
|
+
.ui-menu .ui-menu-item {
|
37
|
+
margin:0;
|
38
|
+
padding: 0;
|
39
|
+
zoom: 1;
|
40
|
+
float: left;
|
41
|
+
clear: left;
|
42
|
+
width: 100%;
|
43
|
+
}
|
44
|
+
.ui-menu .ui-menu-item a {
|
45
|
+
text-decoration:none;
|
46
|
+
display:block;
|
47
|
+
padding:.2em .4em;
|
48
|
+
line-height:1.5;
|
49
|
+
zoom:1;
|
50
|
+
}
|
51
|
+
.ui-menu .ui-menu-item a.ui-state-hover,
|
52
|
+
.ui-menu .ui-menu-item a.ui-state-active {
|
53
|
+
font-weight: normal;
|
54
|
+
margin: -1px;
|
55
|
+
}
|
@@ -0,0 +1,358 @@
|
|
1
|
+
$dark: #2B2F38;
|
2
|
+
$highlight: #F1CB31;
|
3
|
+
|
4
|
+
@mixin rounded-corners($topleft, $topright: $topleft, $bottomright: $topleft, $bottomleft: $topleft) {
|
5
|
+
border-radius: $topleft $topright $bottomright $bottomleft;
|
6
|
+
-moz-border-radius: $topleft $topright $bottomright $bottomleft;
|
7
|
+
-webkit-border-radius: $topleft $topright $bottomright $bottomleft;
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin rotate($degrees) {
|
11
|
+
transform: rotate($degrees);
|
12
|
+
-ms-transform: rotate($degrees); /* IE 9 */
|
13
|
+
-webkit-transform: rotate($degrees); /* Safari and Chrome */
|
14
|
+
-o-transform: rotate($degrees); /* Opera */
|
15
|
+
-moz-transform: rotate($degrees); /* Firefox */
|
16
|
+
}
|
17
|
+
|
18
|
+
#footer {
|
19
|
+
text-align: right;
|
20
|
+
font-size: small;
|
21
|
+
margin-top: 20px;
|
22
|
+
}
|
23
|
+
|
24
|
+
#headers, #params {
|
25
|
+
margin-left: 162px;
|
26
|
+
min-height: 31px;
|
27
|
+
margin-bottom: 10px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.header_pair, .param_pair {
|
31
|
+
padding: 4px 0;
|
32
|
+
}
|
33
|
+
|
34
|
+
#errors {
|
35
|
+
background: white;
|
36
|
+
}
|
37
|
+
|
38
|
+
.key {
|
39
|
+
width: 200px;
|
40
|
+
}
|
41
|
+
|
42
|
+
.value {
|
43
|
+
width: 400px;
|
44
|
+
}
|
45
|
+
|
46
|
+
.long {
|
47
|
+
width: 525px;
|
48
|
+
}
|
49
|
+
|
50
|
+
html, div, span, a, p, img, h1, h2, h3, h4 {
|
51
|
+
font-family: Arial, Helvetica, sans-serif;
|
52
|
+
}
|
53
|
+
|
54
|
+
img {
|
55
|
+
border: 0 solid #000;
|
56
|
+
}
|
57
|
+
|
58
|
+
a {
|
59
|
+
text-decoration: none;
|
60
|
+
color: $dark;
|
61
|
+
font-weight: bold;
|
62
|
+
}
|
63
|
+
|
64
|
+
a:hover {
|
65
|
+
color: lighten($dark, 20%);
|
66
|
+
}
|
67
|
+
|
68
|
+
input.one {
|
69
|
+
width: 480px;
|
70
|
+
}
|
71
|
+
|
72
|
+
input.two {
|
73
|
+
width: 225px;
|
74
|
+
}
|
75
|
+
|
76
|
+
input.three {
|
77
|
+
width: 350px;
|
78
|
+
margin-left: 10px;
|
79
|
+
}
|
80
|
+
|
81
|
+
input.four {
|
82
|
+
width: 350px;
|
83
|
+
}
|
84
|
+
|
85
|
+
textarea#whurl_request_body {
|
86
|
+
width: 610px;
|
87
|
+
height: 55px;
|
88
|
+
margin-bottom: 10px;
|
89
|
+
}
|
90
|
+
|
91
|
+
textarea#whurl_request_description {
|
92
|
+
width: 610px;
|
93
|
+
height: 55px;
|
94
|
+
margin-bottom: 10px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.textarea_disabled {
|
98
|
+
background-color: lightgray;
|
99
|
+
}
|
100
|
+
|
101
|
+
#whurl_request_custom_url {
|
102
|
+
width: 610px;
|
103
|
+
}
|
104
|
+
|
105
|
+
body {
|
106
|
+
background-color: #B2B5BE;
|
107
|
+
background-image:url('bg_new.png');
|
108
|
+
background-position: top center;
|
109
|
+
background-repeat:no-repeat;
|
110
|
+
}
|
111
|
+
|
112
|
+
.containerTop {
|
113
|
+
width: 980px;
|
114
|
+
height: 55px;
|
115
|
+
background: url('container_top.png') no-repeat 0 0;
|
116
|
+
}
|
117
|
+
|
118
|
+
.logo {
|
119
|
+
float: left;
|
120
|
+
margin: -15px 0 0 0;
|
121
|
+
}
|
122
|
+
|
123
|
+
.tagline {
|
124
|
+
float: right;
|
125
|
+
color: #fff;
|
126
|
+
font-size: 18px;
|
127
|
+
width: 350px;
|
128
|
+
margin: -30px 292px 0 0;
|
129
|
+
}
|
130
|
+
|
131
|
+
#wrapper {
|
132
|
+
width: 980px;
|
133
|
+
margin: 0 auto;
|
134
|
+
margin-top: 25px;
|
135
|
+
}
|
136
|
+
|
137
|
+
#container {
|
138
|
+
width: 100%;
|
139
|
+
background: url('container_bg.png') repeat-y 0 0;
|
140
|
+
padding-top: 105px;
|
141
|
+
}
|
142
|
+
|
143
|
+
.top {
|
144
|
+
height: 100%;
|
145
|
+
background-color: #919c9d;
|
146
|
+
margin: 30px 0 0 ;
|
147
|
+
padding: 20px;
|
148
|
+
}
|
149
|
+
|
150
|
+
.content {
|
151
|
+
padding: 0 15px 0 50px;
|
152
|
+
}
|
153
|
+
|
154
|
+
/*titles*/
|
155
|
+
.row {
|
156
|
+
clear: both;
|
157
|
+
margin: 0;
|
158
|
+
padding-bottom: 20px;
|
159
|
+
}
|
160
|
+
|
161
|
+
.hTitle {
|
162
|
+
font-size: 24px;
|
163
|
+
color: $highlight;
|
164
|
+
text-align: right;
|
165
|
+
}
|
166
|
+
|
167
|
+
.section_title {
|
168
|
+
width: 150px;
|
169
|
+
margin: 0 10px 0 0;
|
170
|
+
float: left;
|
171
|
+
text-align: right;
|
172
|
+
}
|
173
|
+
|
174
|
+
.response_section_title {
|
175
|
+
color:$highlight;
|
176
|
+
font-size:24px;
|
177
|
+
}
|
178
|
+
|
179
|
+
.response_section_title img {
|
180
|
+
vertical-align: text-top;
|
181
|
+
}
|
182
|
+
.response_section {
|
183
|
+
margin-top: 20px;
|
184
|
+
}
|
185
|
+
|
186
|
+
#whurl_request_description {
|
187
|
+
background-color: white;
|
188
|
+
overflow-x: auto;
|
189
|
+
}
|
190
|
+
|
191
|
+
#edit_description {
|
192
|
+
padding: 0 20px;
|
193
|
+
background-color: white;
|
194
|
+
overflow-x: auto;
|
195
|
+
}
|
196
|
+
|
197
|
+
.action_button {
|
198
|
+
vertical-align: middle;
|
199
|
+
}
|
200
|
+
|
201
|
+
.titleRESPONSE {
|
202
|
+
width: 150px;
|
203
|
+
float: left;
|
204
|
+
}
|
205
|
+
|
206
|
+
.delete_button {
|
207
|
+
vertical-align:middle;
|
208
|
+
}
|
209
|
+
|
210
|
+
a.delete:hover {
|
211
|
+
background: url("delete.png") no-repeat -20px 0;
|
212
|
+
}
|
213
|
+
|
214
|
+
.paramButton {
|
215
|
+
width: 154px;
|
216
|
+
height: 32px;
|
217
|
+
background: url('param_button.png') no-repeat 0 0;
|
218
|
+
}
|
219
|
+
|
220
|
+
.paramButton a {
|
221
|
+
float: left;
|
222
|
+
margin: 8px 0 0 20px;
|
223
|
+
}
|
224
|
+
|
225
|
+
.headerButton {
|
226
|
+
width: 129px;
|
227
|
+
height: 31px;
|
228
|
+
background: url('header_button.png') no-repeat 0 0;
|
229
|
+
font-family: Verdana, Geneva, Kalimati, sans-serif;
|
230
|
+
margin: 5px 0 0 25px;
|
231
|
+
}
|
232
|
+
|
233
|
+
.headerButton a {
|
234
|
+
float: left;
|
235
|
+
margin: 8px 0 0 20px;
|
236
|
+
}
|
237
|
+
|
238
|
+
.submit {
|
239
|
+
float: right;
|
240
|
+
margin: -10px 60px 0 0;
|
241
|
+
color: $dark;
|
242
|
+
background-color:$highlight;
|
243
|
+
font-weight: bold;
|
244
|
+
font-size: 16px;
|
245
|
+
}
|
246
|
+
.reset {
|
247
|
+
float: right;
|
248
|
+
margin: -10px 10px 0 0;
|
249
|
+
color: $dark;
|
250
|
+
background-color: $highlight;
|
251
|
+
font-weight: bold;
|
252
|
+
font-size: 16px;
|
253
|
+
}
|
254
|
+
.submit:hover {
|
255
|
+
background-position: -91.5px 0;
|
256
|
+
}
|
257
|
+
|
258
|
+
a.copy_link {
|
259
|
+
width: 115.5px;
|
260
|
+
height: 44px;
|
261
|
+
background: url('copyURL.png') no-repeat 0 0;
|
262
|
+
margin: 30px 0 0 45px;
|
263
|
+
display: block;
|
264
|
+
}
|
265
|
+
|
266
|
+
a.copy_link:hover {
|
267
|
+
background-position: -116px 0;
|
268
|
+
}
|
269
|
+
|
270
|
+
.footer {
|
271
|
+
background-color: lighten($highlight, 20%);
|
272
|
+
width: 942px;
|
273
|
+
height: 48px;
|
274
|
+
margin: 25px 0 0 36px;
|
275
|
+
padding: 15px 0 0 0;
|
276
|
+
color: $dark;
|
277
|
+
font-size: 15px;
|
278
|
+
line-height: 1em;
|
279
|
+
}
|
280
|
+
|
281
|
+
.response_container {
|
282
|
+
background-color: white;
|
283
|
+
overflow-x: auto;
|
284
|
+
}
|
285
|
+
|
286
|
+
#response_header {
|
287
|
+
padding: 0 20px;
|
288
|
+
background-color: white;
|
289
|
+
overflow-x: auto;
|
290
|
+
}
|
291
|
+
|
292
|
+
.footer p {
|
293
|
+
float: right;
|
294
|
+
text-align: right;
|
295
|
+
margin: 0 20px 0 0;
|
296
|
+
}
|
297
|
+
|
298
|
+
a.contact {
|
299
|
+
font-weight: bold;
|
300
|
+
}
|
301
|
+
|
302
|
+
.meadowfete {
|
303
|
+
font-size: 12px;
|
304
|
+
color: darken($highlight, 30%);
|
305
|
+
}
|
306
|
+
|
307
|
+
#permalink_container {
|
308
|
+
color: $dark;
|
309
|
+
position: fixed;
|
310
|
+
bottom: 5px;
|
311
|
+
left: 0;
|
312
|
+
padding: 5px 15px 5px 10px;
|
313
|
+
background-color: lighten($highlight, 20%);
|
314
|
+
border: 2px solid $dark;
|
315
|
+
border-left: none;
|
316
|
+
-moz-border-radius-topright: 20px;
|
317
|
+
-moz-border-radius-bottomright: 20px;
|
318
|
+
border-top-right-radius: 20px;
|
319
|
+
border-bottom-right-radius: 20px;
|
320
|
+
}
|
321
|
+
#permalink_text_box {
|
322
|
+
width: 200px;
|
323
|
+
vertical-align: bottom;
|
324
|
+
}
|
325
|
+
|
326
|
+
.param_pair:first-child,
|
327
|
+
.header_pair:first-child
|
328
|
+
{
|
329
|
+
display: none;
|
330
|
+
}
|
331
|
+
ol#saved_whurls {
|
332
|
+
overflow-y: auto;
|
333
|
+
position: fixed;
|
334
|
+
margin: 0 0 0 -400px;
|
335
|
+
padding: 0px;
|
336
|
+
top: 10px;
|
337
|
+
left: 0px;
|
338
|
+
list-style: none;
|
339
|
+
z-index:9999;
|
340
|
+
border: 2px solid lighten($highlight, 20%);
|
341
|
+
@include rounded-corners(0, 10px, 10px, 0);
|
342
|
+
opacity: 0.9;
|
343
|
+
background-color: lightgray;
|
344
|
+
|
345
|
+
li {
|
346
|
+
display: block;
|
347
|
+
padding: 5px;
|
348
|
+
width: 415px;
|
349
|
+
border:1px solid #AFAFAF;
|
350
|
+
|
351
|
+
&:first-child {
|
352
|
+
@include rounded-corners(0, 10px, 0, 0);
|
353
|
+
}
|
354
|
+
&:last-child {
|
355
|
+
@include rounded-corners(0, 0, 10px, 0);
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module WhurlEngine
|
2
|
+
class WhurlRequestsController < ApplicationController
|
3
|
+
def new
|
4
|
+
@whurl = WhurlRequest.new
|
5
|
+
end
|
6
|
+
|
7
|
+
def create
|
8
|
+
whurl = params[:whurl_request]
|
9
|
+
whurl[:headers] = Hash[params[:header_keys].zip(params[:header_values])].delete_if { |k, _| k.blank? }
|
10
|
+
whurl[:query] = Hash[params[:param_keys].zip(params[:param_values])].delete_if { |k, _| k.blank? }
|
11
|
+
@whurl = WhurlRequest.new(whurl)
|
12
|
+
|
13
|
+
if @whurl.save
|
14
|
+
redirect_to short_path(:slug => @whurl.slug) and return
|
15
|
+
else
|
16
|
+
render :action => "new"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def edit
|
21
|
+
@whurl = WhurlRequest.find_by_hash_key(params[:slug])
|
22
|
+
if @whurl.nil?
|
23
|
+
@whurl = WhurlRequest.find_by_custom_url(params[:slug])
|
24
|
+
end
|
25
|
+
|
26
|
+
client_headers = {'User-Agent' => "Whurl/#{WhurlEngine::VERSION} (https://github.com/tildewill/whurl_pub)"}.merge(@whurl.headers)
|
27
|
+
|
28
|
+
client_response = AnyClient.send(@whurl.http_method.downcase,
|
29
|
+
@whurl.url,
|
30
|
+
:headers => client_headers,
|
31
|
+
:query => @whurl.query,
|
32
|
+
:body => @whurl.body
|
33
|
+
)
|
34
|
+
|
35
|
+
@response_headers = client_response.headers.to_html.html_safe
|
36
|
+
|
37
|
+
respond_to do |format|
|
38
|
+
format.html do
|
39
|
+
@api_response = client_response.to_html(:line_numbers => :table).html_safe
|
40
|
+
end
|
41
|
+
#format.iphone do
|
42
|
+
# @api_response = client_response.to_html(:line_numbers => nil).html_safe
|
43
|
+
#end
|
44
|
+
end
|
45
|
+
|
46
|
+
rescue Exception => e
|
47
|
+
@api_response = ("<pre>" + e.message + "\n\n" + e.backtrace.join("\n") + "</pre>").html_safe
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|