multiauth 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'rails', '>=3.0.0'
4
- gem 'omniauth', "0.1.1"
4
+ gem 'omniauth', "~> 0.1.3"
5
5
 
data/Gemfile.lock CHANGED
@@ -46,38 +46,38 @@ GEM
46
46
  multi_json (0.0.4)
47
47
  net-ldap (0.1.1)
48
48
  nokogiri (1.4.3.1)
49
- oa-basic (0.1.1)
49
+ oa-basic (0.1.3)
50
50
  multi_json (~> 0.0.2)
51
51
  nokogiri (~> 1.4.2)
52
- oa-core (= 0.1.1)
52
+ oa-core (= 0.1.3)
53
53
  rest-client (~> 1.6.0)
54
- oa-core (0.1.1)
54
+ oa-core (0.1.3)
55
55
  rack (~> 1.1)
56
- oa-enterprise (0.1.1)
56
+ oa-enterprise (0.1.3)
57
57
  net-ldap (~> 0.1.1)
58
58
  nokogiri (~> 1.4.2)
59
- oa-core (= 0.1.1)
59
+ oa-core (= 0.1.3)
60
60
  rubyntlm (~> 0.1.1)
61
- oa-oauth (0.1.1)
61
+ oa-oauth (0.1.3)
62
62
  multi_json (~> 0.0.2)
63
63
  nokogiri (~> 1.4.2)
64
- oa-core (= 0.1.1)
64
+ oa-core (= 0.1.3)
65
65
  oauth (~> 0.4.0)
66
66
  oauth2 (~> 0.0.10)
67
- oa-openid (0.1.1)
68
- oa-core (= 0.1.1)
67
+ oa-openid (0.1.3)
68
+ oa-core (= 0.1.3)
69
69
  rack-openid (~> 1.1.1)
70
70
  ruby-openid-apps-discovery
71
71
  oauth (0.4.3)
72
72
  oauth2 (0.0.13)
73
73
  faraday (~> 0.4.1)
74
74
  multi_json (>= 0.0.4)
75
- omniauth (0.1.1)
76
- oa-basic (= 0.1.1)
77
- oa-core (= 0.1.1)
78
- oa-enterprise (= 0.1.1)
79
- oa-oauth (= 0.1.1)
80
- oa-openid (= 0.1.1)
75
+ omniauth (0.1.3)
76
+ oa-basic (= 0.1.3)
77
+ oa-core (= 0.1.3)
78
+ oa-enterprise (= 0.1.3)
79
+ oa-oauth (= 0.1.3)
80
+ oa-openid (= 0.1.3)
81
81
  polyglot (0.3.1)
82
82
  rack (1.2.1)
83
83
  rack-mount (0.6.13)
@@ -116,5 +116,5 @@ PLATFORMS
116
116
  ruby
117
117
 
118
118
  DEPENDENCIES
119
- omniauth (= 0.1.1)
119
+ omniauth (~> 0.1.3)
120
120
  rails (>= 3.0.0)
data/Rakefile CHANGED
@@ -12,8 +12,8 @@ begin
12
12
  gem.authors = ["David A. Cuadrado"]
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
14
14
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
- gem.add_dependency "rails", "3.0.0"
16
- gem.add_dependency "omniauth", "0.1.1"
15
+ gem.add_dependency "rails", ">= 3.0.0"
16
+ gem.add_dependency "omniauth", "~> 0.1.3"
17
17
  end
18
18
  Jeweler::GemcutterTasks.new
19
19
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.5
@@ -14,7 +14,7 @@
14
14
  <% providers.each_slice(3) do |column| %>
15
15
  <div class="column">
16
16
  <% column.each do |provider, config| %>
17
- <a id="btn_<%= count+=1 %>" class="<%= provider %> openid_btn <%= config["class"] %>" title="<%= provider %>" href="/auth/<%= config["openid"] ? "open_id?openid_url=#{config["openid"]}" : "#{provider.downcase}" %>"></a>
17
+ <a id="btn_<%= count+=1 %>" class="<%= provider %> openid_btn <%= config[:class] %>" title="<%= provider %>" href="/auth/<%= config["openid"] ? "open_id?openid_url=#{config["openid"]}" : "#{provider.downcase}" %>"></a>
18
18
  <% end %>
19
19
  </div>
20
20
  <% end %>
