gigantron 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ == 0.1.1 2008-06-19
2
+ * 1 minor enhancement:
3
+ * Migrations are now created with model
4
+ * 1 major bugfix:
5
+ * use camelcase instead of capitalize in code generators
6
+ == 0.1.0 2008-06-18
7
+
8
+ * Millions of major enhancements:
9
+ * Now uses ActiveRecord
10
+ * Better tests
1
11
  == 0.0.1 2008-05-31
2
12
 
3
13
  * 1 major enhancement:
data/Manifest.txt CHANGED
@@ -44,6 +44,9 @@ setup.rb
44
44
  tasks/deployment.rake
45
45
  tasks/environment.rake
46
46
  tasks/website.rake
47
+ test/template_database.yml
48
+ test/template_database.yml.example
49
+ test/template_migration.rb
47
50
  test/test_generator_helper.rb
48
51
  test/test_gigantron.rb
49
52
  test/test_gigantron_generator.rb
@@ -1,4 +1,4 @@
1
- class MapReduce<%= name.capitalize %>
1
+ class MapReduce<%= name.camelcase %>
2
2
  include SkynetDebugger
3
3
 
4
4
  def self.run
@@ -1,5 +1,5 @@
1
1
  desc "Describe your MapReduce task"
2
2
  task :<%= name %> do
3
3
  load 'mapreduce/mr_<%= name %>'
4
- MapReduce<%= name.capitalize %>.run
4
+ MapReduce<%= name.camelcase %>.run
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/../test_helper.rb'
2
2
 
3
- class Test<%= name.capitalize %> < Test::Unit::TestCase
3
+ class Test<%= name.camelcase %> < Test::Unit::TestCase
4
4
  def setup
5
5
  get_db_conn(GTRON_ENV)
6
6
  @rake = Rake::Application.new
@@ -20,6 +20,8 @@ class ModelGenerator < RubiGen::Base
20
20
  m.directory "test/models/"
21
21
  m.template "test/models/test_model.rb",
22
22
  "test/models/test_#{name.underscore}.rb"
23
+
24
+ m.dependency "migration", ["Create#{@name.pluralize.camelcase}"]
23
25
  end
24
26
  end
25
27
 
@@ -1,3 +1,3 @@
1
- class <%= name.capitalize %> < ActiveRecord::Base
1
+ class <%= name.camelcase %> < ActiveRecord::Base
2
2
 
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/../test_helper.rb'
2
2
 
3
- class Test<%= name.capitalize %> < Test::Unit::TestCase
3
+ class Test<%= name.camelcase %> < Test::Unit::TestCase
4
4
  def setup
5
5
  get_db_conn(GTRON_ENV)
6
6
  Gigantron.migrate_dbs
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/../test_helper.rb'
2
2
 
3
- class Test<%= name.capitalize %> < Test::Unit::TestCase
3
+ class Test<%= name.camelcase %> < Test::Unit::TestCase
4
4
  def setup
5
5
  get_db_conn(GTRON_ENV)
6
6
  @rake = Rake::Application.new
@@ -2,7 +2,7 @@ module Gigantron #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -0,0 +1,9 @@
1
+ # JRuby
2
+ :test:
3
+ :adapter: jdbcsqlite3
4
+ :url: jdbc:sqlite:<%= GTRON_ROOT %>/db/test.sqlite3
5
+
6
+ # Ruby 1.8
7
+ #:test:
8
+ # :adapter: sqlite3
9
+ # :database: <%= File.expand_path GTRON_ROOT %>/db/test.sqlite3
@@ -0,0 +1,9 @@
1
+ # JRuby
2
+ #:test:
3
+ # :adapter: jdbcsqlite3
4
+ # :url: jdbc:sqlite:<%= GTRON_ROOT %>/db/test.sqlite3
5
+
6
+ # Ruby 1.8
7
+ #:test:
8
+ # :adapter: sqlite3
9
+ # :database: <%= File.expand_path GTRON_ROOT %>/db/test.sqlite3
@@ -0,0 +1,16 @@
1
+ class CreateFoos < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :foos do |t|
4
+ t.string :title
5
+ end
6
+
7
+ %w(Foo Bar).each do |t|
8
+ Foo.new(:title => t).save
9
+ end
10
+ end
11
+
12
+ def self.down
13
+ drop_table :foos
14
+ end
15
+ end
16
+
@@ -34,6 +34,11 @@ class TestModelGenerator < Test::Unit::TestCase
34
34
  assert_directory_exists "test/"
