├── .gitignore ├── Gemfile ├── Rakefile ├── asdf.gemspec ├── bin └── asdf └── lib ├── asdf.rb └── asdf └── version.rb /.gitignore: -------------------------------------------------------------------------------- 1 | pkg/* 2 | *.gem -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source :gemcutter 2 | 3 | # Specify your gem's dependencies in asdf.gemspec 4 | gemspec -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler' 2 | Bundler::GemHelper.install_tasks 3 | -------------------------------------------------------------------------------- /asdf.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $LOAD_PATH.unshift File.expand_path('../lib', __FILE__) 3 | require 'asdf/version' 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "asdf" 7 | s.version = Asdf::VERSION 8 | s.platform = Gem::Platform::RUBY 9 | s.authors = ["Yehuda Katz"] 10 | s.email = ["wycats@gmail.com"] 11 | s.homepage = "http://github.com/wycats/asdf" 12 | s.summary = "Make the current directory available on port 9292" 13 | s.description = "Use Rack::Directory to rackup the current directory on port 9292 for availability in a browser" 14 | 15 | s.required_rubygems_version = ">= 1.3.6" 16 | s.rubyforge_project = "asdf" 17 | 18 | s.add_runtime_dependency "rack", "~> 1.2.1" 19 | s.add_development_dependency "bundler", ">= 1.0.0.rc.5" 20 | 21 | s.files = `git ls-files`.split("\n") 22 | s.executables = `git ls-files`.split("\n").map { |f| p f; f[%r{^bin/(.*)}, 1] }.compact 23 | s.require_path = 'lib' 24 | end 25 | -------------------------------------------------------------------------------- /bin/asdf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "asdf" 4 | Asdf::Server.new.start 5 | -------------------------------------------------------------------------------- /lib/asdf.rb: -------------------------------------------------------------------------------- 1 | require "rack" 2 | require "asdf/version" 3 | 4 | module Asdf 5 | class Server < ::Rack::Server 6 | def app 7 | Rack::Directory.new(Dir.pwd) 8 | end 9 | end 10 | end 11 | 12 | -------------------------------------------------------------------------------- /lib/asdf/version.rb: -------------------------------------------------------------------------------- 1 | module Asdf 2 | VERSION = "0.5.0" 3 | end 4 | --------------------------------------------------------------------------------