@@ -1,7 +1,2 @@
1
1
  <%= multiauth_assets %>
2
- <% if logged_in? %>
3
- <%= multiauth_menu("Connect Your Account") %>
4
- <% else %>
5
- <%= multiauth_box %>
6
- <% end %>
7
-
2
+ <%= multiauth_box %>
@@ -55,14 +55,5 @@ you can override them using the following routes:
55
55
  match "/login" => "multiauth/sessions#new", :as => :new_session
56
56
  match "/logout" => "multiauth/sessions#destroy", :method => :get, :as => :destroy_session
57
57
 
58
- you can override the default view creating the file:
59
- app/views/multiauth/sessions/new.html.haml
60
-
61
- to render the auth providers as a dropdown menu use:
62
- <%= multiauth_menu("connect your account") %>
63
-
64
- you can render single links as follows:
65
- <%= multiauth_link("Google") %>
66
-
67
58
 
68
59
  ===============================================================================
@@ -67,6 +67,12 @@
67
67
  .Launchpad { background-position: 0px -814px; }
68
68
  .LiveJournal { background-position: 0px -861px; }
69
69
  .Vidoop { background-position: 0px -908px; }
70
+ .Gowalla { background-position: 0px -951px; }
71
+ .Ldap { background-position: 0px -999px; }
72
+ .ThirtySevenSignals { background-position: 0px -1047px; }
73
+ .Foursquare { background-position: 0px -1195px; }
74
+ .Identica { background-position: 0px -1143px; }
75
+
70
76
 
71
77
  .OpenID.oselected { background-position: -300px 0; }
72
78
  .Verisign.oselected { background-position: -300px -48px; }
@@ -88,6 +94,12 @@
88
94
  .Launchpad.oselected { background-position: -300px -814px; }
89
95
  .LiveJournal.oselected { background-position: -300px -861px; }
90
96
  .Vidoop.oselected { background-position: -300px -908px; }
97
+ .Gowalla.oselected { background-position:-300px -951px; }
98
+ .Ldap.oselected { background-position: -300px -999px; }
99
+ .ThirtySevenSignals.oselected { background-position: -300px -1047px; }
100
+ .Foursquare.oselected { background-position: -300px -1195px; }
101
+ .Identica.oselected { background-position: -300px -1143px; }
102
+
91
103
 
92
104
  .OpenID:hover { background-position: -150px 0; }
93
105
  .Verisign:hover { background-position: -150px -48px; }
@@ -109,6 +121,11 @@
109
121
  .Launchpad:hover { background-position: -150px -814px; }
110
122
  .LiveJournal:hover { background-position: -150px -861px; }
111
123
  .Vidoop:hover { background-position: -150px -908px; }
124
+ .Gowalla:hover { background-position: -150px -951px; }
125
+ .Ldap:hover { background-position: -150px -999px; }
126
+ .ThirtySevenSignals:hover { background-position: -150px -1047px; }
127
+ .Foursquare:hover { background-position: -150px -1195px; }
128
+ .Identica:hover { background-position: -150px -1143px; }
112
129
 
