Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create pact init #34

Open
bethesque opened this issue Jun 10, 2014 · 8 comments
Open

Create pact init #34

bethesque opened this issue Jun 10, 2014 · 8 comments

Comments

@bethesque
Copy link
Member

Submit PRs to: https://github.com/bethesque/pact-init-consumer

pact-init-consumer --consumer "My Consumer" --provider "My Provider" should create
spec/service_providers/pact_helper.rb

require 'pact/consumer/rspec'

Pact.service_consumer 'My Consumer' do
  has_pact_with 'My Provider' do
    mock_service :my_provider do
      port 1234
    end
  end
end

--consumer and --provider should be optional, and if no values are given use "My Consumer" and "My Provider".

Submit PRs to: https://github.com/bethesque/pact-init-provider
pact-init-provider --provider "My Provider" --consumer "My Consumer" should create
spec/service_consumers/pact_helper.rb

require 'pact/provider/rspec'
require "service_consumers/provider_states_for_my_consumer"

Pact.service_provider 'My Provider' do
  honours_pact_with 'My Consumer' do
    pact_uri ''
  end
end

spec/service_consumers/provider_states_for_my_consumer.rb

Pact.provider_states_for 'My Consumer' do
  provider_state 'there is a thing' do
    set_up do
      # Set up the provider state here (eg. insert record into a database)
    end
  end
end
@bethesque
Copy link
Member Author

Please either use Thor or the default Ruby OptionsParser (I'd like to pull Thor out to reduce dependencies, so if you can get away with OptionsParser, then that's better).

@joesustaric
Copy link
Contributor

Could someone use Clamp? I like it a little better for CLI stuff :)

@bethesque
Copy link
Member Author

I'd rather not have both Clamp and Thor at the same time!

@joesustaric
Copy link
Contributor

Hey Beth ,
You can assign this to @princyj and I.
Thanks!

@bethesque
Copy link
Member Author

I don't know how, it won't let me select your name.

@joesustaric
Copy link
Contributor

Ah ok never mind :p
Hello world - Princy and I are doing this.

@Ch0ronomato
Copy link

Is this still open for development?

@bethesque
Copy link
Member Author

I never ended up releasing it, but yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants