Skip to content
Browse files

Added apn_migrations generator and gert rid of the apn:db:migrate Rak…

…e task.
  • Loading branch information...
1 parent 8d90537 commit 9e8590aeb4c9c7caccf9fff731dcba5e0f5b56ff @markbates markbates committed Jul 26, 2009
View
3 Rakefile
@@ -4,11 +4,12 @@ require 'gemstub'
Gemstub.test_framework = :rspec
Gemstub.gem_spec do |s|
- s.version = "0.1.1"
+ s.version = "0.2.0"
s.rubyforge_project = "magrathea"
s.add_dependency('configatron')
s.email = 'mark@markbates.com'
s.homepage = 'http://www.metabates.com'
+ s.files = FileList['lib/**/*.*', 'README', 'LICENSE', 'bin/**/*.*', 'generators/**/*.*']
end
Gemstub.rdoc do |rd|
View
10 apn_on_rails.gemspec
@@ -2,16 +2,16 @@
Gem::Specification.new do |s|
s.name = %q{apn_on_rails}
- s.version = "0.1.1.20090724152309"
+ s.version = "0.2.0.20090726224957"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["markbates"]
- s.date = %q{2009-07-24}
+ s.date = %q{2009-07-26}
s.description = %q{apn_on_rails was developed by: markbates}
- s.email = %q{}
+ s.email = %q{mark@markbates.com}
s.extra_rdoc_files = ["README", "LICENSE"]
- s.files = ["lib/apn_on_rails/apn_on_rails.rb", "lib/apn_on_rails/app/models/apn/device.rb", "lib/apn_on_rails/app/models/apn/notification.rb", "lib/apn_on_rails/db/migrate/20090723132058_create_apn_devices.rb", "lib/apn_on_rails/db/migrate/20090723132059_create_apn_notifications.rb", "lib/apn_on_rails/tasks/apn.rake", "lib/apn_on_rails/tasks/db.rake", "lib/apn_on_rails.rb", "lib/apn_on_rails_tasks.rb", "README", "LICENSE"]
- s.homepage = %q{}
+ s.files = ["lib/apn_on_rails/apn_on_rails.rb", "lib/apn_on_rails/app/models/apn/device.rb", "lib/apn_on_rails/app/models/apn/notification.rb", "lib/apn_on_rails/tasks/apn.rake", "lib/apn_on_rails/tasks/db.rake", "lib/apn_on_rails.rb", "lib/apn_on_rails_tasks.rb", "README", "LICENSE", "generators/apn_migrations_generator.rb", "generators/templates/apn_migrations/create_apn_devices.rb", "generators/templates/apn_migrations/create_apn_notifications.rb"]
+ s.homepage = %q{http://www.metabates.com}
s.require_paths = ["lib"]
s.rubyforge_project = %q{magrathea}
s.rubygems_version = %q{1.3.4}
View
13 generators/apn_migrations_generator.rb
@@ -0,0 +1,13 @@
+require 'rails_generator'
+# Generates the migrations necessary for APN on Rails
+class ApnMigrationsGenerator < Rails::Generator::Base
+
+ def manifest # :nodoc:
+ record do |m|
+ [:create_apn_devices, :create_apn_notifications].each do |f|
+ m.migration_template(File.join('apn_migrations', "#{f}.rb"), "db/migrate", {:migration_file_name => f, :collision => :skip})
+ end
+ end
+ end
+
+end
View
0 ...tors/apn_migrations/create_apn_devices.rb → ...ates/apn_migrations/create_apn_devices.rb
File renamed without changes.
View
0 ...pn_migrations/create_apn_notifications.rb → ...pn_migrations/create_apn_notifications.rb
File renamed without changes.
View
11 lib/apn_on_rails/generators/apn_migrations_generator.rb
@@ -1,11 +0,0 @@
-require 'rails_generator'
-class ApnMigrationsGenerator < Rails::Generator::Base
- def manifest
- record do |m|
- # m.template "rebba_tasks.rake", "lib/tasks/rebba_tasks.rake", :collision => :force
- #{fixtures}
- #{mts}
-
- end
- end
-end

0 comments on commit 9e8590a

Please sign in to comment.
Something went wrong with that request. Please try again.