Skip to content

Commit

Permalink
remove active_support
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrias committed Oct 4, 2024
1 parent 3c0b981 commit 3b594a1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
14 changes: 12 additions & 2 deletions examples/sinatra-pet-shelter/lib/app.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# frozen_string_literal: true

require 'sinatra'
require 'sinatra/multi_route'
require 'resource_registry'

require 'sinatra/reloader' if development?

# Main entrypoint of the application
class App < Sinatra::Base
get '/' do
'Hello world!'
register Sinatra::MultiRoute

resources = ResourceRegistry::Registry.new.resources

resources.each do |resource|
route :get, "/#{resource}" do
content_type :json
{ data: [] }.to_json
end
end
end
Empty file.
4 changes: 2 additions & 2 deletions examples/sinatra-pet-shelter/spec/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
describe App do
let(:app) { App.new }

context 'GET /' do
let(:response) { get '/' }
context 'GET /dogs' do
let(:response) { get '/dogs' }

it 'returns 200 OK' do
expect(response.status).to eq 200
Expand Down
1 change: 0 additions & 1 deletion lib/public/resource_struct_builder.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# typed: strict

require 'sorbet-coerce'
require 'active_support/hash_with_indifferent_access'

module ResourceRegistry
# Constructs a resource struct (like Dtos and Entities) from a hash of arguments
Expand Down
3 changes: 0 additions & 3 deletions lib/public/versions.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# typed: strict

require 'active_support'
require 'active_support/core_ext'

module ResourceRegistry
class Versions
extend T::Sig
Expand Down

0 comments on commit 3b594a1

Please sign in to comment.