parlement 0.10 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/CHANGES +11 -0
  2. data/MEMORY +9 -1
  3. data/README +5 -4
  4. data/app/controllers/account_controller.rb +10 -13
  5. data/app/controllers/application.rb +4 -5
  6. data/app/controllers/elt_controller.rb +9 -7
  7. data/app/controllers/person_controller.rb +1 -3
  8. data/app/controllers/subscriber_controller.rb +10 -10
  9. data/app/helpers/elt_helper.rb +2 -0
  10. data/app/models/elt.rb +28 -19
  11. data/app/models/mail.rb +26 -14
  12. data/app/models/mail_notify.rb +5 -4
  13. data/app/models/person.rb +11 -2
  14. data/app/views/account/_login.rhtml +3 -3
  15. data/app/views/account/_show.rhtml +12 -14
  16. data/app/views/elt/_choice.rhtml +3 -3
  17. data/app/views/elt/_elt.rhtml +4 -4
  18. data/app/views/elt/_list.rhtml +2 -2
  19. data/app/views/elt/_listByDate.rhtml +1 -1
  20. data/app/views/elt/_listByVote.rhtml +1 -1
  21. data/app/views/elt/new.rhtml +3 -3
  22. data/app/views/elt/show.rhtml +2 -2
  23. data/app/views/layouts/top.rhtml +6 -0
  24. data/app/views/mail_notify/publish.text.html.rhtml +1 -1
  25. data/app/views/person/_listElts.rhtml +5 -3
  26. data/app/views/person/show.rhtml +1 -2
  27. data/config/boot.rb +5 -4
  28. data/config/environment.rb +6 -4
  29. data/config/routes.rb +3 -2
  30. data/db/development_structure.sql +15 -4
  31. data/db/migrate/006_last_activity.rb +10 -0
  32. data/db/schema.rb +67 -49
  33. data/public/dispatch.fcgi +1 -0
  34. data/public/javascripts/controls.js +41 -23
  35. data/public/javascripts/dragdrop.js +317 -99
  36. data/public/javascripts/effects.js +301 -166
  37. data/public/javascripts/prototype.js +932 -402
  38. data/public/stylesheets/default.css +3 -2
  39. data/test/unit/elt_test.rb +13 -0
  40. data/test/unit/mail_test.rb +3 -1
  41. data/vendor/plugins/engines/CHANGELOG +203 -99
  42. data/vendor/plugins/engines/MIT-LICENSE +1 -1
  43. data/vendor/plugins/engines/README +32 -384
  44. data/vendor/plugins/engines/Rakefile +14 -0
  45. data/vendor/plugins/engines/UPGRADING +93 -0
  46. data/vendor/plugins/engines/about.yml +7 -0
  47. data/vendor/plugins/engines/generators/plugin_migration/USAGE +45 -0
  48. data/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +79 -0
  49. data/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +13 -0
  50. data/vendor/plugins/engines/init.rb +34 -47
  51. data/vendor/plugins/engines/install.rb +32 -0
  52. data/vendor/plugins/engines/lib/engines/{ruby_extensions.rb → deprecated_config_support.rb} +135 -113
  53. data/vendor/plugins/engines/lib/engines/plugin.rb +214 -0
  54. data/vendor/plugins/engines/lib/engines/plugin_list.rb +31 -0
  55. data/vendor/plugins/engines/lib/engines/plugin_migrator.rb +60 -0
  56. data/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +19 -0
  57. data/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +143 -0
  58. data/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +155 -0
  59. data/vendor/plugins/engines/lib/engines/rails_extensions/public_asset_helpers.rb +116 -0
  60. data/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +20 -0
  61. data/vendor/plugins/engines/lib/engines/rails_extensions/rails_initializer.rb +86 -0
  62. data/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +77 -0
  63. data/vendor/plugins/engines/lib/engines/rails_extensions/templates.rb +140 -0
  64. data/vendor/plugins/engines/lib/engines/rails_extensions.rb +6 -0
  65. data/vendor/plugins/engines/lib/engines/testing.rb +88 -0
  66. data/vendor/plugins/engines/lib/engines.rb +281 -425
  67. data/vendor/plugins/engines/tasks/engines.rake +108 -137
  68. metadata +218 -250
  69. data/db/ROOT/perso.txt +0 -214
  70. data/public/images/indicator.gif +0 -0
  71. data/public/images/orange_by_darren_Hester_350o.jpg +0 -0
  72. data/public/images/smile.png +0 -0
  73. data/vendor/plugins/engines/generators/engine/USAGE +0 -26
  74. data/vendor/plugins/engines/generators/engine/engine_generator.rb +0 -199
  75. data/vendor/plugins/engines/generators/engine/templates/README +0 -85
  76. data/vendor/plugins/engines/generators/engine/templates/init_engine.erb +0 -15
  77. data/vendor/plugins/engines/generators/engine/templates/install.erb +0 -4
  78. data/vendor/plugins/engines/generators/engine/templates/lib/engine.erb +0 -6
  79. data/vendor/plugins/engines/generators/engine/templates/licenses/GPL +0 -18
  80. data/vendor/plugins/engines/generators/engine/templates/licenses/LGPL +0 -19
  81. data/vendor/plugins/engines/generators/engine/templates/licenses/MIT +0 -22
  82. data/vendor/plugins/engines/generators/engine/templates/licenses/None +0 -1
  83. data/vendor/plugins/engines/generators/engine/templates/public/javascripts/engine.js +0 -0
  84. data/vendor/plugins/engines/generators/engine/templates/public/stylesheets/engine.css +0 -0
  85. data/vendor/plugins/engines/generators/engine/templates/tasks/engine.rake +0 -0
  86. data/vendor/plugins/engines/generators/engine/templates/test/test_helper.erb +0 -17
  87. data/vendor/plugins/engines/lib/bundles/require_resource.rb +0 -124
  88. data/vendor/plugins/engines/lib/bundles.rb +0 -77
  89. data/vendor/plugins/engines/lib/engines/action_mailer_extensions.rb +0 -140
  90. data/vendor/plugins/engines/lib/engines/action_view_extensions.rb +0 -141
  91. data/vendor/plugins/engines/lib/engines/active_record_extensions.rb +0 -21
  92. data/vendor/plugins/engines/lib/engines/dependencies_extensions.rb +0 -129
  93. data/vendor/plugins/engines/lib/engines/migration_extensions.rb +0 -53
  94. data/vendor/plugins/engines/lib/engines/routing_extensions.rb +0 -28
  95. data/vendor/plugins/engines/lib/engines/testing_extensions.rb +0 -327
  96. data/vendor/plugins/engines/tasks/deprecated_engines.rake +0 -7
  97. data/vendor/plugins/engines/test/action_view_extensions_test.rb +0 -9
  98. data/vendor/plugins/engines/test/ruby_extensions_test.rb +0 -115
  99. data/vendor/plugins/guid/README.TXT +0 -29
  100. data/vendor/plugins/guid/init.rb +0 -30
  101. data/vendor/plugins/guid/lib/usesguid.rb +0 -37
  102. data/vendor/plugins/guid/lib/uuid22.rb +0 -43
  103. data/vendor/plugins/guid/lib/uuidtools.rb +0 -572
  104. data/vendor/plugins/responds_to_parent/MIT-LICENSE +0 -20
  105. data/vendor/plugins/responds_to_parent/README +0 -42
  106. data/vendor/plugins/responds_to_parent/Rakefile +0 -22
  107. data/vendor/plugins/responds_to_parent/init.rb +0 -1
  108. data/vendor/plugins/responds_to_parent/lib/responds_to_parent.rb +0 -46
  109. data/vendor/plugins/responds_to_parent/test/responds_to_parent_test.rb +0 -115
