standalone_migrations 0.2.2 → 0.2.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -65,20 +65,12 @@ namespace :db do
65
65
 
66
66
  desc "Create a new migration"
67
67
  task :new_migration do |t|
68
- unless ENV['name']
68
+ unless migration = ENV['name']
69
69
  puts "Error: must provide name of migration to generate."
70
70
  puts "For example: rake #{t.name} name=add_field_to_form"
71
71
  exit 1
72
72
  end
73
73
 
74
- underscore = lambda{|camel_cased_word|
75
- camel_cased_word.to_s.gsub(/::/, '/').
76
- gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
77
- gsub(/([a-z\d])([A-Z])/,'\1_\2').
78
- tr("-", "_").
79
- downcase
80
- }
81
-
82
74
  class_name = migration.split('_').map{|s| s.capitalize }.join
83
75
  file_contents = <<eof
84
76
  class #{class_name} < ActiveRecord::Migration
@@ -91,7 +83,6 @@ class #{class_name} < ActiveRecord::Migration
91
83
  end
92
84
  eof
93
85
 
94
- migration = underscore.call( ENV['name'] )
95
86
  FileUtils.mkdir_p(options[:migrations]) unless File.exist?(options[:migrations])
96
87
  file_name = "#{options[:migrations]}/#{Time.now.utc.strftime('%Y%m%d%H%M%S')}_#{migration}.rb"
97
88
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standalone_migrations}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Todd Huss", "Michael Grosser"]
12
- s.date = %q{2010-03-30}
12
+ s.date = %q{2010-03-31}
13
13
  s.email = %q{thuss@gabrito.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Todd Huss
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-30 00:00:00 +02:00
18
+ date: 2010-03-31 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency