pacto 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in contracts.gemspec
3
+ # Specify your gem's dependencies in pacto.gemspec
4
4
  gemspec
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  guard 'rspec', :cli => '--color --require spec_helper', :version => 2 do
2
- watch(%r{^spec/contracts/.+_spec\.rb$})
2
+ watch(%r{^spec/pacto/.+_spec\.rb$})
3
3
  watch(%r{^spec/json/.+_spec\.rb$})
4
- watch(%r{^lib/contracts\.rb$}) { |m| "spec" }
4
+ watch(%r{^lib/pacto\.rb$}) { |m| "spec" }
5
5
  watch(%r{^lib/json-generator\.rb$}) { |m| "spec" }
6
6
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
7
  watch('spec/spec_helper.rb') { "spec" }
data/README.md CHANGED
@@ -70,11 +70,11 @@ There are two ways to validate a contract against a provider: through a Rake tas
70
70
 
71
71
  Pacto includes a default Rake task. To use it, include it in your Rakefile:
72
72
 
73
- require 'contracts/rake_task'
73
+ require 'pacto/rake_task'
74
74
 
75
75
  Validating a contract against a provider is as simple as running:
76
76
 
77
- $ rake contracts:validate[host,dir] # Validates all contracts in a given directory against a given host
77
+ $ rake pacto:validate[host,dir] # Validates all contracts in a given directory against a given host
78
78
 
79
79
  It is recommended that you also include [colorize](https://github.com/fazibear/colorize) to get prettier, colorful output.
80
80
 
@@ -82,7 +82,7 @@ It is recommended that you also include [colorize](https://github.com/fazibear/c
82
82
 
83
83
  The easiest way to load a contract from a file and validate it against a host is by using the builder interface:
84
84
 
85
- require 'contracts'
85
+ require 'pacto'
86
86
 
87
87
  WebMock.allow_net_connect!
88
88
  contract = Pacto.build_from_file('/path/to/contract.json', 'http://dummyprovider.com')
@@ -97,7 +97,7 @@ with the entire JSON Schema specification.
97
97
 
98
98
  First, register the contracts that are going to be used in the acceptance tests suite:
99
99
 
100
- require 'contracts'
100
+ require 'pacto'
101
101
 
102
102
  contract = Pacto.build_from_file('/path/to/contract.json', 'http://dummyprovider.com')
103
103
  Pacto.register('my_contract', contract)
@@ -115,10 +115,10 @@ The values are merged using [hash-deep-merge](https://github.com/Offirmo/hash-de
115
115
 
116
116
  ## Code status
117
117
 
118
- [![Build Status](https://travis-ci.org/thoughtworks/contracts.png)](https://travis-ci.org/thoughtworks/contracts)
119
- [![Code Climate](https://codeclimate.com/github/thoughtworks/contracts.png)](https://codeclimate.com/github/thoughtworks/contracts)
120
- [![Dependency Status](https://gemnasium.com/thoughtworks/contracts.png)](https://gemnasium.com/thoughtworks/contracts)
121
- [![Coverage Status](https://coveralls.io/repos/thoughtworks/contracts/badge.png)](https://coveralls.io/r/thoughtworks/contracts)
118
+ [![Build Status](https://travis-ci.org/thoughtworks/pacto.png)](https://travis-ci.org/thoughtworks/pacto)
119
+ [![Code Climate](https://codeclimate.com/github/thoughtworks/pacto.png)](https://codeclimate.com/github/thoughtworks/pacto)
120
+ [![Dependency Status](https://gemnasium.com/thoughtworks/pacto.png)](https://gemnasium.com/thoughtworks/pacto)
121
+ [![Coverage Status](https://coveralls.io/repos/thoughtworks/pacto/badge.png)](https://coveralls.io/r/thoughtworks/pacto)
122
122
 
123
123
  ## Contributing
124
124
 
@@ -3,7 +3,7 @@ module Pacto
3
3
  def process(file_string)
4
4
  erb = ERB.new file_string
5
5
  erb_result = erb.result binding
6
- if ENV["DEBUG_CONTRACTS"]
6
+ if ENV["DEBUG_PACTO"]
7
7
  puts "[DEBUG] Processed contract: #{erb_result.inspect}"
8
8
  end
9
9
  erb_result
@@ -17,8 +17,8 @@ module Pacto
17
17
  end
18
18
 
19
19
  def install
20
- desc "Tasks for contracts gem"
21
- namespace :contracts do
20
+ desc "Tasks for Pacto gem"
21
+ namespace :pacto do
22
22
  validate_task
23
23
  end
24
24
  end
@@ -27,7 +27,7 @@ module Pacto
27
27
  desc "Validates all contracts in a given directory against a given host"
28
28
  task :validate, :host, :dir do |t, args|
29
29
  if args.to_a.size < 2
30
- fail "USAGE: rake contracts:validate[<host>, <contract_dir>]".colorize(:yellow)
30
+ fail "USAGE: rake pacto:validate[<host>, <contract_dir>]".colorize(:yellow)
31
31
  end
32
32
 
33
33
  validate_contracts(args[:host], args[:dir])
data/lib/pacto/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pacto
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pacto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: