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/lookup.rb
DELETED
@@ -1,91 +0,0 @@
|
|
1
|
-
module AutoReload
|
2
|
-
|
3
|
-
# = Library Lookup
|
4
|
-
#
|
5
|
-
# This library is a slightly modified copy of the +plugin+ library.
|
6
|
-
#
|
7
|
-
module Lookup
|
8
|
-
|
9
|
-
extend self
|
10
|
-
|
11
|
-
# Find plugins, searching through standard $LOAD_PATH,
|
12
|
-
# Roll Libraries and RubyGems.
|
13
|
-
#
|
14
|
-
# Provide a +match+ file glob to find plugins.
|
15
|
-
#
|
16
|
-
# Lookup.find('syckle/*')
|
17
|
-
#
|
18
|
-
def find(match, options={})
|
19
|
-
plugins = []
|
20
|
-
plugins.concat find_roll(match, options)
|
21
|
-
plugins.concat find_loadpath(match, options)
|
22
|
-
plugins.concat find_gems(match, options)
|
23
|
-
plugins.uniq
|
24
|
-
end
|
25
|
-
|
26
|
-
# Shortcut for #find.
|
27
|
-
#
|
28
|
-
# Lookup['syckle/*']
|
29
|
-
#
|
30
|
-
alias_method :[], :find
|
31
|
-
|
32
|
-
# Search roll for current or latest libraries.
|
33
|
-
def find_roll(match, options={})
|
34
|
-
plugins = []
|
35
|
-
#directory = options[:directory] || DIRECTORY
|
36
|
-
if defined?(::Roll)
|
37
|
-
# Not ::Roll::Library ?
|
38
|
-
::Library.ledger.each do |name, lib|
|
39
|
-
lib = lib.sort.first if Array===lib
|
40
|
-
lib.loadpath.each do |path|
|
41
|
-
#find = File.join(lib.location, path, directory, match)
|
42
|
-
find = File.join(lib.location, path, match)
|
43
|
-
list = Dir.glob(find)
|
44
|
-
list = list.map{ |d| d.chomp('/') }
|
45
|
-
plugins.concat(list)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
plugins
|
50
|
-
end
|
51
|
-
|
52
|
-
# Search standard $LOAD_PATH.
|
53
|
-
#
|
54
|
-
# Activated gem versions are in here too.
|
55
|
-
|
56
|
-
def find_loadpath(match, options={})
|
57
|
-
plugins = []
|
58
|
-
#directory = options[:directory] || DIRECTORY
|
59
|
-
$LOAD_PATH.uniq.each do |path|
|
60
|
-
path = File.expand_path(path)
|
61
|
-
#list = Dir.glob(File.join(path, directory, match))
|
62
|
-
list = Dir.glob(File.join(path, match))
|
63
|
-
list = list.map{ |d| d.chomp('/') }
|
64
|
-
plugins.concat(list)
|
65
|
-
end
|
66
|
-
plugins
|
67
|
-
end
|
68
|
-
|
69
|
-
# Search latest gem versions.
|
70
|
-
#
|
71
|
-
# TODO: Is there anyway to skip active gems?
|
72
|
-
|
73
|
-
def find_gems(match, options={})
|
74
|
-
plugins = []
|
75
|
-
#directory = options[:directory] || DIRECTORY
|
76
|
-
if defined?(::Gem)
|
77
|
-
::Gem.latest_load_paths do |path|
|
78
|
-
#list = Dir.glob(File.join(path, directory, match))
|
79
|
-
list = Dir.glob(File.join(path, match))
|
80
|
-
list = list.map{ |d| d.chomp('/') }
|
81
|
-
plugins.concat(list)
|
82
|
-
end
|
83
|
-
end
|
84
|
-
plugins
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
88
|
-
|
89
|
-
end
|
90
|
-
|
91
|
-
# Copyright (C) 2010 Thomas Sawyer
|