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 29, 2024
1 parent cb9d477 commit 237ac40
Show file tree
Hide file tree
Showing 30 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions lib/resource_registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

require "sorbet-runtime"

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

# Entry point for 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
2 changes: 1 addition & 1 deletion resource_registry.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.email = "[email protected]"
s.files = %w[
lib/resource_registry.rb
lib/public/repositories/base.rb
lib/resource_registry/repositories/base.rb
rbi/resource_registry.rbi
]
s.homepage = "https://rubygems.org/gems/resource_registry"
Expand Down
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 237ac40

Please sign in to comment.