strelka 0.0.1.pre.265 → 0.0.1.pre.279
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/ChangeLog +122 -1
- data/Manifest.txt +14 -1
- data/README.rdoc +1 -1
- data/Rakefile +8 -8
- data/bin/strelka +2 -2
- data/examples/Procfile +1 -0
- data/examples/apps/upload-demo +74 -0
- data/examples/config.yml +1 -1
- data/examples/gen-config.rb +6 -2
- data/examples/static/examples.html +1 -0
- data/examples/templates/upload-form.tmpl +17 -0
- data/examples/templates/upload-success.tmpl +13 -0
- data/lib/strelka/app.rb +23 -1
- data/lib/strelka/app/restresources.rb +1 -1
- data/lib/strelka/app/templating.rb +4 -2
- data/lib/strelka/exceptions.rb +3 -0
- data/lib/strelka/httprequest.rb +18 -2
- data/lib/strelka/mixins.rb +1 -1
- data/lib/strelka/multipartparser.rb +358 -0
- data/lib/strelka/paramvalidator.rb +1 -0
- data/spec/data/forms/2_images.form +0 -0
- data/spec/data/forms/singleupload.form +12 -0
- data/spec/data/forms/testform.form +40 -0
- data/spec/data/forms/testform_bad.form +20 -0
- data/spec/data/forms/testform_badheaders.form +3 -0
- data/spec/data/forms/testform_metadataonly.form +32 -0
- data/spec/data/forms/testform_msie.form +12 -0
- data/spec/data/forms/testform_multivalue.form +48 -0
- data/spec/data/forms/testform_truncated_metadata.form +12 -0
- data/spec/lib/helpers.rb +17 -3
- data/spec/strelka/app_spec.rb +11 -0
- data/spec/strelka/mixins_spec.rb +5 -0
- data/spec/strelka/multipartparser_spec.rb +169 -0
- metadata +44 -31
- metadata.gz.sig +0 -0
- data/examples/.env +0 -4
@@ -27,6 +27,7 @@ require 'strelka/app' unless defined?( Strelka::App )
|
|
27
27
|
# validator.add( :name, /^(?<lastname>\S+), (?<firstname>\S+)$/, "Customer Name" )
|
28
28
|
# validator.add( :email, "Customer Email" )
|
29
29
|
# validator.add( :feedback, :printable, "Customer Feedback" )
|
30
|
+
# validator.override( :email, :printable, "Your Email Address" )
|
30
31
|
#
|
31
32
|
# # Untaint all parameter values which match their constraints
|
32
33
|
# validate.untaint_all_constraints = true
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
--sillyBoundary
|
2
|
+
Content-Disposition: form-data; name="upload"; filename="testfile.rtf"
|
3
|
+
Content-Type: application/rtf
|
4
|
+
|
5
|
+
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420
|
6
|
+
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
7
|
+
{\colortbl;\red255\green255\blue255;}
|
8
|
+
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
9
|
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
10
|
+
|
11
|
+
\f0\fs24 \cf0 This is a test of the ThingFish upload handler. This is only a test. If this were real, you'd hear people screaming outside in anguish, and emergency sirens blaring.}
|
12
|
+
--sillyBoundary--
|
@@ -0,0 +1,40 @@
|
|
1
|
+
--sillyboundary
|
2
|
+
Content-Disposition: fProgram Files\Documents\testfile.rtf"
|
3
|
+
Content-Type: application/rtf
|
4
|
+
|
5
|
+
{\rtfcpg10000\cocoartf824\cocoasubrtf420
|
6
|
+
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
7
|
+
{\colortbl;\red255\green255\blue255;}
|
8
|
+
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
9
|
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
10
|
+
|
11
|
+
\f0\fs24 \cf0 This is a test of the ThingFish upload handler. This is only a test. If this were real, you'd hear people screaming outside in anguish, and emergency sirens blaring.}
|
12
|
+
--sillyboundary
|
13
|
+
Content-Disposition: form-data; name="thingfish-upload"; filename=""
|
14
|
+
Content-Type: application/octet-stream
|
15
|
+
|
16
|
+
|
17
|
+
--sillyboundary
|
18
|
+
Content-Disposition: form-data; name="upload"; filename=""
|
19
|
+
Content-Type: application/octet-stream
|
20
|
+
|
21
|
+
|
22
|
+
--sillyboundary
|
23
|
+
Content-Disposition: form-data; name="thingfish-upload"; filename=""
|
24
|
+
Content-Type: application/octet-stream
|
25
|
+
|
26
|
+
|
27
|
+
--sillyboundary
|
28
|
+
Content-Dispositiona; name="thingfish-upload"; filename=""
|
29
|
+
Content-Type: application/octet-stream
|
30
|
+
|
31
|
+
|
32
|
+
--sillyboundary
|
33
|
+
Content-Disposition: form-data; name="thingfish-metadata-namespace"
|
34
|
+
|
35
|
+
testing
|
36
|
+
--sillyboundary
|
37
|
+
Content-Di form-data; name="thingfish-metadata-rating"
|
38
|
+
|
39
|
+
5
|
40
|
+
--sillyboundary--
|
@@ -0,0 +1,20 @@
|
|
1
|
+
--sillyBADboundary
|
2
|
+
Content-Dispositionthingfish-upload"; filename="C:\Program Files\Documents\testfile.rtf"
|
3
|
+
Content-Type: application/rtf
|
4
|
+
|
5
|
+
{\rtfcpg10000\cocoartf824\cocoasubrtf420
|
6
|
+
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
7
|
+
{\colortbl;\red255\green255\blue255;}
|
8
|
+
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
9
|
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
10
|
+
|
11
|
+
\f0\fs24 \cf0 This is a test of the ThingFish upload handler. This is only a test. If this were real, you'd hear people screaming outside in anguish, and emergency sirens blaring.}
|
12
|
+
--sillyBADboundary
|
13
|
+
Content-Disposition: form-data; name="thingfish-metadata-namespace"
|
14
|
+
|
15
|
+
testing
|
16
|
+
--sillyBADboundary
|
17
|
+
Content-Disposition: form-data; name="thingfish-metadata-rating"
|
18
|
+
|
19
|
+
5
|
20
|
+
--s
|
@@ -0,0 +1,32 @@
|
|
1
|
+
--sillyBoundary
|
2
|
+
Content-Disposition: form-data; name="pork"
|
3
|
+
|
4
|
+
fornk
|
5
|
+
--sillyBoundary
|
6
|
+
Content-Disposition: form-data; name="pork"
|
7
|
+
|
8
|
+
zoot
|
9
|
+
--sillyBoundary
|
10
|
+
Content-Disposition: form-data; name="velour-fog"
|
11
|
+
|
12
|
+
Sweet, sweet canday. BAM.
|
13
|
+
--sillyBoundary
|
14
|
+
Content-Disposition: form-data; name="namespace"
|
15
|
+
|
16
|
+
testing
|
17
|
+
--sillyBoundary
|
18
|
+
Content-Disposition: form-data; name="rating"
|
19
|
+
|
20
|
+
5
|
21
|
+
--sillyBoundary
|
22
|
+
Content-Disposition: form-data; name="x-livejournal-entry"
|
23
|
+
|
24
|
+
Hello. I am content that ThingFish doesn't give a damn about. I am so very sad
|
25
|
+
to not be included in the ThingFish party. I'm going to sit at home and eat ice
|
26
|
+
cream instead. Fuck ThingFish! I don't need him anyway. I mean, he never even called
|
27
|
+
me back after I put out and everything.
|
28
|
+
|
29
|
+
He doesn't know what he's missing! I'm a catch. My Mom told me so.
|
30
|
+
|
31
|
+
lolzz!11
|
32
|
+
--sillyBoundary--
|
@@ -0,0 +1,12 @@
|
|
1
|
+
--sillyBoundary
|
2
|
+
Content-Disposition: form-data; name="upload"; filename="C:\Program Files\Documents\testfile.rtf"
|
3
|
+
Content-Type: application/rtf
|
4
|
+
|
5
|
+
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420
|
6
|
+
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
7
|
+
{\colortbl;\red255\green255\blue255;}
|
8
|
+
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
9
|
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
10
|
+
|
11
|
+
\f0\fs24 \cf0 This is a test of the ThingFish upload handler. This is only a test. If this were real, you'd hear people screaming outside in anguish, and emergency sirens blaring.}
|
12
|
+
--sillyBoundary--
|
@@ -0,0 +1,48 @@
|
|
1
|
+
--sillyBoundary
|
2
|
+
Content-Disposition: form-data; name="pork"
|
3
|
+
|
4
|
+
fornk
|
5
|
+
--sillyBoundary
|
6
|
+
Content-Disposition: form-data; name="pork"
|
7
|
+
|
8
|
+
zoot
|
9
|
+
--sillyBoundary
|
10
|
+
Content-Disposition: form-data; name="upload"; filename="testfile.rtf"
|
11
|
+
Content-Type: application/rtf
|
12
|
+
|
13
|
+
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf420
|
14
|
+
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
|
15
|
+
{\colortbl;\red255\green255\blue255;}
|
16
|
+
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
17
|
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
|
18
|
+
|
19
|
+
\f0\fs24 \cf0 This is a test of the ThingFish upload handler. This is only a test. If this were real, you'd hear people screaming outside in anguish, and emergency sirens blaring.}
|
20
|
+
--sillyBoundary
|
21
|
+
Content-Disposition: form-data; name="upload"; filename=""
|
22
|
+
Content-Type: application/octet-stream
|
23
|
+
|
24
|
+
|
25
|
+
--sillyBoundary
|
26
|
+
Content-Disposition: form-data; name="upload"; filename=""
|
27
|
+
Content-Type: application/octet-stream
|
28
|
+
|
29
|
+
|
30
|
+
--sillyBoundary
|
31
|
+
Content-Disposition: form-data; name="upload"; filename=""
|
32
|
+
Content-Type: application/octet-stream
|
33
|
+
|
34
|
+
|
35
|
+
--sillyBoundary
|
36
|
+
Content-Disposition: form-data; name="upload"; filename=""
|
37
|
+
Content-Type: application/octet-stream
|
38
|
+
|
39
|
+
|
40
|
+
--sillyBoundary
|
41
|
+
Content-Disposition: form-data; name="namespace"
|
42
|
+
|
43
|
+
testing
|
44
|
+
--sillyBoundary
|
45
|
+
Content-Disposition: form-data; name="rating"
|
46
|
+
|
47
|
+
5
|
48
|
+
--sillyBoundary--
|
@@ -0,0 +1,12 @@
|
|
1
|
+
--sillyBoundary
|
2
|
+
Content-Disposition: form-data; name="namespace"
|
3
|
+
|
4
|
+
testing
|
5
|
+
--sillyBoundary
|
6
|
+
Content-Disposition: form-data; name="rating"
|
7
|
+
|
8
|
+
5
|
9
|
+
--sillyBoundary
|
10
|
+
Content-Disposition: form-data; name="x-livejournal-entry"
|
11
|
+
|
12
|
+
I am truncated. So sad...
|
data/spec/lib/helpers.rb
CHANGED
@@ -71,6 +71,22 @@ module Strelka::SpecHelpers
|
|
71
71
|
end
|
72
72
|
|
73
73
|
|
74
|
+
### Create a temporary working directory and return
|
75
|
+
### a Pathname object for it.
|
76
|
+
###
|
77
|
+
def make_tempdir
|
78
|
+
dirname = "%s.%d.%0.4f" % [
|
79
|
+
'strelka_spec',
|
80
|
+
Process.pid,
|
81
|
+
(Time.now.to_f % 3600),
|
82
|
+
]
|
83
|
+
tempdir = Pathname.new( Dir.tmpdir ) + dirname
|
84
|
+
tempdir.mkpath
|
85
|
+
|
86
|
+
return tempdir
|
87
|
+
end
|
88
|
+
|
89
|
+
|
74
90
|
#
|
75
91
|
# Matchers
|
76
92
|
#
|
@@ -250,12 +266,10 @@ RSpec.configure do |c|
|
|
250
266
|
c.mock_with( :rspec )
|
251
267
|
|
252
268
|
c.extend( Strelka::TestConstants )
|
253
|
-
|
254
|
-
c.include( Strelka::TestConstants )
|
269
|
+
|
255
270
|
c.include( Loggability::SpecHelpers )
|
256
271
|
c.include( Mongrel2::SpecHelpers )
|
257
272
|
c.include( Strelka::SpecHelpers )
|
258
|
-
# c.include( Strelka::Matchers )
|
259
273
|
end
|
260
274
|
|
261
275
|
# vim: set nosta noet ts=4 sw=4:
|
data/spec/strelka/app_spec.rb
CHANGED
@@ -377,6 +377,17 @@ describe Strelka::App do
|
|
377
377
|
end
|
378
378
|
end
|
379
379
|
|
380
|
+
it "closes async uploads with a 413 Request Entity Too Large by default" do
|
381
|
+
@req.headers.x_mongrel2_upload_start = 'an/uploaded/file/path'
|
382
|
+
|
383
|
+
app = @app.new
|
384
|
+
app.conn.should_receive( :reply ).with( an_instance_of(Strelka::HTTPResponse) )
|
385
|
+
app.conn.should_receive( :reply_close ).with( @req )
|
386
|
+
|
387
|
+
res = app.handle_async_upload_start( @req )
|
388
|
+
|
389
|
+
res.should be_nil()
|
390
|
+
end
|
380
391
|
|
381
392
|
describe "process name" do
|
382
393
|
|
data/spec/strelka/mixins_spec.rb
CHANGED
@@ -197,6 +197,11 @@ describe Strelka, "mixins" do
|
|
197
197
|
Strelka::DataUtilities.deep_copy( :a_symbol ).should be( :a_symbol )
|
198
198
|
end
|
199
199
|
|
200
|
+
it "doesn't try to dup modules/classes" do
|
201
|
+
klass = Class.new
|
202
|
+
Strelka::DataUtilities.deep_copy( klass ).should be( klass )
|
203
|
+
end
|
204
|
+
|
200
205
|
it "makes distinct copies of arrays and their members" do
|
201
206
|
original = [ 'foom', Set.new([ 1,2 ]), :a_symbol ]
|
202
207
|
|
@@ -0,0 +1,169 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#encoding: utf-8
|
3
|
+
|
4
|
+
BEGIN {
|
5
|
+
require 'pathname'
|
6
|
+
basedir = Pathname.new( __FILE__ ).dirname.parent.parent
|
7
|
+
$LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir )
|
8
|
+
}
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
require 'rspec'
|
12
|
+
|
13
|
+
require 'spec/lib/helpers'
|
14
|
+
|
15
|
+
require 'strelka'
|
16
|
+
require 'strelka/multipartparser'
|
17
|
+
|
18
|
+
|
19
|
+
#####################################################################
|
20
|
+
### C O N T E X T S
|
21
|
+
#####################################################################
|
22
|
+
describe Strelka::MultipartParser do
|
23
|
+
|
24
|
+
BOUNDARY = 'sillyBoundary'
|
25
|
+
MIMEPARSER_SPECDIR = Pathname.new( __FILE__ ).dirname.parent
|
26
|
+
MIMEPARSER_DATADIR = MIMEPARSER_SPECDIR + 'data/forms'
|
27
|
+
|
28
|
+
|
29
|
+
### Create a stub request prepopulated with HTTP headers and form data
|
30
|
+
def load_form( filename )
|
31
|
+
datafile = MIMEPARSER_DATADIR + filename
|
32
|
+
return datafile.open( 'r', encoding: 'ascii-8bit' )
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
before( :all ) do
|
37
|
+
setup_logging( :fatal )
|
38
|
+
@tmpdir = make_tempdir()
|
39
|
+
end
|
40
|
+
|
41
|
+
after( :all ) do
|
42
|
+
reset_logging()
|
43
|
+
FileUtils.rm_rf( @tmpdir )
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
before( :each ) do
|
48
|
+
described_class.configure( spooldir: @tmpdir, bufsize: 4096 )
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
it "should error if the initial boundary can't be found" do
|
53
|
+
socket = load_form( "testform_bad.form" )
|
54
|
+
parser = described_class.new( socket, BOUNDARY )
|
55
|
+
|
56
|
+
expect {
|
57
|
+
parser.parse
|
58
|
+
}.to raise_error( Strelka::ParseError, /^No initial boundary/ )
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should error if headers can't be found" do
|
62
|
+
socket = load_form( "testform_badheaders.form" )
|
63
|
+
parser = described_class.new( socket, BOUNDARY )
|
64
|
+
|
65
|
+
expect {
|
66
|
+
parser.parse
|
67
|
+
}.to raise_error( Strelka::ParseError, /^EOF while searching for headers/ )
|
68
|
+
end
|
69
|
+
|
70
|
+
it "raises an error when the document is truncated inside a form field" do
|
71
|
+
socket = load_form( "testform_truncated_metadata.form" )
|
72
|
+
parser = described_class.new( socket, BOUNDARY )
|
73
|
+
|
74
|
+
expect {
|
75
|
+
parser.parse
|
76
|
+
}.to raise_error( Strelka::ParseError, /EOF while scanning/i )
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
it "parses form fields" do
|
81
|
+
socket = load_form( "testform_metadataonly.form" )
|
82
|
+
parser = described_class.new( socket, BOUNDARY )
|
83
|
+
|
84
|
+
params = parser.parse
|
85
|
+
|
86
|
+
params.should have( 5 ).keys
|
87
|
+
params.keys.should include( 'x-livejournal-entry' )
|
88
|
+
params['velour-fog'].should =~ /Sweet, sweet canday/i
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
it "parses the file from a simple upload" do
|
93
|
+
socket = load_form( "singleupload.form" )
|
94
|
+
parser = described_class.new( socket, BOUNDARY )
|
95
|
+
params = parser.parse
|
96
|
+
|
97
|
+
file = params['upload']
|
98
|
+
|
99
|
+
file.should be_a( Tempfile )
|
100
|
+
file.filename.should == 'testfile.rtf'
|
101
|
+
file.content_length.should == 480
|
102
|
+
file.content_type.should == 'application/rtf'
|
103
|
+
|
104
|
+
file.open
|
105
|
+
file.read.should =~ /screaming.+anguish.+sirens/
|
106
|
+
end
|
107
|
+
|
108
|
+
it "strips full paths from upload filenames (e.g., from MSIE)" do
|
109
|
+
socket = load_form( "testform_msie.form" )
|
110
|
+
parser = described_class.new( socket, BOUNDARY )
|
111
|
+
params = parser.parse
|
112
|
+
|
113
|
+
file = params['upload']
|
114
|
+
|
115
|
+
file.should be_a( Tempfile )
|
116
|
+
file.filename.should == 'testfile.rtf'
|
117
|
+
file.content_length.should == 480
|
118
|
+
file.content_type.should == 'application/rtf'
|
119
|
+
|
120
|
+
file.open
|
121
|
+
file.read.should =~ /screaming.+anguish.+sirens/
|
122
|
+
end
|
123
|
+
|
124
|
+
it "parses a mix of uploaded files and form data" do
|
125
|
+
socket = load_form( "testform_multivalue.form" )
|
126
|
+
parser = described_class.new( socket, BOUNDARY )
|
127
|
+
params = parser.parse
|
128
|
+
|
129
|
+
params['pork'].should be_an_instance_of( Array )
|
130
|
+
params['pork'].should have( 2 ).members
|
131
|
+
params['pork'].should include( 'zoot' )
|
132
|
+
params['pork'].should include( 'fornk' )
|
133
|
+
|
134
|
+
params['namespace'].should == 'testing'
|
135
|
+
params['rating'].should == '5'
|
136
|
+
|
137
|
+
file = params['upload']
|
138
|
+
|
139
|
+
file.should be_an_instance_of( Tempfile )
|
140
|
+
file.filename.should == 'testfile.rtf'
|
141
|
+
file.content_length.should == 480
|
142
|
+
file.content_type.should == 'application/rtf'
|
143
|
+
|
144
|
+
file.open
|
145
|
+
file.read.should =~ /screaming.+anguish.+sirens/
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
JPEG_MAGIC = "\xff\xd8".force_encoding( 'ascii-8bit' )
|
150
|
+
|
151
|
+
it "parses the files from multiple uploads" do
|
152
|
+
socket = load_form( "2_images.form" )
|
153
|
+
parser = described_class.new( socket, BOUNDARY )
|
154
|
+
params = parser.parse
|
155
|
+
|
156
|
+
file1, file2 = params['thingfish-upload']
|
157
|
+
|
158
|
+
file1.filename.should == 'Photo 3.jpg'
|
159
|
+
file2.filename.should == 'grass2.jpg'
|
160
|
+
|
161
|
+
file1.content_type.should == 'image/jpeg'
|
162
|
+
file2.content_type.should == 'image/jpeg'
|
163
|
+
|
164
|
+
file1.content_length.should == 82143
|
165
|
+
file2.content_length.should == 439257
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strelka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.pre.
|
4
|
+
version: 0.0.1.pre.279
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,16 +36,16 @@ cert_chain:
|
|
36
36
|
YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
|
37
37
|
Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
|
38
38
|
cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
-
date: 2012-
|
39
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: configurability
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1.
|
48
|
+
version: '1.2'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -53,15 +53,15 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '1.
|
56
|
+
version: '1.2'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
58
|
+
name: foreman
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
none: false
|
61
61
|
requirements:
|
62
62
|
- - ~>
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
64
|
+
version: '0.47'
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,15 +69,15 @@ dependencies:
|
|
69
69
|
requirements:
|
70
70
|
- - ~>
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '0.47'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
|
-
name:
|
74
|
+
name: formvalidator
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
none: false
|
77
77
|
requirements:
|
78
78
|
- - ~>
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '1
|
80
|
+
version: '0.1'
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -85,15 +85,15 @@ dependencies:
|
|
85
85
|
requirements:
|
86
86
|
- - ~>
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1
|
88
|
+
version: '0.1'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
90
|
+
name: highline
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
none: false
|
93
93
|
requirements:
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.6'
|
97
97
|
type: :runtime
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -101,7 +101,7 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - ~>
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '1.6'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: inversion
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
requirements:
|
110
110
|
- - ~>
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '0.
|
112
|
+
version: '0.11'
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,15 +117,15 @@ dependencies:
|
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '0.
|
120
|
+
version: '0.11'
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
|
-
name:
|
122
|
+
name: loggability
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
none: false
|
125
125
|
requirements:
|
126
126
|
- - ~>
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0.
|
128
|
+
version: '0.4'
|
129
129
|
type: :runtime
|
130
130
|
prerelease: false
|
131
131
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -133,15 +133,15 @@ dependencies:
|
|
133
133
|
requirements:
|
134
134
|
- - ~>
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '0.
|
136
|
+
version: '0.4'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
|
-
name:
|
138
|
+
name: mongrel2
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
144
|
+
version: '0.28'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -149,9 +149,9 @@ dependencies:
|
|
149
149
|
requirements:
|
150
150
|
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '0.28'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: pluginfactory
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
none: false
|
157
157
|
requirements:
|
@@ -167,7 +167,7 @@ dependencies:
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '1.0'
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
|
-
name:
|
170
|
+
name: sysexits
|
171
171
|
requirement: !ruby/object:Gem::Requirement
|
172
172
|
none: false
|
173
173
|
requirements:
|
@@ -183,13 +183,13 @@ dependencies:
|
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '1.0'
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
|
-
name:
|
186
|
+
name: trollop
|
187
187
|
requirement: !ruby/object:Gem::Requirement
|
188
188
|
none: false
|
189
189
|
requirements:
|
190
190
|
- - ~>
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version: '
|
192
|
+
version: '1.16'
|
193
193
|
type: :runtime
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -197,15 +197,15 @@ dependencies:
|
|
197
197
|
requirements:
|
198
198
|
- - ~>
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
200
|
+
version: '1.16'
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
|
-
name:
|
202
|
+
name: uuidtools
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ~>
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
208
|
+
version: '2.1'
|
209
209
|
type: :runtime
|
210
210
|
prerelease: false
|
211
211
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -213,7 +213,7 @@ dependencies:
|
|
213
213
|
requirements:
|
214
214
|
- - ~>
|
215
215
|
- !ruby/object:Gem::Version
|
216
|
-
version: '
|
216
|
+
version: '2.1'
|
217
217
|
- !ruby/object:Gem::Dependency
|
218
218
|
name: hoe-mercurial
|
219
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -364,12 +364,12 @@ files:
|
|
364
364
|
- contrib/hoetemplate/data/project/templates/top.tmpl.erb
|
365
365
|
- contrib/hoetemplate/lib/file_name.rb.erb
|
366
366
|
- contrib/hoetemplate/spec/file_name_spec.rb.erb
|
367
|
-
- examples/.env
|
368
367
|
- examples/Procfile
|
369
368
|
- examples/apps/auth-demo
|
370
369
|
- examples/apps/auth-demo2
|
371
370
|
- examples/apps/hello-world
|
372
371
|
- examples/apps/sessions-demo
|
372
|
+
- examples/apps/upload-demo
|
373
373
|
- examples/config.yml
|
374
374
|
- examples/gen-config.rb
|
375
375
|
- examples/static/examples.css
|
@@ -377,6 +377,8 @@ files:
|
|
377
377
|
- examples/templates/auth-form.tmpl
|
378
378
|
- examples/templates/auth-success.tmpl
|
379
379
|
- examples/templates/layout.tmpl
|
380
|
+
- examples/templates/upload-form.tmpl
|
381
|
+
- examples/templates/upload-success.tmpl
|
380
382
|
- lib/strelka.rb
|
381
383
|
- lib/strelka/app.rb
|
382
384
|
- lib/strelka/app/auth.rb
|
@@ -405,6 +407,7 @@ files:
|
|
405
407
|
- lib/strelka/httpresponse/negotiation.rb
|
406
408
|
- lib/strelka/httpresponse/session.rb
|
407
409
|
- lib/strelka/mixins.rb
|
410
|
+
- lib/strelka/multipartparser.rb
|
408
411
|
- lib/strelka/paramvalidator.rb
|
409
412
|
- lib/strelka/plugins.rb
|
410
413
|
- lib/strelka/router.rb
|
@@ -414,6 +417,15 @@ files:
|
|
414
417
|
- lib/strelka/session/db.rb
|
415
418
|
- lib/strelka/session/default.rb
|
416
419
|
- spec/data/error.tmpl
|
420
|
+
- spec/data/forms/2_images.form
|
421
|
+
- spec/data/forms/singleupload.form
|
422
|
+
- spec/data/forms/testform.form
|
423
|
+
- spec/data/forms/testform_bad.form
|
424
|
+
- spec/data/forms/testform_badheaders.form
|
425
|
+
- spec/data/forms/testform_metadataonly.form
|
426
|
+
- spec/data/forms/testform_msie.form
|
427
|
+
- spec/data/forms/testform_multivalue.form
|
428
|
+
- spec/data/forms/testform_truncated_metadata.form
|
417
429
|
- spec/data/layout.tmpl
|
418
430
|
- spec/data/main.tmpl
|
419
431
|
- spec/lib/constants.rb
|
@@ -443,6 +455,7 @@ files:
|
|
443
455
|
- spec/strelka/httpresponse/session_spec.rb
|
444
456
|
- spec/strelka/httpresponse_spec.rb
|
445
457
|
- spec/strelka/mixins_spec.rb
|
458
|
+
- spec/strelka/multipartparser_spec.rb
|
446
459
|
- spec/strelka/paramvalidator_spec.rb
|
447
460
|
- spec/strelka/plugins_spec.rb
|
448
461
|
- spec/strelka/router/default_spec.rb
|