Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Terminology & structure #93

Closed
4 of 5 tasks
maxlinc opened this issue Feb 11, 2014 · 6 comments
Closed
4 of 5 tasks

Terminology & structure #93

maxlinc opened this issue Feb 11, 2014 · 6 comments

Comments

@maxlinc
Copy link
Collaborator

maxlinc commented Feb 11, 2014

I want to get the codebase a bit more organized and consistent. Several of these ideas have been discussed before and we seemed to have some consensus, but they didn't sneak into PRs yet.

My proposal:

  • rename build_contract/build_contracts to load_contract/load_contracts
  • rename validate_consumer to validate_response and validate_provider to simulate_request (I've realized that validate_consumer validates stubbed responses while the validate_provider simulates a consumer making valid requests)
  • deprecated Pacto::Core::Hook, Pacto::Hooks::ERBHook, and Pacto::ERBProcessor for middleware.
  • rename Pacto::Stubs::BuiltIn to Pacto::Stubs::WebMockAdapter
  • rename stub_all to simulate_consumers and stub_all to stub_providers

I'd also like to outline a structure, similar to http://fog.io/about/structure.html, where we outline a few central concepts that deserve their own folders (mostly around extension points - validators, stubs, generators, ...). I think "core" should be used for essential but non-extensible parts of Pacto... i.e. things that load and control the flow of the extensible pieces.

@marcosccm
Copy link
Contributor

I like the naming changes, will send a PR with them.

Do we really need to deprecate the hooks? The current version is so different from master that I think we can simply delete them.

I need to read about the fog structure

@maxlinc
Copy link
Collaborator Author

maxlinc commented Feb 11, 2014

I think we should preserve ERB post-processing as a feature, so we can't
just delete them until we have an alternative implementation.

I think rather "deprecate" we can just drop it from the config and
documentation so ERB processing still works, but custom hooks are an
undocumented/unused feature.

On Tue, Feb 11, 2014 at 7:47 AM, Marcos Castilho da Costa Matos <
notifications@github.com> wrote:

I like the naming changes, will send a PR with them.

Do we really need to deprecate the hooks? The current version is so
different from master that I think we can simply delete them.

I need to read about the fog structure

Reply to this email directly or view it on GitHubhttps://github.com//issues/93#issuecomment-34750817
.

@jmmercadom
Copy link
Contributor

Since the PR associated was already merged, can we close this issue?

@maxlinc
Copy link
Collaborator Author

maxlinc commented Feb 19, 2014

The PR didn't have all of the proposed changes. In particular, it doesn't have validate_response/simulate_consumer.

I also forgot about stub_all and validate_all, which should probably be stub_providers and simulate_consumers.

Since 0.3.0 was released, I'd recommend using a deprecated alias technique. I think we should leave this open a bit longer, until we make further changes or decide to leave things as-is.

@jmmercadom
Copy link
Contributor

Ok, I changed the original comment into a check list, this way we can track all things that are not implemented yet, and also to know when to close this issue.

@maxlinc
Copy link
Collaborator Author

maxlinc commented Jun 9, 2014

Changed the remaining names.

@maxlinc maxlinc closed this as completed Jun 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants