Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 34 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@ GEM
specs:
ast (2.4.3)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
benchmark (0.5.0)
bigdecimal (3.3.1)
canister (0.9.2)
climate_control (1.2.0)
coderay (1.1.3)
diff-lcs (1.6.2)
docile (1.4.1)
json (2.13.2)
json (2.15.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.7.0)
method_source (1.1.0)
multi_json (1.17.0)
mustermann (3.0.3)
mustermann (3.0.4)
ruby2_keywords (~> 0.0.1)
mysql2 (0.5.6)
nio4r (2.7.4)
mysql2 (0.5.7)
bigdecimal
nio4r (2.7.5)
parallel (1.27.0)
parser (3.3.9.0)
parser (3.3.10.0)
ast (~> 2.4.1)
racc
prism (1.4.0)
prism (1.6.0)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
puma (6.6.0)
puma (7.1.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.16)
rack-protection (4.1.1)
rack (3.2.4)
rack-protection (4.2.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
rack (>= 3.0.0, < 4)
Expand All @@ -44,32 +45,32 @@ GEM
rackup (2.2.1)
rack (>= 3)
rainbow (3.1.1)
regexp_parser (2.10.0)
rspec (3.13.1)
regexp_parser (2.11.3)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.5)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.5)
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.4)
rubocop (1.75.8)
rspec-support (3.13.6)
rubocop (1.80.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-ast (>= 1.46.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0)
rubocop-ast (1.47.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-performance (1.25.0)
Expand All @@ -78,32 +79,32 @@ GEM
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
sequel (5.94.0)
sequel (5.98.0)
bigdecimal
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov-lcov (0.8.0)
simplecov-lcov (0.9.0)
simplecov_json_formatter (0.1.4)
sinatra (4.1.1)
sinatra (4.2.1)
logger (>= 1.6.0)
mustermann (~> 3.0)
rack (>= 3.0.0, < 4)
rack-protection (= 4.1.1)
rack-protection (= 4.2.1)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
sinatra-contrib (4.1.1)
sinatra-contrib (4.2.1)
multi_json (>= 0.0.2)
mustermann (~> 3.0)
rack-protection (= 4.1.1)
sinatra (= 4.1.1)
rack-protection (= 4.2.1)
sinatra (= 4.2.1)
tilt (~> 2.0)
standard (1.50.0)
standard (1.51.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.75.5)
rubocop (~> 1.80.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.8)
standard-custom (1.0.2)
Expand All @@ -113,12 +114,13 @@ GEM
lint_roller (~> 1.1)
rubocop-performance (~> 1.25.0)
tilt (2.6.1)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)

PLATFORMS
aarch64-linux
arm64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -140,4 +142,4 @@ DEPENDENCIES
standard

BUNDLED WITH
2.7.1
2.7.2
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ The test suite is divided into unit and integration tests which can be run separ
give some orthogonality in checking for coverage gaps.
```
# Full test suite
docker-compose run --rm test
docker-compose run --rm web
# Standard
docker-compose run --rm test bundle exec standardrb
docker-compose run --rm web bundle exec standardrb
# Unit
docker-compose run --rm test bundle exec rspec spec/unit
docker-compose run --rm web bundle exec rspec spec/unit
# Integration
docker-compose run --rm test bundle exec rspec spec/integration
docker-compose run --rm web bundle exec rspec spec/integration
```

## Debugging
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/access_profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class AccessProfile < Sequel::Model
extend ModelExtensions

set_primary_key :id

def to_h
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/access_statement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class AccessStatement < Sequel::Model(:access_stmts)
extend ModelExtensions

set_primary_key :stmt_key

def self.default_key
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/access_statement_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class AccessStatementMap < Sequel::Model(:access_stmts_map)
extend ModelExtensions

set_primary_key [:a_attr, :a_access_profile]

def self.default_key
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class Attribute < Sequel::Model
extend ModelExtensions

set_primary_key :id

def to_h
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/reason.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class Reason < Sequel::Model
extend ModelExtensions

set_primary_key :id

def to_h
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/rights_current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class RightsCurrent < Sequel::Model(:rights_current)
extend ModelExtensions

# The obnoxious *_obj naming convention arises from the fact that apparently
# Sequel wants our foreign keys to be of the form attribute_id, reason_id, etc.
# but of course they're not, so much silliness ensues.
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/rights_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class RightsLog < Sequel::Model(:rights_log)
extend ModelExtensions

# The obnoxious *_obj naming convention arises from the fact that apparently
# Sequel wants our foreign keys to be of the form attribute_id, reason_id, etc.
# but of course they're not, so much silliness ensues.
Expand Down
1 change: 1 addition & 0 deletions lib/rights_api/models/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module RightsAPI
class Source < Sequel::Model
extend ModelExtensions

# one_to_many :rights_current, model: "RightsAPI::RightsCurrent".to_sym, key: :source
# one_to_many :rights_log, model: "RightsAPI::RightsCurrent".to_sym, key: :source
many_to_one :access_profile_obj, class: :"RightsAPI::AccessProfile", key: :access_profile
Expand Down