serve 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
- == 0.9.0 (September 17, 2007)
1
+ == 0.9.1 (October 19, 2007)
2
+
3
+ * Added basic support for email mockups.
4
+ * Updated description and help text.
5
+
6
+ == 0.9.0 (September 25, 2007)
2
7
 
3
8
  * Initial release
data/README.txt CHANGED
@@ -1,8 +1,9 @@
1
1
  == What is Serve?
2
2
 
3
- Serve is a small Ruby script that makes it easy to start up an HTTP server
4
- in any directory. This is ideal for everything from HTML prototyping to simple
5
- file sharing.
3
+ Serve is a small Ruby script that makes it easy to start up a WEBrick server
4
+ in any directory. Serve is ideal for HTML prototyping and simple file sharing.
5
+ If the haml, redcloth, and bluecloth gems are installed serve can handle Haml,
6
+ Sass, Textile, and Markdown (in addition to HTML).
6
7
 
7
8
 
8
9
  == Usage
@@ -55,10 +56,10 @@ It is recommended that you install serve via RubyGems:
55
56
  == License
56
57
 
57
58
  Serve is released under the MIT license and is copyright (c) John W. Long.
58
- A copy of the MIT license can be found in the LICENSE.txt file.
59
+ A copy of the MIT license can be found in the License.txt file.
59
60
 
60
61
 
61
62
  Enjoy!
62
63
 
63
64
  --
64
- John Long :: http://wiseheartdesign.com
65
+ John Long :: http://wiseheartdesign.com
data/bin/serve CHANGED
@@ -41,7 +41,7 @@ when help
41
41
  puts " root set to the current working directory. By default the command uses "
42
42
  puts " 0.0.0.0 for the address and 3000 for the port. This means that once the "
43
43
  puts " command has been started you can access the documents in the current "
44
- puts " directory with any Web browser at"
44
+ puts " directory with any Web browser at:"
45
45
  puts " "
46
46
  puts " http://localhost:3000/"
47
47
  puts " "
data/config/hoe.rb CHANGED
@@ -2,7 +2,7 @@ require 'serve/version'
2
2
 
3
3
  AUTHOR = 'John W. Long' # can also be an array of Authors
4
4
  EMAIL = "me@johnwlong.com"
5
- DESCRIPTION = "Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. This is ideal for everything from HTML prototyping to simple file sharing."
5
+ DESCRIPTION = "Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. Serve is ideal for HTML prototyping and simple file sharing. If the haml, redcloth, and bluecloth gems are installed serve can handle Haml, Sass, Textile, and Markdown (in addition to HTML)."
6
6
  GEM_NAME = 'serve' # what ppl will type to install your gem
7
7
  RUBYFORGE_PROJECT = 'serve' # The unix name for your project
8
8
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
data/lib/serve.rb CHANGED
@@ -88,6 +88,28 @@ module Serve #:nodoc:
88
88
  end
89
89
  end
90
90
 
91
+ class EmailHandler < FileTypeHandler #:nodoc:
92
+ extension 'email'
93
+
94
+ def parse(string)
95
+ title = "E-mail"
96
+ title = $1 + " #{title}" if string =~ /^Subject:\s*(\S.*?)$/im
97
+ head, body = string.split("\n\n", 2)
98
+ output = []
99
+ output << "<html><head><title>#{title}</title></head>"
100
+ output << '<body style="font-family: Arial; line-height: 1.2em; font-size: 90%; margin: 0; padding: 0">'
101
+ output << '<div id="head" style="background-color: #E9F2FA; padding: 1em">'
102
+ head.each do |line|
103
+ key, value = line.split(":", 2).map { |a| a.strip }
104
+ output << "<div><strong>#{key}:</strong> #{value}</div>"
105
+ end
106
+ output << '</div><pre id="body" style="font-size: 110%; padding: 1em">'
107
+ output << body
108
+ output << '</pre></body></html>'
109
+ output.join("\n")
110
+ end
111
+ end
112
+
91
113
  class Server < WEBrick::HTTPServer #:nodoc:
92
114
  end
93
115
 
data/lib/serve/version.rb CHANGED
@@ -2,7 +2,7 @@ module Serve #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/tasks/website.rake CHANGED
@@ -1,9 +1,17 @@
1
- # stubs for the website generation
2
- # To install the website framework:
3
- # script/generate website
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
4
+ sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
5
+ end
6
+ end
4
7
 
5
- task :website_generate
8
+ desc 'Upload website files to rubyforge'
9
+ task :website_upload do
10
+ host = "#{rubyforge_username}@rubyforge.org"
11
+ remote_dir = "/var/www/gforge-projects/#{RUBYFORGE_PROJECT}/"
12
+ local_dir = 'website'
13
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
14
+ end
6
15
 
7
- task :website_upload
8
-
9
- task :website => :publish_docs
16
+ desc 'Generate and upload website files'
17
+ task :website => [:website_generate, :website_upload, :publish_docs]
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: serve
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.0
7
- date: 2007-09-25 00:00:00 -04:00
8
- summary: Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. This is ideal for everything from HTML prototyping to simple file sharing.
6
+ version: 0.9.1
7
+ date: 2007-10-19 00:00:00 -04:00
8
+ summary: Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. Serve is ideal for HTML prototyping and simple file sharing. If the haml, redcloth, and bluecloth gems are installed serve can handle Haml, Sass, Textile, and Markdown (in addition to HTML).
9
9
  require_paths:
10
10
  - lib
11
11
  email: me@johnwlong.com
12
12
  homepage: http://serve.rubyforge.org
13
13
  rubyforge_project: serve
14
- description: Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. This is ideal for everything from HTML prototyping to simple file sharing.
14
+ description: Serve is a small Ruby script that makes it easy to start up a WEBrick server in any directory. Serve is ideal for HTML prototyping and simple file sharing. If the haml, redcloth, and bluecloth gems are installed serve can handle Haml, Sass, Textile, and Markdown (in addition to HTML).
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
metadata.gz.sig CHANGED
Binary file