backflip 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Backflip
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/backflip.rb CHANGED
@@ -52,7 +52,7 @@ module ActiveRecord
52
52
  end
53
53
 
54
54
  def self.generate_migrations
55
- puts "rails g migration create_#{self.name.underscore} #{@@attributes.join(' ')} #{@@supporting_attributes.join(' ')}"
55
+ puts "rails g model #{self.name.underscore} #{@@attributes.join(' ')} #{@@supporting_attributes.join(' ')} --skip"
56
56
  @@migrations.each do |migration|
57
57
  puts migration
58
58
  end
@@ -68,7 +68,7 @@ module Backflip
68
68
  desc "generate FILE", "generate migrations required for a given model file"
69
69
  def generate(filename)
70
70
  begin
71
- require filename
71
+ require "./#{filename}"
72
72
  filename.split(/\//).last.gsub(/\.rb/, '').classify.constantize.generate_migrations
73
73
  rescue NameError
74
74
  $stderr.print "Ah, there is a dependancy in this model that Backflip won't try to load.\nTry generating the migration before adding in all the goodies.\n\nHere's a hint for what the problem is:\n\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backflip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: