diff options
| author | mo khan <mo@mokhan.ca> | 2025-03-27 15:25:34 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-03-27 15:25:34 -0600 |
| commit | 56331a6109300736ebf8f1250f04f06c88e95177 (patch) | |
| tree | 2e8c85c2a07617d27d376ddac040c843f81b6ba9 /bin | |
| parent | c55e51eeef2db8a3d4c7796b7d719b05dc46d2fa (diff) | |
refactor: split csv files into sub directory to simulate separate databases
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/api | 2 | ||||
| -rwxr-xr-x | bin/idp | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -31,7 +31,7 @@ $host = ENV.fetch("HOST", "localhost:#{$port}") class Entity class << self def all - @items ||= ::CSV.read(File.join(__dir__, "../db/#{self.name.downcase}s.csv"), headers: true).map do |row| + @items ||= ::CSV.read(File.join(__dir__, "../db/api/#{self.name.downcase}s.csv"), headers: true).map do |row| new(row.to_h.transform_keys(&:to_sym)) end end @@ -89,7 +89,7 @@ module Authn class << self def all - @all ||= ::CSV.read(File.join(__dir__, "../db/users.csv"), headers: true).map do |row| + @all ||= ::CSV.read(File.join(__dir__, "../db/idp/users.csv"), headers: true).map do |row| new(row.to_h.transform_keys(&:to_sym)) end end |
