Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 944 Bytes
1 | class Theme |
2 | cattr_accessor :cache_theme_lookup |
3 | @@cache_theme_lookup = false |
4 | |
5 | attr_accessor :name, :path, :description_html |
6 | |
7 | def initialize(name, path) |
8 | @name, @path = name, path |
9 | end |
10 | |
11 | def layout |
12 | "../../themes/#{name}/layouts/default" |
13 | end |
14 | |
15 | def description |
16 | File.read("#{path}/about.markdown") rescue "### #{name}" |
17 | end |
18 | |
19 | def self.themes_root |
20 | RAILS_ROOT + "/themes" |
21 | end |
22 | |
23 | def self.theme_from_path(path) |
24 | name = path.scan(/[-\w]+$/i).flatten.first |
25 | self.new(name, path) |
26 | end |
27 | |
28 | def self.find_all |
29 | installed_themes.inject([]) do |array, path| |
30 | array << theme_from_path(path) |
31 | end |
32 | end |
33 | |
34 | def self.installed_themes |
35 | cache_theme_lookup ? @theme_cache ||= search_theme_directory : search_theme_directory |
36 | end |
37 | |
38 | def self.search_theme_directory |
39 | glob = "#{themes_root}/[a-zA-Z0-9]*" |
40 | Dir.glob(glob).select do |file| |
41 | File.readable?("#{file}/about.markdown") |
42 | end.compact |
43 | end |
44 | end |