aptible-rails 0.1.2 → 0.1.3

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: 50609d6813d288104a866c8d6e2aef5ea9fadac2
4
- data.tar.gz: d4939021820b97db39033d42ca8bce650737a826
3
+ metadata.gz: ea41bb45af92b0239584a937a73ae6fe24adc447
4
+ data.tar.gz: c79fec5c2ab29a3b67d483b651bb340f9541bd28
5
5
  SHA512:
6
- metadata.gz: db49e4ada9f1c8797d4cf5bccbe2ae0c306321c855ec1f28f25312f50715cfa90865b3608b95826eafaa2447fd4cb4aaf0337c85901d0ec9d8a49f828b58cbe7
7
- data.tar.gz: 14b6d4fd721b2640273ab5440a2aaba3cb96efd129bc9998a64499cd4c8d03ee2098673fa00001afa8559aec471e002d2bb7e815e6218c2bd4526cced93ee7aa
6
+ metadata.gz: cfef7463039136be1e97478d9d1a6aa59347c67647864baa279480f51ae22c15e46c23123ae00ae71d39d948263a08bbb5d4d5ef25e10f87375d7d1000afb356
7
+ data.tar.gz: dff6707756fe115cc3844a3e2668d48c6822ba82bf42af6a2f8d95393416e160f3e4341755bca35c275a74229e33e937059ae2090fb3bfdaa5dc8f68fb45a75f
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
10
10
  spec.version = Aptible::Rails::VERSION
11
11
  spec.authors = ['Frank Macreery']
12
12
  spec.email = ['frank@macreery.com']
13
- spec.description = %q{Rails helpers for Aptible service applications}
14
- spec.summary = %q{Rails helpers for Aptible service applications}
13
+ spec.description = %q(Rails helpers for Aptible service applications)
14
+ spec.summary = %q(Rails helpers for Aptible service applications)
15
15
  spec.homepage = 'https://github.com/aptible/aptible-rails'
16
16
  spec.license = 'MIT'
17
17
 
@@ -7,7 +7,8 @@ module Aptible
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  included do
10
- helper_method :auth, :api, :current_aptible_user
10
+ helper_method :auth, :api, :current_aptible_user,
11
+ :current_organization
11
12
  end
12
13
 
13
14
  def auth
@@ -24,6 +25,10 @@ module Aptible
24
25
  clear_session_cookie
25
26
  end
26
27
 
28
+ def current_organization
29
+ @current_organization ||= auth.organizations.first
30
+ end
31
+
27
32
  def service_token
28
33
  return unless session_token && session_token.session
29
34
  @service_token ||= service_token_for(session_token)
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Rails
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
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.1.2
4
+ version: 0.1.3
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-03-09 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config