phi_attrs 0.3.0 → 0.3.2
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/README.md +3 -4
- data/lib/phi_attrs/phi_record.rb +35 -30
- data/lib/phi_attrs/version.rb +1 -1
- metadata +6 -28
- data/.github/workflows/build.yml +0 -27
- data/.github/workflows/publish.yml +0 -25
- data/.gitignore +0 -23
- data/.rspec +0 -3
- data/.rubocop.yml +0 -94
- data/Appraisals +0 -15
- data/CHANGELOG.md +0 -17
- data/Dockerfile +0 -21
- data/Gemfile +0 -8
- data/Rakefile +0 -12
- data/bin/console +0 -20
- data/bin/helpers/docker +0 -12
- data/bin/rubo_fix +0 -6
- data/bin/run_tests +0 -19
- data/bin/setup +0 -9
- data/bin/ssh_to_container +0 -8
- data/config.ru +0 -6
- data/docker/start.sh +0 -7
- data/docker-compose.yml +0 -37
- data/gemfiles/rails_6.1.gemfile +0 -10
- data/gemfiles/rails_7.0.gemfile +0 -10
- data/phi_attrs.gemspec +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb209a550589eee5edbb17853c56c001c9ce8f7292784e1775cebb644468b830
|
4
|
+
data.tar.gz: 0ca474072ecf6b33b2491ac77f097622e4611716d8c95fb03afee896615b8ac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19021f005a8283d3db4da049c8278dd63b4e0cf5b229ddec2274b414501c9414347e8553d47bfdf5597d06f3da3d4ae2c679fe852d98c8a94e5299f7cb598f1e
|
7
|
+
data.tar.gz: 8fdf599c5db471f842ee25fb91e50d5e54d3c9174978e709ebab5c6d45219a7bc8025f3b7060a51d425bc5fcd1176bcd7ea04df0054b50e8fb48b83c41658170
|
data/README.md
CHANGED
@@ -438,9 +438,8 @@ Tests are written using [RSpec](http://rspec.info/) and are setup to use [Apprai
|
|
438
438
|
$ bundle exec appraisal rspec spec/path/to/spec.rb
|
439
439
|
|
440
440
|
To run just a particular rails version:
|
441
|
-
$ bundle exec appraisal
|
442
|
-
$ bundle exec appraisal rails-
|
443
|
-
$ bundle exec appraisal rails-6.0 rspec
|
441
|
+
$ bundle exec appraisal rails_6.1 rspec
|
442
|
+
$ bundle exec appraisal rails-7.0 rspec
|
444
443
|
|
445
444
|
### Console
|
446
445
|
|
@@ -464,7 +463,7 @@ To release a new version, update the version number in `version.rb`, and then ru
|
|
464
463
|
|
465
464
|
Bug reports and pull requests are welcome on GitHub at https://github.com/apsislabs/phi_attrs.
|
466
465
|
|
467
|
-
Any PRs should be accompanied with documentation in `README.md
|
466
|
+
Any PRs should be accompanied with documentation in `README.md`.
|
468
467
|
|
469
468
|
## License
|
470
469
|
|
data/lib/phi_attrs/phi_record.rb
CHANGED
@@ -142,32 +142,32 @@ module PhiAttrs
|
|
142
142
|
# Save this so we don't revoke access previously extended outside the block
|
143
143
|
frozen_instances = __instances_with_extended_phi.index_with { |obj| obj.instance_variable_get(:@__phi_relations_extended).clone }
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
145
|
+
begin
|
146
|
+
if allow_only.nil?
|
147
|
+
allow_phi!(user_id, reason)
|
148
|
+
else
|
149
|
+
allow_only.each { |t| t.allow_phi!(user_id, reason) }
|
150
|
+
end
|
150
151
|
|
151
|
-
|
152
|
+
return yield
|
153
|
+
ensure
|
154
|
+
__instances_with_extended_phi.each do |obj|
|
155
|
+
if frozen_instances.include?(obj)
|
156
|
+
old_extensions = frozen_instances[obj]
|
157
|
+
new_extensions = obj.instance_variable_get(:@__phi_relations_extended) - old_extensions
|
158
|
+
obj.send(:revoke_extended_phi!, new_extensions) if new_extensions.any?
|
159
|
+
else
|
160
|
+
obj.send(:revoke_extended_phi!) # Instance is new to the set, so revoke everything
|
161
|
+
end
|
162
|
+
end
|
152
163
|
|
153
|
-
|
154
|
-
|
155
|
-
old_extensions = frozen_instances[obj]
|
156
|
-
new_extensions = obj.instance_variable_get(:@__phi_relations_extended) - old_extensions
|
157
|
-
obj.send(:revoke_extended_phi!, new_extensions) if new_extensions.any?
|
164
|
+
if allow_only.nil?
|
165
|
+
disallow_last_phi!
|
158
166
|
else
|
159
|
-
|
167
|
+
allow_only.each { |t| t.disallow_last_phi!(preserve_extensions: true) }
|
168
|
+
# We've handled any newly extended allowances ourselves above
|
160
169
|
end
|
161
170
|
end
|
162
|
-
|
163
|
-
if allow_only.nil?
|
164
|
-
disallow_last_phi!
|
165
|
-
else
|
166
|
-
allow_only.each { |t| t.disallow_last_phi!(preserve_extensions: true) }
|
167
|
-
# We've handled any newly extended allowances ourselves above
|
168
|
-
end
|
169
|
-
|
170
|
-
result
|
171
171
|
end
|
172
172
|
|
173
173
|
# Explicitly disallow phi access in a specific area of code. This does not
|
@@ -385,15 +385,15 @@ module PhiAttrs
|
|
385
385
|
raise ArgumentError, 'block required' unless block_given?
|
386
386
|
|
387
387
|
extended_instances = @__phi_relations_extended.clone
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
388
|
+
begin
|
389
|
+
allow_phi!(user_id, reason)
|
390
|
+
|
391
|
+
return yield
|
392
|
+
ensure
|
393
|
+
new_extensions = @__phi_relations_extended - extended_instances
|
394
|
+
disallow_last_phi!(preserve_extensions: true)
|
395
|
+
revoke_extended_phi!(new_extensions) if new_extensions.any?
|
396
|
+
end
|
397
397
|
end
|
398
398
|
|
399
399
|
# Revoke all PHI access for a single instance of this class.
|
@@ -624,6 +624,10 @@ module PhiAttrs
|
|
624
624
|
# # through access logging.
|
625
625
|
#
|
626
626
|
def phi_wrap_method(method_name)
|
627
|
+
unless respond_to?(method_name)
|
628
|
+
PhiAttrs::Logger.warn("#{self.class.name} tried to wrap non-existant method (#{method_name})")
|
629
|
+
return
|
630
|
+
end
|
627
631
|
return if self.class.__phi_methods_wrapped.include? method_name
|
628
632
|
|
629
633
|
wrapped_method = :"__#{method_name}_phi_wrapped"
|
@@ -659,6 +663,7 @@ module PhiAttrs
|
|
659
663
|
# @private
|
660
664
|
#
|
661
665
|
def phi_wrap_extension(method_name)
|
666
|
+
raise NameError, "Undefined relationship in `extend_phi_access`: #{method_name}" unless respond_to?(method_name)
|
662
667
|
return if self.class.__phi_methods_to_extend.include? method_name
|
663
668
|
|
664
669
|
wrapped_method = wrapped_extended_name(method_name)
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wyatt Kirby
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -178,37 +178,16 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
-
description:
|
181
|
+
description:
|
182
182
|
email:
|
183
183
|
- wyatt@apsis.io
|
184
184
|
executables: []
|
185
185
|
extensions: []
|
186
186
|
extra_rdoc_files: []
|
187
187
|
files:
|
188
|
-
- ".github/workflows/build.yml"
|
189
|
-
- ".github/workflows/publish.yml"
|
190
|
-
- ".gitignore"
|
191
|
-
- ".rspec"
|
192
|
-
- ".rubocop.yml"
|
193
|
-
- Appraisals
|
194
|
-
- CHANGELOG.md
|
195
188
|
- DISCLAIMER.txt
|
196
|
-
- Dockerfile
|
197
|
-
- Gemfile
|
198
189
|
- LICENSE.txt
|
199
190
|
- README.md
|
200
|
-
- Rakefile
|
201
|
-
- bin/console
|
202
|
-
- bin/helpers/docker
|
203
|
-
- bin/rubo_fix
|
204
|
-
- bin/run_tests
|
205
|
-
- bin/setup
|
206
|
-
- bin/ssh_to_container
|
207
|
-
- config.ru
|
208
|
-
- docker-compose.yml
|
209
|
-
- docker/start.sh
|
210
|
-
- gemfiles/rails_6.1.gemfile
|
211
|
-
- gemfiles/rails_7.0.gemfile
|
212
191
|
- lib/phi_attrs.rb
|
213
192
|
- lib/phi_attrs/configure.rb
|
214
193
|
- lib/phi_attrs/exceptions.rb
|
@@ -218,7 +197,6 @@ files:
|
|
218
197
|
- lib/phi_attrs/railtie.rb
|
219
198
|
- lib/phi_attrs/rspec.rb
|
220
199
|
- lib/phi_attrs/version.rb
|
221
|
-
- phi_attrs.gemspec
|
222
200
|
homepage: http://www.apsis.io
|
223
201
|
licenses:
|
224
202
|
- MIT
|
@@ -242,8 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
220
|
- !ruby/object:Gem::Version
|
243
221
|
version: '0'
|
244
222
|
requirements: []
|
245
|
-
rubygems_version: 3.
|
246
|
-
signing_key:
|
223
|
+
rubygems_version: 3.3.27
|
224
|
+
signing_key:
|
247
225
|
specification_version: 4
|
248
226
|
summary: PHI Access Restriction & Logging for Rails ActiveRecord
|
249
227
|
test_files: []
|
data/.github/workflows/build.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
name: Spec CI
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
name: Ruby ${{ matrix.ruby }}
|
9
|
-
strategy:
|
10
|
-
matrix:
|
11
|
-
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
12
|
-
ruby: ['2.7.2', '3.0', 3.1]
|
13
|
-
env:
|
14
|
-
RUBY_VERSION: ${{ matrix.ruby }}
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v3
|
17
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
18
|
-
uses: ruby/setup-ruby@v1
|
19
|
-
with:
|
20
|
-
ruby-version: ${{ matrix.ruby }}
|
21
|
-
bundler-cache: true
|
22
|
-
- name: Install dependencies
|
23
|
-
run: |
|
24
|
-
bundle exec appraisal install
|
25
|
-
- name: Run rspec
|
26
|
-
run: |
|
27
|
-
bundle exec appraisal "rake dummy:db:create dummy:db:migrate && rspec"
|
@@ -1,25 +0,0 @@
|
|
1
|
-
name: Publish Gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- "main"
|
7
|
-
tags:
|
8
|
-
- v*
|
9
|
-
jobs:
|
10
|
-
build:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
|
13
|
-
steps:
|
14
|
-
- uses: actions/checkout@v3
|
15
|
-
- uses: ruby/setup-ruby@v1
|
16
|
-
with:
|
17
|
-
ruby-version: '3.1'
|
18
|
-
bundler-cache: true
|
19
|
-
- name: Release Gem
|
20
|
-
if: contains(github.ref, 'refs/tags/v')
|
21
|
-
uses: cadwallion/publish-rubygems-action@master
|
22
|
-
env:
|
23
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
24
|
-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
25
|
-
RELEASE_COMMAND: bundle exec rake release
|
data/.gitignore
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
|
11
|
-
*Gemfile.lock
|
12
|
-
.byebug_history
|
13
|
-
|
14
|
-
/spec/dummy/tmp/
|
15
|
-
/spec/dummy/db/schema.rb
|
16
|
-
*.sqlite
|
17
|
-
*.sqlite3
|
18
|
-
*.log
|
19
|
-
.rspec_status
|
20
|
-
gemfiles/*.gemfile.lock
|
21
|
-
|
22
|
-
# Macs. Ugh.
|
23
|
-
.DS_Store
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
require: rubocop-rails
|
2
|
-
|
3
|
-
Rails:
|
4
|
-
Enabled: true
|
5
|
-
|
6
|
-
AllCops:
|
7
|
-
Exclude:
|
8
|
-
- 'bin/**/*'
|
9
|
-
- 'gemfiles/**/*'
|
10
|
-
- 'spec/internal/db/schema.rb'
|
11
|
-
NewCops: enable
|
12
|
-
TargetRubyVersion: 2.7
|
13
|
-
|
14
|
-
Layout/IndentationWidth:
|
15
|
-
Enabled: true
|
16
|
-
|
17
|
-
Layout/LineLength:
|
18
|
-
Exclude:
|
19
|
-
- 'spec/**/*'
|
20
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
21
|
-
Max: 140
|
22
|
-
|
23
|
-
Lint/UnreachableCode:
|
24
|
-
Exclude:
|
25
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
26
|
-
|
27
|
-
Lint/UnusedMethodArgument:
|
28
|
-
Exclude:
|
29
|
-
- 'lib/phi_attrs.rb' # TODO: RUBOCOP Cleanup exclusion
|
30
|
-
|
31
|
-
Metrics/AbcSize:
|
32
|
-
Max: 30
|
33
|
-
Exclude:
|
34
|
-
- 'spec/internal/db/**/*'
|
35
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
36
|
-
|
37
|
-
Metrics/BlockLength:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
Metrics/ClassLength:
|
41
|
-
Max: 1500
|
42
|
-
|
43
|
-
Metrics/CyclomaticComplexity:
|
44
|
-
Exclude:
|
45
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
46
|
-
|
47
|
-
Metrics/MethodLength:
|
48
|
-
Exclude:
|
49
|
-
- 'spec/**/*'
|
50
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
51
|
-
Max: 20
|
52
|
-
|
53
|
-
Metrics/ModuleLength:
|
54
|
-
Exclude:
|
55
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
56
|
-
|
57
|
-
Metrics/PerceivedComplexity:
|
58
|
-
Exclude:
|
59
|
-
- 'lib/phi_attrs/phi_record.rb' # TODO: RUBOCOP Cleanup exclusion
|
60
|
-
|
61
|
-
Naming/PredicateName:
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
Rails/DynamicFindBy:
|
65
|
-
Exclude:
|
66
|
-
- 'spec/spec_helper.rb' # TODO: RUBOCOP Cleanup exclusion
|
67
|
-
|
68
|
-
# Style/BracesAroundHashParameters:
|
69
|
-
# Enabled: false
|
70
|
-
|
71
|
-
Style/ClassVars:
|
72
|
-
Enabled: false
|
73
|
-
|
74
|
-
Style/CommentedKeyword:
|
75
|
-
Exclude:
|
76
|
-
- 'spec/**/*'
|
77
|
-
|
78
|
-
Style/ConditionalAssignment:
|
79
|
-
Enabled: false
|
80
|
-
|
81
|
-
Style/Documentation:
|
82
|
-
Enabled: false
|
83
|
-
|
84
|
-
Style/EmptyMethod:
|
85
|
-
EnforcedStyle: expanded
|
86
|
-
|
87
|
-
Style/SymbolArray:
|
88
|
-
EnforcedStyle: brackets
|
89
|
-
|
90
|
-
Style/RedundantReturn:
|
91
|
-
Enabled: false
|
92
|
-
|
93
|
-
Style/WordArray:
|
94
|
-
MinSize: 4
|
data/Appraisals
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
appraise 'rails_6.1' do
|
4
|
-
gem 'rails', '~> 6.1'
|
5
|
-
gem 'rspec', '~> 3.10'
|
6
|
-
gem 'rspec-rails', '~> 5.1'
|
7
|
-
gem 'sqlite3', '~> 1.5'
|
8
|
-
end
|
9
|
-
|
10
|
-
appraise 'rails_7.0' do
|
11
|
-
gem 'rails', '~> 7.0'
|
12
|
-
gem 'rspec', '~> 3.12'
|
13
|
-
gem 'rspec-rails', '~> 6.0'
|
14
|
-
gem 'sqlite3', '~> 1.5'
|
15
|
-
end
|
data/CHANGELOG.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
All notable changes to this project will be documented in this file.
|
3
|
-
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
-
|
7
|
-
## [Unreleased]
|
8
|
-
### Added
|
9
|
-
- Added documentation for CHANGELOG to README
|
10
|
-
|
11
|
-
## [v0.1.4] - 2018-07-05
|
12
|
-
## [v0.1.3] - 2018-07-05
|
13
|
-
## [v0.1.2] - 2018-07-05
|
14
|
-
## [v0.1.1] - 2018-07-05
|
15
|
-
|
16
|
-
## [v0.1.0] - 2018-07-04
|
17
|
-
Initial release
|
data/Dockerfile
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
ARG RUBY_VERSION=3.1.3
|
2
|
-
|
3
|
-
FROM ruby:${RUBY_VERSION}-buster
|
4
|
-
|
5
|
-
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
|
6
|
-
build-essential \
|
7
|
-
git \
|
8
|
-
bash \
|
9
|
-
sqlite3
|
10
|
-
|
11
|
-
ENV APP_HOME /app
|
12
|
-
WORKDIR $APP_HOME
|
13
|
-
|
14
|
-
COPY . $APP_HOME/
|
15
|
-
|
16
|
-
RUN gem update --system
|
17
|
-
RUN bundle config set force_ruby_platform true
|
18
|
-
|
19
|
-
EXPOSE 3000
|
20
|
-
|
21
|
-
CMD ["bash"]
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'phi_attrs'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
require 'irb/completion'
|
15
|
-
|
16
|
-
PhiAttrs.configure do |conf|
|
17
|
-
conf.log_path = File.join('log', 'phi_access_console.log')
|
18
|
-
end
|
19
|
-
|
20
|
-
IRB.start(__FILE__)
|
data/bin/helpers/docker
DELETED
data/bin/rubo_fix
DELETED
data/bin/run_tests
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
source bin/helpers/docker
|
3
|
-
runOnDocker ruby3
|
4
|
-
|
5
|
-
echo "== Starting unit tests =="
|
6
|
-
bundle exec appraisal rspec
|
7
|
-
if [ $? -ne 0 ]; then
|
8
|
-
echo -e "\n== RSpec failed; push aborted! ==\n"
|
9
|
-
exit 1
|
10
|
-
fi
|
11
|
-
|
12
|
-
echo "== Starting rubocop =="
|
13
|
-
bundle exec rubocop --format worst --format simple --format offenses
|
14
|
-
if [ $? -ne 0 ]; then
|
15
|
-
echo -e "\n== Rubocop failed; push aborted! ==\n"
|
16
|
-
echo -e "To auto-correct errors run:"
|
17
|
-
echo -e "\tbin/rubo_fix"
|
18
|
-
exit 1
|
19
|
-
fi
|
data/bin/setup
DELETED
data/bin/ssh_to_container
DELETED
data/config.ru
DELETED
data/docker/start.sh
DELETED
data/docker-compose.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
version: '3'
|
2
|
-
|
3
|
-
services:
|
4
|
-
ruby2:
|
5
|
-
build:
|
6
|
-
context: .
|
7
|
-
args:
|
8
|
-
- RUBY_VERSION=2.7.0
|
9
|
-
volumes:
|
10
|
-
- bundle_cache:/bundle
|
11
|
-
- .:/app
|
12
|
-
environment:
|
13
|
-
- BUNDLER_VERSION=2.2.33
|
14
|
-
- BUNDLE_JOBS=5
|
15
|
-
- BUNDLE_PATH=/bundle
|
16
|
-
- BUNDLE_BIN=/bundle/bin
|
17
|
-
- GEM_HOME=/bundle
|
18
|
-
- DOCKER_CONTAINER=1
|
19
|
-
command:
|
20
|
-
- docker/start.sh
|
21
|
-
ruby3:
|
22
|
-
build: .
|
23
|
-
volumes:
|
24
|
-
- bundle_cache:/bundle
|
25
|
-
- .:/app
|
26
|
-
environment:
|
27
|
-
- BUNDLER_VERSION=2.4.0
|
28
|
-
- BUNDLE_JOBS=5
|
29
|
-
- BUNDLE_PATH=/bundle
|
30
|
-
- BUNDLE_BIN=/bundle/bin
|
31
|
-
- GEM_HOME=/bundle
|
32
|
-
- DOCKER_CONTAINER=1
|
33
|
-
command:
|
34
|
-
- docker/start.sh
|
35
|
-
|
36
|
-
volumes:
|
37
|
-
bundle_cache:
|
data/gemfiles/rails_6.1.gemfile
DELETED
data/gemfiles/rails_7.0.gemfile
DELETED
data/phi_attrs.gemspec
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'phi_attrs/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = 'phi_attrs'
|
9
|
-
spec.version = PhiAttrs::VERSION
|
10
|
-
spec.authors = ['Wyatt Kirby']
|
11
|
-
spec.email = ['wyatt@apsis.io']
|
12
|
-
|
13
|
-
spec.summary = 'PHI Access Restriction & Logging for Rails ActiveRecord'
|
14
|
-
spec.homepage = 'http://www.apsis.io'
|
15
|
-
spec.license = 'MIT'
|
16
|
-
spec.post_install_message = '
|
17
|
-
Thank you for installing phi_attrs! By installing this gem,
|
18
|
-
you acknowledge and agree to the disclaimer as provided in the
|
19
|
-
DISCLAIMER.txt file.
|
20
|
-
|
21
|
-
For full details, see: https://github.com/apsislabs/phi_attrs/blob/master/DISCLAIMER.txt
|
22
|
-
'
|
23
|
-
|
24
|
-
spec.required_ruby_version = '>= 2.7.0'
|
25
|
-
|
26
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
-
f.match(%r{^(test|spec|features)/})
|
28
|
-
end
|
29
|
-
spec.bindir = 'exe'
|
30
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
-
spec.require_paths = ['lib']
|
32
|
-
|
33
|
-
spec.add_runtime_dependency 'rails', '>= 6.0.0'
|
34
|
-
spec.add_runtime_dependency 'request_store', '~> 1.4'
|
35
|
-
|
36
|
-
spec.add_development_dependency 'appraisal'
|
37
|
-
spec.add_development_dependency 'bundler', '>= 2.2.33'
|
38
|
-
spec.add_development_dependency 'byebug'
|
39
|
-
spec.add_development_dependency 'factory_bot_rails'
|
40
|
-
spec.add_development_dependency 'faker'
|
41
|
-
spec.add_development_dependency 'rake'
|
42
|
-
spec.add_development_dependency 'rubocop'
|
43
|
-
spec.add_development_dependency 'rubocop-rails'
|
44
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
45
|
-
spec.add_development_dependency 'tzinfo-data'
|
46
|
-
spec.metadata['rubygems_mfa_required'] = 'false'
|
47
|
-
end
|