sso_provyder 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,6 @@
1
1
  Authentifyd.devise_config = { :registrations_controller => "SsoProvyder::Registrations" }
2
2
  Authentifyd.path = SsoProvyder.authentifyd_path
3
3
  Authentifyd.path_prefix = SsoProvyder.path
4
- Authentifyd.custom_css = SsoProvyder.custom_css
5
- Authentifyd.custom_js = SsoProvyder.custom_js
6
4
 
7
5
  module SsoProvyder
8
6
  class Engine < Rails::Engine
data/config/routes.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  SsoProvyder::Engine.routes.draw do
2
2
  root :to => redirect { |p, req| req.flash.keep; "#{SsoProvyder.default_root}" }
3
- mount Authentifyd::Engine => Authentifyd.path
3
+ mount Authentifyd::Engine => Authentifyd.path, :as => "authentifyd"
4
4
 
5
5
  match 'auth/sso/authorize' => 'auth_web#authorize'
6
6
  match 'auth/sso/access_token' => 'auth_web#access_token'
@@ -5,5 +5,17 @@ module SsoProvyder
5
5
  config.generators do |g|
6
6
  g.test_framework :rspec, :view_specs => false
7
7
  end
8
+
9
+ config.sso_provyder = ActiveSupport::OrderedOptions.new
10
+
11
+ initializer "sso_provyder.configure" do |app|
12
+ SsoProvyder.configure(app.config.sso_provyder)
13
+ config.authentifyd = {
14
+ :custom_head_snippet => SsoProvyder.authentifyd_custom_head_snippet,
15
+ :custom_bottom_snippet => SsoProvyder.authentifyd_custom_bottom_snippet,
16
+ :top_navbar_snippet => SsoProvyder.authentifyd_top_navbar_snippet
17
+ }
18
+ end
19
+
8
20
  end
9
21
  end
@@ -1,3 +1,3 @@
1
1
  module SsoProvyder
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/sso_provyder.rb CHANGED
@@ -27,6 +27,12 @@ module SsoProvyder
27
27
  @@default_root ||= "/"
28
28
  end
29
29
 
30
- mattr_accessor :custom_css, :custom_js
30
+ mattr_accessor :authentifyd_custom_head_snippet, :authentifyd_custom_bottom_snippet, :authentifyd_top_navbar_snippet
31
+
32
+ def self.configure(config={})
33
+ @@authentifyd_custom_head_snippet ||= config[:authentifyd_custom_head_snippet]
34
+ @@authentifyd_custom_bottom_snippet ||= config[:authentifyd_custom_bottom_snippet]
35
+ @@authentifyd_top_navbar_snippet ||= config[:authentifyd_top_navbar_snippet]
36
+ end
31
37
  end
32
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sso_provyder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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: 2013-03-05 00:00:00.000000000 Z
12
+ date: 2013-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 1.0.4
53
+ version: 1.0.6
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.4
61
+ version: 1.0.6
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: mysql2
64
64
  requirement: !ruby/object:Gem::Requirement