rails3-generators 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -4,6 +4,14 @@
4
4
  * Datamapper Tests
5
5
  * Mongomapper Tests
6
6
 
7
+ == 0.10.2
8
+ * optimize
9
+ * add --extension option to machinist blueprints. (I like using ".blueprint". --Louis T.)
10
+
11
+ == 0.10.1
12
+ * optimize
13
+ * move mustache generators to correct hidden_namespaces location. (mustache:install was being hidden)
14
+
7
15
  == 0.10.0
8
16
  * enhancements
9
17
  * added mustache:install
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
@@ -5,6 +5,7 @@ module Machinist
5
5
  class ModelGenerator < Base
6
6
  argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
7
7
  class_option :dir, :type => :string, :default => "test/blueprints", :desc => "The directory where the blueprints should go"
8
+ class_option :extension, :type => :string, :default => "rb", :desc => "file extenstion name"
8
9
 
9
10
  def create_machinist_initializer
10
11
  return if File.exists?(File.expand_path("config/initializers/machinist.rb", self.destination_root))
@@ -12,7 +13,7 @@ module Machinist
12
13
  end
13
14
 
14
15
  def create_blueprint_file
15
- template 'blueprint.rb', File.join(options[:dir], "#{table_name}.rb")
16
+ template 'blueprint.rb', File.join(options[:dir], "#{table_name}.#{options[:extenstion].to_s}")
16
17
  end
17
18
  end
18
19
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails3-generators}
8
- s.version = "0.10.1"
8
+ s.version = "0.10.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jose Valim", "Anuj Dutta", "Paul Berry", "Jeff Tucker", "Louis T.", "Jai-Gouk Kim", "Darcy Laycock", "Peter Haza", "Peter Gumeson"]
12
- s.date = %q{2010-07-02}
12
+ s.date = %q{2010-07-11}
13
13
  s.description = %q{Rails 3 compatible generators for DataMapper, Haml, Factory-girl, Authlogic, Mongomapper, Shoulda, Formtastic and SimpleForm}
14
14
  s.email = %q{andre@arko.net}
15
15
  s.extra_rdoc_files = [
@@ -130,7 +130,7 @@ Gem::Specification.new do |s|
130
130
  ]
131
131
  s.homepage = %q{http://github.com/indirect/rails3-generators}
132
132
  s.post_install_message = %q{
133
- rails3-generators-0.10.1
133
+ rails3-generators-0.10.2
134
134
 
135
135
  Be sure to check out the wiki, http://wiki.github.com/indirect/rails3-generators/,
136
136
  for information about recent changes to this project.
@@ -21,4 +21,9 @@ class Machinist::Generators::ModelGeneratorTest < Rails::Generators::TestCase
21
21
  assert_file "config/initializers/machinist.rb"
22
22
  assert_no_file "test/fixtures/accounts.yml"
23
23
  end
24
+
25
+ test "invoke when fixture replacement is given with custom file extenstion" do
26
+ content = run_generator %w(Account name:string age:integer -r machinist --extension i.like.using.blueprint)
27
+ assert_file "test/blueprints/accounts.i.like.using.blueprint"
28
+ end
24
29
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 10
8
- - 1
9
- version: 0.10.1
8
+ - 2
9
+ version: 0.10.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jose Valim
@@ -22,7 +22,7 @@ autorequire:
22
22
  bindir: bin
23
23
  cert_chain: []
24
24
 
25
- date: 2010-07-02 00:00:00 -04:00
25
+ date: 2010-07-11 00:00:00 -04:00
26
26
  default_executable:
27
27
  dependencies: []
28
28
 
@@ -151,7 +151,7 @@ homepage: http://github.com/indirect/rails3-generators
151
151
  licenses: []
152
152
 
153
153
  post_install_message: "\n\
154
- rails3-generators-0.10.1\n\n\
154
+ rails3-generators-0.10.2\n\n\
155
155
  Be sure to check out the wiki, http://wiki.github.com/indirect/rails3-generators/,\n\
156
156
  for information about recent changes to this project.\n\n\
157
157
  note: if you use erb templates add the follow to your generators block to take full advantage of this gem.\n\