lhs 19.10.0 → 20.0.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
  SHA256:
3
- metadata.gz: 57094afc8763a8fe1aab390ad385ac4ddee8c2abd59dd8b8651cd83c07826fef
4
- data.tar.gz: 2b06402e0aceb84e5d21aefeb15321610a6b13ada2959b6286434d8725578b13
3
+ metadata.gz: 8a7bf20f71cff5e170d43991a6bd79ab90fd35e32798663055b074a44d123dc8
4
+ data.tar.gz: d05a41113ba4e00868cd7c02cb8ca26ff0d0f1ea745ef24f1a8a09771748e42c
5
5
  SHA512:
6
- metadata.gz: ae00456701d8fa85fdf0e3f8d3d14eb58d87f1c87719b5ac2916959ebd449853f7a061a239fda5debc45faa0d34bb265f3cf429b584eba63cf2969a38b3c3ebe
7
- data.tar.gz: 0b142fc761ccda98c5524bd0810ca0147fd9a5d4ec923b4986cdc3698bce8f1881b240c8c3113d9f09d1c57ca92925848d29690d0da5fde0a099a7757b3e81a0
6
+ metadata.gz: '0709a3da6db7dcf227254a4aaff48a54a75315ab1a7a281e5ed9ead269a04850a94fb3a906a3192bf86626185af1f0b9f84cd016fb19756f1c9ffa602e6352a4'
7
+ data.tar.gz: fe62a75e751b4f37215740368a2b68c55a1c130e59e938d5d42b769f1ca4d66f008dde1b2c21dbbc0d9bc1b0cf0bb1492d4385adf0b119e8ef1ec2ff781f63be
data/README.md CHANGED
@@ -1629,6 +1629,15 @@ POST https://service.example.com/records/1z-5r1fkaj { body: "{ 'name': 'Starbuck
1629
1629
 
1630
1630
  -> See [record validation](#record-validation) for how to handle validation errors when updating records.
1631
1631
 
1632
+ You can also pass explicit request options to `update`, by passing two explicit hashes:
1633
+
1634
+ ```ruby
1635
+ # app/controllers/some_controller.rb
1636
+
1637
+ record.update({ recommended: true }, { method: 'put' })
1638
+
1639
+ ```
1640
+
1632
1641
  ##### partial_update
1633
1642
 
1634
1643
  `partial_update` updates just the provided parameters.
@@ -1660,6 +1669,15 @@ POST https://service.example.com/records/1z-5r1fkaj { body: "{ 'name': 'Starbuck
1660
1669
 
1661
1670
  -> See [record validation](#record-validation) for how to handle validation errors when updating records.
1662
1671
 
1672
+ You can also pass explicit request options to `partial_update`, by passing two explicit hashes:
1673
+
1674
+ ```ruby
1675
+ # app/controllers/some_controller.rb
1676
+
1677
+ record.partial_update({ recommended: true }, { method: 'put' })
1678
+
1679
+ ```
1680
+
1663
1681
  #### Endpoint url parameter injection during record creation/change
1664
1682
 
1665
1683
  LHS injects parameters provided to `create`, `update`, `partial_update`, `save` etc. into an endpoint's URL when matching:
@@ -2502,17 +2520,18 @@ it 'displays contracts' do
2502
2520
  end
2503
2521
  ```
2504
2522
 
2505
- ### Test helper for request cycle cache
2523
+ ### Test helper
2506
2524
 
2507
- In order to not run into caching issues during your tests, when (request cycle cache)[#request-cycle-cache] is enabled, simply require the following helper in your tests:
2525
+ In order to load LHS test helpers into your tests, add the following to your spec helper:
2508
2526
 
2509
2527
  ```ruby
2510
2528
  # spec/spec_helper.rb
2511
2529
 
2512
- require 'lhs/test/request_cycle_cache_helper'
2530
+ require 'lhs/rspec'
2513
2531
  ```
2514
2532
 
2515
- This will initialize a MemoryStore cache for LHC::Caching interceptor and resets the cache before every test.
2533
+ This e.g. will prevent running into caching issues during your tests, when (request cycle cache)[#request-cycle-cache] is enabled.
2534
+ It will initialize a MemoryStore cache for LHC::Caching interceptor and resets the cache before every test.
2516
2535
 
2517
2536
  ### Test query chains
2518
2537
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'lhs'
4
+
3
5
  RSpec.configure do |config|
4
6
  config.before(:each) do
5
7
  LHS.config.request_cycle_cache.clear
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHS
4
- VERSION = '19.10.0'
4
+ VERSION = '20.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhs
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.10.0
4
+ version: 20.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhs/graphs/contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-12 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -300,7 +300,7 @@ files:
300
300
  - lib/lhs/proxy.rb
301
301
  - lib/lhs/railtie.rb
302
302
  - lib/lhs/record.rb
303
- - lib/lhs/test/request_cycle_cache_helper.rb
303
+ - lib/lhs/rspec.rb
304
304
  - lib/lhs/unprocessable.rb
305
305
  - lib/lhs/version.rb
306
306
  - script/ci/build.sh