autoreload 0.3.1 → 1.0.0
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.
- data/.gitignore +6 -0
- data/.ruby +31 -26
- data/.yardopts +5 -0
- data/Assembly +40 -0
- data/COPYING.rdoc +371 -12
- data/HISTORY.rdoc +40 -0
- data/MANIFEST +14 -0
- data/PROFILE +28 -0
- data/README.rdoc +31 -17
- data/Rakefile +9 -0
- data/VERSION +1 -0
- data/autoreload.gemspec +143 -0
- data/lib/autoreload.rb +3 -2
- data/lib/autoreload/reloader.rb +46 -33
- data/lib/autoreload/version.rb +1 -1
- data/site/assets/icon.png +0 -0
- data/site/assets/screen.css +149 -0
- data/site/index.html +135 -0
- data/site/index.page +80 -0
- data/site/template.layout +77 -0
- data/spec/autoreload_spec.rb +8 -29
- data/spec/helper.rb +29 -0
- data/spec/require_spec.rb +37 -0
- data/try/changeme.rb +5 -0
- data/try/start.rb +20 -0
- data/work/autoreload.rb +115 -0
- data/work/consider/autoreload.rb +115 -0
- data/work/deprecated/Changes.txt +56 -0
- data/work/deprecated/Rakefile +80 -0
- data/work/deprecated/default_task.rb +129 -0
- data/work/deprecated/lookup.rb +174 -0
- data/work/deprecated/meta/authors +2 -0
- data/work/deprecated/meta/description +3 -0
- data/work/deprecated/meta/name +1 -0
- data/work/deprecated/meta/summary +1 -0
- data/work/deprecated/meta/version +1 -0
- data/work/deprecated/scripts/lib-txt2html.rb +133 -0
- data/work/deprecated/scripts/makemanifest.rb +20 -0
- data/work/deprecated/scripts/txt2html +10 -0
- data/work/deprecated/setup.rb +1585 -0
- metadata +59 -30
- data/GPL3.txt +0 -674
- data/lib/autoreload/lookup.rb +0 -91
data/lib/autoreload/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,149 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #E1D1F1;
|
3
|
+
font-family: "Georgia", sans-serif;
|
4
|
+
font-size: 16px;
|
5
|
+
line-height: 1.6em;
|
6
|
+
padding: 1.6em 0 0 0;
|
7
|
+
color: #333;
|
8
|
+
}
|
9
|
+
h1, h2, h3, h4, h5, h6 {
|
10
|
+
color: #444;
|
11
|
+
}
|
12
|
+
h1 {
|
13
|
+
font-family: sans-serif;
|
14
|
+
font-weight: normal;
|
15
|
+
font-size: 3.7em;
|
16
|
+
line-height: 0.8em;
|
17
|
+
letter-spacing: -0.1ex;
|
18
|
+
margin: 0 5px 0 0;
|
19
|
+
padding: 10px 0 20px 0;
|
20
|
+
}
|
21
|
+
h2 {
|
22
|
+
margin-top: 40px;
|
23
|
+
}
|
24
|
+
pre {
|
25
|
+
border-radius: 8px;
|
26
|
+
}
|
27
|
+
li {
|
28
|
+
padding: 0;
|
29
|
+
margin: 0;
|
30
|
+
list-style-type: square;
|
31
|
+
}
|
32
|
+
a {
|
33
|
+
color: #5E5AFF;
|
34
|
+
background-color: #DAC;
|
35
|
+
font-weight: normal;
|
36
|
+
text-decoration: underline;
|
37
|
+
}
|
38
|
+
blockquote {
|
39
|
+
font-size: 90%;
|
40
|
+
font-style: italic;
|
41
|
+
border-left: 1px solid #111;
|
42
|
+
padding-left: 1em;
|
43
|
+
}
|
44
|
+
.caps {
|
45
|
+
font-size: 80%;
|
46
|
+
}
|
47
|
+
|
48
|
+
#main {
|
49
|
+
width: 45em;
|
50
|
+
padding: 0;
|
51
|
+
margin: 0 auto;
|
52
|
+
}
|
53
|
+
|
54
|
+
.coda {
|
55
|
+
text-align: right;
|
56
|
+
color: #77f;
|
57
|
+
font-size: smaller;
|
58
|
+
}
|
59
|
+
|
60
|
+
h1.title { font-weight: bold; font-size: 4em; }
|
61
|
+
|
62
|
+
table {
|
63
|
+
font-size: 90%;
|
64
|
+
line-height: 1.4em;
|
65
|
+
color: #ff8;
|
66
|
+
background-color: #111;
|
67
|
+
padding: 2px 10px 2px 10px;
|
68
|
+
border-style: dashed;
|
69
|
+
}
|
70
|
+
|
71
|
+
th {
|
72
|
+
color: #fff;
|
73
|
+
}
|
74
|
+
|
75
|
+
td {
|
76
|
+
padding: 2px 10px 2px 10px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.success {
|
80
|
+
color: #0CC52B;
|
81
|
+
}
|
82
|
+
|
83
|
+
.failed {
|
84
|
+
color: #E90A1B;
|
85
|
+
}
|
86
|
+
|
87
|
+
.unknown {
|
88
|
+
color: #995000;
|
89
|
+
}
|
90
|
+
pre, code {
|
91
|
+
font-family: monospace;
|
92
|
+
font-size: 90%;
|
93
|
+
line-height: 1.4em;
|
94
|
+
color: #ff8;
|
95
|
+
background-color: #111;
|
96
|
+
padding: 5px 10px 5px 10px;
|
97
|
+
}
|
98
|
+
.comment { color: #aaa; font-style: italic; }
|
99
|
+
.keyword { color: #eff; font-weight: bold; }
|
100
|
+
.punct { color: #eee; font-weight: bold; }
|
101
|
+
.symbol { color: #0bb; }
|
102
|
+
.string { color: #6b4; }
|
103
|
+
.ident { color: #ff8; }
|
104
|
+
.constant { color: #66f; }
|
105
|
+
.regex { color: #ec6; }
|
106
|
+
.number { color: #F99; }
|
107
|
+
.expr { color: #227; }
|
108
|
+
|
109
|
+
#version {
|
110
|
+
float: right;
|
111
|
+
text-align: right;
|
112
|
+
font-family: sans-serif;
|
113
|
+
font-weight: normal;
|
114
|
+
background-color: #B3ABFF;
|
115
|
+
color: #141331;
|
116
|
+
padding: 15px 20px 10px 20px;
|
117
|
+
margin: 0 auto;
|
118
|
+
margin-top: 15px;
|
119
|
+
border: 3px solid #141331;
|
120
|
+
border-radius: 12px;
|
121
|
+
}
|
122
|
+
|
123
|
+
#version .numbers {
|
124
|
+
display: block;
|
125
|
+
font-size: 4em;
|
126
|
+
line-height: 0.8em;
|
127
|
+
letter-spacing: -0.1ex;
|
128
|
+
margin-bottom: 15px;
|
129
|
+
}
|
130
|
+
|
131
|
+
#version p {
|
132
|
+
text-decoration: none;
|
133
|
+
color: #141331;
|
134
|
+
background-color: #B3ABFF;
|
135
|
+
margin: 0;
|
136
|
+
padding: 0;
|
137
|
+
}
|
138
|
+
|
139
|
+
#version a {
|
140
|
+
text-decoration: none;
|
141
|
+
color: #141331;
|
142
|
+
background-color: #B3ABFF;
|
143
|
+
}
|
144
|
+
|
145
|
+
.clickable {
|
146
|
+
cursor: pointer;
|
147
|
+
cursor: hand;
|
148
|
+
}
|
149
|
+
|
data/site/index.html
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<link rel="icon" type="image/png" href="assets/icon.png" />
|
5
|
+
<link rel="stylesheet" href="assets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>AutoReload</title>
|
8
|
+
<style>
|
9
|
+
#rubyworks{ position: fixed; bottom: 0; right: 3px; padding: 0; opacity: 0.2; }
|
10
|
+
</style>
|
11
|
+
<script type="text/javascript">
|
12
|
+
window.onload = function() {
|
13
|
+
settings = {
|
14
|
+
tl: { radius: 10 },
|
15
|
+
tr: { radius: 10 },
|
16
|
+
bl: { radius: 10 },
|
17
|
+
br: { radius: 10 },
|
18
|
+
antiAlias: true,
|
19
|
+
autoPad: true,
|
20
|
+
validTags: ["div"]
|
21
|
+
}
|
22
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
23
|
+
versionBox.applyCornersToAll();
|
24
|
+
}
|
25
|
+
</script>
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
|
29
|
+
<div id="main">
|
30
|
+
<h1 class="title">AutoReload</h1>
|
31
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubygems.org/gems/autoreload"; return false'>
|
32
|
+
<p>Get Version</p>
|
33
|
+
<a href="http://rubygems.org/gems/autoreload" class="numbers">1.0.0</a>
|
34
|
+
</div>
|
35
|
+
<h1>you don't have to restart your program</h1>
|
36
|
+
|
37
|
+
<h2>What Is It?</h2>
|
38
|
+
|
39
|
+
<p>Autoreload reloads libraries automatically at regular intervals
|
40
|
+
when files are updated.</p>
|
41
|
+
|
42
|
+
<h2>Installing</h2>
|
43
|
+
|
44
|
+
<pre syntax="ruby">$ gem install autoreload</pre>
|
45
|
+
|
46
|
+
|
47
|
+
<h2>The Basics</h2>
|
48
|
+
|
49
|
+
|
50
|
+
<pre class="ruby">
|
51
|
+
# foo.rb
|
52
|
+
def foo
|
53
|
+
1
|
54
|
+
end
|
55
|
+
</pre>
|
56
|
+
|
57
|
+
<pre class="ruby">
|
58
|
+
# sample1.rb
|
59
|
+
require 'autoreload'
|
60
|
+
|
61
|
+
autoreload(:interval=>1, :verbose=>true) do
|
62
|
+
require 'foo'
|
63
|
+
end
|
64
|
+
|
65
|
+
loop {
|
66
|
+
puts foo
|
67
|
+
sleep 1
|
68
|
+
}
|
69
|
+
</pre>
|
70
|
+
|
71
|
+
|
72
|
+
<p>In this situation, run the script <code>sample1.rb</code>. You see that the
|
73
|
+
number 1 is shown repeatedly. Then, while that is still running,
|
74
|
+
update the file <code>foo.rb</code>. For example, change the number 1 to 2
|
75
|
+
and save it. Then, the library automatically check the update
|
76
|
+
and reload it. You'll see the number 2 is shown.</p>
|
77
|
+
|
78
|
+
<h2>Documentation</h2>
|
79
|
+
|
80
|
+
<ul>
|
81
|
+
<li><a href="http://rubydoc.info/gems/autoreload/frames">RubyDoc.info</a></li>
|
82
|
+
</ul>
|
83
|
+
|
84
|
+
|
85
|
+
<h2>Repository</h2>
|
86
|
+
|
87
|
+
<p>This project is hosted on <a href="http://rubyworks.github.com/autoreload">GitHub.com</a>.</p>
|
88
|
+
|
89
|
+
<p>The repository is <code>git://github.com/rubyworks/autoreload.git</code>
|
90
|
+
for anonymous access.</p>
|
91
|
+
|
92
|
+
<h2>Copying</h2>
|
93
|
+
|
94
|
+
<p>(FreeBSD License)</p>
|
95
|
+
|
96
|
+
<p>Copyright (c) 2010 Thomas Sawyer</p>
|
97
|
+
|
98
|
+
<p>Copyright (c) 2003 Kouichirou Eto</p>
|
99
|
+
|
100
|
+
<h2>Contact</h2>
|
101
|
+
|
102
|
+
<p>Comments are welcome. Send an email to Trans "transfire <em>at</em> gmail <em>dot</em> org".</p>
|
103
|
+
|
104
|
+
<p>Autoreload is a <a href="http://rubyworks.github.com">RubyWorks</a> project.</p>
|
105
|
+
|
106
|
+
<p class="coda">
|
107
|
+
<a href="mailto:transfire@gmail.com">Trans</a>, 2011-07-15<br>
|
108
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
109
|
+
</p>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div style="margin: 40px auto; width: 730px;">
|
113
|
+
<script type="text/javascript"><!--
|
114
|
+
google_ad_client = "ca-pub-1126154564663472";
|
115
|
+
/* RUBYWORKS 09-10-02 728x90 */
|
116
|
+
google_ad_slot = "0788888658";
|
117
|
+
google_ad_width = 728;
|
118
|
+
google_ad_height = 90;
|
119
|
+
//-->
|
120
|
+
</script>
|
121
|
+
<script type="text/javascript"
|
122
|
+
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
123
|
+
</script>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
127
|
+
|
128
|
+
<div id="rubyworks">
|
129
|
+
<a href="http://rubyworks.github.com">
|
130
|
+
<img src="http://rubyworks.github.com/assets/images/seal.png" height="175px" />
|
131
|
+
</a>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</body>
|
135
|
+
</html>
|
data/site/index.page
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
layout: template
|
2
|
+
|
3
|
+
--- markdown
|
4
|
+
|
5
|
+
# you don't have to restart your program
|
6
|
+
|
7
|
+
|
8
|
+
## What Is It?
|
9
|
+
|
10
|
+
Autoreload reloads libraries automatically at regular intervals
|
11
|
+
when files are updated.
|
12
|
+
|
13
|
+
|
14
|
+
## Installing
|
15
|
+
|
16
|
+
<pre syntax="ruby">$ gem install autoreload</pre>
|
17
|
+
|
18
|
+
|
19
|
+
## The Basics
|
20
|
+
|
21
|
+
--- html
|
22
|
+
|
23
|
+
<pre class="ruby">
|
24
|
+
# foo.rb
|
25
|
+
def foo
|
26
|
+
1
|
27
|
+
end
|
28
|
+
</pre>
|
29
|
+
|
30
|
+
<pre class="ruby">
|
31
|
+
# sample1.rb
|
32
|
+
require 'autoreload'
|
33
|
+
|
34
|
+
autoreload(:interval=>1, :verbose=>true) do
|
35
|
+
require 'foo'
|
36
|
+
end
|
37
|
+
|
38
|
+
loop {
|
39
|
+
puts foo
|
40
|
+
sleep 1
|
41
|
+
}
|
42
|
+
</pre>
|
43
|
+
|
44
|
+
--- markdown
|
45
|
+
|
46
|
+
In this situation, run the script `sample1.rb`. You see that the
|
47
|
+
number 1 is shown repeatedly. Then, while that is still running,
|
48
|
+
update the file `foo.rb`. For example, change the number 1 to 2
|
49
|
+
and save it. Then, the library automatically check the update
|
50
|
+
and reload it. You'll see the number 2 is shown.
|
51
|
+
|
52
|
+
|
53
|
+
## Documentation
|
54
|
+
|
55
|
+
* [RubyDoc.info](http://rubydoc.info/gems/autoreload/frames)
|
56
|
+
|
57
|
+
|
58
|
+
## Repository
|
59
|
+
|
60
|
+
This project is hosted on [GitHub.com](http://rubyworks.github.com/autoreload).
|
61
|
+
|
62
|
+
The repository is <code>git://github.com/rubyworks/autoreload.git</code>
|
63
|
+
for anonymous access.
|
64
|
+
|
65
|
+
|
66
|
+
## Copying
|
67
|
+
|
68
|
+
(FreeBSD License)
|
69
|
+
|
70
|
+
Copyright (c) 2010 Thomas Sawyer
|
71
|
+
|
72
|
+
Copyright (c) 2003 Kouichirou Eto
|
73
|
+
|
74
|
+
|
75
|
+
## Contact
|
76
|
+
|
77
|
+
Comments are welcome. Send an email to Trans "transfire _at_ gmail _dot_ org".
|
78
|
+
|
79
|
+
Autoreload is a [RubyWorks](http://rubyworks.github.com) project.
|
80
|
+
|
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
stencil: erb
|
3
|
+
|
4
|
+
--- html
|
5
|
+
<%
|
6
|
+
require 'pom'
|
7
|
+
project = POM::Project.new('..')
|
8
|
+
version = project.version
|
9
|
+
title = project.metadata.title
|
10
|
+
download = project.metadata.resources.gem
|
11
|
+
%>
|
12
|
+
|
13
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
14
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
15
|
+
<head>
|
16
|
+
<link rel="icon" type="image/png" href="assets/icon.png" />
|
17
|
+
<link rel="stylesheet" href="assets/screen.css" type="text/css" media="screen" />
|
18
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
19
|
+
<title><%= title %></title>
|
20
|
+
<style>
|
21
|
+
#rubyworks{ position: fixed; bottom: 0; right: 3px; padding: 0; opacity: 0.2; }
|
22
|
+
</style>
|
23
|
+
<script type="text/javascript">
|
24
|
+
window.onload = function() {
|
25
|
+
settings = {
|
26
|
+
tl: { radius: 10 },
|
27
|
+
tr: { radius: 10 },
|
28
|
+
bl: { radius: 10 },
|
29
|
+
br: { radius: 10 },
|
30
|
+
antiAlias: true,
|
31
|
+
autoPad: true,
|
32
|
+
validTags: ["div"]
|
33
|
+
}
|
34
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
35
|
+
versionBox.applyCornersToAll();
|
36
|
+
}
|
37
|
+
</script>
|
38
|
+
</head>
|
39
|
+
<body>
|
40
|
+
|
41
|
+
<div id="main">
|
42
|
+
<h1 class="title"><%= title %></h1>
|
43
|
+
<div id="version" class="clickable" onclick='document.location = "<%= download %>"; return false'>
|
44
|
+
<p>Get Version</p>
|
45
|
+
<a href="<%= download %>" class="numbers"><%= version %></a>
|
46
|
+
</div>
|
47
|
+
<%= yield %>
|
48
|
+
<p class="coda">
|
49
|
+
<a href="mailto:transfire@gmail.com">Trans</a>, <%= Time.now.strftime("%Y-%m-%d") %><br>
|
50
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
51
|
+
</p>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div style="margin: 40px auto; width: 730px;">
|
55
|
+
<script type="text/javascript"><!--
|
56
|
+
google_ad_client = "ca-pub-1126154564663472";
|
57
|
+
/* RUBYWORKS 09-10-02 728x90 */
|
58
|
+
google_ad_slot = "0788888658";
|
59
|
+
google_ad_width = 728;
|
60
|
+
google_ad_height = 90;
|
61
|
+
//-->
|
62
|
+
</script>
|
63
|
+
<script type="text/javascript"
|
64
|
+
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
65
|
+
</script>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
69
|
+
|
70
|
+
<div id="rubyworks">
|
71
|
+
<a href="http://rubyworks.github.com">
|
72
|
+
<img src="http://rubyworks.github.com/assets/images/seal.png" height="175px" />
|
73
|
+
</a>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
</body>
|
77
|
+
</html>
|