doorkeeper_assertion_flow 0.0.1 → 0.0.2

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: c572fe86c187f49a09439abad9f605d86adc575b
4
- data.tar.gz: 81fb250f19da0ee4494787958e0115aeca6b23e7
3
+ metadata.gz: 2066529d7f457536ffca8e604c7f42d43b10fdd9
4
+ data.tar.gz: 69d2a1186e8b87ca7aea7aaff3ade93015254112
5
5
  SHA512:
6
- metadata.gz: 495de03c2280ae34d52f58c5a587101c11b9ede2d70791968a6412b6cddf79373353bb7750d1b8c38c06c876acf788860a4ce0aad2469edfe9d38dc5be648243
7
- data.tar.gz: be3044495a03394fb2b752f2ed0034ab154006dd61df80ac267c93dd69dc3365658060627a0a22628374d2c4e710ac8fdc48b2edd316ea5399072fb8474b63df
6
+ metadata.gz: 8b09f011593abdec16cb19a7245a89d4f3299d27c3bbb0ef1350f722e5563b5580529868a360ae9e7eef623512e3681d88bb0af6feede2c1215efae2d0c8d804
7
+ data.tar.gz: e9f590c424632fcbff5bbc26153d5f2c8d994cfd6693cc72c131db12fba66688c0c2b7aec0a8840b6ea40a06e0bb4865fefa23d601416dbcb650c59a55fe4fa2
@@ -1,7 +1,37 @@
1
- require_relative 'helpers/controller'
2
- require_relative 'server'
3
- require_relative 'config'
4
1
  require_relative 'request/assertion'
5
2
 
6
- require_relative 'assertion_flow/railtie'
7
3
  require_relative 'assertion_flow/version'
4
+ require_relative 'assertion_flow/railtie'
5
+
6
+
7
+ module Doorkeeper
8
+ module AssertionFlow
9
+
10
+ def resource_owner_from_assertion
11
+ instance_eval &Doorkeeper.configuration.resource_owner_from_assertion
12
+ end
13
+
14
+ end
15
+ end
16
+
17
+ module Doorkeeper
18
+ class Server
19
+
20
+ def resource_owner_from_assertion
21
+ context.send :resource_owner_from_assertion
22
+ end
23
+
24
+ end
25
+ end
26
+
27
+ module Doorkeeper
28
+ class Config
29
+
30
+ option :resource_owner_from_assertion,
31
+ default: ->(routes) {
32
+ warn I18n.t('doorkeeper.errors.messages.assertion_flow_not_configured')
33
+ nil
34
+ }
35
+
36
+ end
37
+ end
@@ -1,6 +1,11 @@
1
1
  module Doorkeeper
2
2
  module AssertionFlow
3
3
  class Railtie < ::Rails::Railtie
4
+
5
+ initializer 'doorkeeper.assertion_flow' do
6
+ Doorkeeper::Helpers::Controller.send :include, Doorkeeper::AssertionFlow
7
+ end
8
+
4
9
  end
5
10
  end
6
11
  end
@@ -3,7 +3,7 @@ module Doorkeeper
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 0
6
- REVISION = 1
6
+ REVISION = 2
7
7
 
8
8
  VERSION = [MAJOR, MINOR, REVISION].compact.join '.'
9
9
 
@@ -0,0 +1 @@
1
+ require_relative 'doorkeeper/assertion_flow'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper_assertion_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Iwanaga
@@ -84,10 +84,8 @@ files:
84
84
  - lib/doorkeeper/assertion_flow.rb
85
85
  - lib/doorkeeper/assertion_flow/railtie.rb
86
86
  - lib/doorkeeper/assertion_flow/version.rb
87
- - lib/doorkeeper/config.rb
88
- - lib/doorkeeper/helpers/controller.rb
89
87
  - lib/doorkeeper/request/assertion.rb
90
- - lib/doorkeeper/server.rb
88
+ - lib/doorkeeper_assertion_flow.rb
91
89
  homepage: https://github.com/creasty/doorkeeper_assertion_flow
92
90
  licenses:
93
91
  - MIT
@@ -1,11 +0,0 @@
1
- module Doorkeeper
2
- class Config
3
-
4
- option :resource_owner_from_assertion,
5
- default: ->(routes) {
6
- warn I18n.t('doorkeeper.errors.messages.assertion_flow_not_configured')
7
- nil
8
- }
9
-
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- module Doorkeeper
2
- module Helpers
3
- module Controller
4
-
5
- def resource_owner_from_assertion
6
- instance_eval &Doorkeeper.configuration.resource_owner_from_assertion
7
- end
8
-
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- module Doorkeeper
2
- class Server
3
-
4
- def resource_owner_from_assertion
5
- context.send :resource_owner_from_assertion
6
- end
7
-
8
- end
9
- end