whurl_engine 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +18 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_flat_100_ffffff_40x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_flat_10_000000_40x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_flat_18_f6ecd5_40x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_flat_20_666666_40x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_highlight-hard_100_dddddd_1x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_highlight-hard_100_eeeeee_1x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_highlight-hard_40_f6a828_1x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-bg_highlight-soft_75_f1fbe5_1x100.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_1c94c4_256x240.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_222222_256x240.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_8cce3b_256x240.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_ef8c08_256x240.png +0 -0
- data/app/assets/{stylesheets/whurl_engine/custom-theme/images → images/whurl_engine}/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/stylesheets/whurl_engine/application.css.scss +23 -0
- data/app/assets/stylesheets/whurl_engine/{custom-theme/jquery-ui-1.8.16.custom.css → jquery-ui-1.8.16.custom.css} +17 -17
- data/app/assets/stylesheets/whurl_engine/whurl.css.scss +110 -105
- data/app/models/whurl_engine/whurl.rb +12 -7
- data/app/views/layouts/whurl_engine/application.html.haml +4 -0
- data/app/views/whurl_engine/whurls/_form.html.haml +9 -2
- data/app/views/whurl_engine/whurls/_response.html.haml +1 -1
- data/app/views/whurl_engine/whurls/new.html.haml +2 -2
- data/db/migrate/{20110209054322_create_whurls_table.rb → 20110209054322_whurl_create_whurls_table.rb} +1 -1
- data/db/migrate/{20111210192724_add_description_to_whurl.rb → 20111210192724_whurl_add_description_to_whurl.rb} +1 -1
- data/db/migrate/{20111210201607_add_custom_url_to_whurl.rb → 20111210201607_whurl_add_custom_url_to_whurl.rb} +1 -1
- data/db/migrate/{20111211030904_rename_whurls_to_requests.rb → 20111211030904_whurl_rename_whurls_to_requests.rb} +1 -1
- data/db/migrate/{20111220233800_create_fields_for_whurl_requests.rb → 20111220233800_whurl_create_fields_for_whurl_requests.rb} +1 -1
- data/db/migrate/{20111221011145_drop_data_from_requests.rb → 20111221011145_whurl_drop_data_from_requests.rb} +1 -1
- data/db/migrate/{20120106033416_create_responses.rb → 20120106033416_whurl_create_responses.rb} +1 -1
- data/db/migrate/{20120106190508_create_categories_table.rb → 20120106190508_whurl_create_categories_table.rb} +1 -1
- data/db/migrate/{20120107011500_create_resources_table.rb → 20120107011500_whurl_create_resources_table.rb} +1 -1
- data/db/migrate/{20120107065652_create_parameters_table.rb → 20120107065652_whurl_create_parameters_table.rb} +1 -1
- data/db/migrate/{20120110205837_rename_parameters_to_parameter_definitions.rb → 20120110205837_whurl_rename_parameters_to_parameter_definitions.rb} +1 -1
- data/db/migrate/{20120110205853_rename_requests_to_whurls.rb → 20120110205853_whurl_rename_requests_to_whurls.rb} +1 -1
- data/db/migrate/{20120111014928_add_raw_request_to_whurls.rb → 20120111014928_whurl_add_raw_request_to_whurls.rb} +1 -1
- data/db/migrate/{20120118011913_create_header_definitions_table.rb → 20120118011913_whurl_create_header_definitions_table.rb} +1 -1
- data/db/migrate/{20120214074332_add_message_to_whurls.rb → 20120214074332_whurl_add_message_to_whurls.rb} +1 -1
- data/db/migrate/20120221012000_whurl_add_basic_auth_fields.rb +6 -0
- data/lib/tasks/whurl_engine_tasks.rake +1 -1
- data/lib/whurl_engine/version.rb +1 -1
- metadata +58 -57
data/README.markdown
CHANGED
@@ -29,6 +29,24 @@ comes with a default CanCan adapter. To us it install the cancan gem in your app
|
|
29
29
|
config.authorize_with(:cancan)
|
30
30
|
end
|
31
31
|
|
32
|
+
...and your ability.rb file looks like this:
|
33
|
+
|
34
|
+
class Ability
|
35
|
+
include CanCan::Ability
|
36
|
+
|
37
|
+
def initialize(user)
|
38
|
+
user ||= User.new # guest user (not logged in)
|
39
|
+
if user.admin?
|
40
|
+
can :manage, :all
|
41
|
+
else
|
42
|
+
can :read, :all
|
43
|
+
can :access, :whurl_engine
|
44
|
+
can :create, WhurlEngine::Whurl
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
|
32
50
|
Finally, look at your new API playground by starting your rails server and hitting up the right URL:
|
33
51
|
|
34
52
|
http://localhost:3000/whurl
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,6 +11,8 @@ body {
|
|
11
11
|
font-family: Arial, sans-serif;
|
12
12
|
font-size: 14px;
|
13
13
|
background-color: white;
|
14
|
+
padding-top: 50px;
|
15
|
+
padding-bottom: 50px;
|
14
16
|
}
|
15
17
|
|
16
18
|
h1, h2, h3 {
|
@@ -92,3 +94,24 @@ select {
|
|
92
94
|
vertical-align: middle;
|
93
95
|
}
|
94
96
|
|
97
|
+
.header {
|
98
|
+
position: fixed;
|
99
|
+
top: 0;
|
100
|
+
padding-left: 20px;
|
101
|
+
left: 0;
|
102
|
+
width:100%;
|
103
|
+
text-align: left;
|
104
|
+
background-color: #CCC;
|
105
|
+
z-index: 10;
|
106
|
+
}
|
107
|
+
|
108
|
+
.footer {
|
109
|
+
position: fixed;
|
110
|
+
bottom: 0;
|
111
|
+
padding-right: 20px;
|
112
|
+
right: 0;
|
113
|
+
width:100%;
|
114
|
+
text-align: right;
|
115
|
+
background-color: #CCC;
|
116
|
+
z-index: 10;
|
117
|
+
}
|
@@ -57,26 +57,26 @@
|
|
57
57
|
/* Component containers
|
58
58
|
----------------------------------*/
|
59
59
|
.ui-widget { font-family: Arial,sans-serif; font-size: 14px; }
|
60
|
-
.ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(
|
60
|
+
.ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(ui-bg_flat_100_ffffff_40x100.png) 50% 50% repeat-x; color: #333333; }
|
61
61
|
.ui-widget-content a { color: #333333; }
|
62
|
-
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(
|
62
|
+
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(ui-bg_highlight-hard_40_f6a828_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
63
63
|
.ui-widget-header a { color: #ffffff; }
|
64
64
|
|
65
65
|
/* Interaction states
|
66
66
|
----------------------------------*/
|
67
|
-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #dddddd url(
|
67
|
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #dddddd url(ui-bg_highlight-hard_100_dddddd_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
|
68
68
|
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
|
69
|
-
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #cccccc; background: #eeeeee url(
|
69
|
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #cccccc; background: #eeeeee url(ui-bg_highlight-hard_100_eeeeee_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
|
70
70
|
.ui-state-hover a, .ui-state-hover a:hover { color: #1c94c4; text-decoration: none; }
|
71
|
-
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dddddd; background: #ffffff url(
|
71
|
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dddddd; background: #ffffff url(ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
|
72
72
|
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
|
73
73
|
.ui-widget :active { outline: none; }
|
74
74
|
|
75
75
|
/* Interaction Cues
|
76
76
|
----------------------------------*/
|
77
|
-
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #8cce3b; background: #f1fbe5 url(
|
77
|
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #8cce3b; background: #f1fbe5 url(ui-bg_highlight-soft_75_f1fbe5_1x100.png) 50% top repeat-x; color: #363636; }
|
78
78
|
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
79
|
-
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #f6ecd5 url(
|
79
|
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #f6ecd5 url(ui-bg_flat_18_f6ecd5_40x100.png) 50% 50% repeat-x; color: #444444; }
|
80
80
|
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #444444; }
|
81
81
|
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #444444; }
|
82
82
|
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
@@ -87,14 +87,14 @@
|
|
87
87
|
----------------------------------*/
|
88
88
|
|
89
89
|
/* states and images */
|
90
|
-
.ui-icon { width: 16px; height: 16px; background-image: url(
|
91
|
-
.ui-widget-content .ui-icon {background-image: url(
|
92
|
-
.ui-widget-header .ui-icon {background-image: url(
|
93
|
-
.ui-state-default .ui-icon { background-image: url(
|
94
|
-
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(
|
95
|
-
.ui-state-active .ui-icon {background-image: url(
|
96
|
-
.ui-state-highlight .ui-icon {background-image: url(
|
97
|
-
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(
|
90
|
+
.ui-icon { width: 16px; height: 16px; background-image: url(ui-icons_222222_256x240.png); }
|
91
|
+
.ui-widget-content .ui-icon {background-image: url(ui-icons_222222_256x240.png); }
|
92
|
+
.ui-widget-header .ui-icon {background-image: url(ui-icons_ffffff_256x240.png); }
|
93
|
+
.ui-state-default .ui-icon { background-image: url(ui-icons_1c94c4_256x240.png); }
|
94
|
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(ui-icons_ef8c08_256x240.png); }
|
95
|
+
.ui-state-active .ui-icon {background-image: url(ui-icons_ef8c08_256x240.png); }
|
96
|
+
.ui-state-highlight .ui-icon {background-image: url(ui-icons_8cce3b_256x240.png); }
|
97
|
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(ui-icons_cd0a0a_256x240.png); }
|
98
98
|
|
99
99
|
/* positioning */
|
100
100
|
.ui-icon-carat-1-n { background-position: 0 0; }
|
@@ -284,8 +284,8 @@
|
|
284
284
|
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 14px; -webkit-border-bottom-right-radius: 14px; -khtml-border-bottom-right-radius: 14px; border-bottom-right-radius: 14px; }
|
285
285
|
|
286
286
|
/* Overlays */
|
287
|
-
.ui-widget-overlay { background: #666666 url(
|
288
|
-
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(
|
287
|
+
.ui-widget-overlay { background: #666666 url(ui-bg_flat_20_666666_40x100.png) 50% 50% repeat-x; opacity: .50;filter:Alpha(Opacity=50); }
|
288
|
+
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 19px; -khtml-border-radius: 19px; -webkit-border-radius: 19px; border-radius: 19px; }/*
|
289
289
|
* jQuery UI Resizable 1.8.16
|
290
290
|
*
|
291
291
|
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
@@ -1,128 +1,133 @@
|
|
1
1
|
$dark: #2B2F38;
|
2
2
|
$highlight: #F1CB31;
|
3
3
|
|
4
|
-
@mixin rounded-corners($topleft, $topright: $topleft, $bottomright: $topleft, $bottomleft: $topleft)
|
4
|
+
@mixin rounded-corners($topleft, $topright: $topleft, $bottomright: $topleft, $bottomleft: $topleft){
|
5
5
|
border-radius: $topleft $topright $bottomright $bottomleft;
|
6
6
|
-moz-border-radius: $topleft $topright $bottomright $bottomleft;
|
7
7
|
-webkit-border-radius: $topleft $topright $bottomright $bottomleft;
|
8
8
|
}
|
9
9
|
|
10
|
-
@mixin rotate($degrees)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
@mixin rotate($degrees){
|
11
|
+
transform: rotate($degrees);
|
12
|
+
-ms-transform: rotate($degrees);
|
13
|
+
-webkit-transform: rotate($degrees);
|
14
|
+
-o-transform: rotate($degrees);
|
15
|
+
-moz-transform: rotate($degrees);
|
16
16
|
}
|
17
17
|
|
18
18
|
.whurls.show {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
19
|
+
.menu {
|
20
|
+
position: fixed;
|
21
|
+
bottom: 20px;
|
22
|
+
left: 0;
|
23
|
+
border: 1px solid #666;
|
24
|
+
border-left: none;
|
25
|
+
background-color: #f6a828;
|
26
|
+
border-radius: 0 20px 20px 0;
|
27
|
+
width: auto;
|
28
|
+
font-size: 16px;
|
29
|
+
padding: 5px;
|
30
|
+
z-index: 20;
|
31
|
+
}
|
31
32
|
}
|
32
33
|
|
33
34
|
.whurl {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
35
|
+
td.line_numbers pre, td.code pre, td.code span {
|
36
|
+
font-family: monospace;
|
37
|
+
}
|
38
|
+
|
39
|
+
table.CodeRay {
|
40
|
+
border-collapse: collapse;
|
41
|
+
}
|
42
|
+
|
43
|
+
td.line_numbers {
|
44
|
+
background-color: #DDD;
|
45
|
+
text-align: right;
|
46
|
+
padding: 0 5px;
|
47
|
+
}
|
47
48
|
}
|
48
49
|
|
49
50
|
.whurl_form {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
51
|
+
.headers, .params, .fields, .url, .post_body, .button_row {
|
52
|
+
margin-left: 162px;
|
53
|
+
min-height: 31px;
|
54
|
+
margin-bottom: 10px;
|
55
|
+
}
|
56
|
+
|
57
|
+
.header_pair, .param_pair, .field_pair {
|
58
|
+
padding: 4px 0;
|
59
|
+
}
|
60
|
+
|
61
|
+
.key, #whurl_basic_auth_user {
|
62
|
+
width: 200px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.value, #whurl_basic_auth_password {
|
66
|
+
width: 400px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.long {
|
70
|
+
width: 525px;
|
71
|
+
}
|
72
|
+
|
73
|
+
#whurl_request_url {
|
74
|
+
width: 514px;
|
75
|
+
}
|
76
|
+
|
77
|
+
input.one {
|
78
|
+
width: 480px;
|
79
|
+
}
|
80
|
+
|
81
|
+
input.two {
|
82
|
+
width: 225px;
|
83
|
+
}
|
84
|
+
|
85
|
+
input.three {
|
86
|
+
width: 350px;
|
87
|
+
margin-left: 10px;
|
88
|
+
}
|
89
|
+
|
90
|
+
input.four {
|
91
|
+
width: 350px;
|
92
|
+
}
|
93
|
+
|
94
|
+
textarea#whurl_request_body {
|
95
|
+
width: 610px;
|
96
|
+
height: 55px;
|
97
|
+
margin-bottom: 10px;
|
98
|
+
}
|
99
|
+
|
100
|
+
.textarea_disabled {
|
101
|
+
background-color: lightgray;
|
102
|
+
}
|
103
|
+
|
104
|
+
.section_title {
|
104
105
|
padding: 4px 0;
|
105
106
|
float: left;
|
106
107
|
text-align: right;
|
107
108
|
width: 155px;
|
108
109
|
line-height: 26px;
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
110
|
+
}
|
111
|
+
|
112
|
+
a.copy_link {
|
113
|
+
width: 115.5px;
|
114
|
+
height: 44px;
|
115
|
+
background: url('copyURL.png') no-repeat 0 0;
|
116
|
+
margin: 30px 0 0 45px;
|
117
|
+
display: block;
|
118
|
+
}
|
119
|
+
|
120
|
+
a.copy_link:hover {
|
121
|
+
background-position: -116px 0;
|
122
|
+
}
|
123
|
+
|
124
|
+
.param_pair:first-child,
|
125
|
+
.header_pair:first-child {
|
126
|
+
display: none;
|
127
|
+
}
|
128
|
+
|
129
|
+
#give_it_a-whurl {
|
130
|
+
float:right;
|
131
|
+
margin-right: 170px;
|
132
|
+
}
|
128
133
|
}
|
@@ -24,13 +24,18 @@ module WhurlEngine
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def make_request
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
request_params = {
|
28
|
+
:headers => request_headers.to_hash,
|
29
|
+
:query => request_parameters.blank? ? nil : request_parameters,
|
30
|
+
:body => request_body,
|
31
|
+
:follow_redirects => false
|
32
|
+
}
|
33
|
+
|
34
|
+
if basic_auth_user.present? && basic_auth_password.present?
|
35
|
+
request_params.merge!({:basic_auth => { :username => basic_auth_user, :password => basic_auth_password }})
|
36
|
+
end
|
37
|
+
|
38
|
+
response = AnyClient.send(request_method.downcase, request_url, request_params)
|
34
39
|
self.response_message = "HTTP/#{response.http_version} #{response.code} #{Rack::Utils::HTTP_STATUS_CODES[response.code]}"
|
35
40
|
self.response_content_type = response.content_type
|
36
41
|
self.response_body = response.body
|
@@ -12,6 +12,13 @@
|
|
12
12
|
= f.select(:request_method, options_for_select(["GET", "POST", "PUT", "DELETE", "HEAD"], whurl.request_method))
|
13
13
|
\/
|
14
14
|
\#{f.text_field(:request_url)}
|
15
|
+
.row
|
16
|
+
.section_title
|
17
|
+
Basic Auth
|
18
|
+
.fields
|
19
|
+
.field_pair
|
20
|
+
= f.text_field(:basic_auth_user, :placeholder => 'username')
|
21
|
+
= f.text_field(:basic_auth_password, :placeholder => 'password')
|
15
22
|
.row
|
16
23
|
.section_title
|
17
24
|
%a.trash_headers{:class => 'trash button icon_only', :title => "trash all headers"}
|
@@ -38,5 +45,5 @@
|
|
38
45
|
.post_body
|
39
46
|
= f.text_area(:request_body)
|
40
47
|
.button_row
|
41
|
-
%input{:type => '
|
42
|
-
%input#
|
48
|
+
%input#clear_fields{:type => 'button', :value => "Clear", :class => 'clear_fields'}
|
49
|
+
%input#give_it_a-whurl{:type => 'submit', :value => "Give it a Whurl!"}/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
-#- response_body = response.to_html(:line_numbers => :table).force_encoding(Encoding.default_external)
|
2
2
|
%h3 Response Headers
|
3
3
|
.container
|
4
|
-
= whurl.response_message
|
4
|
+
%pre= whurl.response_message
|
5
5
|
= find_and_preserve(whurl.response_headers.to_html)
|
6
6
|
%h3 Response Body
|
7
7
|
.container= find_and_preserve(whurl.response_body.to_html(whurl.response_content_type))
|
data/lib/whurl_engine/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whurl_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-20 00:00:00.000000000 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: coderay
|
17
|
-
requirement: &
|
17
|
+
requirement: &2152434520 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.9.6
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2152434520
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: coffee-script
|
28
|
-
requirement: &
|
28
|
+
requirement: &2152434100 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2152434100
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: httmultiparty
|
39
|
-
requirement: &
|
39
|
+
requirement: &2157985420 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0.2'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2157985420
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: haml
|
50
|
-
requirement: &
|
50
|
+
requirement: &2157984920 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 3.1.4
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2157984920
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: json
|
61
|
-
requirement: &
|
61
|
+
requirement: &2157984460 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 1.5.1
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2157984460
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rails
|
72
|
-
requirement: &
|
72
|
+
requirement: &2157984000 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 3.1.3
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2157984000
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rinku
|
83
|
-
requirement: &
|
83
|
+
requirement: &2157983540 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ~>
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: 1.5.0
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *2157983540
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: sass
|
94
|
-
requirement: &
|
94
|
+
requirement: &2157983080 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ~>
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: 3.1.10
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *2157983080
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: uglifier
|
105
|
-
requirement: &
|
105
|
+
requirement: &2157982700 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *2157982700
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: heroku
|
116
|
-
requirement: &
|
116
|
+
requirement: &2157982240 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *2157982240
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: mysql
|
127
|
-
requirement: &
|
127
|
+
requirement: &2157981740 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ~>
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: 2.8.1
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *2157981740
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: webmock
|
138
|
-
requirement: &
|
138
|
+
requirement: &2157981240 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ~>
|
@@ -143,7 +143,7 @@ dependencies:
|
|
143
143
|
version: 1.7.10
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *2157981240
|
147
147
|
description: ! "Whurl is a mountable engine for Rails 3.1+ apps allowing\n you
|
148
148
|
to show the functionality of your API. You can save API calls and share them with
|
149
149
|
your team or the public."
|
@@ -173,28 +173,28 @@ files:
|
|
173
173
|
- app/assets/images/whurl_engine/rails.png
|
174
174
|
- app/assets/images/whurl_engine/send_button.jpg
|
175
175
|
- app/assets/images/whurl_engine/splash.png
|
176
|
+
- app/assets/images/whurl_engine/ui-bg_flat_100_ffffff_40x100.png
|
177
|
+
- app/assets/images/whurl_engine/ui-bg_flat_10_000000_40x100.png
|
178
|
+
- app/assets/images/whurl_engine/ui-bg_flat_18_f6ecd5_40x100.png
|
179
|
+
- app/assets/images/whurl_engine/ui-bg_flat_20_666666_40x100.png
|
180
|
+
- app/assets/images/whurl_engine/ui-bg_glass_65_ffffff_1x400.png
|
181
|
+
- app/assets/images/whurl_engine/ui-bg_highlight-hard_100_dddddd_1x100.png
|
182
|
+
- app/assets/images/whurl_engine/ui-bg_highlight-hard_100_eeeeee_1x100.png
|
183
|
+
- app/assets/images/whurl_engine/ui-bg_highlight-hard_40_f6a828_1x100.png
|
184
|
+
- app/assets/images/whurl_engine/ui-bg_highlight-soft_75_f1fbe5_1x100.png
|
185
|
+
- app/assets/images/whurl_engine/ui-icons_1c94c4_256x240.png
|
186
|
+
- app/assets/images/whurl_engine/ui-icons_222222_256x240.png
|
187
|
+
- app/assets/images/whurl_engine/ui-icons_8cce3b_256x240.png
|
188
|
+
- app/assets/images/whurl_engine/ui-icons_cd0a0a_256x240.png
|
189
|
+
- app/assets/images/whurl_engine/ui-icons_ef8c08_256x240.png
|
190
|
+
- app/assets/images/whurl_engine/ui-icons_ffffff_256x240.png
|
176
191
|
- app/assets/javascripts/whurl_engine/application.js
|
177
192
|
- app/assets/javascripts/whurl_engine/jquery-1-7-1-min.js
|
178
193
|
- app/assets/javascripts/whurl_engine/jquery-livequery.js
|
179
194
|
- app/assets/javascripts/whurl_engine/jquery-ui-1-8-16-min.js
|
180
195
|
- app/assets/javascripts/whurl_engine/jquery-ujs.js
|
181
196
|
- app/assets/stylesheets/whurl_engine/application.css.scss
|
182
|
-
- app/assets/stylesheets/whurl_engine/
|
183
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_flat_10_000000_40x100.png
|
184
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_flat_18_f6ecd5_40x100.png
|
185
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_flat_20_666666_40x100.png
|
186
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png
|
187
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_highlight-hard_100_dddddd_1x100.png
|
188
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_highlight-hard_100_eeeeee_1x100.png
|
189
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_highlight-hard_40_f6a828_1x100.png
|
190
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-bg_highlight-soft_75_f1fbe5_1x100.png
|
191
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_1c94c4_256x240.png
|
192
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_222222_256x240.png
|
193
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_8cce3b_256x240.png
|
194
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_cd0a0a_256x240.png
|
195
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_ef8c08_256x240.png
|
196
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/images/ui-icons_ffffff_256x240.png
|
197
|
-
- app/assets/stylesheets/whurl_engine/custom-theme/jquery-ui-1.8.16.custom.css
|
197
|
+
- app/assets/stylesheets/whurl_engine/jquery-ui-1.8.16.custom.css
|
198
198
|
- app/assets/stylesheets/whurl_engine/whurl.css.scss
|
199
199
|
- app/controllers/whurl_engine/application_controller.rb
|
200
200
|
- app/controllers/whurl_engine/categories_controller.rb
|
@@ -255,21 +255,22 @@ files:
|
|
255
255
|
- config/initializers/nilclass.rb
|
256
256
|
- config/initializers/string.rb
|
257
257
|
- config/routes.rb
|
258
|
-
- db/migrate/
|
259
|
-
- db/migrate/
|
260
|
-
- db/migrate/
|
261
|
-
- db/migrate/
|
262
|
-
- db/migrate/
|
263
|
-
- db/migrate/
|
264
|
-
- db/migrate/
|
265
|
-
- db/migrate/
|
266
|
-
- db/migrate/
|
267
|
-
- db/migrate/
|
268
|
-
- db/migrate/
|
269
|
-
- db/migrate/
|
270
|
-
- db/migrate/
|
271
|
-
- db/migrate/
|
272
|
-
- db/migrate/
|
258
|
+
- db/migrate/20110209054322_whurl_create_whurls_table.rb
|
259
|
+
- db/migrate/20111210192724_whurl_add_description_to_whurl.rb
|
260
|
+
- db/migrate/20111210201607_whurl_add_custom_url_to_whurl.rb
|
261
|
+
- db/migrate/20111211030904_whurl_rename_whurls_to_requests.rb
|
262
|
+
- db/migrate/20111220233800_whurl_create_fields_for_whurl_requests.rb
|
263
|
+
- db/migrate/20111221011145_whurl_drop_data_from_requests.rb
|
264
|
+
- db/migrate/20120106033416_whurl_create_responses.rb
|
265
|
+
- db/migrate/20120106190508_whurl_create_categories_table.rb
|
266
|
+
- db/migrate/20120107011500_whurl_create_resources_table.rb
|
267
|
+
- db/migrate/20120107065652_whurl_create_parameters_table.rb
|
268
|
+
- db/migrate/20120110205837_whurl_rename_parameters_to_parameter_definitions.rb
|
269
|
+
- db/migrate/20120110205853_whurl_rename_requests_to_whurls.rb
|
270
|
+
- db/migrate/20120111014928_whurl_add_raw_request_to_whurls.rb
|
271
|
+
- db/migrate/20120118011913_whurl_create_header_definitions_table.rb
|
272
|
+
- db/migrate/20120214074332_whurl_add_message_to_whurls.rb
|
273
|
+
- db/migrate/20120221012000_whurl_add_basic_auth_fields.rb
|
273
274
|
- lib/tasks/whurl_engine_tasks.rake
|
274
275
|
- lib/whurl_engine/config.rb
|
275
276
|
- lib/whurl_engine/engine.rb
|