bivouac 0.0.5 → 0.0.6

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/README CHANGED
@@ -12,6 +12,9 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
12
12
 
13
13
  == FEATURES/PROBLEMS:
14
14
 
15
+ === 0.0.6:
16
+ * Scaffold now works with ERB! It's now time to work on a *real* scaffold!
17
+
15
18
  === 0.0.5:
16
19
  * new generator : scaffold! -- maybe someone need it!
17
20
  * Ho my god! the code is horrible!
@@ -99,6 +102,10 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
99
102
  == INSTALL:
100
103
 
101
104
  sudo gem install bivouac
105
+
106
+ or
107
+
108
+ sudo gem install bivouac --source=http://dev.rubyfr.net
102
109
 
103
110
  == LICENSE:
104
111
 
data/doc/rdoc/created.rid CHANGED
@@ -1 +1 @@
1
- Wed, 08 Aug 2007 18:13:52 +0200
1
+ Tue, 28 Aug 2007 18:32:09 +0200
@@ -73,7 +73,7 @@ end</strong>
73
73
  <div id="README" class="page_shade">
74
74
  <div class="page">
75
75
  <div class="header">
76
- <div class="path">README / Wed Aug 08 18:12:33 +0200 2007</div>
76
+ <div class="path">README / Tue Aug 28 18:26:06 +0200 2007</div>
77
77
  </div>
78
78
 
79
79
  <h1>Bivouac</h1>
@@ -98,6 +98,13 @@ Bivouac is a simple generator for <a
98
98
  href="http://code.whytheluckystiff.net/camping">camping</a>.
99
99
  </p>
100
100
  <h2>FEATURES/PROBLEMS:</h2>
101
+ <h3>0.0.6:</h3>
102
+ <ul>
103
+ <li>Scaffold now works with ERB! It&#8216;s now time to work on a <b>real</b>
104
+ scaffold!
105
+
106
+ </li>
107
+ </ul>
101
108
  <h3>0.0.5:</h3>
102
109
  <ul>
103
110
  <li>new generator : scaffold! &#8212; maybe someone need it!
@@ -243,6 +250,12 @@ href="http://code.whytheluckystiff.net/camping/wiki/MosquitoForBugFreeCamping">m
243
250
  <pre>
244
251
  sudo gem install bivouac
245
252
  </pre>
253
+ <p>
254
+ or
255
+ </p>
256
+ <pre>
257
+ sudo gem install bivouac --source=http://dev.rubyfr.net
258
+ </pre>
246
259
  <h2>LICENSE:</h2>
247
260
  <p>
248
261
  Bivouac is freely distributable according to the terms of the GNU General
@@ -141,11 +141,11 @@ module Bivouac
141
141
  end
142
142
 
143
143
  def view
144
+ file_extension = ".rb"
144
145
  if @generation_type.downcase == "erb"
145
- @destination_file = File.dirname( $0 ) + "/../app/views/" + @generation_file_name.underscore + ".html"
146
- else
147
- @destination_file = File.dirname( $0 ) + "/../app/views/" + @generation_file_name.underscore + ".rb"
146
+ file_extension = ".html"
148
147
  end
148
+ @destination_file = File.dirname( $0 ) + "/../app/views/" + @generation_file_name.underscore + file_extension
149
149
 
150
150
  @generation_view_name = @generation_class_name.underscore
151
151
  createFile( @destination_file ) do |io|
@@ -174,17 +174,21 @@ module Bivouac
174
174
  end
175
175
 
176
176
  # Generate scaffold views
177
- @destination_file = File.dirname( $0 ) + "/../app/views/list_" + @generation_file_name + ".rb"
177
+ file_extension = ".rb"
178
+ if @generation_type.downcase == "erb"
179
+ file_extension = ".html"
180
+ end
181
+ @destination_file = File.dirname( $0 ) + "/../app/views/list_" + @generation_file_name + file_extension
178
182
  createFile( @destination_file ) do |io|
