debian/0000755000000000000000000000000012153315245007167 5ustar debian/rules0000755000000000000000000000121612153314556010253 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby # need to start a socks daemon and an HTTP service to run the tests override_dh_auto_install: chmod +x debian/start_webrick_hpsockd_and_auto_install.sh debian/start_webrick_hpsockd_and_auto_install.sh debian/start_webrick_hpsockd_and_auto_install.sh0000755000000000000000000000141412153314774017512 0ustar #!/bin/sh # start hpsockd and webrick, inspired from ruby-mysql2 # It is in turn inspired by # debian/test_mysql.sh from libdbi-drivers source package. # It needs a socks proxy and an HTTP service to test. set -e CONFIG_FILE=debian/hpsockd.conf mkdir debian/tmp # Start webrick on 8082 /usr/bin/ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8082, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start" >debian/tmp/webrick.out 2>&1& echo "Sleeping 5 seconds for WEBrick to start..." sleep 5 # Start a hpsockd socks server /usr/sbin/hpsockd -c ${CONFIG_FILE} dh_auto_install # Stop webrick and hpsockd killall -9 hpsockd webrick_pid=`cat debian/tmp/webrick.out |grep pid| awk '{print $5}'|cut -d= -f2` kill -9 ${webrick_pid} # Cleanup rm -rf debian/tmp debian/copyright0000644000000000000000000000251012153314556011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: em-socksify Source: http://rubygems.og/gems/em-socksify Files: * Copyright: 2011 Ilya Grigorik License: Expat Files: debian/* Copyright: 2013 Praveen Arimbrathodiyil License: Expat License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/compat0000644000000000000000000000000212153314556010371 0ustar 7 debian/ruby-em-socksify.docs0000644000000000000000000000001212153314556013246 0ustar README.md debian/patches/0000755000000000000000000000000012153314556010622 5ustar debian/patches/remove-bundler.patch0000644000000000000000000000066212153314556014575 0ustar Description: Remove bundler and rubygems We will use apt to install dependencies. Dependencies will be added to debian/control. Author: Praveen Arimbrathodiyil Last-Update: 2013-06-04 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,4 +1,4 @@ -require 'rubygems' -require 'bundler/setup' +#require 'rubygems' +#require 'bundler/setup' -require 'em-socksify' \ No newline at end of file +require 'em-socksify' debian/patches/series0000644000000000000000000000005212153314556012034 0ustar remove-bundler.patch test-localhost.patch debian/patches/test-localhost.patch0000644000000000000000000000116612153314556014614 0ustar Description: Test HTTP service on localhost Debian build process cannot access internet. So test HTTP service on localhost instead. Author: Praveen Arimbrathodiyil Last-Update: 2013-06-04 --- a/spec/socksify_spec.rb +++ b/spec/socksify_spec.rb @@ -8,8 +8,8 @@ include EM::Socksify def connection_completed - socksify('google.ca', 80) do |ip| - send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: google.ca\r\n\r\n" + socksify('localhost', 8082) do |ip| + send_data "GET / HTTP/1.1\r\nConnection:close\r\nHost: localhost\r\n\r\n" end end debian/ruby-tests.rake0000644000000000000000000000022312153314556012155 0ustar require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = './spec/**/*_spec.rb' end task :default => :spec debian/changelog0000644000000000000000000000025312153315245011041 0ustar ruby-em-socksify (0.2.1-1) unstable; urgency=low * Initial release (Closes: #710043) -- Praveen Arimbrathodiyil Tue, 04 Jun 2013 13:05:40 +0530 debian/control0000644000000000000000000000212412153314556010575 0ustar Source: ruby-em-socksify Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Praveen Arimbrathodiyil Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.1~), hpsockd, rake, ruby-rspec, ruby-eventmachine (>=1.0~), procps, psmisc Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-em-socksify.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-em-socksify.git;a=summary Homepage: http://github.com/igrigorik/em-socksify XS-Ruby-Versions: all Package: ruby-em-socksify Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-eventmachine (>= 1.0~) Description: EventMachine SOCKSify shim: adds SOCKS support to any protocol Dealing with SOCKS proxies is pain. EM-Socksify provides a simple shim to setup & negotiate a SOCKS5 connection for any EventMachine protocol. To add SOCKS support, all you have to do is include the module and provide your destination address. debian/hpsockd.conf0000644000000000000000000000231412153314556011475 0ustar daemon { # name "sockd"; # listen-address { 0.0.0.0; }; directory "debian/tmp"; negotiate-file "hpsockd-negot_file"; # must be specified # inetdsec-file "/var/adm/inetd.sec"; # default is no inetd.sec # listen {1,252}; # client {1,200}; # pre-fork 1; # service "socks"; port 8080; # poll 1m; # user -2; user "nobody"; # dns-helper 1; # flags { }; }; logging { # facility "daemon"; # level 2; dump-prefix "sockd.dump"; # if not specified, you get no dumps usage-log "debian/tmp/hpsockd-usage.log"; # if not specified, you get no logging }; route { { default host }; # must have at least one route }; method-list { { number 0; name "noAuth"; internal; flags 0; }; { number 2; name "userPass"; internal; flags 0; }; { number 254; name "v4"; internal; flags 0; }; }; client-method { { src { 127.0.0.1; }; method { "userPass"; "v4"; "noAuth"; }; }; }; client { permit { # Let net @@MYNET@@ out src { 127.0.0.1; }; timeout 1h; }; deny { }; # nuke everyone else (default action) }; debian/watch0000644000000000000000000000015312153314556010223 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/em-socksify .*/em-socksify-(.*).tar.gz debian/ruby-em-socksify.lintian-overrides0000644000000000000000000000012512153314556015761 0ustar # Upstream does not provide a changelog file ruby-em-socksify: no-upstream-changelog debian/source/0000755000000000000000000000000012153314535010470 5ustar debian/source/format0000644000000000000000000000001412153314556011701 0ustar 3.0 (quilt)