35
35
  assert_directory_exists "test/models/"
36
36
  assert_generated_file "test/models/test_foo_baz.rb"
37
+
38
+ #check migration
39
+ assert_directory_exists "db/"
40
+ assert_directory_exists "db/migrate/"
41
+ assert_generated_file "db/migrate/001_create_foo_bazs.rb"
37
42
  end
38
43
 
39
44
  private
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Gigantron: Processor of Data</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/gigantron"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/gigantron" class="numbers">0.1.0</a>
36
+ <a href="http://rubyforge.org/projects/gigantron" class="numbers">0.1.1</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;gigantron&#8217;</h1>
39
39
 
@@ -152,7 +152,7 @@ a file like</p>
152
152
 
153
153
 
154
154
  <p><pre class='syntax'>
155
- <span class="keyword">class </span><span class="class">Test</span><span class="punct">&lt;%=</span><span class="string"> name.capitalize %&gt; &lt; Test::Unit::TestCase
155
+ <span class="keyword">class </span><span class="class">Test</span><span class="punct">&lt;%=</span><span class="string"> name.camelcase %&gt; &lt; Test::Unit::TestCase
156
156
  ...
157
157
  end<span class="normal">
158
158
  </span></span></pre></p>
@@ -202,7 +202,7 @@ rake install_gem</pre>
202
202
 
203
203
  <p>Comments are welcome. Send an email to <a href="mailto:ben@pixelmachine.org">Ben Hughes</a></p>
204
204
  <p class="coda">
205
- <a href="ben@pixelmachine.org">Ben Hughes</a>, 18th June 2008<br>
205
+ <a href="ben@pixelmachine.org">Ben Hughes</a>, 19th June 2008<br>
206
206
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
207
207
  </p>
208
208
  </div>
data/website/index.txt CHANGED
@@ -103,7 +103,7 @@ The same value is available to your templates as just @name@. You can template
103
103
  a file like
104
104
 
105
105
  <pre syntax="ruby">
106
- class Test<%%= name.capitalize %> < Test::Unit::TestCase
106
+ class Test<%%= name.camelcase %> < Test::Unit::TestCase
107
107
  ...
108
108
  end
109
109
  </pre>
metadata CHANGED
@@ -81,6 +81,9 @@ files:
81
81
  - tasks/deployment.rake
82
82
  - tasks/environment.rake
83
83
  - tasks/website.rake
84
+ - test/template_database.yml
85
+ - test/template_database.yml.example
86
+ - test/template_migration.rb
84
87
  - test/test_generator_helper.rb
85
88
  - test/test_gigantron.rb
86
89
  - test/test_gigantron_generator.rb
@@ -105,7 +108,7 @@ rubygems_version: 1.1.1
105
108
  requirements: []
106
109
  authors:
107
110
  - Ben Hughes
108
- date: 2008-06-18 04:00:00 +00:00
111
+ date: 2008-06-19 04:00:00 +00:00
109
112
  platform: ruby
110
113
  test_files:
111
114
  - test/test_model_generator.rb
@@ -117,7 +120,7 @@ test_files:
117
120
  - test/test_gigantron.rb
118
121
  - test/test_generator_helper.rb
119
122
  version: !ruby/object:Gem::Version
120
- version: 0.1.0
123
+ version: 0.1.1
121
124
  require_paths:
122
125
  - lib
123
126
  dependencies: []