devise_oauth2_rails4 1.1.4 → 1.1.5
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50f683c2aaf11afde687f792b5392b73b653624e
|
4
|
+
data.tar.gz: 7687c696f5f15cd8eb86842c49c322cd91410fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 764b7cc5b68c7587ddd38aabc88c020b76ca8d36f85463118811cd58dceccfda679e0a75be49eaf703fb0a3463acfb4196e4d279e520dfa5eafeab545a6fdac0
|
7
|
+
data.tar.gz: 76f80b89613d5ed6d9d0926c6ad6d2c985396004287583506397caed0ce288480693148bfb0c01de58ab774a3839d2f785b1034cfb795adc93222114904b5d60
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class DeviseOauth2UpgradeToVersion2 < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
|
4
|
+
change_table :oauth2_clients do |t|
|
5
|
+
t.belongs_to :owner, polymorphic: true
|
6
|
+
t.index :owner_id
|
7
|
+
end
|
8
|
+
|
9
|
+
change_table :oauth2_access_tokens do |t|
|
10
|
+
t.rename :user_id, :owner_id
|
11
|
+
t.string :owner_type
|
12
|
+
end
|
13
|
+
|
14
|
+
change_table :oauth2_refresh_tokens do |t|
|
15
|
+
t.rename :user_id, :owner_id
|
16
|
+
t.string :owner_type
|
17
|
+
end
|
18
|
+
|
19
|
+
change_table :oauth2_authorization_codes do |t|
|
20
|
+
t.rename :user_id, :owner_id
|
21
|
+
t.string :owner_type
|
22
|
+
end
|
23
|
+
|
24
|
+
Devise::Oauth2::AuthorizationCode.update_all("owner_type = 'User'")
|
25
|
+
Devise::Oauth2::Client.update_all("owner_type = 'User'")
|
26
|
+
Devise::Oauth2::AccessToken.update_all("owner_type = 'User'")
|
27
|
+
Devise::Oauth2::RefreshToken.update_all("owner_type = 'User'")
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Devise
|
2
|
+
module Oauth2
|
3
|
+
class UpgradeGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
Devise::Oauth2::UpgradeGenerator.source_root(File.expand_path '../../../../../', __FILE__)
|
6
|
+
|
7
|
+
def upgrade
|
8
|
+
copy_file 'db/migrate/20140307013534_devise_oauth2_upgrade_to_version2.rb', 'db/migrate/20140307013534_devise_oauth2_upgrade_to_version2.rb'
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_oauth2_rails4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Wheeler
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- Rakefile
|
169
169
|
- app/controllers/devise/oauth2/authorizations_controller.rb
|
170
170
|
- app/controllers/devise/oauth2/tokens_controller.rb
|
171
|
+
- app/helpers/permissions_helper.rb
|
171
172
|
- app/models/devise/oauth2/access_token.rb
|
172
173
|
- app/models/devise/oauth2/authorization_code.rb
|
173
174
|
- app/models/devise/oauth2/client.rb
|
@@ -177,6 +178,7 @@ files:
|
|
177
178
|
- app/views/devise/oauth2/authorizations/new.html.erb
|
178
179
|
- config/routes.rb
|
179
180
|
- db/migrate/20111014160714_create_devise_oauth2_providable_schema.rb
|
181
|
+
- db/migrate/20140307013534_devise_oauth2_upgrade_to_version2.rb
|
180
182
|
- devise_oauth2_rails4.gemspec
|
181
183
|
- lib/devise/oauth2/engine.rb
|
182
184
|
- lib/devise/oauth2/expirable_token.rb
|
@@ -192,6 +194,7 @@ files:
|
|
192
194
|
- lib/devise/oauth2/version.rb
|
193
195
|
- lib/devise_oauth2_rails4.rb
|
194
196
|
- lib/generators/devise/oauth2/migrations_generator.rb
|
197
|
+
- lib/generators/devise/oauth2/upgrade_generator.rb
|
195
198
|
- lib/generators/devise/oauth2/views_generator.rb
|
196
199
|
- rails/tasks/engine.rake
|
197
200
|
- script/rails
|