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 +4 -4
- data/lib/devise_multiple_token_auth/version.rb +1 -1
- data/lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb +28 -0
- data/lib/generators/devise_multiple_token_auth/install_generator.rb +8 -4
- data/lib/generators/devise_multiple_token_auth/templates/migrations/add_push_notification_columns_to_devices.rb +6 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58bb7e3c5d87202a0117101114b78460a6b8dcf9
|
4
|
+
data.tar.gz: 3930a672e22f1e625c5f98166fe7efbf184144da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9c525e554decebe4b57161bfa06483e07288ec886c130b1f5ec07c9f1997dba50b22bb77a6d67f00e01968df70354cfb82c0296209c99e2df64f67555022e7
|
7
|
+
data.tar.gz: a8c66b4c7deed3bf00dc1a14bd5e5a81f543eda2e31459f532f88e2dc4ec1626e843889bf1a380c5c5797beb7caecf975813fbfba344bc7e7d314ae62acb5bcb
|
data/lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb
ADDED
@@ -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
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
|
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.
|
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-
|
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
|