179
- io.puts template( "generate/scaffold_view_list", binding )
183
+ io.puts template( "generate/scaffold_view_list_#{@generation_type.downcase}", binding )
180
184
  end
181
- @destination_file = File.dirname( $0 ) + "/../app/views/create_" + @generation_file_name + ".rb"
185
+ @destination_file = File.dirname( $0 ) + "/../app/views/create_" + @generation_file_name + file_extension
182
186
  createFile( @destination_file ) do |io|
183
- io.puts template( "generate/scaffold_view_create", binding )
187
+ io.puts template( "generate/scaffold_view_create_#{@generation_type.downcase}", binding )
184
188
  end
185
- @destination_file = File.dirname( $0 ) + "/../app/views/view_" + @generation_file_name + ".rb"
189
+ @destination_file = File.dirname( $0 ) + "/../app/views/view_" + @generation_file_name + file_extension
186
190
  createFile( @destination_file ) do |io|
187
- io.puts template( "generate/scaffold_view_view", binding )
191
+ io.puts template( "generate/scaffold_view_view_#{@generation_type.downcase}", binding )
188
192
  end
189
193
  end
190
194
  end
@@ -0,0 +1,7 @@
1
+ <p>Add a new <%= @generation_class_name %></p>
2
+ <div id="<%= @generation_view_name %>_form">
3
+ <form method="POST" action="/<%= @generation_view_name %>/add">
4
+ ...<br />
5
+ <input type="submit" />
6
+ </form>
7
+ </div>
@@ -0,0 +1,7 @@
1
+ <a href="/<%= @generation_view_name %>/add">add a <%= @generation_class_name %></a>
2
+ <div id="<%= @generation_view_name.pluralize %>">
3
+ <%% @<%= @generation_view_name.pluralize %>.each do |<%= @generation_view_name%>| %>
4
+ ...
5
+ <a href="/<%= @generation_view_name %>/<%%= <%= @generation_view_name %>.id %>">view</a>
6
+ <%% end %>
7
+ </div>
@@ -0,0 +1,10 @@
1
+ <div id="<%= @generation_view_name %>">
2
+ ...<br />
3
+ <a href="/<%= @generation_view_name %>">List</a>
4
+ </div>
5
+ <div id="<%= @generation_view_name %>_form">
6
+ <form method="POST" action="/<%= @generation_view_name %>/<%%= @<%= @generation_view_name %>.id %>">
7
+ ...<br />
8
+ <input type="submit" />
9
+ </form>
10
+ </div>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: bivouac
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5
7
- date: 2007-08-08 00:00:00 +02:00
6
+ version: 0.0.6
7
+ date: 2007-08-28 00:00:00 +02:00
8
8
  summary: Developpe with Camping like you do with Rails
9
9
  require_paths:
10
10
  - lib
@@ -70,9 +70,12 @@ files:
70
70
  - lib/bivouac/template/generate/scaffold_controller_create.rb
71
71
  - lib/bivouac/template/generate/scaffold_controller_list.rb
72
72
  - lib/bivouac/template/generate/scaffold_controller_view.rb
73
- - lib/bivouac/template/generate/scaffold_view_create.rb
74
- - lib/bivouac/template/generate/scaffold_view_list.rb
75
- - lib/bivouac/template/generate/scaffold_view_view.rb
73
+ - lib/bivouac/template/generate/scaffold_view_create_erb.rb
74
+ - lib/bivouac/template/generate/scaffold_view_create_goh.rb
75
+ - lib/bivouac/template/generate/scaffold_view_list_erb.rb
76
+ - lib/bivouac/template/generate/scaffold_view_list_goh.rb
77
+ - lib/bivouac/template/generate/scaffold_view_view_erb.rb
78
+ - lib/bivouac/template/generate/scaffold_view_view_goh.rb
76
79
  - lib/bivouac/template/generate/view_erb.rb
77
80
  - lib/bivouac/template/generate/view_goh.rb
78
81
  - lib/bivouac/template/generate.rb