phi_attrs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/phi_attrs/phi_record.rb +8 -3
- data/lib/phi_attrs/railtie.rb +1 -1
- data/lib/phi_attrs/version.rb +1 -1
- metadata +2 -3
- data/.rspec_status +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f28f8b165404acd488de741070670268bb5e1a3
|
|
4
|
+
data.tar.gz: 8610013fc23d93100ba5829327a85c32516a2f38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b181df2aacce039f31c31a97051434f99a5dc96f975f2668eba97a7d7cff0a357f6aed8eca75a03a75945b1b4489083e489318e4ba680a446968b93d3142285
|
|
7
|
+
data.tar.gz: 1bfa9fac24405baa8a8e3e91eb8f5db4f7602413254143d9b8526d61f45f396250351bb333ca99da35a49a293d303521466974c79ffa0a83ecf9ce8e391463a7
|
data/.gitignore
CHANGED
data/lib/phi_attrs/phi_record.rb
CHANGED
|
@@ -7,8 +7,11 @@ module PhiAttrs
|
|
|
7
7
|
included do
|
|
8
8
|
class_attribute :__phi_exclude_methods
|
|
9
9
|
class_attribute :__phi_include_methods
|
|
10
|
+
class_attribute :__phi_extended_methods
|
|
10
11
|
class_attribute :__phi_methods_wrapped
|
|
11
12
|
|
|
13
|
+
after_initialize :wrap_phi
|
|
14
|
+
|
|
12
15
|
self.__phi_methods_wrapped = []
|
|
13
16
|
end
|
|
14
17
|
|
|
@@ -21,6 +24,10 @@ module PhiAttrs
|
|
|
21
24
|
self.__phi_include_methods = methods.map(&:to_s)
|
|
22
25
|
end
|
|
23
26
|
|
|
27
|
+
def extend_phi_access(*methods)
|
|
28
|
+
self.__phi_extended_methods = methods.map(&:to_s)
|
|
29
|
+
end
|
|
30
|
+
|
|
24
31
|
def allow_phi!(user_id, reason)
|
|
25
32
|
RequestStore.store[:phi_access] ||= {}
|
|
26
33
|
|
|
@@ -42,9 +49,7 @@ module PhiAttrs
|
|
|
42
49
|
end
|
|
43
50
|
end
|
|
44
51
|
|
|
45
|
-
def
|
|
46
|
-
super(*args)
|
|
47
|
-
|
|
52
|
+
def wrap_phi
|
|
48
53
|
# Disable PHI access by default
|
|
49
54
|
@__phi_access_allowed = false
|
|
50
55
|
@__phi_access_logged = false
|
data/lib/phi_attrs/railtie.rb
CHANGED
data/lib/phi_attrs/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phi_attrs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wyatt Kirby
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-07-
|
|
11
|
+
date: 2018-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -173,7 +173,6 @@ extra_rdoc_files: []
|
|
|
173
173
|
files:
|
|
174
174
|
- ".gitignore"
|
|
175
175
|
- ".rspec"
|
|
176
|
-
- ".rspec_status"
|
|
177
176
|
- ".travis.yml"
|
|
178
177
|
- Appraisals
|
|
179
178
|
- Dockerfile
|
data/.rspec_status
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
example_id | status | run_time |
|
|
2
|
-
------------------------------- | ------ | --------------- |
|
|
3
|
-
./spec/phi_attrs_spec.rb[1:1] | passed | 0.0012 seconds |
|
|
4
|
-
./spec/phi_attrs_spec.rb[1:2:1] | passed | 0.00702 seconds |
|
|
5
|
-
./spec/phi_attrs_spec.rb[1:2:2] | passed | 0.00064 seconds |
|
|
6
|
-
./spec/phi_attrs_spec.rb[1:2:3] | passed | 0.00054 seconds |
|
|
7
|
-
./spec/phi_attrs_spec.rb[1:3:1] | passed | 0.00642 seconds |
|
|
8
|
-
./spec/phi_attrs_spec.rb[1:3:2] | passed | 0.00121 seconds |
|
|
9
|
-
./spec/phi_attrs_spec.rb[1:4:1] | passed | 0.00085 seconds |
|
|
10
|
-
./spec/phi_attrs_spec.rb[1:4:2] | passed | 0.00075 seconds |
|
|
11
|
-
./spec/phi_attrs_spec.rb[1:4:3] | passed | 0.00086 seconds |
|
|
12
|
-
./spec/phi_attrs_spec.rb[1:5:1] | passed | 0.00068 seconds |
|
|
13
|
-
./spec/phi_attrs_spec.rb[1:5:2] | passed | 0.00444 seconds |
|
|
14
|
-
./spec/phi_attrs_spec.rb[1:5:3] | passed | 0.00091 seconds |
|