aptible-rails 0.4.4 → 0.4.5

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: 684af5ad3b6c94d37a76145f951501b69c5e3a04
4
- data.tar.gz: b47325dda608009d447c4afa4e812922ed72c45e
3
+ metadata.gz: 4958636cae6b034e1241110f6e1774f51e6b5e80
4
+ data.tar.gz: 8596952c947ab63ab3a6a5d3bbe706f1d12a2823
5
5
  SHA512:
6
- metadata.gz: 757ee419b0adcd8ac635f3f169b08d1a5d08f503b113afbad6e97345476718d6b88648b5a73ea310b20c4e268e0e114ec4f0f12e8e8e05eaaed41b5cea27b937
7
- data.tar.gz: bdde857f15730e6576610469a7c4b1e5c1f3bbc26c97122e38a324f5792d0a9d7d1f42372b2e028e28ca50b1508dd8ea429136a9503bfdf3aab09e5ac480de66
6
+ metadata.gz: b4541522805f44c58dbb763cbc1f717bd3058ab9ecfbcb62916b78cd2ce4a3a54af62e237cf7f2fca99f62f6821904330c36faae1e0118254dd773b1be065b65
7
+ data.tar.gz: bd0c509d1c06c1debd5d4f0b36437b2934961d6a343bddc6e32a7d3651bbcdb23b19cd6a386f85c1456818fafaeaf908ef52fe23b588cb5fb2a9009f84381798
@@ -9,7 +9,7 @@ module Aptible
9
9
 
10
10
  included do
11
11
  helper_method :current_user, :current_organization, :user_url,
12
- :organization_url, :criterion_by_handle
12
+ :organization_url, :criterion_by_handle, :auth_url
13
13
  end
14
14
 
15
15
  def current_user
@@ -105,6 +105,12 @@ module Aptible
105
105
  organization: current_organization
106
106
  ).first
107
107
  end
108
+
109
+ def auth_url(path = '/', params = {})
110
+ uri = URI.join(Aptible::Auth.configuration.root_url, path)
111
+ uri.query = params.to_query if params
112
+ uri.to_s
113
+ end
108
114
  end
109
115
  end
110
116
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Rails
3
- VERSION = '0.4.4'
3
+ VERSION = '0.4.5'
4
4
  end
5
5
  end
@@ -10,10 +10,6 @@ module Aptible
10
10
  "https://secure.gravatar.com/avatar/#{digest}?s=#{size}"
11
11
  end
12
12
 
13
- def auth_url(path = '/')
14
- URI.join Aptible::Auth.configuration.root_url, path
15
- end
16
-
17
13
  def controller?(*controller)
18
14
  controller.include?(params[:controller])
19
15
  end
@@ -21,6 +17,15 @@ module Aptible
21
17
  def action?(*action)
22
18
  action.include?(params[:action])
23
19
  end
20
+
21
+ def verification_code_reset_url
22
+ callback = "#{dashboard_url}/callback?type=verification_code_reset"
23
+ auth_url(
24
+ '/reset',
25
+ type: 'verification_code',
26
+ redirect_uri: callback
27
+ )
28
+ end
24
29
  end
25
30
  end
26
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config