cgiup 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +26 -0
- data/bin/cgiup +20 -0
- metadata +65 -0
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Ryan Carmelo Briones <ryan.briones@brionesandco.com>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= cgiup
|
2
|
+
|
3
|
+
Party like it's 1999! Run your awesome Ruby CGI applications...err, scripts like Rack applications.
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
gem install cgiup
|
8
|
+
|
9
|
+
== Usage
|
10
|
+
|
11
|
+
cgiup /path/to/script.cgi
|
12
|
+
|
13
|
+
Starts a WEBrick HTTP server on http://localhost:2000 that runs the CGI script.
|
14
|
+
|
15
|
+
== Author
|
16
|
+
|
17
|
+
Ryan Carmelo Briones <ryan.briones@brionesandco.com>
|
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake/gempackagetask'
|
3
|
+
|
4
|
+
spec = Gem::Specification.new do |s|
|
5
|
+
s.name = 'cgiup'
|
6
|
+
s.version = '0.0.1'
|
7
|
+
s.summary = '"rackup" your CGI scripts!'
|
8
|
+
s.description = %Q{Party like it's 1999! Run your awesome Ruby CGI applications...err, scripts like Rack applications.}
|
9
|
+
s.homepage = 'http://github.com/ryanbriones/cgiup'
|
10
|
+
s.files = FileList['[A-Z]*', 'bin/cgiup']
|
11
|
+
s.executables = ['cgiup']
|
12
|
+
s.has_rdoc = false
|
13
|
+
s.author = 'Ryan Briones'
|
14
|
+
s.email = 'ryan.briones@brionesandco.com'
|
15
|
+
end
|
16
|
+
|
17
|
+
package_task = Rake::GemPackageTask.new(spec) {}
|
18
|
+
|
19
|
+
desc "Write out #{spec.name}.gemspec"
|
20
|
+
task :build_gemspec do
|
21
|
+
File.open("#{spec.name}.gemspec", "w") do |f|
|
22
|
+
f.write spec.to_ruby
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
task :default => [:build_gemspec, :gem]
|
data/bin/cgiup
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'webrick'
|
3
|
+
|
4
|
+
unless ARGV[0]
|
5
|
+
STDERR.puts "usage: cgiup [PATH TO CGI SCRIPT]"
|
6
|
+
exit 1
|
7
|
+
end
|
8
|
+
|
9
|
+
cgi_script = File.expand_path(ARGV[0])
|
10
|
+
|
11
|
+
unless File.exists?(cgi_script)
|
12
|
+
STDERR.puts "CGI Script: #{cgi_script} Not Found"
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
|
16
|
+
server = WEBrick::HTTPServer.new(:Port => 2000)
|
17
|
+
server.mount('/', WEBrick::HTTPServlet::CGIHandler, File.expand_path(ARGV[0]))
|
18
|
+
|
19
|
+
trap("INT"){ server.shutdown }
|
20
|
+
server.start
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cgiup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Ryan Briones
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-04-16 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Party like it's 1999! Run your awesome Ruby CGI applications...err, scripts like Rack applications.
|
22
|
+
email: ryan.briones@brionesandco.com
|
23
|
+
executables:
|
24
|
+
- cgiup
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
29
|
+
files:
|
30
|
+
- LICENSE
|
31
|
+
- Rakefile
|
32
|
+
- README.rdoc
|
33
|
+
- bin/cgiup
|
34
|
+
has_rdoc: true
|
35
|
+
homepage: http://github.com/ryanbriones/cgiup
|
36
|
+
licenses: []
|
37
|
+
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
version: "0"
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
requirements: []
|
58
|
+
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.3.6
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: "\"rackup\" your CGI scripts!"
|
64
|
+
test_files: []
|
65
|
+
|