113
130
  a.openid_large_btn:focus {
114
131
  outline: none;
@@ -58,7 +58,7 @@ jQuery(function ($) {
58
58
  return false;
59
59
  });
60
60
 
61
- $(".openid_btn").click(function(e){
61
+ $form.find(".openid_btn").click(function(e){
62
62
  var a = $(this);
63
63
 
64
64
  if(a.attr("href").match("{user_name}")) {
@@ -81,16 +81,4 @@ jQuery(function ($) {
81
81
  });
82
82
 
83
83
  openidCarouselEffect();
84
-
85
- var intervalId = null;
86
- $("#multiauth-menu").hover(function(){
87
- if(intervalId)
88
- clearTimeout(intervalId);
89
- $(this).addClass("hovering");
90
- }, function() {
91
- var e = $(this);
92
- intervalId = setTimeout(function() {
93
- e.removeClass("hovering");
94
- }, 1000)
95
- })
96
84
  });
@@ -1,11 +1,7 @@
1
1
  module Multiauth
2
2
  module ViewsHelper
3
3
  def multiauth_box
4
- render "multiauth/box"
5
- end
6
-
7
- def multiauth_menu(title = "Sign In")
8
- render "multiauth/menu", :title => title
4
+ render(:partial => "multiauth/box")
9
5
  end
10
6
 
11
7
  def multiauth_assets
@@ -14,14 +10,7 @@ module Multiauth
14
10
  end
15
11
 
16
12
  def multiauth_providers
17
- Multiauth.providers || {}
18
- end
19
-
20
- def multiauth_link(provider, text = "", cssclass = nil)
21
- config = multiauth_providers[provider]
22
- css_class ||= "#{provider} openid_btn #{config["class"]}"
23
-
24
- %@<a class="#{css_class}" title="#{provider}" href="/auth/#{config["openid"] ? "open_id?openid_url=#{config["openid"]}" : "#{provider.downcase}"}">#{text}</a>@
13
+ Multiauth.providers || []
25
14
  end
26
15
  end
27
16
  end
data/multiauth.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{multiauth}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David A. Cuadrado"]
12
- s.date = %q{2010-10-07}
12
+ s.date = %q{2010-10-14}
13
13
  s.description = %q{multi authentication gem using devise & co}
14
14
  s.email = %q{krawek@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
27
27
  "VERSION",
28
28
  "app/controllers/multiauth/sessions_controller.rb",
29
29
  "app/views/multiauth/_box.html.erb",
30
- "app/views/multiauth/_menu.html.erb",
31
30
  "app/views/multiauth/sessions/new.html.erb",
32
31
  "lib/generators/multiauth/multiauth_generator.rb",
33
32
  "lib/generators/templates/README",
@@ -65,17 +64,17 @@ Gem::Specification.new do |s|
65
64
 
66
65
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
66
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
68
- s.add_runtime_dependency(%q<rails>, ["= 3.0.0"])
69
- s.add_runtime_dependency(%q<omniauth>, ["= 0.1.1"])
67
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
68
+ s.add_runtime_dependency(%q<omniauth>, ["~> 0.1.3"])
70
69
  else
71
70
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
72
- s.add_dependency(%q<rails>, ["= 3.0.0"])
73
- s.add_dependency(%q<omniauth>, ["= 0.1.1"])
71
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
72
+ s.add_dependency(%q<omniauth>, ["~> 0.1.3"])
74
73
  end
75
74
  else
76
75
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
77
- s.add_dependency(%q<rails>, ["= 3.0.0"])
78
- s.add_dependency(%q<omniauth>, ["= 0.1.1"])
76
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
77
+ s.add_dependency(%q<omniauth>, ["~> 0.1.3"])
79
78
  end
80
79
  end
81
80
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 5
9
+ version: 0.2.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - David A. Cuadrado
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-07 00:00:00 -05:00
17
+ date: 2010-10-14 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -38,7 +38,7 @@ dependencies:
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - "="
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  segments:
44
44
  - 3
@@ -53,13 +53,13 @@ dependencies:
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
- - - "="
56
+ - - ~>
57
57
  - !ruby/object:Gem::Version
58
58
  segments:
59
59
  - 0
60
60
  - 1
61
- - 1
62
- version: 0.1.1
61
+ - 3
62
+ version: 0.1.3
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  description: multi authentication gem using devise & co
@@ -82,7 +82,6 @@ files:
82
82
  - VERSION
83
83
  - app/controllers/multiauth/sessions_controller.rb
84
84
  - app/views/multiauth/_box.html.erb
85
- - app/views/multiauth/_menu.html.erb
86
85
  - app/views/multiauth/sessions/new.html.erb
87
86
  - lib/generators/multiauth/multiauth_generator.rb
88
87
  - lib/generators/templates/README
@@ -1,17 +0,0 @@
1
- <div id="multiauth-menu">
2
- <h2>
3
- <a href="#"><%= title %></a>
4
- </h2>
5
- <div class="menu-container">
6
- <% count = 0 %>
7
- <% multiauth_providers.each_slice(5) do |providers| %>
8
- <div class="rows">
9
- <% providers.each do |provider, config| %>
10
- <div class="item" style="float: left; width: 19.5%;">
11
- <a id="btn_<%= count+=1 %>" class="<%= provider %> openid_btn <%= config["class"] %>" title="<%= provider %>" href="/auth/<%= config["openid"] ? "open_id?openid_url=#{config["openid"]}" : "#{provider.downcase}" %>"></a>
12
- </div>
13
- <% end %>
14
- </div>
15
- <% end %>
16
- </div>
17
- </div>