lhs 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f470a5aba78054aa70cc3479afb69bc0dd92814
4
- data.tar.gz: b1b7436c1998cb1280d6a3c2f11f59e9a99e91d1
3
+ metadata.gz: b2a6b34bdffb8337a7af6b62df8029f5e1ce1484
4
+ data.tar.gz: 9f03ce1bfad9928d8223de3ae87c5013b1ae3419
5
5
  SHA512:
6
- metadata.gz: 8385de082cb82e468583343d4d5ad78db3f7ac6d4265c7d8faeb399ad26cfa4a4d61cde15243ca9782fca0079f79d73c6952a675cc3cc9d94feced5de2cde1b9
7
- data.tar.gz: 04b937fe66115b2fa3020993fb40b230a01fdb2f60a98ade93ef6715881a0133e7a3b136a6b902083a4ebc8d94ebd3299d0b6e7cf80782266a771746bb37d990
6
+ metadata.gz: 742b0b748b7d33e01754f5d178ba83cc1cad6ac131d7318a2a074c6db955fa440de4f0cd66589f70a2c29798f1de8efbe60b82f715a0550b82ccd2c83462f040
7
+ data.tar.gz: 3f0768207f057a18ba9d475b5c615bbd27e4831084be68f4204047a9c6d5f782d196649a29bb215392f1091b20985ce79d1209305cceac176bd88d13b1faf09b
@@ -74,6 +74,11 @@ class LHS::Data
74
74
  _proxy.respond_to?(name, include_all)
75
75
  end
76
76
 
77
+ def inspect_with_focus
78
+ _raw
79
+ end
80
+ alias_method_chain :inspect, :focus
81
+
77
82
  private
78
83
 
79
84
  def collection_proxy?(input)
@@ -1,3 +1,3 @@
1
1
  module LHS
2
- VERSION = "5.5.0"
2
+ VERSION = "5.6.0"
3
3
  end
@@ -0,0 +1,24 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHS::Data do
4
+ context 'equality' do
5
+ before(:each) do
6
+ class Record < LHS::Record
7
+ endpoint 'http://local.ch/records'
8
+ end
9
+ end
10
+
11
+ let(:raw) do
12
+ { name: 'Steve' }
13
+ end
14
+
15
+ let(:data) do
16
+ LHS::Data.new(raw, nil, Record)
17
+ end
18
+
19
+ it 'provides inspect method that is focused on the raw data' do
20
+ expect(data.inspect).to eq raw
21
+ expect(data.inspect_without_focus).to include 'LHS::Data'
22
+ end
23
+ end
24
+ end
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: 5.5.0
4
+ version: 5.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhs/graphs/contributors
@@ -218,6 +218,7 @@ files:
218
218
  - spec/collection/without_object_items_spec.rb
219
219
  - spec/data/collection_spec.rb
220
220
  - spec/data/equality_spec.rb
221
+ - spec/data/inspect_spec.rb
221
222
  - spec/data/is_item_or_collection_spec.rb
222
223
  - spec/data/item_spec.rb
223
224
  - spec/data/merge_spec.rb
@@ -357,6 +358,7 @@ test_files:
357
358
  - spec/collection/without_object_items_spec.rb
358
359
  - spec/data/collection_spec.rb
359
360
  - spec/data/equality_spec.rb
361
+ - spec/data/inspect_spec.rb
360
362
  - spec/data/is_item_or_collection_spec.rb
361
363
  - spec/data/item_spec.rb
362
364
  - spec/data/merge_spec.rb