newplugin 0.0.1 → 0.0.2

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.
@@ -1,2 +1,6 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/app_root/config/environment')
2
2
  require 'test_help'
3
+
4
+ # Run the migrations
5
+ ActiveRecord::Migration.verbose = false
6
+ ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
@@ -15,10 +15,10 @@ class ModelGenerator < RubiGen::Base
15
15
  @attributes << {:type => x.split(/:/)[1],:name => x.split(/:/)[0]}
16
16
  end
17
17
 
18
- @file_name = @name.pluralize.underscore
18
+ @file_name = @name.singularize.underscore
19
19
  @class_name = @name.singularize.classify
20
- @class_path = File.dirname(@file_name)
21
- @table_name = file_name.gsub(/\//, '_').pluralize
20
+ @class_path = File.dirname(file_name)
21
+ @table_name = @name.pluralize.underscore.gsub(/\//, '_').pluralize
22
22
  end
23
23
 
24
24
  def manifest
data/lib/newplugin.rb CHANGED
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Newplugin
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newplugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhangJinzhu