aptible-rails 0.6.0 → 0.6.1

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: 9520a85027c4b70faf022266f45089da536bbd2c
4
- data.tar.gz: db1ab4be12b0cd93f409d1f231a732e2f87c1ed2
3
+ metadata.gz: 44621b35394c6b27b73cf8d00ad4de82dab2bee4
4
+ data.tar.gz: 1eb6479abc4b2bc8992574ac54bf97ca8fd99244
5
5
  SHA512:
6
- metadata.gz: 1e944e3e449f95eeaf43b53dc359b163813cba6fe00f45850d080632a975cdf0ffe07b8af5c590350051f1301ef33f06baae9b8c484b5eb088e7cf79bde6603d
7
- data.tar.gz: edf36846f729d67e817951472d33df86665d5fff14c756deabffaa98adaaffca9bf03758e27704c9bccb80e800596943dce521d2714b09e2bd984f33fec3494f
6
+ metadata.gz: d4aed36b1b17b1815d38e24656d8315a3d60c9cff8307d0d0fb55789aa5288c6d2e97bbec59760854fa9a1dbe116e2f5369df6ced3c1274e2abae8e3224c816b
7
+ data.tar.gz: 2e053c41da75bf9d659c32b5bfba138c91c63e4f7b3e6ef576407adb3012c31ed995cd706792bdcd2050a68699d9bb2020b950c472e67104c15115aa928f7136
@@ -9,7 +9,9 @@ module Aptible
9
9
 
10
10
  included do
11
11
  helper_method :current_user, :current_organization, :user_url,
12
- :organization_url, :criterion_by_handle, :auth_url
12
+ :organization_url, :criterion_by_handle, :auth_url,
13
+ :risk_criterion, :policy_criterion, :security_criterion,
14
+ :training_criterion, :url_helpers
13
15
  end
14
16
 
15
17
  def current_user
@@ -131,6 +133,34 @@ module Aptible
131
133
  uri.query = params.to_query if params
132
134
  uri.to_s
133
135
  end
136
+
137
+ def risk_criterion
138
+ @risk_criterion ||=
139
+ criterion_by_handle(:risk_assessment).decorate
140
+ end
141
+
142
+ def security_criterion
143
+ @security_criterion ||=
144
+ criterion_by_handle(:app_security_interview).decorate
145
+ end
146
+
147
+ def policy_criterion
148
+ @policy_criterion ||= criterion_by_handle(:policy_manual).decorate
149
+ end
150
+
151
+ def training_criterion
152
+ @training_criterion ||= criterion_by_handle('training_log').decorate
153
+ end
154
+
155
+ def bootstrap_backbone
156
+ return unless current_user
157
+
158
+ gon.current_user = current_user.attributes
159
+ gon.security_officer = current_organization.security_officer.attributes
160
+ gon.current_organization = current_organization.attributes
161
+ organization_users = current_organization.users
162
+ gon.current_organization_users = organization_users.map(&:attributes)
163
+ end
134
164
  end
135
165
  end
136
166
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Rails
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
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.6.0
4
+ version: 0.6.1
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-11-13 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_config