pact 1.0.32 → 1.0.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,48 +2,77 @@ Do this to generate your change history
2
2
 
3
3
  git log --date=relative --pretty=format:' * %h - %s (%an, %ad)'
4
4
 
5
+ ### 1.0.33 (13 March 2013)
6
+ * 49456cc - Added the ability to configure modules that can be used in provider state definitions (Beth Skurrie, 75
7
+
8
+ ### 1.0.32 (11 March 2014)
9
+ * 5a7cc36 - Adding as_json methods for diff indicators (index/key not found/unexpected) (Beth Skurrie, 2 days ago)
10
+
11
+ ### 1.0.31 (11 March 2013)
12
+
13
+ * e109722 - Fixed output of pact:verify failures when active_support is loaded (Beth Skurrie, 2 days ago)
14
+ * 90d62fb - Returning a json error with a backtrace when a StandardError occurs in the MockServer, in an at
15
+ * 044cc71 - Using PATH_INFO instead of REQUEST_PATH as recommended by Rack spec - REQUEST_PATH isn't offici
16
+ * e40d785 - Using webrick instead of thin to run pact service as thin does not work on jruby (Beth Skurrie, 9 days
17
+ * ec732de - use puma instead of then as that gem works on JRuby (Ronald Holshausen, 9 days ago)
18
+ * 8720da9 - removed ruby head from travis config as event machine gem is not building on it (Ronald Holshau
19
+ * d46f712 - removed JRuby from Travis.ci config as JRubests can now use the pact-jvm (Ronald Holshausen, 9
20
+ * a1b0796 - Merge pull request #5 from jessedc/patch-1 (Ronald Holshausen, 9 days ago)
21
+ * bd1f9ed - Update link to DiUS repository. (Jesse Collis, 9 days ago)
22
+ * 5cbe40b - Added Shokkenki link and a Google form link. (Beth Skurrie, 2 weeks ago)
23
+ * 284481e - Updating example spec (Beth Skurrie, 2 weeks ago)
24
+ * 346cd57 - Fixed SomethingModel example code. (Beth Skurrie, 2 weeks ago)
25
+ * ac37919 - Adding terminology and 'reasons why pact is good' (Beth Skurrie, 10 weeks ago)
26
+ * 49923c6 - Added FAQ about non ruby codebases. (Beth Skurrie, 2 months ago)
27
+ * cba6409 - Splitting up the REAME into more manageable chunks (Beth Skurrie, 2 months ago)
28
+ * 115e786 - Added diagram to help explain testing with pact (Beth Skurrie, 2 months ago)
29
+ * 8962afe - Using Pact::DSL for provider states (Beth Skurrie, 3 months ago)
30
+ * 77d087f - Added helper method for mock service base URL (Beth Skurrie, 3 months ago)
31
+ * 0e7e249 - Updated example app with latest good practise pact code (Beth Skurrie, 3 months ago)
32
+ * bf225c6 - Added documentation for standalone mock server (Beth Skurrie, 3 months ago)
33
+
5
34
  ### 1.0.30 (17 December 2013)
6
35
 
7
36
  * c8278c7 - Added thin into the gemspec for pact standalone mock server (Beth Skurrie, 2 minutes ago)
8
37
 
9
38
  ### 1.0.29 (12 December 2013)
10
39
 
11
- * 8ffde69 - Providing before :all like functionality using before :each to get the dual benefits of faster tests and the ability to use stubbing (Beth, 53 seconds ago)
40
+ * 8ffde69 - Providing before :all like functionality using before :each to get the dual benefits of faster tests and the ability to use stubbing (Beth Skurrie, 53 seconds ago)
12
41
  * d30a78b - Added test to ensure rspec stubbing always works (Beth Skurrie, 15 hours ago)
13
42
 
14
43
  ### 1.0.28 (11 December 2013)
15
44
 
16
- * 24f9ea0 - Changed provider set up and tear down back to running in before :each, as rspec stubbing is not supported in before :all (Beth, 15 seconds ago)
17
- * 825e787 - Fixing failing tests (Beth, 4 hours ago)
18
- * fb6a1c8 - Moving ProviderState collection into its own class (Beth, 6 hours ago)
45
+ * 24f9ea0 - Changed provider set up and tear down back to running in before :each, as rspec stubbing is not supported in before :all (Beth Skurrie, 15 seconds ago)
46
+ * 825e787 - Fixing failing tests (Beth Skurrie, 4 hours ago)
47
+ * fb6a1c8 - Moving ProviderState collection into its own class (Beth Skurrie, 6 hours ago)
19
48
 
20
49
  ### 1.0.27 (10 December 2013)
21
50
 
22
- * 388fc7b - Changing provider set up and tear down to run before :all rather than before :each (Beth, 13 minutes ago)
23
- * 06b5626 - Updating TODO list in the README. (Beth, 25 hours ago)
24
- * 823f306 - Update README.md (bethesque, 32 hours ago)
51
+ * 388fc7b - Changing provider set up and tear down to run before :all rather than before :each (Beth Skurrie, 13 minutes ago)
52
+ * 06b5626 - Updating TODO list in the README. (Beth Skurrie, 25 hours ago)
53
+ * 823f306 - Update README.md (Beth Skurrie, 32 hours ago)
25
54
  * 7d96017 - Improving layout of text diff message (Beth Skurrie, 2 days ago)
26
55
  * 9c88c3a - Working on a new way to display the diff between an expected and actual request/response (Beth Skurrie, 2 days ago)
27
56
  * ff2c448 - Added a Difference class instead of a hash with :expected and :actual (Beth Skurrie, 2 days ago)
28
57
  * b34457c - Moved all missing provider state templates into the one message at the end of the test so it's easier to digest and can be copied directly into a file. (Beth Skurrie, 2
29
58
  * 1729887 - Moving ProviderStateProxy on to Pact World (Beth Skurrie, 3 days ago)
30
- * c53cb4d - Starting to add Pact::World (Beth, 4 days ago)
31
- * f7af9e2 - Recording missing provider states (Beth, 4 days ago)
32
- * 4caa171 - Starting work on ProviderStateProxy - intent is for it to record missing and unused states to report at the end of the pact:verify (Beth, 4 days ago)
59
+ * c53cb4d - Starting to add Pact::World (Beth Skurrie, 4 days ago)
60
+ * f7af9e2 - Recording missing provider states (Beth Skurrie, 4 days ago)
61
+ * 4caa171 - Starting work on ProviderStateProxy - intent is for it to record missing and unused states to report at the end of the pact:verify (Beth Skurrie, 4 days ago)
33
62
 
34
63
  ### 1.0.26 (5 December 2013)
35
64
 
36
- * e4be654 - BEST COMMIT TO PACT EVER since the introduction of pact:verify. Got rid of the horrific backtraces. (Beth, 5 hours ago)
65
+ * e4be654 - BEST COMMIT TO PACT EVER since the introduction of pact:verify. Got rid of the horrific backtraces. (Beth Skurrie, 5 hours ago)
37
66
  * 2810db7 - Updated README to point to realestate-com-au travis CI build (Ronald Holshausen, 28 hours ago)
38
- * bfa357a - Update README.md (bethesque, 30 hours ago)
67
+ * bfa357a - Update README.md (Beth Skurrie, 30 hours ago)
39
68
 
40
69
  ### 1.0.25 (4 December 2013)
41
70
 
42
- * 20dd5fa - Updated the homepage in gemspec (Beth, 4 minutes ago)
71
+ * 20dd5fa - Updated the homepage in gemspec (Beth Skurrie, 4 minutes ago)
43
72
 
44
73
  ### 1.0.24 (4 December 2013)
45
74
 
46
- * fd30d36 - Merge branch 'master' of github.com:uglyog/pact (Beth, 13 minutes ago)
75
+ * fd30d36 - Merge branch 'master' of github.com:uglyog/pact (Beth Skurrie, 13 minutes ago)
47
76
  * 45430b1 - Whoops; use actual latest ruby p484, not p448 (Daniel Heath, 18 hours ago)
48
77
  * 9a999ad - Specify a non-compromised version of ruby in .ruby-version (Daniel Heath, 18 hours ago)
49
78
  * bb8d4d9 - Merge pull request #13 from stevenfarlie/update-awesome-print (Ronald Holshausen, 20 hours ago)
@@ -73,65 +102,65 @@ Do this to generate your change history
73
102
  * 1930269 - added travis CI for the uglyog repo (Ronald Holshausen, 4 days ago)
74
103
  * 7750ee1 - added travis build status image (Ronald Holshausen, 5 days ago)
75
104
  * 9f72b31 - added travis build status image (Ronald Holshausen, 5 days ago)
76
- * d9be65b - Added .travis.yml (Beth, 6 days ago)
77
- * e7a7e7b - Refactoring pact_helper loading. (Beth, 6 days ago)
78
- * 0224d36 - Only log loading of pact_helper once https://github.com/uglyog/pact/issues/8 (Beth, 6 days ago)
79
- * 0123207 - Updating gemspec description (Beth, 7 days ago)
80
- * 697cbdc - Updating README.md (Beth, 4 weeks ago)
105
+ * d9be65b - Added .travis.yml (Beth Skurrie, 6 days ago)
106
+ * e7a7e7b - Refactoring pact_helper loading. (Beth Skurrie, 6 days ago)
107
+ * 0224d36 - Only log loading of pact_helper once https://github.com/uglyog/pact/issues/8 (Beth Skurrie, 6 days ago)
108
+ * 0123207 - Updating gemspec description (Beth Skurrie, 7 days ago)
109
+ * 697cbdc - Updating README.md (Beth Skurrie, 4 weeks ago)
81
110
  * ca79968 - Investigating Rack and HTTP headers in response to https://github.com/uglyog/pact/issues/6. Updated tests and README with info on multiple headers with the same name. (B
82
- * 01f0b9a - Updating README (Beth, 4 weeks ago)
111
+ * 01f0b9a - Updating README (Beth Skurrie, 4 weeks ago)
83
112
 
84
113
  ### 1.0.20 (29 October 2013)
85
114
 
86
- * c03f34f - Fixed the pretty generation of JSON when active support is loaded. It is both a sad and a happy moment. (Beth, 7 minutes ago)
115
+ * c03f34f - Fixed the pretty generation of JSON when active support is loaded. It is both a sad and a happy moment. (Beth Skurrie, 7 minutes ago)
87
116
 
88
117
  ### 1.0.19 (29 October 2013)
89
118
  * e4b990e - Gsub '-' to '_' in request headers. (Sebastian Glazebrook, 4 minutes ago)
90
- * 52ac8f8 - Added documentation for PACT_DESCRIPTION and PACT_PROVIDER_STATE to README. (Beth, 13 hours ago)
119
+ * 52ac8f8 - Added documentation for PACT_DESCRIPTION and PACT_PROVIDER_STATE to README. (Beth Skurrie, 13 hours ago)
91
120
 
92
121
  ### 1.0.18 (29 October 2013)
93
122
 
94
- * f2892d4 - Fixed bug where an exception is thrown when a key is not found and is attempted to be matched to a regexp (Beth, 60 seconds ago)
123
+ * f2892d4 - Fixed bug where an exception is thrown when a key is not found and is attempted to be matched to a regexp (Beth Skurrie, 60 seconds ago)
95
124
 
96
125
  ### 1.0.17 (29 October 2013)
97
126
 
98
- * 74bdf09 - Added missing require for Regexp json deserialisation (Beth, 3 minutes ago)
99
- * d69482e - Removed JsonWarning for ActiveSupport JSON. (Beth, 3 hours ago)
127
+ * 74bdf09 - Added missing require for Regexp json deserialisation (Beth Skurrie, 3 minutes ago)
128
+ * d69482e - Removed JsonWarning for ActiveSupport JSON. (Beth Skurrie, 3 hours ago)
100
129
  * 5f72720 - Fixing ALL THE REGEXPS that ActiveSupport JSON broke. The pact gem should now serialise and deserialise its own JSON properly even when ActiveSupport is loaded by the call
101
- * c3e6430 - Added config.ru parsing to best practices. (Beth, 9 hours ago)
102
- * ae3a70f - DRYing up pact file reading code. (Beth, 11 hours ago)
103
- * dc83557 - Fixing VerificationTask spec (Beth, 11 hours ago)
104
- * bae379c - Added consumer name, provider name and request method to output of rspec. (Beth, 12 hours ago)
105
- * 89c2620 - Adding spec filtering using PACT_DESCRIPTION and PACT_PROVIDER_STATE to pact:verify and pact:verify:at tasks. (Beth, 28 hours ago)
106
- * 7ab43a9 - Adding puts to show when pact:verify specs are being filtered. (Beth, 28 hours ago)
130
+ * c3e6430 - Added config.ru parsing to best practices. (Beth Skurrie, 9 hours ago)
131
+ * ae3a70f - DRYing up pact file reading code. (Beth Skurrie, 11 hours ago)
132
+ * dc83557 - Fixing VerificationTask spec (Beth Skurrie, 11 hours ago)
133
+ * bae379c - Added consumer name, provider name and request method to output of rspec. (Beth Skurrie, 12 hours ago)
134
+ * 89c2620 - Adding spec filtering using PACT_DESCRIPTION and PACT_PROVIDER_STATE to pact:verify and pact:verify:at tasks. (Beth Skurrie, 28 hours ago)
135
+ * 7ab43a9 - Adding puts to show when pact:verify specs are being filtered. (Beth Skurrie, 28 hours ago)
107
136
 
108
137
  ### 1.0.16 (28 October 2013)
109
138
 
110
- * ce0d102 - Fixing specs after adding pact_helper and changing producer_state to provider_state. There is no producer here any more! Naughty producer. (Beth, 71 seconds ago)
111
- * 90f7203 - Fixing bug where RSpec world was not cleared between pact:verify tasks. (Beth, 16 minutes ago)
112
- * b323336 - Fixed bug where pact_helper option was not being passed into the PactSpecRunner from the task configuration (Beth, 4 hours ago)
139
+ * ce0d102 - Fixing specs after adding pact_helper and changing producer_state to provider_state. There is no producer here any more! Naughty producer. (Beth Skurrie, 71 seconds ago)
140
+ * 90f7203 - Fixing bug where RSpec world was not cleared between pact:verify tasks. (Beth Skurrie, 16 minutes ago)
141
+ * b323336 - Fixed bug where pact_helper option was not being passed into the PactSpecRunner from the task configuration (Beth Skurrie, 4 hours ago)
113
142
  * b1e78f5 - Added environment variable support. (Sergei Matheson, 3 days ago)
114
143
  * 2b9f39a - Allow match criteria to be passed through to pact:verify tasks on command line (Sergei Matheson, 3 days ago)
115
144
  * 2241f29 - Un-deprecating the support_file functionality after having discovered a valid use for it (project that contains two rack apps that have a pact with each other). Renamed op
116
- * c94fc13 - Updating example provider state (Beth, 4 days ago)
117
- * 6900f39 - Updating README with better client class example (Beth, 5 days ago)
145
+ * c94fc13 - Updating example provider state (Beth Skurrie, 4 days ago)
146
+ * 6900f39 - Updating README with better client class example (Beth Skurrie, 5 days ago)
118
147
  * e41f755 - Update README.md (bskurrie, 5 days ago)
119
- * 2abcce4 - Adding to pact best practices. (Beth, 5 days ago)
148
+ * 2abcce4 - Adding to pact best practices. (Beth Skurrie, 5 days ago)
120
149
 
121
150
  ### 1.0.15 (22 October 2013)
122
151
 
123
- * 6800a58 - Updating README with latest TODOs (Beth, 2 hours ago)
124
- * 99a6827 - Improving logging in pact:verify. Fixing bug where Pact log level was ignored. (Beth, 3 hours ago)
125
- * 5434f54 - Updating README with best practice and information on the :pact => :verify metadata. (Beth, 4 hours ago)
126
- * 16dd2be - Adding :pact => :verify to pact:verify rspec examples for https://github.com/uglyog/pact/issues/3 (Beth, 5 hours ago)
152
+ * 6800a58 - Updating README with latest TODOs (Beth Skurrie, 2 hours ago)
153
+ * 99a6827 - Improving logging in pact:verify. Fixing bug where Pact log level was ignored. (Beth Skurrie, 3 hours ago)
154
+ * 5434f54 - Updating README with best practice and information on the :pact => :verify metadata. (Beth Skurrie, 4 hours ago)
155
+ * 16dd2be - Adding :pact => :verify to pact:verify rspec examples for https://github.com/uglyog/pact/issues/3 (Beth Skurrie, 5 hours ago)
127
156
 
128
157
  ### 1.0.14 (22 October 2013)
129
158
 
130
- * 406e746 - Added a template for the provider state when no provider state is found (Beth, 9 minutes ago)
159
+ * 406e746 - Added a template for the provider state when no provider state is found (Beth Skurrie, 9 minutes ago)
131
160
  * 1f58be8 - Adding error messages when set_up or tear_down are not defined, and added no_op as a way to avoid having to use an empty set_up block when there is no data to set up (Beth)
132
161
  * 78d3999 - Merge pull request #2 from stuliston/json_warning_minor_refactor (Ronald Holshausen, 18 hours ago)
133
162
  * be4a466 - Altering JsonWarning so that it only warns once. Added spec to confirm that's the case. (Stuart Liston, 21 hours ago)
134
- * 3b11b42 - Fixing the issue where a method defined in global scope could not be accessed in the DSL delegation code (Beth, 11 days ago)
163
+ * 3b11b42 - Fixing the issue where a method defined in global scope could not be accessed in the DSL delegation code (Beth Skurrie, 11 days ago)
135
164
 
136
165
  ### 1.0.13 (10 October 2013)
137
166
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pact (1.0.30)
4
+ pact (1.0.33)
5
5
  awesome_print (~> 1.1)
6
6
  find_a_port (~> 1.0.1)
7
7
  json
@@ -1,5 +1,7 @@
1
1
  require 'pact/provider/pact_verification'
2
2
  require 'pact/shared/dsl'
3
+ require 'pact/provider/provider_state_configured_modules'
4
+
3
5
  module Pact
4
6
 
5
7
  module Provider
@@ -42,6 +44,13 @@ module Pact
42
44
  def config_ru_path= config_ru_path
43
45
  @config_ru_path = config_ru_path
44
46
  end
47
+
48
+ def include mod
49
+ Pact::Provider::ProviderStateConfiguredModules.instance_eval do
50
+ include mod
51
+ end
52
+ end
53
+
45
54
  end
46
55
 
47
56
  Pact::Configuration.send(:include, ConfigurationExtension)
@@ -1,4 +1,5 @@
1
1
  require 'pact/shared/dsl'
2
+ require 'pact/provider/provider_state_configured_modules'
2
3
 
3
4
  module Pact
4
5
  module Provider
@@ -51,6 +52,8 @@ module Pact
51
52
  @set_up_defined = false
52
53
  @tear_down_defined = false
53
54
  @no_op_defined = false
55
+ #not sure why but using include doesn't bring in the configured module methods
56
+ self.extend ProviderStateConfiguredModules
54
57
  end
55
58
 
56
59
  dsl do
@@ -0,0 +1,7 @@
1
+ module Pact
2
+ module Provider
3
+ module ProviderStateConfiguredModules
4
+ # Placeholder for modules configured using config.include
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Pact
2
- VERSION = "1.0.32"
2
+ VERSION = "1.0.33"
3
3
  end
@@ -13,6 +13,7 @@ class App
13
13
  end
14
14
 
15
15
  Pact.provider_states_for 'Consumer' do
16
+
16
17
  provider_state 'something is stubbed' do
17
18
  set_up do
18
19
  StubbedThing.stub(:stub_me).and_return("stubbing works")
@@ -0,0 +1,29 @@
1
+ require 'pact/provider/rspec'
2
+ require 'rspec/mocks'
3
+
4
+ class StubbedThing
5
+ def self.stub_me
6
+ end
7
+ end
8
+
9
+ class App
10
+ def self.call env
11
+ [200, {}, [StubbedThing.stub_me]]
12
+ end
13
+ end
14
+
15
+ Pact.configure do | config |
16
+ config.include RSpec::Mocks::ExampleMethods
17
+ end
18
+
19
+ Pact.provider_states_for 'Consumer' do
20
+ provider_state 'something is stubbed' do
21
+ set_up do
22
+ allow(StubbedThing).to receive(:stub_me).and_return("stubbing works")
23
+ end
24
+ end
25
+ end
26
+
27
+ Pact.service_provider 'Provider' do
28
+ app { App }
29
+ end
@@ -4,10 +4,15 @@ Pact::VerificationTask.new(:stubbing) do | pact |
4
4
  pact.uri './spec/support/stubbing.json', :pact_helper => './spec/support/stubbing.rb'
5
5
  end
6
6
 
7
+ Pact::VerificationTask.new(:stubbing_using_allow) do | pact |
8
+ pact.uri './spec/support/stubbing.json', :pact_helper => './spec/support/stubbing_using_allow.rb'
9
+ end
10
+
11
+
7
12
  namespace :pact do
8
13
 
9
14
  desc 'Runs pact tests against a sample application, testing failure and success.'
10
- task :tests => ['pact:verify:stubbing'] do
15
+ task :tests => ['pact:verify:stubbing','pact:verify:stubbing_using_allow'] do
11
16
 
12
17
  require 'pact/provider/pact_spec_runner'
13
18
  require 'open3'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.32
4
+ version: 1.0.33
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-03-11 00:00:00.000000000 Z
16
+ date: 2014-03-13 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: randexp
@@ -358,6 +358,7 @@ files:
358
358
  - lib/pact/provider/pact_verification.rb
359
359
  - lib/pact/provider/print_missing_provider_states.rb
360
360
  - lib/pact/provider/provider_state.rb
361
+ - lib/pact/provider/provider_state_configured_modules.rb
361
362
  - lib/pact/provider/provider_state_proxy.rb
362
363
  - lib/pact/provider/request.rb
363
364
  - lib/pact/provider/rspec.rb
@@ -432,6 +433,7 @@ files:
432
433
  - spec/support/shared_examples_for_request.rb
433
434
  - spec/support/stubbing.json
434
435
  - spec/support/stubbing.rb
436
+ - spec/support/stubbing_using_allow.rb
435
437
  - spec/support/test_app_fail.json
436
438
  - spec/support/test_app_pass.json
437
439
  - tasks/pact-test.rake
@@ -516,5 +518,6 @@ test_files:
516
518
  - spec/support/shared_examples_for_request.rb
517
519
  - spec/support/stubbing.json
518
520
  - spec/support/stubbing.rb
521
+ - spec/support/stubbing_using_allow.rb
519
522
  - spec/support/test_app_fail.json
520
523
  - spec/support/test_app_pass.json