aptible-rails 0.4.11 → 0.4.12

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: 35be1dc385803dad441f142b272018c07e5d530b
4
- data.tar.gz: 7d1fd4dff716ea18fdc0e4903f254d5187bee7d1
3
+ metadata.gz: 38a2e5fb3f7144a4d434f645c1a85a02c387dc56
4
+ data.tar.gz: fa23b67121c9e933e98d89730c7dab9ba3363647
5
5
  SHA512:
6
- metadata.gz: 9a5cc08fe81f23303bb87445bb5ee46c89d3dded0fbbcdef9cb5c82a4db2e010828b087b84779883b96ca7dd4a0730ca14f7d3388009ef444f7627d5b5d5c5d8
7
- data.tar.gz: 443f0202afed082ef15e6082512e75f1d7ccae449833a8fd2cbc485fd6eb2752f14cd20073df23c3b3eeb0738bd08c58da76fec1f03c5f0da598170b2b431042
6
+ metadata.gz: 7ca33fea7206a36d43ea0b9aaa67f5b027736e681bd25fab8c1e817abd8b95bdc7051d379e349c169b729eda18e516816cc8820332cd5f8ac37aba59497bd1fa
7
+ data.tar.gz: f0aaf57aa9485b7a7006a6ebdc220d84482313a7b677bab50c0b2244bd8967d17cc782d025165456bf384299f966d53123d0091a80cebe074cd993a11c916f49
@@ -39,8 +39,9 @@ module Aptible
39
39
 
40
40
  # before_action :set_default_organization
41
41
  def set_default_organization
42
- self.current_organization ||=
43
- Aptible::Auth::Organization.all(token: session_token).first
42
+ return current_organization if current_organization
43
+ orgs = Aptible::Auth::Organization.all(token: session_token)
44
+ self.current_organization = orgs.first if orgs.any?
44
45
  end
45
46
 
46
47
  # before_action :authenticate_user
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Rails
3
- VERSION = '0.4.11'
3
+ VERSION = '0.4.12'
4
4
  end
5
5
  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.11
4
+ version: 0.4.12
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-08-07 00:00:00.000000000 Z
11
+ date: 2014-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config