songkick-oauth2-provider 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/README.rdoc +11 -8
- data/lib/songkick/oauth2/model/authorization.rb +1 -1
- data/lib/songkick/oauth2/schema.rb +4 -1
- metadata +2 -2
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -96,14 +96,17 @@ behavior:
|
|
96
96
|
=== Schema
|
97
97
|
|
98
98
|
Add the <tt>Songkick::OAuth2::Provider</tt> tables to your app's schema. This is
|
99
|
-
done using <tt>Songkick::OAuth2::Model::Schema.
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
99
|
+
done using <tt>Songkick::OAuth2::Model::Schema.migrate</tt>, which will run all
|
100
|
+
the gem's migrations that have not yet been applied to your database.
|
101
|
+
|
102
|
+
Songkick::OAuth2::Model::Schema.migrate
|
103
|
+
I, [2012-10-31T14:52:33.801428 #7002] INFO -- : Migrating to SongkickOauth2SchemaOriginalSchema (20120828112156)
|
104
|
+
== SongkickOauth2SchemaOriginalSchema: migrating =============================
|
105
|
+
-- create_table(:oauth2_clients)
|
106
|
+
-> 0.0029s
|
107
|
+
-- add_index(:oauth2_clients, [:client_id])
|
108
|
+
-> 0.0009s
|
109
|
+
...
|
107
110
|
|
108
111
|
|
109
112
|
=== Model Mixins
|
@@ -79,7 +79,7 @@ module Songkick
|
|
79
79
|
|
80
80
|
scopes = instance.scopes + (attributes[:scopes] || [])
|
81
81
|
scopes += attributes[:scope].split(/\s+/) if attributes[:scope]
|
82
|
-
instance.scope = scopes.entries.join(' ')
|
82
|
+
instance.scope = scopes.empty? ? nil : scopes.entries.join(' ')
|
83
83
|
|
84
84
|
instance.save && instance
|
85
85
|
|
@@ -2,10 +2,13 @@ module Songkick
|
|
2
2
|
module OAuth2
|
3
3
|
|
4
4
|
class Schema
|
5
|
-
def self.
|
5
|
+
def self.migrate
|
6
6
|
ActiveRecord::Base.logger ||= Logger.new(StringIO.new)
|
7
7
|
ActiveRecord::Migrator.up(migrations_path)
|
8
8
|
end
|
9
|
+
class << self
|
10
|
+
alias :up :migrate
|
11
|
+
end
|
9
12
|
|
10
13
|
def self.migrations_path
|
11
14
|
File.expand_path('../schema', __FILE__)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: songkick-oauth2-provider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|