Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 4416 Bytes
1 | # (c) Copyright 2006 Nick Sieger <nicksieger@gmail.com> |
2 | # |
3 | # Permission is hereby granted, free of charge, to any person |
4 | # obtaining a copy of this software and associated documentation files |
5 | # (the "Software"), to deal in the Software without restriction, |
6 | # including without limitation the rights to use, copy, modify, merge, |
7 | # publish, distribute, sublicense, and/or sell copies of the Software, |
8 | # and to permit persons to whom the Software is furnished to do so, |
9 | # subject to the following conditions: |
10 | # |
11 | # The above copyright notice and this permission notice shall be |
12 | # included in all copies or substantial portions of the Software. |
13 | # |
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
17 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
18 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
19 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
20 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
21 | # SOFTWARE. |
22 | |
23 | $:.push(*Dir["vendor/rails/*/lib"]) |
24 | |
25 | require 'active_support' |
26 | require 'autotest/rspec' |
27 | |
28 | Autotest.add_hook :initialize do |at| |
29 | |
30 | %w{^config/ ^coverage/ ^db/ ^doc/ ^log/ ^public/ ^script ^vendor/rails ^vendor/plugins previous_failures.txt}.each do |exception| |
31 | at.add_exception(exception) |
32 | end |
33 | |
34 | at.clear_mappings |
35 | |
36 | at.add_mapping(%r%^(test|spec)/fixtures/(.*).yml$%) { |_, m| |
37 | ["spec/models/#{m[2].singularize}_spec.rb"] + at.files_matching(%r%^spec\/views\/#{m[2]}/.*_spec\.rb$%) |
38 | } |
39 | at.add_mapping(%r%^spec/(models|controllers|views|helpers|lib)/.*rb$%) { |filename, _| |
40 | filename |
41 | } |
42 | at.add_mapping(%r%^app/models/(.*)\.rb$%) { |_, m| |
43 | ["spec/models/#{m[1]}_spec.rb"] |
44 | } |
45 | at.add_mapping(%r%^app/views/(.*)$%) { |_, m| |
46 | at.files_matching %r%^spec/views/#{m[1]}_spec.rb$% |
47 | } |
48 | at.add_mapping(%r%^app/controllers/(.*)\.rb$%) { |_, m| |
49 | if m[1] == "application" |
50 | at.files_matching %r%^spec/controllers/.*_spec\.rb$% |
51 | else |
52 | ["spec/controllers/#{m[1]}_spec.rb"] |
53 | end |
54 | } |
55 | at.add_mapping(%r%^app/helpers/(.*)_helper\.rb$%) { |_, m| |
56 | if m[1] == "application" then |
57 | at.files_matching(%r%^spec/(views|helpers)/.*_spec\.rb$%) |
58 | else |
59 | ["spec/helpers/#{m[1]}_helper_spec.rb"] + at.files_matching(%r%^spec\/views\/#{m[1]}/.*_spec\.rb$%) |
60 | end |
61 | } |
62 | at.add_mapping(%r%^config/routes\.rb$%) { |
63 | at.files_matching %r%^spec/(controllers|views|helpers)/.*_spec\.rb$% |
64 | } |
65 | at.add_mapping(%r%^config/database\.yml$%) { |_, m| |
66 | at.files_matching %r%^spec/models/.*_spec\.rb$% |
67 | } |
68 | at.add_mapping(%r%^(spec/(spec_helper|shared/.*)|config/(boot|environment(s/test)?))\.rb$%) { |
69 | at.files_matching %r%^spec/(models|controllers|views|helpers)/.*_spec\.rb$% |
70 | } |
71 | at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m| |
72 | ["spec/lib/#{m[1]}_spec.rb"] |
73 | } |
74 | at.add_mapping(%r%^vendor/extensions/(.*)/app/models/(.*)\.rb$%) { |_, m| |
75 | ["vendor/extensions/#{m[1]}/spec/models/#{m[2]}_spec.rb"] |
76 | } |
77 | at.add_mapping(%r%^vendor/extensions/.*/spec/(models|controllers|views|helpers|lib)/.*rb$%) { |filename, _| |
78 | filename |
79 | } |
80 | at.add_mapping(%r%^vendor/extensions/(.*)/app/views/(.*)$%) { |_, m| |
81 | at.files_matching %r%^vendor/extensions/#{m[1]}/spec/views/#{m[2]}_spec.rb$% |
82 | } |
83 | at.add_mapping(%r%^vendor/extensions/(.*)/app/controllers/(.*)\.rb%) { |_, m| |
84 | if m[2] == "#{m[1]}_controller" |
85 | at.files_matching %r%^vendor/extensions/#{m[1]}/spec/controllers/.*_spec\.rb$% |
86 | else |
87 | ["vendor/extensions/#{m[1]}/spec/controllers/#{m[2]}_spec.rb"] |
88 | end |
89 | } |
90 | at.add_mapping(%r%^vendor/extensions/(.*)/app/helpers/(.*)_helper\.rb$%) { |_, m| |
91 | if m[2] == m[1] then |
92 | at.files_matching(%r%^vendor/extensions/#{m[1]}/spec/(views|helpers)/.*_spec\.rb$%) |
93 | else |
94 | ["vendor/extensions/#{m[1]}/spec/helpers/#{m[2]}_helper_spec.rb"] + at.files_matching(%r%^vendor/extensions/#{m[1]}/spec\/views\/#{m[2]}/.*_spec\.rb$%) |
95 | end |
96 | } |
97 | at.add_mapping(%r%^vendor/extensions/(.*)/lib/(.*)\.rb$%) { |_, m| |
98 | ["vendor/extensions/#{m[1]}/spec/lib/#{m[2]}_spec.rb"] |
99 | } |
100 | at.add_mapping(%r%^vendor/extensions/(.*)/(.*)_extension\.rb%) { |_, m| |
101 | at.files_matching(%r%^vendor/extensions/#{m[1]}/spec/.*_spec\.rb$%) if m[1] == m[2] |
102 | } |
103 | end |
104 | |
105 | class Autotest::RadiantRailsRspec < Autotest::Rspec |
106 | |
107 | def spec_command |
108 | "script/spec" |
109 | end |
110 | |
111 | end |