knapsack_pro 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a3d312090aad075f0a626b6abf41f26f2ca0988
4
- data.tar.gz: 9736a0e662c48f8cba659f0278e7c0a31705ebfa
3
+ metadata.gz: 4454bfe5dfceab7bea180109a6ac2ee52858f948
4
+ data.tar.gz: 6244844626ac5b000ca32cbc9124d646d317201a
5
5
  SHA512:
6
- metadata.gz: 201539b38bafc36bb00129a8da55d910f607ccb6b62ef374372c693f4486eebb2feb812bc8df8b80310d7ee4a0a549dad265ffa34e2a6dd7ec512f437bca17b7
7
- data.tar.gz: af5c6e1afa1fd05af1919b4dbb94f06271126521c62931b1c25103072bcfa8e9e6d182018f289c3331098215ae68ac05cce2206f5ed28d3b2f1086126cd43f76
6
+ metadata.gz: d758eff6a6777b6869618477d0f472fb842edfb6a8cbd1e255c1bf63e6f3ba4da061e70f042b7240b79fef5dd3bc8eb989a6a3ef7e8791c483f941337dd6d1af
7
+ data.tar.gz: 4a1c552adf14f48271ef1126cc97f52975225722d2e11477c7e0132e36248244815d1313d722ef96dadd8d6a6956846db1683a4976a63a417dcf16387d93a8c9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  * TODO
4
4
 
5
+ ### 0.22.0
6
+
7
+ * Add more info how to set up VCR and webmock to `knapsack_pro:install` rake task.
8
+
9
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.21.0...v0.22.0
10
+
5
11
  ### 0.21.0
6
12
 
7
13
  * Improve VCR config documentation so it's more clear that ignore_hosts takes arguments instead of array
data/README.md CHANGED
@@ -148,11 +148,26 @@ If you are using [VCR gem](https://github.com/vcr/vcr) then add Knapsack Pro API
148
148
  ```ruby
149
149
  # spec/spec_helper.rb or wherever is your VCR configuration
150
150
 
151
+ require 'vcr'
151
152
  VCR.configure do |config|
153
+ config.hook_into :webmock # or :fakeweb
152
154
  config.ignore_hosts('localhost', '127.0.0.1', '0.0.0.0', 'api.knapsackpro.com')
153
155
  end
154
156
 
155
- WebMock.disable_net_connect!(:allow => ['api.knapsackpro.com']) if defined?(WebMock)
157
+ # add below when you hook into webmock
158
+ require 'webmock/rspec'
159
+ WebMock.disable_net_connect!(:allow => ['api.knapsackpro.com'])
160
+ ```
161
+
162
+ Ensure you have require false for webmock gem when VCR is hook into it. Thanks to that webmock configuration in `spec_helper.rb` is loaded properly.
163
+
164
+ ```ruby
165
+ # Gemfile
166
+
167
+ group :test do
168
+ gem 'vcr'
169
+ gem 'webmock', require: false
170
+ end
156
171
  ```
157
172
 
158
173
  ### Usage (How to set up 1 of 3)
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '0.21.0'
2
+ VERSION = '0.22.0'
3
3
  end
@@ -45,14 +45,29 @@ end
45
45
  def step_for_vcr(prompt)
46
46
  prompt.say "Step for VCR gem", color: :yellow
47
47
  prompt.say "Add Knapsack Pro API subdomain to ignore hosts"
48
- prompt.say "in spec/spec_helper.rb or wherever is your VCR configuration"
48
+ prompt.say "in spec/spec_helper.rb or wherever is your VCR configuration:"
49
49
 
50
50
  prompt.say %{
51
+ require 'vcr'
51
52
  VCR.configure do |config|
53
+ config.hook_into :webmock # or :fakeweb
52
54
  config.ignore_hosts('localhost', '127.0.0.1', '0.0.0.0', 'api.knapsackpro.com')
53
55
  end
54
56
 
55
- WebMock.disable_net_connect!(:allow => ['api.knapsackpro.com']) if defined?(WebMock)
57
+ # add below when you hook into webmock
58
+ require 'webmock/rspec'
59
+ WebMock.disable_net_connect!(:allow => ['api.knapsackpro.com'])
60
+ }, color: :cyan
61
+
62
+ puts
63
+
64
+ prompt.say "Ensure you have require false in Gemfile for webmock gem when VCR is hook into it. Thanks to that webmock configuration in spec_helper.rb is loaded properly."
65
+
66
+ prompt.say %{
67
+ group :test do
68
+ gem 'vcr'
69
+ gem 'webmock', require: false
70
+ end
56
71
  }, color: :cyan
57
72
  end
58
73
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
@@ -363,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
363
  version: '0'
364
364
  requirements: []
365
365
  rubyforge_project:
366
- rubygems_version: 2.5.2
366
+ rubygems_version: 2.6.8
367
367
  signing_key:
368
368
  specification_version: 4
369
369
  summary: Knapsack Pro splits tests across CI nodes and makes sure that tests will