devise_multiple_token_auth 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22146ddf15c7d422ce8cd6ff4412b3847bbf15f5
4
- data.tar.gz: a07c8d5052322abbcd1c1bb35d8519656778551e
3
+ metadata.gz: 58bb7e3c5d87202a0117101114b78460a6b8dcf9
4
+ data.tar.gz: 3930a672e22f1e625c5f98166fe7efbf184144da
5
5
  SHA512:
6
- metadata.gz: c0c27f17e238151ac6b8eb6ccccda91f02730601bdb1f787963a8a9b7657d8de2def4a2f6711c9bd38405ae02d5372556018c9c3bca4c58039d2be7d75a7b54f
7
- data.tar.gz: 5b7d25aa907ec75efcf6d405322f74837cff69f3d035455e5fefb3d824cfa31e3ec39147f7f05ad7629cbc8fd93468765734a86f7967cdf8bbc07805f5b75805
6
+ metadata.gz: 3d9c525e554decebe4b57161bfa06483e07288ec886c130b1f5ec07c9f1997dba50b22bb77a6d67f00e01968df70354cfb82c0296209c99e2df64f67555022e7
7
+ data.tar.gz: a8c66b4c7deed3bf00dc1a14bd5e5a81f543eda2e31459f532f88e2dc4ec1626e843889bf1a380c5c5797beb7caecf975813fbfba344bc7e7d314ae62acb5bcb
@@ -1,3 +1,3 @@
1
1
  module DeviseMultipleTokenAuth
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,28 @@
1
+ require 'rails/generators'
2
+ require 'securerandom'
3
+
4
+ module DeviseMultipleTokenAuth
5
+ class InstallGenerator < Rails::Generators::Base
6
+ include Rails::Generators::Migration
7
+ source_root File.expand_path("../templates", __FILE__)
8
+ class_option :orm
9
+
10
+ desc "Sets up rails project token authentication with devise with columns for push notification data"
11
+ def self.next_migration_number(path)
12
+ sleep 1
13
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
14
+ end
15
+
16
+ def create_migrations
17
+ filepath = "#{self.class.source_root}/migrations/add_push_notification_columns_to_devices.rb"
18
+ name = File.basename(filepath)
19
+ migration_template "migrations/#{name}", "db/migrate/#{name}"
20
+
21
+ # Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
22
+ # name = File.basename(filepath)
23
+ # migration_template "migrations/#{name}", "db/migrate/#{name}"
24
+ # end
25
+ end
26
+ end
27
+
28
+ end
@@ -28,10 +28,14 @@ module DeviseMultipleTokenAuth
28
28
  end
29
29
 
30
30
  def create_migrations
31
- Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
32
- name = File.basename(filepath)
33
- migration_template "migrations/#{name}", "db/migrate/#{name}"
34
- end
31
+ filepath = "#{self.class.source_root}/migrations/create_devise_multiple_token_auth_devices.rb"
32
+ name = File.basename(filepath)
33
+ migration_template "migrations/#{name}", "db/migrate/#{name}"
34
+
35
+ # Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
36
+ # name = File.basename(filepath)
37
+ # migration_template "migrations/#{name}", "db/migrate/#{name}"
38
+ # end
35
39
  end
36
40
  end
37
41
 
@@ -0,0 +1,6 @@
1
+ class AddPushNotificationColumnsToDevices < ActiveRecord::Migration
2
+ def change
3
+ add_column :devise_multiple_token_auth_devices, :platform, :string
4
+ add_column :devise_multiple_token_auth_devices, :push_token, :string
5
+ end
6
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_multiple_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Juncker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-18 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -60,8 +60,10 @@ files:
60
60
  - lib/devise_multiple_token_auth/active_record/base.rb
61
61
  - lib/devise_multiple_token_auth/engine.rb
62
62
  - lib/devise_multiple_token_auth/version.rb
63
+ - lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb
63
64
  - lib/generators/devise_multiple_token_auth/install_generator.rb
64
65
  - lib/generators/devise_multiple_token_auth/templates/devise_multiple_token_auth.rb
66
+ - lib/generators/devise_multiple_token_auth/templates/migrations/add_push_notification_columns_to_devices.rb
65
67
  - lib/generators/devise_multiple_token_auth/templates/migrations/create_devise_multiple_token_auth_devices.rb
66
68
  - lib/tasks/devise_multiple_token_auth_tasks.rake
67
69
  - test/devise_multiple_token_auth_test.rb