statico 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.
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
@@ -0,0 +1,13 @@
1
+ # statico #
2
+
3
+ Hi, I'm [statico](https://github.com/filiptepper/statico "statico").
4
+ When you launch me I'll serve your static files on port 9000.
5
+
6
+ ## Usage ##
7
+
8
+ gem install statico
9
+
10
+ cd /my/directory/
11
+ statico
12
+
13
+ open 127.0.0.1:9090
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "statico/version"
4
+ require "logger"
5
+ require "goliath"
6
+
7
+ module Statico
8
+ class Server < Goliath::API
9
+ def initialize
10
+ @logger = Logger.new STDOUT
11
+ @logger.info "Hi! http://127.0.0.1/9000 is now available!"
12
+ super
13
+ end
14
+
15
+ use Rack::Static,
16
+ :root => Dir.pwd,
17
+ :urls => { "/" => "index.html" }
18
+
19
+ def on_headers(env, headers)
20
+ @logger.info env["REQUEST_URI"]
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module Statico
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "statico/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "statico"
7
+ s.version = Statico::VERSION
8
+ s.authors = ["Filip Tepper"]
9
+ s.email = ["filip@tepper.pl"]
10
+ s.homepage = "https://github.com/filiptepper/statico"
11
+ s.summary = %q{Ad-hoc HTTP Server}
12
+ s.description = %q{Ad-hoc HTTP Server for static files}
13
+
14
+ s.rubyforge_project = "statico"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency "rspec"
22
+ s.add_runtime_dependency "goliath"
23
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: statico
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Filip Tepper
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-23 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &2172936960 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *2172936960
25
+ - !ruby/object:Gem::Dependency
26
+ name: goliath
27
+ requirement: &2172936500 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *2172936500
36
+ description: Ad-hoc HTTP Server for static files
37
+ email:
38
+ - filip@tepper.pl
39
+ executables:
40
+ - statico
41
+ extensions: []
42
+ extra_rdoc_files: []
43
+ files:
44
+ - .gitignore
45
+ - Gemfile
46
+ - README.md
47
+ - Rakefile
48
+ - bin/statico
49
+ - lib/statico/version.rb
50
+ - statico.gemspec
51
+ homepage: https://github.com/filiptepper/statico
52
+ licenses: []
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ requirements: []
70
+ rubyforge_project: statico
71
+ rubygems_version: 1.8.6
72
+ signing_key:
73
+ specification_version: 3
74
+ summary: Ad-hoc HTTP Server
75
+ test_files: []