data/db/ROOT/perso.txt DELETED
@@ -1,214 +0,0 @@
1
- echarp
2
-
3
- <style>
4
- .eltSubs, .eltSubsClose { display: none; }
5
- </style>
6
-
7
- <div class="sidebar" style="clear:right">
8
- <div class="boxTitle">Amis et famille</div>
9
- <div class="box">
10
- <div class="boxLine">
11
- Fr�rot <a href="http://www.christhalie.free.fr">christophe</a>,et des
12
- <a href="http://www.motorun.net">motos!</a>
13
- </div>
14
- <div class="boxLine">
15
- <a href="http://www.copinedegeek.com">Copine De Geek</a>
16
- </div>
17
- <div class="boxLine"><a href="http://www.paulhac.org">Coralie</a></div>
18
- <div class="boxLine">
19
- <a href="http://inferno.cs.univ-paris8.fr/~naoko/">naoko</a>
20
- </div>
21
- <div class="boxLine">
22
- <a href="http://perso.club-internet.fr/olberger">Olivier Berger</a>
23
- </div>
24
- <div class="boxLine">
25
- <a href="http://jf.hardy.free.fr">JF Hardy</a>
26
- </div>
27
- </div>
28
-
29
- <div class="boxTitle">Un ptit peu de logiciels libres</div>
30
- <div class="box">
31
- <a href="http://www.fsf.org">FSF</a>
32
- <a href="http://april.org">APRIL</a>
33
- <a href="http://debian.org">debian</a> <a href="http://cocoon.apache.org">Cocoon</a>
34
- <a href="http://postgresql.org">PostgreSQL</a>
35
- <a href="http://jboss.org">JBoss</a>
36
- <a href="http://vim.sf.net">VIM</a>
37
- <a href="http://web.wt.net/~billw/gkrellm/gkrellm.html">GKrellm</a>
38
- <a href="http://slashdot.org">/.</a> <a href="http://linuxfr.org">linuxFr</a>
39
- <a href="http://kuro5hin.org">kuro5hin</a> <a href="http://javalobby.org">javalobby</a>
40
- </div>
41
-
42
- <div class="boxTitle">Int�ressants</div>
43
- <div class="box">
44
- <div class="boxLineR">
45
- <a href="http://www.radioparadise.com">Radio Paradise</a>
46
- </div>
47
- <div class="boxLine"><a href="http://wikipedia.org">Wikipedia</a></div>
48
- <div class="boxLine">
49
- <a href="http://ocw.mit.edu">MIT OpenCourseWare</a>
50
- </div>
51
- <div class="boxLine">
52
- <a href="http://www.edge.org/3rd_culture/bios/dawkins.html" title="vive l'�volution">
53
- Richard Dawkins</a>
54
- </div>
55
- <div class="boxLine" title="Un intello de premi�re">
56
- Noam Chomsky
57
- <a href="http://www.zmag.org/chomsky/index.cfm">archive</a>
58
- &amp;
59
- <a href="http://blog.zmag.org/ttt/">blog</a>
60
- </div>
61
- <div class="boxLine">
62
- <a href="http://old.law.columbia.edu" title="loi et logiciel libre">
63
- Eben Moglen</a>
64
- </div>
65
- </div>
66
-
67
- <div class="boxTitle">De mon histoire</div>
68
- <div class="box">
69
- <div class="boxLine">
70
- <a href="http://www.editronics-edu.fr" title="liquid�">Editronics</a>
71
- </div>
72
- <div class="boxLine">
73
- <a href="http://www.alcove.com" title="liquid�">Alc�ve</a>
74
- </div>
75
- <div class="boxLine">
76
- <a href="http://www.fisystem.com" title="liquid�">Fi System</a>
77
- </div>
78
- <div class="boxLine">
79
- <a href="http://www.altran.net">Altran</a>
80
- </div>
81
- <div class="boxLine">
82
- <a href="http://www-iasc.enst-bretagne.fr" title="la Bretagne �a me gagne :)">LIASC</a>
83
- </div>
84
- <div class="boxLine">
85
- <a href="http://www.utbm.fr" title="Brrr, qu'il fait froid � belfort">
86
- UTBM</a>
87
- </div>
88
- <div class="boxLine">
89
- <a href="http://www.eso.org/projects/vlt/" title="Very Large Telescope, je suis fier d'y avoir particip�">
90
- VLT</a>
91
- </div>
92
- <div class="boxLine">
93
- <a href="http://www.cge.asso.fr/ecoles/ECOLE32.phtml">
94
- ENI de Tarbes</a>
95
- </div>
96
- <div class="boxLine">
97
- <a href="http://www.strath.ac.uk" title="Vive l'�cosse!!!">
98
- Strathclyde University</a>
99
- </div>
100
- <div class="boxLine">
101
- <a href="http://www.tourisme.fr/office-de-tourisme/moncontour.htm" title="... son lac et sa tour">
102
- Moncontour</a>
103
- </div>
104
- <div class="boxLine" title="Trop petit pour un lien, et pourtant c'�tait le grand Vatres">
105
- Vatres
106
- </div>
107
- </div>
108
- </div>
109
-
110
- Bonjour le monde
111
-
112
- Je suis un parisien d'origine paysanne. Cru 1973 et �lev� dans une bonne ferme
113
- pleine de poules et de ch�vres. Quand j'�tais petit, je passais du temps dans
114
- les pr�s et les chemins. Autant vous dire que j'�tais un grand fan d'heidi!
115
-
116
- !{width:10em;float:right;margin:1em;}/images/image/viveLeSki.jpg!:/images/image/viveLeSki.jpg
117
-
118
- Dire qu'aujourd'hui je suis devenu un intello qui aime se prendre la t�te sur
119
- toutes sortes de sujets. Politique, philosophie, psychologie, science fiction
120
- hard.
121
-
122
- En 1997 j'ai imagin� une chose qui me tient � coeur, un outil d'�criture
123
- collaborative o� un groupe peut �crire n'importe quel genre de texte structur�
124
- de mani�re d�mocratique.
125
-
126
- !{width:10em;float:left;margin:1em;}/images/image/echarp.jpg!:/images/image/echarp.jpg
127
-
128
- L'id�e est simple (si si), c'est un mix de d�mocratie participative et
129
- repr�sentative: proposer des �l�ments de texte, voter oui/non pour chaque
130
- �l�ment propos� (�a c'est de la d�mocratie participative) ou encore d�l�guer
131
- votre vote � un tiers (d�mocratie repr�sentative). Votre d�l�gu� peut lui m�me
132
- d�l�guer � un autre, c'est transitif (et tr�s compliqu� en cas de boucle). Les
133
- votes sont permanents, c'est � dire que l'on peut changer d'avis � tout moment.
134
- Cette permanence r�duit grandement l'int�r�t des diff�rentes m�thodes de votes
135
- comme condorcet ou par tour.
136
-
137
- Ah, l'outil s'appelle "VeniVidiVoti":http://echarp.dyndns.org, oui oui, le nom
138
- est idiot expr�s :)
139
-
140
- Pour moi ces projets sont importants, car cela fait partie de ma nature:
141
- j'adore construire, imaginer. D�j� tout petit je faisais plein de trucs
142
- inutilies avec des l�gos. Comme quoi avec les ann�es on ne change pas tant que
143
- �a...
144
-
145
- <pre style="float: left; color: #aa0;">
146
-
147
- \ | /
148
- |
149
- ___
150
- \ /
151
- \_|_/
152
- \ | /
153
- </pre>
154
- <pre style="float: left; color: #aa0;">
155
-
156
- \ | /
157
- |
158
- ___
159
- \ /
160
- .
161
- </pre>
162
-
163
- Les deux figures bizarres � gauche sont le clavier d'un alphabet imaginaire. Je
164
- l'appelle smile :)
165
-
166
- !{float:right; margin-left:1em; width:14em;}/images/image/smileCircles.png!:/images/image/smileCircles.png
167
-
168
- Cela consiste en six traits qui forment un carr� et ses diagonales. Six carr�s
169
- forment les six faces d'un cube. En vue isom�trique cela donne deux hexagones.
170
-
171
- Mais bon, c'est bien gentil d'avoir des mots qui peuvent �tre repr�sent�s en 3D
172
- ou sous des projections �tranges, mais je n'ai aucune s�mantique � leur
173
- appliquer... Pourtant il y a plein de combinaisons/mots possibles! Si vous avez
174
- une id�e appelez moi!
175
-
176
- Euh, sinon je tiens � ajouter une chose pour toutes les femmes qui passent ici:
177
- je suis grand, b�, fort, riche et tr�s intelligent. Et puis modeste bien s�r.
178
- J'ai �t� �lev� au grand air, � la ferme. Je suis facile � vivre et fr�le la
179
- !{width:13em; float:right; margin:1em;}/images/image/cheveuxLongs.jpg!:/images/image/cheveuxLongs.jpg
180
- perfection en tout. Pour entretenir mon corps de dieu grec je fais de la
181
- piscine, et puis je poss�de des rollers (les salauds, ils ne sortent plus
182
- depuis qq temps d�j�).
183
-
184
- Ma photo en ski c'est pour la frime. En 93 je me suis lux� l'�paule en
185
- descendant une rouge (je le savais bien, moi, qu'il fallait pas prendre une
186
- rouge d�s le premier jour, d�s la premi�re descente). En 2003 je me suis relux�
187
- l'�paule (quand on aime on ne compte pas), mais cette fois-ci en poursuivant le
188
- m�tro. Salopris de gr�ves et de sol mouill�!!! Bref en 2004 j'�tais heureux de
189
- constater ma capacit� � vraiment faire du ski, du vrai de vrai qu'on tombe et
190
- tout et tout, mais qu'on aime �a.
191
-
192
- !{float:left; margin:1em;}/images/image/cdgRomanPhoto.jpg!:http://copinedegeek.com
193
- Les informaticiens qui aiment ce qu'ils font sont parfois appel�s des geeks. Et
194
- parce que c'est une situation insupportable les copines de geeks se sont
195
- r�unies en une "association":http://copinedegeek.com o� elles peuvent se r�unir
196
- et �changer. Enfin surtout se moquer de leurs amis.
197
-
198
- Voil� un roman photo idiot o� j'�tais heureux de participer: "le geek qui
199
- murmurait � l'oreille des PC".
200
-
201
- !{width:15em; float:right; margin:1em;}/images/image/capture.png!:/images/image/capture.png
202
- Pour le fun et vous montrer ce qu'est un geek, voici mon bureau. Je suis dessus
203
- une large partie de mes journ�es.
204
-
205
- Vous pouvez voir un navigateur (galeon bas� sur mozilla), gkrellm qui me permet
206
- de suivre l'�tat de mes ordinateurs (3 en ce moment), 3 terminaux avec irssi
207
- pour le chat, vim pour �diter ce texte, et xtail pour suivre l'�tat de mon
208
- serveur de d�veloppement.
209
-
210
- En haut � droite c'est un xplanet avec la couverture nuageuse du moment.
211
-
212
- Bon, je parlerai de politique une prochaine fois ;)
213
-
214
- Bye bye
Binary file
Binary file
@@ -1,26 +0,0 @@
1
- Description:
2
- The Engine Generator creates the directories and files you need
3
- to create your own engine.
4
-
5
- Example:
6
- ./script/generate engine MyEngine
7
-
8
- This will generate:
9
- RAILS_ROOT
10
- |- vendor
11
- |-plugins
12
- |- my_engine <-- our example engine
13
- |- init_engine.rb
14
- |- app
15
- | |- controllers
16
- | |- model
17
- | |- helpers
18
- | |- views
19
- |- db
20
- |- tasks
21
- |- lib
22
- |- public
23
- | |- javascripts
24
- | |- stylesheets
25
- |- test
26
-
@@ -1,199 +0,0 @@
1
- # Copyright (c) 2005 Jonathan Lim <snowblink@gmail.com>
2
- #
3
- # The MIT License
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
-
24
- module Rails
25
- module Generator
26
- module Commands
27
-
28
- class Create < Base
29
- def complex_template(relative_source, relative_destination, template_options = {})
30
- options = template_options.dup
31
- options[:assigns] ||= {}
32
- options[:assigns]['template_for_inclusion'] = render_template_part(template_options) if template_options[:mark_id]
33
- options[:assigns]['license'] = render_license(template_options)
34
- template(relative_source, relative_destination, options)
35
- end
36
-
37
- def render_license(template_options)
38
- # Getting Sandbox to evaluate part template in it
39
- part_binding = template_options[:sandbox].call.sandbox_binding
40
- part_rel_path = template_options[:insert]
41
- part_path = source_path(part_rel_path)
42
-
43
- # Render inner template within Sandbox binding
44
- template_file = File.readlines(part_path)
45
- case template_options[:comment_style]
46
- when :rb
47
- template_file.map! {|x| x.sub(/^/, '# ')}
48
- end
49
- rendered_part = ERB.new(template_file.join, nil, '-').result(part_binding)
50
- end
51
-
52
- end
53
- end
54
- end
55
- end
56
-
57
-
58
- class LicensingSandbox
59
- include ActionView::Helpers::ActiveRecordHelper
60
- attr_accessor :author
61
-
62
- def sandbox_binding
63
- binding
64
- end
65
-
66
- end
67
-
68
- class Author
69
- def initialize
70
- set_name
71
- set_email
72
- end
73
-
74
- def set_name
75
- print "Please enter the author's name: "
76
- @name = gets.chomp
77
- end
78
-
79
- def set_email
80
- print "Please enter the author's email: "
81
- @email = gets.chomp
82
- end
83
-
84
- def to_s
85
- "#{@name} <#{@email}>"
86
- end
87
- end
88
-
89
- class License
90
- def initialize(source_root)
91
- @source_root = source_root
92
- select_license
93
- end
94
-
95
- def select_license
96
- # list all the licenses in the licenses directory
97
- licenses = Dir.entries(File.join(@source_root, 'licenses')).select { |name| name !~ /^\./ }
98
- puts "We can generate the following licenses automatically for you:"
99
- licenses.sort.each_with_index do |license, index|
100
- puts "#{index}) #{licenses[index]}"
101
- end
102
- print "Please select a license: "
103
- while choice = gets.chomp
104
- if (choice !~ /^[0-9]+$/)
105
- print "Hint - you want to be typing a number.\nPlease select a license: "
106
- next
107
- end
108
- break if choice.to_i >=0 && choice.to_i <= licenses.length
109
- end
110
-
111
- @license = licenses[choice.to_i]
112
- puts "'#{@license}' selected"
113
- end
114
-
115
- def to_s
116
- File.join('licenses', @license)
117
- end
118
-
119
- end
120
-
121
- class EngineGenerator < Rails::Generator::NamedBase
122
-
123
- attr_reader :engine_class_name, :engine_underscored_name, :engine_start_name, :author
124
-
125
-
126
- def initialize(runtime_args, runtime_options = {})
127
- super
128
- @engine_class_name = runtime_args.shift
129
-
130
- # ensure that they've given us a valid class name
131
- if @engine_class_name =~ /^[a-z]/
132
- raise "'#{@engine_class_name}' should be a valid Ruby constant, e.g. 'MyEngine'; aborting generation..."
133
- end
134
-
135
- @engine_underscored_name = @engine_class_name.underscore
136
- @engine_start_name = @engine_underscored_name.sub(/_engine$/, '')
137
- @author = Author.new
138
- @license = License.new(source_root)
139
- end
140
-
141
- def manifest
142
- record do |m|
143
- m.directory File.join('vendor', 'plugins')
144
- m.directory File.join('vendor', 'plugins', @engine_underscored_name)
145
- m.complex_template 'README',
146
- File.join('vendor', 'plugins', @engine_underscored_name, 'README'),
147
- :sandbox => lambda {create_sandbox},
148
- :insert => @license.to_s
149
-
150
- m.file 'install.erb', File.join('vendor', 'plugins', @engine_underscored_name, 'install.rb')
151
-
152
- m.complex_template 'init_engine.erb',
153
- File.join('vendor', 'plugins', @engine_underscored_name, 'init_engine.rb'),
154
- :sandbox => lambda {create_sandbox},
155
- :insert => @license.to_s,
156
- :comment_style => :rb
157
-
158
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'app')
159
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'app', 'models')
160
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'app', 'controllers')
161
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'app', 'helpers')
162
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'app', 'views')
163
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'db')
164
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'db', 'migrate')
165
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'lib')
166
- m.complex_template File.join('lib', 'engine.erb'),
167
- File.join('vendor', 'plugins', @engine_underscored_name, 'lib', "#{@engine_underscored_name}.rb"),
168
- :sandbox => lambda {create_sandbox},
169
- :insert => @license.to_s,
170
- :comment_style => :rb
171
-
172
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'lib', @engine_underscored_name)
173
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'public')
174
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'public', 'javascripts')
175
- m.template File.join('public', 'javascripts', 'engine.js'), File.join('vendor', 'plugins', @engine_underscored_name, 'public', 'javascripts', "#{@engine_underscored_name}.js")
176
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'public', 'stylesheets')
177
- m.template File.join('public', 'stylesheets', 'engine.css'), File.join('vendor', 'plugins', @engine_underscored_name, 'public', 'stylesheets', "#{@engine_underscored_name}.css")
178
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'tasks')
179
- m.template File.join('tasks', 'engine.rake'), File.join('vendor', 'plugins', @engine_underscored_name, 'tasks', "#{@engine_underscored_name}.rake")
180
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'test')
181
- m.template File.join('test', 'test_helper.erb'), File.join('vendor', 'plugins', @engine_underscored_name, 'test', 'test_helper.rb')
182
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'test', 'fixtures')
183
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'test', 'functional')
184
- m.directory File.join('vendor', 'plugins', @engine_underscored_name, 'test', 'unit')
185
- end
186
- end
187
-
188
- protected
189
- def banner
190
- "Usage: #{$0} #{spec.name} MyEngine [general options]"
191
- end
192
-
193
- def create_sandbox
194
- sandbox = LicensingSandbox.new
195
- sandbox.author = @author
196
- sandbox
197
- end
198
-
199
- end
@@ -1,85 +0,0 @@
1
- ------------------[ once you've read this, delete it ]---------------------
2
-
3
- ENGINE DEVELOPERS - HEED THIS!
4
-
5
- This is a sample README file to guide your users when they are installing what is undoubtedly going to be the finest piece of code they ever got their hands on. Lucky them, but alas they are often foolish, and so this is where you can guide them with the metaphorical beating of twigs. Or just a numbered series of instructions.
6
-
7
- ANYWAY - you will almost certainly need to tailor this to your specific engine. For instance, your users will probably only need to include modules into the ApplicationController and ApplicationHelper if your engine defines methods to be usable by controllers and views external to your engine.
8
-
9
- If you engine does not rely on any database tables, you will probably not need migrations either.
10
-
11
- You are also under no obligation to use the 'config' method for setting options within your modules. Documentation which explains the purpose of the 'config' method is available as part of the Engines plugin itself.
12
-
13
- Please check the engine development information on the Rails Engines wiki for more information about what to do now:
14
-
15
- http://rails-engines.rubyforge.org/wiki/wiki.pl?DevelopingAnEngine
16
-
17
- -----------------------[ remember to delete me! ]--------------------------
18
-
19
- = <%= engine_class_name %>
20
-
21
- <%= engine_class_name %> is a ...
22
-
23
- This software package is developed using the Engines plugin. To find out more about how to use engines in general, go to http://rails-engines.rubyforge.org for general documentation about the Engines mechanism.
24
-
25
- == Installation
26
-
27
- 1. Create your Rails application, set up your databases, grab the Engines plugin and the <%= engine_class_name %>, and install them.
28
-
29
- 2. Install the <%= engine_class_name %> into your vendor/plugins directory
30
-
31
- 3. Modify your Engines.start call in config/environment.rb
32
-
33
- Engines.start :<%= engine_start_name %> # or :<%= engine_underscored_name %>
34
-
35
- 4. Edit your application.rb file so it looks something like the following:
36
-
37
- class ApplicationController < ActionController::Base
38
- include <%= engine_class_name %>
39
- end
40
-
41
- 5. Edit your application_helper.rb file:
42
-
43
- module ApplicationHelper
44
- include <%= engine_class_name %>
45
- end
46
-
47
- 6. Perform any configuration you might need. You'll probably want to set these values in environment.rb (before the call to Engines.start):
48
-
49
- module <%= engine_class_name %>
50
- config :some_option, "some_value"
51
- end
52
-
53
- 7. Initialize the database tables. You can either use the engine migrations by calling:
54
-
55
- rake engine_migrate
56
-
57
- to move all engines to their latest versions, or
58
-
59
- rake engine_migrate ENGINE=<%= engine_start_name %>
60
-
61
- to migrate only this engine.
62
-
63
- 8. The <%= engine_class_name %> provides a default stylesheet and a small javascript helper file, so you'll probably want to include the former and almost certainly the latter in your application's layout. Add the following lines:
64
-
65
- <%%= engine_stylesheet "<%=engine_start_name%>_engine" %>
66
- <%%= engine_javascript "<%=engine_start_name%>_engine" %>
67
-
68
- == Configuration
69
-
70
- A number of configuration parameters are available to allow to you control
71
- how the data is stored, should you be unhappy with the defaults. These are
72
- outlined below.
73
-
74
- module <%= engine_class_name %>
75
- config :some_option, "some_value"
76
- end
77
-
78
- === Configuration Options
79
- +some_option+:: This option will set some_value
80
-
81
- == Usage
82
- How to use this engine
83
-
84
- == License
85
- <%= license %>
@@ -1,15 +0,0 @@
1
- <%= license %>
2
-
3
- module <%= engine_class_name %>
4
- module VERSION
5
- Major = 0 # change implies compatibility breaking with previous versions
6
- Minor = 1 # change implies backwards-compatible change to API
7
- Release = 0 # incremented with bug-fixes, updates, etc.
8
- end
9
- end
10
-
11
- Engines.current.version = <%= engine_class_name %>::VERSION
12
-
13
- # load up all the required files we need...
14
- require '<%= engine_underscored_name %>'
15
-
@@ -1,4 +0,0 @@
1
- # Install the engines plugin if it has been already
2
- unless File.exist?(File.dirname(__FILE__) + "/../engines")
3
- Commands::Plugin.parse!(['install', 'http://svn.rails-engines.org/plugins/engines'])
4
- end
@@ -1,6 +0,0 @@
1
- <%= license %>
2
-
3
- #require '<%= engine_underscored_name %>/additional_files'
4
-
5
- module <%= engine_class_name %>
6
- end
@@ -1,18 +0,0 @@
1
- Copyright (c) <%= Time.now.strftime("%Y") %> <%= author %>
2
-
3
- The GNU General Public License (GPL)
4
- Version 2, June 1991
5
-
6
- This program is free software; you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation; either version 2 of the License, or
9
- (at your option) any later version.
10
-
11
- This program is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -1,19 +0,0 @@
1
- Copyright (c) <%= Time.now.strftime("%Y") %> <%= author %>
2
-
3
- GNU Lesser General Public License
4
- Version 2.1, February 1999
5
-
6
- This library is free software; you can redistribute it and/or
7
- modify it under the terms of the GNU Lesser General Public
8
- License as published by the Free Software Foundation; either
9
- version 2.1 of the License, or (at your option) any later version.
10
-
11
- This library is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- Lesser General Public License for more details.
15
-
16
- You should have received a copy of the GNU Lesser General Public
17
- License along with this library; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
-
@@ -1,22 +0,0 @@
1
- Copyright (c) <%= Time.now.strftime("%Y") %> <%= author %>
2
-
3
- The MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
22
-
@@ -1 +0,0 @@
1
- Copyright (c) <%= Time.now.strftime("%Y") %> <%= author %>
@@ -1,17 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper') # the default rails helper
2
-
3
- # ensure that the Engines testing enhancements are loaded.
4
- require File.join(Engines.config(:root), "engines", "lib", "engines", "testing_extensions")
5
-
6
- # Ensure that the code mixing and view loading from the application is disabled
7
- Engines.disable_app_views_loading = true
8
- Engines.disable_app_code_mixing = true
9
-
10
- # force these config values
11
- module <%= engine_class_name %>
12
- # config :some_option, "some_value"
13
- end
14
-
15
- # set up the fixtures location
16
- Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
17
- $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)