heel 3.0.1 → 3.0.2
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.
- checksums.yaml +15 -0
- data/{HISTORY.rdoc → HISTORY.md} +25 -18
- data/Manifest.txt +2 -3
- data/README.md +117 -0
- data/Rakefile +2 -0
- data/data/error.rhtml +27 -27
- data/data/listing.rhtml +41 -40
- data/lib/heel.rb +1 -1
- data/lib/heel/configuration.rb +1 -1
- data/lib/heel/error_response.rb +1 -1
- data/lib/heel/mime_map.rb +1 -1
- data/lib/heel/server.rb +0 -23
- data/tasks/default.rake +71 -12
- data/tasks/this.rb +15 -8
- metadata +21 -35
- data/README.rdoc +0 -117
- data/TODO +0 -2
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTBjMTliZGUxNDc1MDgwMWUwNjE2NzNmN2E3ODMxNjc3MmQzYTYzOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjIwMjA5ZjU5MWY2YWQzZmNhNzYzOTVhZjY0YjE1ODBiOTQyMTgxMg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YmEwMDIwNWJlNDIyMGM4MDIwYjllNTI1MTMxNjc1ZWJjMjkxYjM0OGJlM2Fm
|
10
|
+
NjhmOTkxYzZlMTg2MWE2YzMxZWI3YmExMWFkMjI0ZjFlYjRhNjczZDM2YmVi
|
11
|
+
NGJjYzQzNGNkOGY1YzkwMDQ2ZDk3OGEzMmRjODM0ODFmOWRhOWI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGEyYmQ2NTk1YzgyZmY2MWZlN2U4OTY2OTNjYzQ5YWQ5ZWZjNGQ4MmY4ODQw
|
14
|
+
ZTFmMjI2OTczNDNkNjlhNWE3ZDVlZmUyYTNiYTU4NzRkNWFiMjk0NWE0ZDIx
|
15
|
+
MDczNTAyMjQ0YjJmY2I4ZTBkYjkxNzBjYzM4MGU4YzZjMDg3YTg=
|
data/{HISTORY.rdoc → HISTORY.md}
RENAMED
@@ -1,5 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# Changelog
|
2
|
+
## Version 3.0.2 - 2013-03-13
|
3
|
+
|
4
|
+
* Fix generated pages to say they are utf-8 [#4]
|
5
|
+
* Fix formatting of usage section of documentation
|
6
|
+
* Update dependencies
|
7
|
+
* Convert to RDoc 4.0
|
8
|
+
|
9
|
+
## Version 3.0.1 - 2013-02-06
|
3
10
|
|
4
11
|
* Switch to using puma for the webserver
|
5
12
|
* Switch to using simplecov for coverage testing
|
@@ -7,85 +14,85 @@
|
|
7
14
|
* Update to fixme project template
|
8
15
|
* Convert to minitest
|
9
16
|
|
10
|
-
|
17
|
+
## Version 2.1.0 - 2011-03-17
|
11
18
|
|
12
19
|
* Update to Launchy 1.0.0
|
13
20
|
* Update to Thin 1.2.8
|
14
21
|
|
15
|
-
|
22
|
+
## Version 2.0.0 - 2009-06-24
|
16
23
|
|
17
24
|
* Change highlighting mode default to 'off' instead of 'on'
|
18
25
|
* Update for Thin 1.2.2
|
19
26
|
|
20
|
-
|
27
|
+
## Version 1.0.3 - 2009-03-02
|
21
28
|
|
22
29
|
* Update for MIME::Types 1.16
|
23
30
|
|
24
|
-
|
31
|
+
## Version 1.0.2 - 2008-12-03
|
25
32
|
|
26
33
|
* Fix FileType namespace issue (thanks defunkt) and new version of coderay
|
27
34
|
* various task maintenance
|
28
35
|
* updated version dependencies
|
29
36
|
|
30
|
-
|
37
|
+
## Version 1.0.1 - 2008-04-24
|
31
38
|
|
32
39
|
* Fix performance issue in serving large files
|
33
40
|
* Fix performance issue in checking for coderay file type when coderay would not be used.
|
34
41
|
|
35
|
-
|
42
|
+
## Version 1.0.0 - 2008-04-20
|
36
43
|
|
37
44
|
* Convert Heel to a Rack and Thin application
|
38
45
|
|
39
|
-
|
46
|
+
## Version 0.6.0 - 2007-11-21
|
40
47
|
|
41
48
|
* Fixed bug where an exception was thrown if a 0 byte file was served.
|
42
49
|
* Changed change 'resources' directory to 'data'
|
43
50
|
* Renamed internal constants
|
44
51
|
* Changed operating URL's to avoid conflict with directories heel may be serving
|
45
52
|
|
46
|
-
|
53
|
+
## Version 0.5.0 - 2007-11-19
|
47
54
|
|
48
55
|
* Add in code highlighting support via coderay
|
49
56
|
* extract CSS files to a resource
|
50
57
|
* increase test coverage
|
51
58
|
|
52
|
-
|
59
|
+
## Version 0.4.1 - 2007-11-15
|
53
60
|
|
54
61
|
* Fix bug [#15645] - not starting up on windows
|
55
62
|
|
56
|
-
|
63
|
+
## Version 0.4.0 - 2007-11-04
|
57
64
|
|
58
65
|
* Added common log format output to terminal or logfile as appropriate.
|
59
66
|
|
60
|
-
|
67
|
+
## Version 0.3.2 - 2007-08-30
|
61
68
|
|
62
69
|
* fix failure to find background option
|
63
70
|
* remember to double check your tests before releasing
|
64
71
|
|
65
|
-
|
72
|
+
## Version 0.3.1 - 2007-08-30
|
66
73
|
|
67
74
|
* fix failure to find pid file [Bug #13530]
|
68
75
|
* remember to stop releasing software in the wee hours of the morning
|
69
76
|
|
70
|
-
|
77
|
+
## Version 0.3.0 - 2007-08-30
|
71
78
|
|
72
79
|
* update with Launchy requirement 0.3.0
|
73
80
|
* remove unneeded famfamfam icons
|
74
81
|
* change default listening address to 127.0.0.1
|
75
82
|
* refactored handler test, now with more coverage
|
76
83
|
|
77
|
-
|
84
|
+
## Version 0.2.0 - 2007-08-11
|
78
85
|
|
79
86
|
* Initial public release
|
80
87
|
* Added daemonizing of server
|
81
88
|
* Added launching of browser to server URL
|
82
89
|
|
83
|
-
|
90
|
+
## Version 0.1.0
|
84
91
|
|
85
92
|
* rename project to 'heel'
|
86
93
|
* gem packaging
|
87
94
|
|
88
|
-
|
95
|
+
## Version 0.0.1 - 2007-05-03
|
89
96
|
|
90
97
|
* initial development release
|
91
98
|
|
data/Manifest.txt
CHANGED
data/README.md
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
## Heel
|
2
|
+
|
3
|
+
* [Homepage](http://github.com/copiousfreetime/heel/)
|
4
|
+
* [GitHub](http://github.com/copiousfreetime/heel/)
|
5
|
+
* email jeremy at hinegardner dot org
|
6
|
+
* `git clone git://github.com/copiousfreetime/heel.git`
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Heel is a small static web server for use when you need a quick web server for a
|
11
|
+
directory. Once the server is running, heel will use
|
12
|
+
[launchy](http://rubygems.org/gems/launchy/) to open your browser at
|
13
|
+
the URL of your document root.
|
14
|
+
|
15
|
+
Heel is built using [Rack](http://rack.github.com) and
|
16
|
+
[Puma](http://puma.io)
|
17
|
+
|
18
|
+
% heel
|
19
|
+
Launching your browser...
|
20
|
+
Puma 1.6.3 starting...
|
21
|
+
* Min threads: 0, max threads: 16
|
22
|
+
* Environment: deployment
|
23
|
+
* Listening on tcp://0.0.0.0:4331
|
24
|
+
|
25
|
+
Or run it in the background
|
26
|
+
|
27
|
+
% heel --daemonize
|
28
|
+
Launching your browser at http://0.0.0.0:4331/
|
29
|
+
|
30
|
+
% heel --kill
|
31
|
+
Sending TERM to process 3304
|
32
|
+
Done.
|
33
|
+
|
34
|
+
## FEATURES
|
35
|
+
|
36
|
+
* Automatic launching of your browser to the URL it is serving with [launchy](http://github.com/copiousfreetime/launchy/)
|
37
|
+
* Automatic syntax highlighting of source code files with [coderay](http://coderay.rubychan.de/)
|
38
|
+
* Run in the foreground or daemonized
|
39
|
+
* Bind to any address and port (default is 0.0.0.0:4331)
|
40
|
+
|
41
|
+
## SYNOPSIS:
|
42
|
+
|
43
|
+
Usage: heel [options]
|
44
|
+
|
45
|
+
-a, --address ADDRESS Address to bind to
|
46
|
+
(default: 0.0.0.0)
|
47
|
+
-d, --daemonize Run daemonized in the background
|
48
|
+
-h, --help Display this text
|
49
|
+
-k, --kill Kill an existing daemonized heel process
|
50
|
+
--[no-]highlighting Turn on or off syntax highlighting
|
51
|
+
(default: off)
|
52
|
+
--[no-]launch-browser Turn on or off automatic browser launch
|
53
|
+
(default: on)
|
54
|
+
-p, --port PORT Port to bind to
|
55
|
+
(default: 4331)
|
56
|
+
-r, --root ROOT Set the document root
|
57
|
+
(default: <current working directory>)
|
58
|
+
-v, --version Show version
|
59
|
+
|
60
|
+
## REQUIREMENTS:
|
61
|
+
|
62
|
+
### For running:
|
63
|
+
|
64
|
+
* [coderay](http://coderay.rubychan.de/)
|
65
|
+
* [launchy](http://copiousfreetime.rubyforge.org/launchy/) >= 0.1.1
|
66
|
+
* [mime-types](http://mime-types.rubyforge.org/)
|
67
|
+
* [puma](http://puma.io)
|
68
|
+
|
69
|
+
### For development:
|
70
|
+
|
71
|
+
* [minitest](http://rubygems.org/gems/minitest)
|
72
|
+
* [rake](http://rubygems.org/gems/rake)
|
73
|
+
* [rdoc](http://rubygems.org/gems/rdoc)
|
74
|
+
|
75
|
+
## INSTALL:
|
76
|
+
|
77
|
+
* `gem install heel`
|
78
|
+
|
79
|
+
## CREDITS:
|
80
|
+
|
81
|
+
* [puma](http://puma.io)
|
82
|
+
* [Rack](http://rack.rubyforge.org/)
|
83
|
+
* http://www.famfamfam.com/ for amazing icons
|
84
|
+
|
85
|
+
## BSD LICENSE:
|
86
|
+
|
87
|
+
Copyright (c) 2007 - 2013, Jeremy Hinegardner
|
88
|
+
|
89
|
+
All rights reserved.
|
90
|
+
|
91
|
+
Redistribution and use in source and binary forms, with or without
|
92
|
+
modification, are permitted provided that the following conditions are met:
|
93
|
+
|
94
|
+
* Redistributions of source code must retain the above copyright notice,
|
95
|
+
this list of conditions and the following disclaimer.
|
96
|
+
|
97
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
98
|
+
this list of conditions and the following disclaimer in the
|
99
|
+
documentation and/or other materials provided with the
|
100
|
+
distribution.
|
101
|
+
|
102
|
+
* Neither the name of Jeremy Hinegardner nor the
|
103
|
+
names of its contributors may be used to endorse or promote
|
104
|
+
products derived from this software without specific prior written
|
105
|
+
permission.
|
106
|
+
|
107
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
108
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
109
|
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
110
|
+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
111
|
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
112
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
113
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
114
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
115
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
116
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
117
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Rakefile
CHANGED
@@ -15,6 +15,8 @@ This.ruby_gemspec do |spec|
|
|
15
15
|
spec.add_development_dependency( 'rake' , '~> 10.0.3')
|
16
16
|
spec.add_development_dependency( 'minitest' , '~> 4.5.0' )
|
17
17
|
spec.add_development_dependency( 'rdoc' , '~> 3.12' )
|
18
|
+
|
19
|
+
spec.license = "BSD"
|
18
20
|
end
|
19
21
|
|
20
22
|
load 'tasks/default.rake'
|
data/data/error.rhtml
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
</div>
|
22
|
-
<b class="c4"></b><b class="c3"></b><b class="c2"></b><b class="c1"></b>
|
23
|
-
</div>
|
24
|
-
<div class="footer">
|
25
|
-
<a href="<%= homepage %>">heel</a>/v<%= ::Heel::VERSION %>
|
26
|
-
</div>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Error <%= status %> </title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<link rel="stylesheet" href="/heel_css/error.css" type="text/css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div class="wrap">
|
10
|
+
<div class="header">
|
11
|
+
Requested URL: <%= base_uri %>
|
12
|
+
</div>
|
13
|
+
<div class="curved">
|
14
|
+
<b class="c1"></b><b class="c2"></b><b class="c3"></b><b class="c4"></b>
|
15
|
+
<div class="box">
|
16
|
+
<div class="content">
|
17
|
+
<img src="/heel_icons/error.png" alt=""/><h1>Error <%= status %></h1>
|
18
|
+
<br />
|
19
|
+
<h2><%= message %></h2>
|
20
|
+
</div>
|
27
21
|
</div>
|
28
|
-
|
22
|
+
<b class="c4"></b><b class="c3"></b><b class="c2"></b><b class="c1"></b>
|
23
|
+
</div>
|
24
|
+
<div class="footer">
|
25
|
+
<a href="<%= homepage %>">heel</a>/v<%= ::Heel::VERSION %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</body>
|
29
29
|
</html>
|
data/data/listing.rhtml
CHANGED
@@ -1,41 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
</
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Index of <%= base_uri %></title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<link rel="stylesheet" href="/heel_css/listing.css" type="text/css" />
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div class="header">
|
10
|
+
<h1>Index of <%= base_uri %></h1>
|
11
|
+
</div>
|
12
|
+
<div class="content">
|
13
|
+
<table>
|
14
|
+
<caption>Directory Listing</caption>
|
15
|
+
<thead>
|
16
|
+
<tr><th class="n">File Name</th><th class="l" >Last Modified Timestamp</th><th class="m">File Size</th><th class="t">File Type</th></tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% entries.each_with_index do |entry,i| %>
|
20
|
+
<tr<%= i % 2 > 0 ? ' class="odd" ' : '' %>>
|
21
|
+
<td>
|
22
|
+
<% if entry.icon_url then %>
|
23
|
+
<img src="<%= entry.icon_url %>" width="16" height="16" alt="icon for type <%= entry.content_type %>" />
|
24
|
+
<% end %>
|
25
|
+
<a href="<%= "#{base_uri.chomp('/')}/#{entry.link}" %>"><%= entry.name %></a>
|
26
|
+
<% if highlighting? and entry.content_type != 'Directory' then %>
|
27
|
+
(<a href="<%= "#{base_uri.chomp('/')}/#{entry.link}?highlighting=false" %>">download</a>)
|
28
|
+
<% end %>
|
29
|
+
</td>
|
30
|
+
<td><%= entry.last_modified %></td>
|
31
|
+
<td class="<%= entry.content_type == "Directory" ? 'c' : 'n' %>" ><%= entry.size %></td>
|
32
|
+
<td><%= entry.content_type %></td>
|
33
|
+
</tr>
|
34
|
+
<% end %>
|
35
|
+
</tbody>
|
36
|
+
</table>
|
37
|
+
</div>
|
38
|
+
<div class="footer">
|
39
|
+
<a href="http://copiousfreetime.rubyforge.org/heel/">heel</a>/v<%= Heel::VERSION %>
|
40
|
+
</div>
|
41
|
+
</body>
|
41
42
|
</html>
|
data/lib/heel.rb
CHANGED
data/lib/heel/configuration.rb
CHANGED
data/lib/heel/error_response.rb
CHANGED
@@ -28,7 +28,7 @@ module Heel
|
|
28
28
|
|
29
29
|
def initialize(base_uri, body, status = 404, header = {})
|
30
30
|
header = header.merge( "Content-Type" => 'text/html' )
|
31
|
-
@response = Rack::Response.new(
|
31
|
+
@response = Rack::Response.new('', status, header )
|
32
32
|
@base_uri = base_uri
|
33
33
|
end
|
34
34
|
|
data/lib/heel/mime_map.rb
CHANGED
data/lib/heel/server.rb
CHANGED
@@ -254,29 +254,6 @@ module Heel
|
|
254
254
|
return server_thread
|
255
255
|
end
|
256
256
|
|
257
|
-
def start_server_old
|
258
|
-
server = Rack::Server.new( server_options )
|
259
|
-
server_thread = Thread.new do
|
260
|
-
if options.daemonize then
|
261
|
-
if cpid = fork then
|
262
|
-
# wait for the server to span and then move on to launching the
|
263
|
-
# browser
|
264
|
-
Process.waitpid( cpid )
|
265
|
-
else
|
266
|
-
server.start
|
267
|
-
end
|
268
|
-
else
|
269
|
-
begin
|
270
|
-
server.start
|
271
|
-
rescue RuntimeError
|
272
|
-
$stderr.puts "ERROR: Unable to start server. Heel may already be running. Please check running processes or run `heel --kill'"
|
273
|
-
exit 1
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
return server_thread
|
278
|
-
end
|
279
|
-
|
280
257
|
def server_options
|
281
258
|
{
|
282
259
|
:app => heel_app,
|
data/tasks/default.rake
CHANGED
@@ -56,6 +56,9 @@ begin
|
|
56
56
|
t.libs = %w[ lib spec ]
|
57
57
|
t.pattern = "spec/**/*_spec.rb"
|
58
58
|
end
|
59
|
+
|
60
|
+
task :test_requirements
|
61
|
+
task :test => :test_requirements
|
59
62
|
task :default => :test
|
60
63
|
rescue LoadError
|
61
64
|
This.task_warning( 'test' )
|
@@ -71,9 +74,10 @@ begin
|
|
71
74
|
RDoc::Task.new do |t|
|
72
75
|
t.markup = 'tomdoc'
|
73
76
|
t.rdoc_dir = 'doc'
|
74
|
-
t.main = 'README.
|
77
|
+
t.main = 'README.md'
|
75
78
|
t.title = "#{This.name} #{This.version}"
|
76
|
-
t.rdoc_files.include( '*.rdoc', '
|
79
|
+
t.rdoc_files.include( FileList['*.{rdoc,md,txt}'], FileList['ext/**/*.c'],
|
80
|
+
FileList['lib/**/*.rb'] )
|
77
81
|
end
|
78
82
|
rescue LoadError => le
|
79
83
|
This.task_warning( 'rdoc' )
|
@@ -146,18 +150,70 @@ end
|
|
146
150
|
#------------------------------------------------------------------------------
|
147
151
|
# Fixme - look for fixmes and report them
|
148
152
|
#------------------------------------------------------------------------------
|
149
|
-
|
150
|
-
task :
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
153
|
+
namespace :fixme do
|
154
|
+
task :default => 'manifest:check' do
|
155
|
+
This.manifest.each do |file|
|
156
|
+
next if file == __FILE__
|
157
|
+
next unless file =~ %r/(txt|rb|md|rdoc|css|html|xml|css)\Z/
|
158
|
+
puts "FIXME: Rename #{file}" if file =~ /fixme/i
|
159
|
+
IO.readlines( file ).each_with_index do |line, idx|
|
160
|
+
prefix = "FIXME: #{file}:#{idx+1}".ljust(42)
|
161
|
+
puts "#{prefix} => #{line.strip}" if line =~ /fixme/i
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def fixme_project_root
|
167
|
+
This.project_path( '../fixme' )
|
168
|
+
end
|
169
|
+
|
170
|
+
def fixme_project_path( subtree )
|
171
|
+
fixme_project_root.join( subtree )
|
172
|
+
end
|
173
|
+
|
174
|
+
def local_fixme_files
|
175
|
+
This.manifest.select { |p| p =~ %r|^tasks/| }
|
176
|
+
end
|
177
|
+
|
178
|
+
def outdated_fixme_files
|
179
|
+
local_fixme_files.reject do |local|
|
180
|
+
upstream = fixme_project_path( local )
|
181
|
+
Digest::SHA256.file( local ) == Digest::SHA256.file( upstream )
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def fixme_up_to_date?
|
186
|
+
outdated_fixme_files.empty?
|
187
|
+
end
|
188
|
+
|
189
|
+
desc "See if the fixme tools are outdated"
|
190
|
+
task :outdated => :release_check do
|
191
|
+
if fixme_up_to_date? then
|
192
|
+
puts "Fixme files are up to date."
|
193
|
+
else
|
194
|
+
outdated_fixme_files.each do |f|
|
195
|
+
puts "#{f} is outdated"
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
desc "Update outdated fixme files"
|
201
|
+
task :update => :release_check do
|
202
|
+
if fixme_up_to_date? then
|
203
|
+
puts "Fixme files are already up to date."
|
204
|
+
else
|
205
|
+
puts "Updating fixme files:"
|
206
|
+
outdated_fixme_files.each do |local|
|
207
|
+
upstream = fixme_project_path( local )
|
208
|
+
puts " * #{local}"
|
209
|
+
FileUtils.cp( upstream, local )
|
210
|
+
end
|
211
|
+
puts "Use your git commands as appropriate."
|
158
212
|
end
|
159
213
|
end
|
160
214
|
end
|
215
|
+
desc "Look for fixmes and report them"
|
216
|
+
task :fixme => "fixme:default"
|
161
217
|
|
162
218
|
#------------------------------------------------------------------------------
|
163
219
|
# Gem Specification
|
@@ -171,7 +227,10 @@ task :gemspec do
|
|
171
227
|
end
|
172
228
|
|
173
229
|
# the gemspec is also a dev artifact and should not be kept around.
|
174
|
-
CLOBBER << This.gemspec_file
|
230
|
+
CLOBBER << This.gemspec_file.to_s
|
231
|
+
|
232
|
+
# .rbc files from ruby 2.0
|
233
|
+
CLOBBER << FileList["**/*.rbc"]
|
175
234
|
|
176
235
|
# The standard gem packaging task, everyone has it.
|
177
236
|
require 'rubygems/package_task'
|
data/tasks/this.rb
CHANGED
@@ -25,7 +25,7 @@ class ThisProject
|
|
25
25
|
#
|
26
26
|
# Yields self
|
27
27
|
def initialize(&block)
|
28
|
-
@exclude_from_manifest = %r
|
28
|
+
@exclude_from_manifest = %r/\.(git|DS_Store)|^(doc|coverage|pkg|tmp)|Gemfile*|\.(gemspec|swp|jar|bundle|so|rvmrc)$|~$/
|
29
29
|
@gemspecs = Hash.new
|
30
30
|
yield self if block_given?
|
31
31
|
end
|
@@ -54,7 +54,7 @@ class ThisProject
|
|
54
54
|
#
|
55
55
|
# Retuns the text of the section as an array of paragrphs.
|
56
56
|
def section_of( file, section_name )
|
57
|
-
re =
|
57
|
+
re = /^[=#]+ (.*)$/
|
58
58
|
sectional = project_path( file )
|
59
59
|
parts = sectional.read.split( re )[1..-1]
|
60
60
|
parts.map! { |p| p.strip }
|
@@ -77,8 +77,8 @@ class ThisProject
|
|
77
77
|
# path - the relative path of the file from the project root
|
78
78
|
#
|
79
79
|
# Returns the Pathname of the file
|
80
|
-
def project_path( relative_path )
|
81
|
-
project_root.join( relative_path )
|
80
|
+
def project_path( *relative_path )
|
81
|
+
project_root.join( *relative_path )
|
82
82
|
end
|
83
83
|
|
84
84
|
# Internal: The absolute path of this file
|
@@ -110,9 +110,16 @@ class ThisProject
|
|
110
110
|
manifest_file.readlines.map { |l| l.strip }
|
111
111
|
end
|
112
112
|
|
113
|
+
# Internal: Return the files that define the extensions
|
114
|
+
#
|
115
|
+
# Returns an Array
|
116
|
+
def extension_conf_files
|
117
|
+
manifest.grep( /extconf.rb\Z/ )
|
118
|
+
end
|
119
|
+
|
113
120
|
# Internal: Returns the gemspace associated with the current ruby platform
|
114
121
|
def platform_gemspec
|
115
|
-
gemspecs
|
122
|
+
gemspecs[platform]
|
116
123
|
end
|
117
124
|
|
118
125
|
def core_gemspec
|
@@ -130,8 +137,8 @@ class ThisProject
|
|
130
137
|
spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
|
131
138
|
spec.test_files = spec.files.grep(/^spec/)
|
132
139
|
|
133
|
-
spec.extra_rdoc_files += spec.files.grep(/(txt|rdoc)$/)
|
134
|
-
spec.rdoc_options = [ "--main" , 'README.
|
140
|
+
spec.extra_rdoc_files += spec.files.grep(/(txt|rdoc|md)$/)
|
141
|
+
spec.rdoc_options = [ "--main" , 'README.md',
|
135
142
|
"--markup", "tomdoc" ]
|
136
143
|
end
|
137
144
|
end
|
@@ -180,7 +187,7 @@ class ThisProject
|
|
180
187
|
|
181
188
|
# Internal: Return the DESCRIPTION section of the README.rdoc file
|
182
189
|
def description_section
|
183
|
-
section_of( 'README.
|
190
|
+
section_of( 'README.md', 'DESCRIPTION')
|
184
191
|
end
|
185
192
|
|
186
193
|
# Internal: Return the summary text from the README
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeremy Hinegardner
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: puma
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: mime-types
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: launchy
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: coderay
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rake
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: minitest
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ~>
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ~>
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rdoc
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,35 +104,35 @@ dependencies:
|
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - ~>
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '3.12'
|
126
111
|
description: ! 'Heel is a small static web server for use when you need a quick web
|
127
|
-
server for a directory. Once the server is running, heel will use launchy
|
128
|
-
your browser at the URL of your document root. Heel is built using
|
129
|
-
heel
|
130
|
-
threads: 16
|
131
|
-
it in the background
|
132
|
-
heel --kill
|
112
|
+
server for a directory. Once the server is running, heel will use (http://rubygems.org/gems/launchy/)
|
113
|
+
to open your browser at the URL of your document root. Heel is built using (http://rack.github.com)
|
114
|
+
and (http://puma.io) % heel Launching your browser... Puma 1.6.3 starting... *
|
115
|
+
Min threads: 0, max threads: 16 * Environment: deployment * Listening on
|
116
|
+
tcp://0.0.0.0:4331 Or run it in the background % heel --daemonize Launching
|
117
|
+
your browser at http://0.0.0.0:4331/ % heel --kill Sending TERM to process
|
118
|
+
3304 Done.'
|
133
119
|
email: jeremy@copiousfreetime.org
|
134
120
|
executables:
|
135
121
|
- heel
|
136
122
|
extensions: []
|
137
123
|
extra_rdoc_files:
|
138
|
-
-
|
124
|
+
- CONTRIBUTING.md
|
125
|
+
- HISTORY.md
|
139
126
|
- Manifest.txt
|
140
|
-
- README.
|
127
|
+
- README.md
|
141
128
|
- data/famfamfam/readme.txt
|
142
129
|
files:
|
143
130
|
- CONTRIBUTING.md
|
144
|
-
- HISTORY.
|
131
|
+
- HISTORY.md
|
145
132
|
- LICENSE
|
146
133
|
- Manifest.txt
|
147
|
-
- README.
|
134
|
+
- README.md
|
148
135
|
- Rakefile
|
149
|
-
- TODO
|
150
136
|
- bin/heel
|
151
137
|
- data/css/coderay-alpha.css
|
152
138
|
- data/css/coderay-cycnus.css
|
@@ -186,34 +172,34 @@ files:
|
|
186
172
|
- tasks/default.rake
|
187
173
|
- tasks/this.rb
|
188
174
|
homepage: http://github.com/copiousfreetime/heel
|
189
|
-
licenses:
|
175
|
+
licenses:
|
176
|
+
- BSD
|
177
|
+
metadata: {}
|
190
178
|
post_install_message:
|
191
179
|
rdoc_options:
|
192
180
|
- --main
|
193
|
-
- README.
|
181
|
+
- README.md
|
194
182
|
- --markup
|
195
183
|
- tomdoc
|
196
184
|
require_paths:
|
197
185
|
- lib
|
198
186
|
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
-
none: false
|
200
187
|
requirements:
|
201
188
|
- - ! '>='
|
202
189
|
- !ruby/object:Gem::Version
|
203
190
|
version: '0'
|
204
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
192
|
requirements:
|
207
193
|
- - ! '>='
|
208
194
|
- !ruby/object:Gem::Version
|
209
195
|
version: '0'
|
210
196
|
requirements: []
|
211
197
|
rubyforge_project:
|
212
|
-
rubygems_version:
|
198
|
+
rubygems_version: 2.0.3
|
213
199
|
signing_key:
|
214
|
-
specification_version:
|
200
|
+
specification_version: 4
|
215
201
|
summary: Heel is a small static web server for use when you need a quick web server
|
216
|
-
for a directory. Once the server is running, heel will use
|
202
|
+
for a directory. Once the server is running, heel will use [launchy](http://rubygems.org/gems/launchy/)
|
217
203
|
to open your browser at the URL of your document root.
|
218
204
|
test_files:
|
219
205
|
- spec/configuration_spec.rb
|
data/README.rdoc
DELETED
@@ -1,117 +0,0 @@
|
|
1
|
-
== Heel
|
2
|
-
|
3
|
-
* Homepage[http://github.com/copiousfreetime/heel/]
|
4
|
-
* email jeremy at hinegardner dot org
|
5
|
-
* git clone git://github.com/copiousfreetime/heel.git
|
6
|
-
|
7
|
-
== DESCRIPTION
|
8
|
-
|
9
|
-
Heel is a small static web server for use when you need a quick web server for a
|
10
|
-
directory. Once the server is running, heel will use
|
11
|
-
{launchy}[http://rubygems.org/gems/launchy/] to open your browser at
|
12
|
-
the URL of your document root.
|
13
|
-
|
14
|
-
Heel is built using {Rack}[http://rack.github.com] and
|
15
|
-
{Puma}[http://puma.io]
|
16
|
-
|
17
|
-
% heel
|
18
|
-
Launching your browser...
|
19
|
-
Puma 1.6.3 starting...
|
20
|
-
* Min threads: 0, max threads: 16
|
21
|
-
* Environment: deployment
|
22
|
-
* Listening on tcp://0.0.0.0:4331
|
23
|
-
|
24
|
-
Or run it in the background
|
25
|
-
|
26
|
-
% heel --daemonize
|
27
|
-
Launching your browser at http://0.0.0.0:4331/
|
28
|
-
|
29
|
-
% heel --kill
|
30
|
-
Sending TERM to process 3304
|
31
|
-
Done.
|
32
|
-
|
33
|
-
== FEATURES
|
34
|
-
|
35
|
-
* Automatic launching of your browser to the URL it is serving with {launchy}[http://github.com/copiousfreetime/launchy/]
|
36
|
-
* Automatic syntax highlighting of source code files with {coderay}[http://coderay.rubychan.de/]
|
37
|
-
* Run in the foreground or daemonized
|
38
|
-
* Bind to any address and port (default is 0.0.0.0:4331)
|
39
|
-
|
40
|
-
== SYNOPSIS:
|
41
|
-
|
42
|
-
Usage: heel [options]
|
43
|
-
|
44
|
-
-a, --address ADDRESS Address to bind to
|
45
|
-
(default: 0.0.0.0)
|
46
|
-
-d, --daemonize Run daemonized in the background
|
47
|
-
-h, --help Display this text
|
48
|
-
-k, --kill Kill an existing daemonized heel process
|
49
|
-
--[no-]highlighting Turn on or off syntax highlighting
|
50
|
-
(default: off)
|
51
|
-
--[no-]launch-browser Turn on or off automatic browser launch
|
52
|
-
(default: on)
|
53
|
-
-p, --port PORT Port to bind to
|
54
|
-
(default: 4331)
|
55
|
-
-r, --root ROOT Set the document root
|
56
|
-
(default: current working directory)
|
57
|
-
-v, --version Show version
|
58
|
-
|
59
|
-
|
60
|
-
== REQUIREMENTS:
|
61
|
-
|
62
|
-
=== For running:
|
63
|
-
|
64
|
-
* {coderay}[http://coderay.rubychan.de/]
|
65
|
-
* {launchy}[http://copiousfreetime.rubyforge.org/launchy/] >= 0.1.1
|
66
|
-
* {mime-types}[http://mime-types.rubyforge.org/]
|
67
|
-
* {puma}[http://puma.io]
|
68
|
-
|
69
|
-
=== For development:
|
70
|
-
|
71
|
-
* {minitest}[http://rubygems.org/gems/minitest]
|
72
|
-
* {rake}[http://rubygems.org/gems/rake]
|
73
|
-
* {rdoc}[http://rubygems.org/gems/rdoc]
|
74
|
-
|
75
|
-
== INSTALL:
|
76
|
-
|
77
|
-
* gem install heel
|
78
|
-
|
79
|
-
== CREDITS:
|
80
|
-
|
81
|
-
* {puma}[http://puma.io]
|
82
|
-
* {Rack}[http://rack.rubyforge.org/]
|
83
|
-
* http://www.famfamfam.com/ for amazing icons
|
84
|
-
|
85
|
-
== BSD LICENSE:
|
86
|
-
|
87
|
-
Copyright (c) 2007 - 2013, Jeremy Hinegardner
|
88
|
-
|
89
|
-
All rights reserved.
|
90
|
-
|
91
|
-
Redistribution and use in source and binary forms, with or without
|
92
|
-
modification, are permitted provided that the following conditions are met:
|
93
|
-
|
94
|
-
* Redistributions of source code must retain the above copyright notice,
|
95
|
-
this list of conditions and the following disclaimer.
|
96
|
-
|
97
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
98
|
-
this list of conditions and the following disclaimer in the
|
99
|
-
documentation and/or other materials provided with the
|
100
|
-
distribution.
|
101
|
-
|
102
|
-
* Neither the name of Jeremy Hinegardner nor the
|
103
|
-
names of its contributors may be used to endorse or promote
|
104
|
-
products derived from this software without specific prior written
|
105
|
-
permission.
|
106
|
-
|
107
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
108
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
109
|
-
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
110
|
-
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
111
|
-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
112
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
113
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
114
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
115
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
116
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
117
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|