dailycred 0.1.33 → 0.1.34

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -111,5 +111,5 @@ To specify where users should be redirected after authentication actions, setup
111
111
  4. Push to the branch (`git push origin my-new-feature`)
112
112
  5. Create new Pull Request
113
113
 
114
- ![](https://www.dailycred.com/dc.gif?client_id=dailycred "")
114
+ ![](https://www.dailycred.com/dc.gif?client_id=dailycred&title=rails_repo "dailycred")
115
115
 
@@ -16,7 +16,7 @@ class SessionsController < ApplicationController
16
16
  end
17
17
 
18
18
  def failure
19
- redirect_to_unauth, notice: params[:message]
19
+ redirect_to_unauth notice: params[:message]
20
20
  end
21
21
 
22
22
  def info
data/dailycred.gemspec CHANGED
@@ -15,5 +15,5 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
16
  gem.name = "dailycred"
17
17
  gem.require_paths = ["lib"]
18
- gem.version = "0.1.33"
18
+ gem.version = "0.1.34"
19
19
  end
@@ -60,7 +60,7 @@ example:
60
60
  </td>
61
61
  <td class=code>
62
62
  <div class='highlight'><pre> <span class="k">def</span> <span class="nf">authenticate</span>
63
- <span class="n">redirect_to_auth</span> <span class="k">unless</span> <span class="n">current_user</span>
63
+ <span class="n">redirect_to_unauth</span> <span class="k">unless</span> <span class="n">current_user</span>
64
64
  <span class="k">end</span></pre></div>
65
65
  </td>
66
66
  </tr>
@@ -106,6 +106,12 @@ make sure we have the correct state passed back and forth</p>
106
106
  <span class="n">redirect_to</span> <span class="n">path</span><span class="p">,</span> <span class="n">opts</span>
107
107
  <span class="k">end</span>
108
108
 
109
+ <span class="k">def</span> <span class="nf">redirect_to_unauth</span> <span class="n">opts</span> <span class="o">=</span> <span class="p">{}</span>
110
+ <span class="n">conf</span> <span class="o">=</span> <span class="no">Rails</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">DAILYCRED_OPTIONS</span>
111
+ <span class="n">path</span> <span class="o">=</span> <span class="o">!</span><span class="n">conf</span><span class="o">[</span><span class="ss">:after_unauth</span><span class="o">].</span><span class="n">nil?</span> <span class="p">?</span> <span class="n">conf</span><span class="o">[</span><span class="ss">:after_unauth</span><span class="o">]</span> <span class="p">:</span> <span class="n">dailycred_engine</span><span class="o">.</span><span class="n">auth_info_path</span>
112
+ <span class="n">redirect_to</span> <span class="n">path</span><span class="p">,</span> <span class="n">opts</span>
113
+ <span class="k">end</span>
114
+
109
115
 
110
116
  <span class="no">ActiveSupport</span><span class="o">.</span><span class="n">on_load</span><span class="p">(</span><span class="ss">:action_controller</span><span class="p">)</span> <span class="k">do</span>
111
117
  <span class="n">helper_method</span> <span class="ss">:current_user</span><span class="p">,</span> <span class="ss">:login_path</span><span class="p">,</span> <span class="ss">:set_state</span><span class="p">,</span> <span class="ss">:dailycred</span><span class="p">,</span> <span class="ss">:authenticate</span>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dailycred
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.33
4
+ version: 0.1.34
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: