lhs 17.0.1 → 18.0.0.pre.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.activesupport4 +0 -1
- data/README.md +0 -31
- data/cider-ci/bin/bundle +0 -2
- data/lhs.gemspec +2 -2
- data/lib/lhs/concerns/record/endpoints.rb +0 -1
- data/lib/lhs/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01afaab81a36c0bb7d277e289511442747c39b7a821ebc58248ab4d39bb93b11
|
4
|
+
data.tar.gz: f1a0c75002907986fdad20f60a91945a0c9a2eafd84b92560cc7f31d0ca17624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b356a2ee2f431a799bdac24b6b232c18a5941ef45b4824ed1fb5aa85dd0e8b4ee94fe7bc44f666ec1ed4ddcaf8461c34c8aae803de5fecdbc48f5b644ca5f13
|
7
|
+
data.tar.gz: 8a1e4c138b88e847b23928be1c5bab807782bd80f20044e7589182ee2b5c139f0d00ffe481690770607f1ac54bf6027af43ca76206027041fa82fb7ccba457db
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.6.0
|
data/Gemfile.activesupport4
CHANGED
data/README.md
CHANGED
@@ -48,11 +48,8 @@ record.review # "Lunch was great
|
|
48
48
|
* [Ambiguous endpoints](#ambiguous-endpoints)
|
49
49
|
* [Record inheritance](#record-inheritance)
|
50
50
|
* [Find multiple records](#find-multiple-records)
|
51
|
-
* [fetch](#fetch)
|
52
51
|
* [where](#where)
|
53
52
|
* [Reuse/Dry where statements: Use scopes](#reusedry-where-statements-use-scopes)
|
54
|
-
* [all](#all)
|
55
|
-
* [all with unpaginated endpoints](#all-with-unpaginated-endpoints)
|
56
53
|
* [Retrieve the amount of a collection of items: count vs. length](#retrieve-the-amount-of-a-collection-of-items-count-vs-length)
|
57
54
|
* [Find single records](#find-single-records)
|
58
55
|
* [find](#find)
|
@@ -68,7 +65,6 @@ record.review # "Lunch was great
|
|
68
65
|
* [has_one](#has_one)
|
69
66
|
* [Unwrap nested items from the response body](#unwrap-nested-items-from-the-response-body)
|
70
67
|
* [Determine collections from the response body](#determine-collections-from-the-response-body)
|
71
|
-
* [Load additional data based on retrieved data](#load-additional-data-based-on-retrieved-data)
|
72
68
|
* [Chain complex queries](#chain-complex-queries)
|
73
69
|
* [Chain where queries](#chain-where-queries)
|
74
70
|
* [Expand plain collections of links: expanded](#expand-plain-collections-of-links-expanded)
|
@@ -745,33 +741,6 @@ GET https://service.example.com/search?q=Starbucks
|
|
745
741
|
{... docs: [... {... address: 'Bahnhofstrasse 5, 8000 Zürich' }] }
|
746
742
|
```
|
747
743
|
|
748
|
-
#### Load additional data based on retrieved data
|
749
|
-
|
750
|
-
In order to load linked data from already retrieved data, you can use `load!` (or `reload!`).
|
751
|
-
|
752
|
-
```ruby
|
753
|
-
# app/controllers/some_controller.rb
|
754
|
-
|
755
|
-
record = Record.find(1)
|
756
|
-
record.associated_thing.load!
|
757
|
-
```
|
758
|
-
```
|
759
|
-
GET https://things/4
|
760
|
-
{ name: "Steve" }
|
761
|
-
```
|
762
|
-
```ruby
|
763
|
-
# app/controllers/some_controller.rb
|
764
|
-
record.associated_thing.name # Steve
|
765
|
-
|
766
|
-
record.associated_thing.load! # Does NOT create another request, as it is already loaded
|
767
|
-
record.associated_thing.reload! # Does request the data again from remote
|
768
|
-
|
769
|
-
```
|
770
|
-
```
|
771
|
-
GET https://things/4
|
772
|
-
{ name: "Steve" }
|
773
|
-
```
|
774
|
-
|
775
744
|
### Chain complex queries
|
776
745
|
|
777
746
|
> [Method chaining](https://en.wikipedia.org/wiki/Method_chaining), also known as named parameter idiom, is a common syntax for invoking multiple method calls in object-oriented programming languages. Each method returns an object, allowing the calls to be chained together without requiring variables to store the intermediate results
|
data/cider-ci/bin/bundle
CHANGED
data/lhs.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
20
20
|
s.require_paths = ['lib']
|
21
21
|
|
22
|
-
s.requirements << 'Ruby >= 2.
|
23
|
-
s.required_ruby_version = '>= 2.
|
22
|
+
s.requirements << 'Ruby >= 2.6.0'
|
23
|
+
s.required_ruby_version = '>= 2.6.0'
|
24
24
|
|
25
25
|
s.add_dependency 'activemodel'
|
26
26
|
s.add_dependency 'activesupport', '> 4.2'
|
data/lib/lhs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 18.0.0.pre.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhs/graphs/contributors
|
@@ -461,16 +461,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
461
461
|
requirements:
|
462
462
|
- - ">="
|
463
463
|
- !ruby/object:Gem::Version
|
464
|
-
version: 2.
|
464
|
+
version: 2.6.0
|
465
465
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
466
466
|
requirements:
|
467
|
-
- - "
|
467
|
+
- - ">"
|
468
468
|
- !ruby/object:Gem::Version
|
469
|
-
version:
|
469
|
+
version: 1.3.1
|
470
470
|
requirements:
|
471
|
-
- Ruby >= 2.
|
472
|
-
|
473
|
-
rubygems_version: 2.7.7
|
471
|
+
- Ruby >= 2.6.0
|
472
|
+
rubygems_version: 3.0.1
|
474
473
|
signing_key:
|
475
474
|
specification_version: 4
|
476
475
|
summary: 'REST services accelerator: Rails gem providing an easy, active-record-like
|