Skip to content

Commit

Permalink
Rename public/ folder
Browse files Browse the repository at this point in the history
Follow the standard Ruby structure of lib/gem_name

This also helps us to understand the difference between
resource_registry and schema_registry at first sight
  • Loading branch information
atd committed Nov 28, 2024
1 parent 5257b58 commit 11f45c7
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 30 deletions.
14 changes: 7 additions & 7 deletions lib/resource_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

require "sorbet-runtime"

require "public/configuration"
require "public/resource"
require "public/versions"
require "public/versions/version"
require "public/entity_finder"
require "resource_registry/configuration"
require "resource_registry/resource"
require "resource_registry/versions"
require "resource_registry/versions/version"
require "resource_registry/entity_finder"
require "schema_registry/json_schema_mapper"
require "schema_registry/maybe"
require "schema_registry/generate_from_struct"
require "runtime_generic"
require "public/resource_struct_builder"
require "public/registry"
require "resource_registry/resource_struct_builder"
require "resource_registry/registry"

# Entry point for ResourceRegistry
module ResourceRegistry
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/schema_registry/property.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "bigdecimal"
require_relative "property_type"
require_relative "maybe"
require_relative "../public/versions/version"
require_relative "../resource_registry/versions/version"

module SchemaRegistry
class Property < T::Struct
Expand Down
34 changes: 19 additions & 15 deletions resource_registry.gemspec
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
Gem::Specification.new do |s|
s.name = 'resource_registry'
s.version = '0.0.0'
s.summary = 'Resource Registry'
s.description = 'A declarative approach to define resources and their relationships'
s.authors = ['Genar Trias Ortiz']
s.email = '[email protected]'
s.files = ['lib/resource_registry.rb', 'lib/public/repositories/base.rb', 'rbi/resource_registry.rbi']
s.homepage =
'https://rubygems.org/gems/resource_registry'
s.license = 'MIT'
s.add_dependency 'sorbet-coerce', '>= 0.2.6'
s.name = "resource_registry"
s.version = "0.0.0"
s.summary = "Resource Registry"
s.description =
"A declarative approach to define resources and their relationships"
s.authors = ["Genar Trias Ortiz"]
s.email = "[email protected]"
s.files = %w[
lib/resource_registry.rb
lib/resource_registry/repositories/base.rb
rbi/resource_registry.rbi
]
s.homepage = "https://rubygems.org/gems/resource_registry"
s.license = "MIT"
s.add_dependency "sorbet-coerce", ">= 0.2.6"
# s.add_runtime_dependency 'sorbet-runtime-stub', '0.2.0'
s.add_development_dependency 'sorbet', '0.5.11609'
s.add_runtime_dependency 'activesupport', '>= 7.1.3'
s.add_runtime_dependency 'dry-inflector', '>= 0.1.2'
s.add_runtime_dependency 'sorbet-runtime', '0.5.11609'
s.add_development_dependency "sorbet", "0.5.11609"
s.add_runtime_dependency "activesupport", ">= 7.1.3"
s.add_runtime_dependency "dry-inflector", ">= 0.1.2"
s.add_runtime_dependency "sorbet-runtime", "0.5.11609"
# s.add_development_dependency 'tapioca'
end
2 changes: 1 addition & 1 deletion spec/capability_factory_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require "spec_helper"
require_relative "./dummy_capability"
require_relative "../lib/public/capability_factory"
require_relative "../lib/resource_registry/capability_factory"

RSpec.describe ResourceRegistry::CapabilityFactory do
let(:capability) { described_class }
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_repo.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# typed: false

require_relative "../lib/public/repositories/base"
require_relative "../lib/resource_registry/repositories/base"

class DummyEntity < T::Struct
const :id, Integer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# typed: false

require "spec_helper"
require_relative "../../lib/public/registry"
require_relative "../../lib/resource_registry/registry"
require_relative "../dummy_repo"

class DummyCapability < T::Struct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# typed: false

require "spec_helper"
require_relative "../../lib/public/relationship"
require_relative "../../lib/resource_registry/relationship"

RSpec.describe ResourceRegistry::Relationship do
describe "#load" do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# typed: false

require "spec_helper"
require_relative "../../lib/public/resource"
require_relative "../../lib/resource_registry/resource"
require_relative "../dummy_repo"
require_relative "../dummy_capability"
require_relative "../void_capability"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# typed: false

require "spec_helper"
require_relative "../../lib/public/versions"
require_relative "../../lib/resource_registry/versions"

RSpec.describe ResourceRegistry::Versions do
subject { described_class.new(versions: versions) }
Expand Down
2 changes: 1 addition & 1 deletion spec/resource_struct_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# typed: false

require "spec_helper"
require_relative "../lib/public/resource_struct_builder"
require_relative "../lib/resource_registry/resource_struct_builder"

module ResourceRegistry
module DtoBuilderSpec
Expand Down

0 comments on commit 11f45c7

Please sign in to comment.