plupload-rails3 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/LICENSE +38 -0
- data/README.md +100 -0
- data/Rakefile +23 -0
- data/init.rb +3 -0
- data/install.rb +9 -0
- data/lib/.DS_Store +0 -0
- data/lib/app/.DS_Store +0 -0
- data/lib/app/controllers/plupload_rails_controller.rb +38 -0
- data/lib/app/helpers/plupload_helper.rb +14 -0
- data/lib/app/middleware/plupload_params_renamer.rb +38 -0
- data/lib/app/views/.DS_Store +0 -0
- data/lib/app/views/plupload/_uploader_scripts.html.erb +72 -0
- data/lib/plupload-rails3.rb +20 -0
- data/lib/plupload-rails3/asset_mover.rb +54 -0
- data/lib/plupload-rails3/railtie.rb +12 -0
- data/lib/plupload-rails3/version.rb +5 -0
- data/lib/public/.DS_Store +0 -0
- data/lib/public/images/.DS_Store +0 -0
- data/lib/public/images/plupload-rails3/.DS_Store +0 -0
- data/lib/public/images/plupload-rails3/plupload/backgrounds.gif +0 -0
- data/lib/public/images/plupload-rails3/plupload/buttons-disabled.png +0 -0
- data/lib/public/images/plupload-rails3/plupload/buttons.png +0 -0
- data/lib/public/images/plupload-rails3/plupload/delete.gif +0 -0
- data/lib/public/images/plupload-rails3/plupload/done.gif +0 -0
- data/lib/public/images/plupload-rails3/plupload/error.gif +0 -0
- data/lib/public/images/plupload-rails3/plupload/transp50.png +0 -0
- data/lib/public/javascripts/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/jquery-ui.min.js +406 -0
- data/lib/public/javascripts/plupload-rails3/jquery.min.js +16 -0
- data/lib/public/javascripts/plupload-rails3/plupload/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/changelog.txt +152 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/bg.jpg +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/custom.html +94 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/dump.php +36 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/jquery/events.html +196 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/jquery/jquery_ui_widget.html +103 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/jquery/queue_widget.html +174 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/jquery/s3.php +158 -0
- data/lib/public/javascripts/plupload-rails3/plupload/examples/upload.php +124 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css +177 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/backgrounds.gif +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/buttons-disabled.png +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/buttons.png +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/delete.gif +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/done.gif +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/error.gif +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/throbber.gif +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/transp50.png +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/jquery.plupload.queue.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/.DS_Store +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css +139 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/img/plupload-bw.png +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/img/plupload.png +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.browserplus.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.flash.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.flash.swf +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.full.js +2 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.gears.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.html4.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.html5.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.js +2 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.silverlight.js +1 -0
- data/lib/public/javascripts/plupload-rails3/plupload/js/plupload.silverlight.xap +0 -0
- data/lib/public/javascripts/plupload-rails3/plupload/license.txt +339 -0
- data/lib/public/javascripts/plupload-rails3/plupload/readme.md +46 -0
- data/lib/public/stylesheets/.DS_Store +0 -0
- data/lib/public/stylesheets/.gitkeep +0 -0
- data/lib/public/stylesheets/plupload-rails3/jquery-ui.custom.css +578 -0
- data/lib/public/stylesheets/plupload-rails3/plupload.queue.3.1.css +171 -0
- data/lib/public/stylesheets/plupload-rails3/plupload.queue.css +171 -0
- data/lib/tasks/asset_mover.rake +15 -0
- data/plupload-rails3.gemspec +24 -0
- data/test/plupload_rails3_test.rb +29 -0
- data/test/test_helper.rb +3 -0
- data/uninstall.rb +3 -0
- metadata +131 -0
@@ -0,0 +1,171 @@
|
|
1
|
+
/*
|
2
|
+
Plupload
|
3
|
+
------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
.plupload_button {
|
6
|
+
display: -moz-inline-box; /* FF < 3*/
|
7
|
+
display: inline-block;
|
8
|
+
font: normal 12px sans-serif;
|
9
|
+
text-decoration: none;
|
10
|
+
color: #42454a;
|
11
|
+
border: 1px solid #bababa;
|
12
|
+
padding: 2px 8px 3px 20px;
|
13
|
+
margin-right: 4px;
|
14
|
+
background: #f3f3f3 url('/assets/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
|
15
|
+
outline: 0;
|
16
|
+
|
17
|
+
/* Optional rounded corners for browsers that support it */
|
18
|
+
-moz-border-radius: 3px;
|
19
|
+
-khtml-border-radius: 3px;
|
20
|
+
-webkit-border-radius: 3px;
|
21
|
+
border-radius: 3px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.plupload_button:hover {
|
25
|
+
color: #000;
|
26
|
+
text-decoration: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
.plupload_disabled, a.plupload_disabled:hover {
|
30
|
+
color: #737373;
|
31
|
+
border-color: #c5c5c5;
|
32
|
+
background: #ededed url('/assets/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
|
33
|
+
cursor: default;
|
34
|
+
}
|
35
|
+
|
36
|
+
.plupload_add {
|
37
|
+
background-position: -181px center;
|
38
|
+
}
|
39
|
+
|
40
|
+
.plupload_wrapper {
|
41
|
+
font: normal 11px Verdana,sans-serif;
|
42
|
+
width: 100%;
|
43
|
+
}
|
44
|
+
|
45
|
+
.plupload_container {
|
46
|
+
padding: 8px;
|
47
|
+
background: url('/assets/plupload-rails3/plupload/transp50.png');
|
48
|
+
/*-moz-border-radius: 5px;*/
|
49
|
+
}
|
50
|
+
|
51
|
+
.plupload_header {background: #2A2C2E url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
|
52
|
+
.plupload_header_content {
|
53
|
+
background: url('/assets/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
|
54
|
+
min-height: 56px;
|
55
|
+
padding-left: 60px;
|
56
|
+
color: #FFF;
|
57
|
+
}
|
58
|
+
.plupload_header_title {
|
59
|
+
font: normal 18px sans-serif;
|
60
|
+
padding: 6px 0 3px;
|
61
|
+
}
|
62
|
+
.plupload_header_text {
|
63
|
+
font: normal 12px sans-serif;
|
64
|
+
}
|
65
|
+
|
66
|
+
.plupload_filelist {
|
67
|
+
margin: 0;
|
68
|
+
padding: 0;
|
69
|
+
list-style: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
.plupload_scroll .plupload_filelist {
|
73
|
+
height: 185px;
|
74
|
+
background: #F5F5F5;
|
75
|
+
overflow-y: scroll;
|
76
|
+
}
|
77
|
+
|
78
|
+
.plupload_filelist li {
|
79
|
+
padding: 10px 8px;
|
80
|
+
background: #F5F5F5 url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
|
81
|
+
border-bottom: 1px solid #DDD;
|
82
|
+
}
|
83
|
+
|
84
|
+
.plupload_filelist_header, .plupload_filelist_footer {
|
85
|
+
background: #DFDFDF;
|
86
|
+
padding: 8px 8px;
|
87
|
+
color: #42454A;
|
88
|
+
}
|
89
|
+
.plupload_filelist_header {
|
90
|
+
border-top: 1px solid #EEE;
|
91
|
+
border-bottom: 1px solid #CDCDCD;
|
92
|
+
}
|
93
|
+
|
94
|
+
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
|
95
|
+
.plupload_file_name {float: left; overflow: hidden}
|
96
|
+
.plupload_file_status {color: #777;}
|
97
|
+
.plupload_file_status span {color: #42454A;}
|
98
|
+
.plupload_file_size, .plupload_file_status, .plupload_progress {
|
99
|
+
float: right;
|
100
|
+
width: 80px;
|
101
|
+
}
|
102
|
+
.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
|
103
|
+
|
104
|
+
.plupload_filelist .plupload_file_name {width: 205px}
|
105
|
+
|
106
|
+
.plupload_file_action {
|
107
|
+
float: right;
|
108
|
+
width: 16px;
|
109
|
+
height: 16px;
|
110
|
+
margin-left: 15px;
|
111
|
+
}
|
112
|
+
|
113
|
+
.plupload_file_action * {
|
114
|
+
display: none;
|
115
|
+
width: 16px;
|
116
|
+
height: 16px;
|
117
|
+
}
|
118
|
+
|
119
|
+
li.plupload_uploading {background: #ECF3DC url('/assets/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
|
120
|
+
li.plupload_done {color:#AAA}
|
121
|
+
|
122
|
+
li.plupload_delete a {
|
123
|
+
background: url('/assets/plupload-rails3/plupload/delete.gif');
|
124
|
+
}
|
125
|
+
|
126
|
+
li.plupload_failed a {
|
127
|
+
background: url('/assets/plupload-rails3/plupload/error.gif');
|
128
|
+
cursor: default;
|
129
|
+
}
|
130
|
+
|
131
|
+
li.plupload_done a {
|
132
|
+
background: url('/assets/plupload-rails3/plupload/done.gif');
|
133
|
+
cursor: default;
|
134
|
+
}
|
135
|
+
|
136
|
+
.plupload_progress, .plupload_upload_status {
|
137
|
+
display: none;
|
138
|
+
}
|
139
|
+
|
140
|
+
.plupload_progress_container {
|
141
|
+
margin-top: 3px;
|
142
|
+
border: 1px solid #CCC;
|
143
|
+
background: #FFF;
|
144
|
+
padding: 1px;
|
145
|
+
}
|
146
|
+
.plupload_progress_bar {
|
147
|
+
width: 0px;
|
148
|
+
height: 7px;
|
149
|
+
background: #CDEB8B;
|
150
|
+
}
|
151
|
+
|
152
|
+
.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
|
153
|
+
margin-right: 17px;
|
154
|
+
}
|
155
|
+
|
156
|
+
/* Floats */
|
157
|
+
|
158
|
+
.plupload_clear,.plupload_clearer {clear: both;}
|
159
|
+
.plupload_clearer, .plupload_progress_bar {
|
160
|
+
display: block;
|
161
|
+
font-size: 0;
|
162
|
+
line-height: 0;
|
163
|
+
}
|
164
|
+
|
165
|
+
li.plupload_droptext {
|
166
|
+
background: transparent;
|
167
|
+
text-align: center;
|
168
|
+
vertical-align: middle;
|
169
|
+
border: 0;
|
170
|
+
line-height: 165px;
|
171
|
+
}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
/*
|
2
|
+
Plupload
|
3
|
+
------------------------------------------------------------------- */
|
4
|
+
|
5
|
+
.plupload_button {
|
6
|
+
display: -moz-inline-box; /* FF < 3*/
|
7
|
+
display: inline-block;
|
8
|
+
font: normal 12px sans-serif;
|
9
|
+
text-decoration: none;
|
10
|
+
color: #42454a;
|
11
|
+
border: 1px solid #bababa;
|
12
|
+
padding: 2px 8px 3px 20px;
|
13
|
+
margin-right: 4px;
|
14
|
+
background: #f3f3f3 url('/images/plupload-rails3/plupload/buttons.png') no-repeat 0 center;
|
15
|
+
outline: 0;
|
16
|
+
|
17
|
+
/* Optional rounded corners for browsers that support it */
|
18
|
+
-moz-border-radius: 3px;
|
19
|
+
-khtml-border-radius: 3px;
|
20
|
+
-webkit-border-radius: 3px;
|
21
|
+
border-radius: 3px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.plupload_button:hover {
|
25
|
+
color: #000;
|
26
|
+
text-decoration: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
.plupload_disabled, a.plupload_disabled:hover {
|
30
|
+
color: #737373;
|
31
|
+
border-color: #c5c5c5;
|
32
|
+
background: #ededed url('/images/plupload-rails3/plupload/buttons-disabled.png') no-repeat 0 center;
|
33
|
+
cursor: default;
|
34
|
+
}
|
35
|
+
|
36
|
+
.plupload_add {
|
37
|
+
background-position: -181px center;
|
38
|
+
}
|
39
|
+
|
40
|
+
.plupload_wrapper {
|
41
|
+
font: normal 11px Verdana,sans-serif;
|
42
|
+
width: 100%;
|
43
|
+
}
|
44
|
+
|
45
|
+
.plupload_container {
|
46
|
+
padding: 8px;
|
47
|
+
background: url('/images/plupload-rails3/plupload/transp50.png');
|
48
|
+
/*-moz-border-radius: 5px;*/
|
49
|
+
}
|
50
|
+
|
51
|
+
.plupload_header {background: #2A2C2E url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x;}
|
52
|
+
.plupload_header_content {
|
53
|
+
background: url('/images/plupload-rails3/plupload/backgrounds.gif') no-repeat 0 -317px;
|
54
|
+
min-height: 56px;
|
55
|
+
padding-left: 60px;
|
56
|
+
color: #FFF;
|
57
|
+
}
|
58
|
+
.plupload_header_title {
|
59
|
+
font: normal 18px sans-serif;
|
60
|
+
padding: 6px 0 3px;
|
61
|
+
}
|
62
|
+
.plupload_header_text {
|
63
|
+
font: normal 12px sans-serif;
|
64
|
+
}
|
65
|
+
|
66
|
+
.plupload_filelist {
|
67
|
+
margin: 0;
|
68
|
+
padding: 0;
|
69
|
+
list-style: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
.plupload_scroll .plupload_filelist {
|
73
|
+
height: 185px;
|
74
|
+
background: #F5F5F5;
|
75
|
+
overflow-y: scroll;
|
76
|
+
}
|
77
|
+
|
78
|
+
.plupload_filelist li {
|
79
|
+
padding: 10px 8px;
|
80
|
+
background: #F5F5F5 url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -156px;
|
81
|
+
border-bottom: 1px solid #DDD;
|
82
|
+
}
|
83
|
+
|
84
|
+
.plupload_filelist_header, .plupload_filelist_footer {
|
85
|
+
background: #DFDFDF;
|
86
|
+
padding: 8px 8px;
|
87
|
+
color: #42454A;
|
88
|
+
}
|
89
|
+
.plupload_filelist_header {
|
90
|
+
border-top: 1px solid #EEE;
|
91
|
+
border-bottom: 1px solid #CDCDCD;
|
92
|
+
}
|
93
|
+
|
94
|
+
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
|
95
|
+
.plupload_file_name {float: left; overflow: hidden}
|
96
|
+
.plupload_file_status {color: #777;}
|
97
|
+
.plupload_file_status span {color: #42454A;}
|
98
|
+
.plupload_file_size, .plupload_file_status, .plupload_progress {
|
99
|
+
float: right;
|
100
|
+
width: 80px;
|
101
|
+
}
|
102
|
+
.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
|
103
|
+
|
104
|
+
.plupload_filelist .plupload_file_name {width: 205px}
|
105
|
+
|
106
|
+
.plupload_file_action {
|
107
|
+
float: right;
|
108
|
+
width: 16px;
|
109
|
+
height: 16px;
|
110
|
+
margin-left: 15px;
|
111
|
+
}
|
112
|
+
|
113
|
+
.plupload_file_action * {
|
114
|
+
display: none;
|
115
|
+
width: 16px;
|
116
|
+
height: 16px;
|
117
|
+
}
|
118
|
+
|
119
|
+
li.plupload_uploading {background: #ECF3DC url('/images/plupload-rails3/plupload/backgrounds.gif') repeat-x 0 -238px;}
|
120
|
+
li.plupload_done {color:#AAA}
|
121
|
+
|
122
|
+
li.plupload_delete a {
|
123
|
+
background: url('/images/plupload-rails3/plupload/delete.gif');
|
124
|
+
}
|
125
|
+
|
126
|
+
li.plupload_failed a {
|
127
|
+
background: url('/images/plupload-rails3/plupload/error.gif');
|
128
|
+
cursor: default;
|
129
|
+
}
|
130
|
+
|
131
|
+
li.plupload_done a {
|
132
|
+
background: url('/images/plupload-rails3/plupload/done.gif');
|
133
|
+
cursor: default;
|
134
|
+
}
|
135
|
+
|
136
|
+
.plupload_progress, .plupload_upload_status {
|
137
|
+
display: none;
|
138
|
+
}
|
139
|
+
|
140
|
+
.plupload_progress_container {
|
141
|
+
margin-top: 3px;
|
142
|
+
border: 1px solid #CCC;
|
143
|
+
background: #FFF;
|
144
|
+
padding: 1px;
|
145
|
+
}
|
146
|
+
.plupload_progress_bar {
|
147
|
+
width: 0px;
|
148
|
+
height: 7px;
|
149
|
+
background: #CDEB8B;
|
150
|
+
}
|
151
|
+
|
152
|
+
.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
|
153
|
+
margin-right: 17px;
|
154
|
+
}
|
155
|
+
|
156
|
+
/* Floats */
|
157
|
+
|
158
|
+
.plupload_clear,.plupload_clearer {clear: both;}
|
159
|
+
.plupload_clearer, .plupload_progress_bar {
|
160
|
+
display: block;
|
161
|
+
font-size: 0;
|
162
|
+
line-height: 0;
|
163
|
+
}
|
164
|
+
|
165
|
+
li.plupload_droptext {
|
166
|
+
background: transparent;
|
167
|
+
text-align: center;
|
168
|
+
vertical-align: middle;
|
169
|
+
border: 0;
|
170
|
+
line-height: 165px;
|
171
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace :plupload_rails3 do
|
2
|
+
desc "Installs the plupload assets to your application"
|
3
|
+
task :install_assets do
|
4
|
+
require File.join(File.dirname(__FILE__), '../plupload-rails3/asset_mover')
|
5
|
+
install_plupload_assets
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :plupload_rails3 do
|
10
|
+
desc "Removes the installed plupload assets from your application"
|
11
|
+
task :uninstall_assets do
|
12
|
+
require File.join(File.dirname(__FILE__), '../plupload-rails3/asset_mover')
|
13
|
+
uninstall_plupload_assets
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "plupload-rails3/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "plupload-rails3"
|
7
|
+
s.version = Plupload::Rails3::VERSION
|
8
|
+
s.authors = ["Sammy Larbi"]
|
9
|
+
s.email = ["sam@codeodor.com"]
|
10
|
+
s.homepage = "https://github.com/codeodor/plupload-rails3"
|
11
|
+
s.summary = %q{Plupload lets you upload multiple files at a time and even allows drag and drop from the local file system into the browser (with Firefox and Safari). This gem/plugin tries to make its integration with Rails 3 very simple.}
|
12
|
+
s.description = %q{}
|
13
|
+
|
14
|
+
s.rubyforge_project = "plupload-rails3"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
# s.add_runtime_dependency "rest-client"
|
24
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'rack/mock'
|
3
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../lib/app/middleware/plupload_params_renamer'
|
4
|
+
|
5
|
+
class PluploadRails3Test < ActiveSupport::TestCase
|
6
|
+
#include Rack::Test::Methods
|
7
|
+
setup do
|
8
|
+
app = lambda { |env|
|
9
|
+
req = Rack::Request.new(env)
|
10
|
+
[200, {'Content-Type' => 'text/plain'}, [req.params.inspect]]
|
11
|
+
}
|
12
|
+
@app = PluploadParamsRenamer.new(app)
|
13
|
+
end
|
14
|
+
|
15
|
+
test "should not modify params on post without _plupload_upload" do
|
16
|
+
params = {'some_param' => 'somevalue'}
|
17
|
+
response = Rack::MockRequest.new(@app).post('/', :params=>params)
|
18
|
+
|
19
|
+
assert_equal response.body, params.inspect
|
20
|
+
end
|
21
|
+
|
22
|
+
test "should create new param based on value of _plupload_upload" do
|
23
|
+
params = {'_plupload_upload' => 'method[object]', 'file' => 'original_value'}
|
24
|
+
response = Rack::MockRequest.new(@app).post('/', :params=>params)
|
25
|
+
|
26
|
+
assert_match /"method"=>{"object"=>"original_value"}/, response.body
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
data/test/test_helper.rb
ADDED
data/uninstall.rb
ADDED
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: plupload-rails3
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Sammy Larbi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-12 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: ''
|
15
|
+
email:
|
16
|
+
- sam@codeodor.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- init.rb
|
27
|
+
- install.rb
|
28
|
+
- lib/.DS_Store
|
29
|
+
- lib/app/.DS_Store
|
30
|
+
- lib/app/controllers/plupload_rails_controller.rb
|
31
|
+
- lib/app/helpers/plupload_helper.rb
|
32
|
+
- lib/app/middleware/plupload_params_renamer.rb
|
33
|
+
- lib/app/views/.DS_Store
|
34
|
+
- lib/app/views/plupload/_uploader_scripts.html.erb
|
35
|
+
- lib/plupload-rails3.rb
|
36
|
+
- lib/plupload-rails3/asset_mover.rb
|
37
|
+
- lib/plupload-rails3/railtie.rb
|
38
|
+
- lib/plupload-rails3/version.rb
|
39
|
+
- lib/public/.DS_Store
|
40
|
+
- lib/public/images/.DS_Store
|
41
|
+
- lib/public/images/plupload-rails3/.DS_Store
|
42
|
+
- lib/public/images/plupload-rails3/plupload/backgrounds.gif
|
43
|
+
- lib/public/images/plupload-rails3/plupload/buttons-disabled.png
|
44
|
+
- lib/public/images/plupload-rails3/plupload/buttons.png
|
45
|
+
- lib/public/images/plupload-rails3/plupload/delete.gif
|
46
|
+
- lib/public/images/plupload-rails3/plupload/done.gif
|
47
|
+
- lib/public/images/plupload-rails3/plupload/error.gif
|
48
|
+
- lib/public/images/plupload-rails3/plupload/transp50.png
|
49
|
+
- lib/public/javascripts/.DS_Store
|
50
|
+
- lib/public/javascripts/plupload-rails3/.DS_Store
|
51
|
+
- lib/public/javascripts/plupload-rails3/jquery-ui.min.js
|
52
|
+
- lib/public/javascripts/plupload-rails3/jquery.min.js
|
53
|
+
- lib/public/javascripts/plupload-rails3/plupload/.DS_Store
|
54
|
+
- lib/public/javascripts/plupload-rails3/plupload/changelog.txt
|
55
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/.DS_Store
|
56
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/bg.jpg
|
57
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/custom.html
|
58
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/dump.php
|
59
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/jquery/events.html
|
60
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/jquery/jquery_ui_widget.html
|
61
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/jquery/queue_widget.html
|
62
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/jquery/s3.php
|
63
|
+
- lib/public/javascripts/plupload-rails3/plupload/examples/upload.php
|
64
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/.DS_Store
|
65
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/.DS_Store
|
66
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css
|
67
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/backgrounds.gif
|
68
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/buttons-disabled.png
|
69
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/buttons.png
|
70
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/delete.gif
|
71
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/done.gif
|
72
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/error.gif
|
73
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/throbber.gif
|
74
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/img/transp50.png
|
75
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.plupload.queue/jquery.plupload.queue.js
|
76
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/.DS_Store
|
77
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css
|
78
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/img/plupload-bw.png
|
79
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/img/plupload.png
|
80
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js
|
81
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.browserplus.js
|
82
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.flash.js
|
83
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.flash.swf
|
84
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.full.js
|
85
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.gears.js
|
86
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.html4.js
|
87
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.html5.js
|
88
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.js
|
89
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.silverlight.js
|
90
|
+
- lib/public/javascripts/plupload-rails3/plupload/js/plupload.silverlight.xap
|
91
|
+
- lib/public/javascripts/plupload-rails3/plupload/license.txt
|
92
|
+
- lib/public/javascripts/plupload-rails3/plupload/readme.md
|
93
|
+
- lib/public/stylesheets/.DS_Store
|
94
|
+
- lib/public/stylesheets/.gitkeep
|
95
|
+
- lib/public/stylesheets/plupload-rails3/jquery-ui.custom.css
|
96
|
+
- lib/public/stylesheets/plupload-rails3/plupload.queue.3.1.css
|
97
|
+
- lib/public/stylesheets/plupload-rails3/plupload.queue.css
|
98
|
+
- lib/tasks/asset_mover.rake
|
99
|
+
- plupload-rails3.gemspec
|
100
|
+
- test/plupload_rails3_test.rb
|
101
|
+
- test/test_helper.rb
|
102
|
+
- uninstall.rb
|
103
|
+
homepage: https://github.com/codeodor/plupload-rails3
|
104
|
+
licenses: []
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
111
|
+
requirements:
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ! '>='
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
requirements: []
|
122
|
+
rubyforge_project: plupload-rails3
|
123
|
+
rubygems_version: 1.8.8
|
124
|
+
signing_key:
|
125
|
+
specification_version: 3
|
126
|
+
summary: Plupload lets you upload multiple files at a time and even allows drag and
|
127
|
+
drop from the local file system into the browser (with Firefox and Safari). This
|
128
|
+
gem/plugin tries to make its integration with Rails 3 very simple.
|
129
|
+
test_files:
|
130
|
+
- test/plupload_rails3_test.rb
|
131
|
+
- test/test_helper.rb
|