fmrest-rails 0.23.1 → 0.24.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -0
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2878cff85c3b40426b8e2f43e547d0224ce1fd8fb4a8cb94cdf371e684c130f5
4
- data.tar.gz: 793352edcee978558e7fd9e33ec2b0ed200fea6d7385f7290a94fe3cd60a575c
3
+ metadata.gz: 20c9e25a7f91baa2ae531f973ca40b7f93aaadb971a8b2b5755c228ea1a1c63f
4
+ data.tar.gz: 4f094ca5ea0a095145b973e2720a372988a9aa3fb8c2cba13c6dba3c7d50aee8
5
5
  SHA512:
6
- metadata.gz: 478e199b2a94125f39d2fffc96172e944fbefd0b4257296d180564db61b3eef8ab94c14219608429dfeb8baaf29a2ee813c2eee40aaa0e0134fb85e82a45e874
7
- data.tar.gz: 7c9b7ca5a3d0553187e61e6d3fca308a745465df60858121f59da65f8e6b203d849a180f3e9e5d6c9859d94b46a156b9d8971ba9126b760f725f2b07887bdb9a
6
+ metadata.gz: 4cef3848231b7e78d26c6294fe9d096f1c0b3dae8fbd95c59ccc61a9d4b634d21183cc977d6841f15eede20c337b5f8d38ca09f8da1d00c7d7ded5616633cc83
7
+ data.tar.gz: f5b8c841f0223441cb33994fba7eb9db42cb06de0395d9455a9c0111e16b167422e48782ee0983634426889e274644fb019d4ad2adfba57b4ef5c00d63b2fee2
data/README.md CHANGED
@@ -469,6 +469,36 @@ class method. Also note that this will only catch exceptions raised during an
469
469
  API call to the Data API server (in other words, only on actions that perform
470
470
  an HTTP request).
471
471
 
472
+ ### Optional `modId`
473
+
474
+ The Data API provides an optional `modId` value that gets set on a record every
475
+ time you fetch or update it. This value then gets included in the API request
476
+ when you save the record, and FileMaker compares it against the current value,
477
+ preventing the update in case of a mismatch.
478
+
479
+ This safety feature is enabled by default in `fmrest-spyke` models, but you can
480
+ disable it using the inheritable `ignore_mod_id` flag on your model classes or
481
+ instances. E.g.
482
+
483
+ ```ruby
484
+ class Bee < FmRest::Layout
485
+ # This disables modId for all instances and subclasses
486
+ self.ignore_mod_id = true
487
+ end
488
+
489
+ # Or set it on instances:
490
+ bee = Bee.new
491
+ bee.ignore_mod_id # => true (set in class)
492
+ bee.ignore_mod_id = false # (affects only this instance)
493
+ ```
494
+
495
+ You can also set it directly on `FmRest::Layout` if you want to disable it for
496
+ your entire app:
497
+
498
+ ```ruby
499
+ FmRest::Layout.ignore_mod_id = true
500
+ ```
501
+
472
502
  ## Logging
473
503
 
474
504
  If using `fmrest-spyke` with Rails then pretty log output will be set up for
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fmrest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.24.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Carbajal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-14 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fmrest-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.23.1
19
+ version: 0.24.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.23.1
26
+ version: 0.24.0.rc1
27
27
  description: fmrest-rails provides Rails integration for the fmrest gem.
28
28
  email:
29
29
  - pedro_c@beezwax.net
@@ -57,9 +57,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - ">"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: 1.3.1
63
63
  requirements: []
64
64
  rubygems_version: 3.3.3
65
65
  signing_key: