apn_on_rails 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -67,7 +67,7 @@ Rake tasks that ship with APN on Rails:
67
67
 
68
68
  Now, to create the tables you need for APN on Rails, run the following task:
69
69
 
70
- $ rake apn:db:migrate
70
+ $ ruby script/generate apn_migrations
71
71
 
72
72
  APN on Rails uses the Configatron gem, http://github.com/markbates/configatron/tree/master,
73
73
  to configure itself. APN on Rails has the following default configurations that you change as you
@@ -0,0 +1,13 @@
1
+ require 'rails_generator'
2
+ # Generates the migrations necessary for APN on Rails
3
+ class ApnMigrationsGenerator < Rails::Generator::Base
4
+
5
+ def manifest # :nodoc:
6
+ record do |m|
7
+ [:create_apn_devices, :create_apn_notifications].each do |f|
8
+ m.migration_template(File.join('apn_migrations', "#{f}.rb"), "db/migrate", {:migration_file_name => f, :collision => :skip})
9
+ end
10
+ end
11
+ end
12
+
13
+ end
@@ -1,4 +1,4 @@
1
- class CreateApnDevices < ActiveRecord::Migratio # :nodoc:
1
+ class CreateApnDevices < ActiveRecord::Migration # :nodoc:
2
2
  def self.up
3
3
  create_table :apn_devices do |t|
4
4
  t.text :token, :size => 71, :null => false
@@ -1,11 +1,17 @@
1
1
  namespace :apn do
2
2
 
3
3
  namespace :db do
4
-
5
- desc 'Runs the migrations for apn_on_rails.'
6
- task :migrate => [:environment] do
7
- puts File.join(File.dirname(__FILE__), '..', '..', 'apn_on_rails', 'db', 'migrate')
8
- ActiveRecord::Migrator.up(File.join(File.dirname(__FILE__), '..', '..', 'apn_on_rails', 'db', 'migrate'))
4
+
5
+ task :migrate do
6
+ puts %{
7
+ This task no longer exists. Please generate the migrations like this:
8
+
9
+ $ ruby script/generate apn_migrations
10
+
11
+ Then just run the migrations like you would normally:
12
+
13
+ $ rake db:migrate
14
+ }.strip
9
15
  end
10
16
 
11
17
  end # db
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apn_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-24 00:00:00 -04:00
12
+ date: 2009-07-26 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: "0"
24
24
  version:
25
25
  description: "apn_on_rails was developed by: markbates"
26
- email: ""
26
+ email: mark@markbates.com
27
27
  executables: []
28
28
 
29
29
  extensions: []
@@ -35,16 +35,17 @@ files:
35
35
  - lib/apn_on_rails/apn_on_rails.rb
36
36
  - lib/apn_on_rails/app/models/apn/device.rb
37
37
  - lib/apn_on_rails/app/models/apn/notification.rb
38
- - lib/apn_on_rails/db/migrate/20090723132058_create_apn_devices.rb
39
- - lib/apn_on_rails/db/migrate/20090723132059_create_apn_notifications.rb
40
38
  - lib/apn_on_rails/tasks/apn.rake
41
39
  - lib/apn_on_rails/tasks/db.rake
42
40
  - lib/apn_on_rails.rb
43
41
  - lib/apn_on_rails_tasks.rb
44
42
  - README
45
43
  - LICENSE
44
+ - generators/apn_migrations_generator.rb
45
+ - generators/templates/apn_migrations/create_apn_devices.rb
46
+ - generators/templates/apn_migrations/create_apn_notifications.rb
46
47
  has_rdoc: true
47
- homepage: ""
48
+ homepage: http://www.metabates.com
48
49
  licenses: []
49
50
 
50
51
  post_install_message: