phlawski-migration_fu 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -6,11 +6,11 @@ Rails gem / plugin for generating foreign key constraints.
6
6
 
7
7
  === as gem
8
8
 
9
- sudo gem install sleistner-migration_fu --source http://gems.github.com
9
+ sudo gem install phlawski-migration_fu --source http://gems.github.com
10
10
 
11
11
  === or plugin
12
12
 
13
- script/plugin install git://github.com/sleistner/migration_fu.git
13
+ script/plugin install git://github.com/phlawski/migration_fu.git
14
14
 
15
15
  == Usage
16
16
 
data/lib/migration_fu.rb CHANGED
@@ -40,10 +40,10 @@ module ActiveRecord
40
40
  end
41
41
 
42
42
  def process(from_table, to_table, options)
43
- id = options[:name].to_s || "fk_#{from_table}_#{to_table}"
43
+ id = options[:name] || "fk_#{from_table}_#{to_table}"
44
44
 
45
- if id.size > MAX_KEY_LENGTH
46
- id = id.slice(0...MAX_KEY_LENGTH)
45
+ if id.to_s.size > MAX_KEY_LENGTH
46
+ id = id.to_s.slice(0...MAX_KEY_LENGTH)
47
47
  puts "Warning: foreign key id has more then #{MAX_KEY_LENGTH} characters - sliced to '#{id}'"
48
48
  end
49
49
  yield(from_table.to_s, to_table.to_s, id)
data/migration_fu.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{migration_fu}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Steffen Leistner", "Piotr Hlawski"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlawski-migration_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Leistner