Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
amendments
Commits
c8e07c96
Commit
c8e07c96
authored
Mar 31, 2013
by
Michael Witrant
Browse files
added web server to run extraction
parent
b9e29983
Changes
3
Hide whitespace changes
Inline
Side-by-side
Gemfile
View file @
c8e07c96
...
...
@@ -4,3 +4,7 @@ gem "nokogiri"
gem
"
htmldiff
"
gem
"
zippy
"
gem
"
clik
"
gem
"
sinatra
"
gem
"
haml
"
gem
"
rb-inotify
"
gem
"
rerun
"
Gemfile.lock
View file @
c8e07c96
...
...
@@ -2,9 +2,25 @@ GEM
remote: http://rubygems.org/
specs:
clik (0.1.0)
ffi (1.6.0)
haml (4.0.1)
tilt
htmldiff (0.0.1)
listen (0.7.3)
nokogiri (1.5.9)
rack (1.5.2)
rack-protection (1.5.0)
rack
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rerun (0.8.0)
listen
rubyzip (0.9.9)
sinatra (1.4.2)
rack (~> 1.5, >= 1.5.2)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.3.6)
zippy (0.2.1)
rubyzip (>= 0.9.1)
...
...
@@ -13,6 +29,10 @@ PLATFORMS
DEPENDENCIES
clik
haml
htmldiff
nokogiri
rb-inotify
rerun
sinatra
zippy
server.rb
0 → 100755
View file @
c8e07c96
#!/usr/bin/env ruby
require
'rubygems'
require
'bundler/setup'
require
'sinatra'
require
'haml'
get
'/'
do
haml
:index
end
post
'/extract'
do
haml
:extract
,
locals:
{
result:
%x(ruby extract_amendments.rb
#{
params
[
'file'
][
:tempfile
].
path
}
)
}
end
__END__
@@ layout
%html
%body
= yield
@@ index
%form{action: "/extract", method: "POST", enctype: 'multipart/form-data'}
%input{type: "file", name: "file"}
%input{type: "submit"}
@@ extract
%pre= Rack::Utils.escape_html(result)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment