lhs 15.3.2 → 15.3.3.pre.fixoptions.1

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: 8010781e2fd91ba9ecac88aaf5894da86f1eeed4
4
- data.tar.gz: c6d867261dd21b0092e028d2c575d35750eefd17
3
+ metadata.gz: 3e5da1036f02c60211e7ec3387dc658a766ae4a4
4
+ data.tar.gz: 4fb912489e9a1ec9df80709727cf1563f534e814
5
5
  SHA512:
6
- metadata.gz: 22e05d07613f147ee2bf14955af07ea1f1f36307b7c0880c6d6e143514631f40f9fcddd2c7054ad0c72c6ed084c7260930e57123ff859f829f737dc53fc13113
7
- data.tar.gz: 2fb6114404ce5fa4e089814bfd72c0b9283531c29b1aee6f04c9ced7f701a333de2db9311c514da621a0421de7e6fae9f591043b1619bfeed5e22a4ad3b1bf2b
6
+ metadata.gz: b6c6b910b0861fbf4a5efde46539fd2e896b4f62c4811ca16e4e75e101c572fc6e50c7a7b67cd779b6a07c439b76fec0ff64c78414ca428674f3864d7dfb9e6a
7
+ data.tar.gz: c0e36932f40ab038d63da453a97c270217f8f54b66f30632104266c1d9076a63444f8db95903b452eb30aac3fb856886ed3d292e835dc52920b44e3203783c56
@@ -7,6 +7,7 @@ class LHS::Record
7
7
 
8
8
  # You can start new option chains for already fetched records (needed for save, update, valid etc.)
9
9
  def options(hash = nil)
10
+ return method_missing(:options) if hash.nil?
10
11
  Chain.new(self.class, Option.new(hash), self)
11
12
  end
12
13
 
@@ -1,3 +1,3 @@
1
1
  module LHS
2
- VERSION = '15.3.2'
2
+ VERSION = '15.3.3.pre.fixoptions.1'
3
3
  end
@@ -0,0 +1,24 @@
1
+ require 'rails_helper'
2
+
3
+ describe LHS::Record do
4
+
5
+ context 'options' do
6
+ before do
7
+ class Record < LHS::Record
8
+ endpoint 'http://local.ch/records'
9
+ end
10
+ end
11
+
12
+ let(:raw) do
13
+ { options: { criticality: :high } }
14
+ end
15
+
16
+ def record
17
+ LHS::Record.new LHS::Data.new(raw, nil, Record)
18
+ end
19
+
20
+ it 'is possible to fetch data from a key called options from an instance' do
21
+ expect(record.options.criticality).to eq :high
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: 15.3.2
4
+ version: 15.3.3.pre.fixoptions.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/local-ch/lhs/graphs/contributors
@@ -403,6 +403,7 @@ files:
403
403
  - spec/record/mapping_spec.rb
404
404
  - spec/record/model_name_spec.rb
405
405
  - spec/record/new_spec.rb
406
+ - spec/record/options_getter_spec.rb
406
407
  - spec/record/options_spec.rb
407
408
  - spec/record/paginatable_collection_spec.rb
408
409
  - spec/record/pagination_chain_spec.rb
@@ -446,13 +447,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
446
447
  version: 2.3.0
447
448
  required_rubygems_version: !ruby/object:Gem::Requirement
448
449
  requirements:
449
- - - ">="
450
+ - - ">"
450
451
  - !ruby/object:Gem::Version
451
- version: '0'
452
+ version: 1.3.1
452
453
  requirements:
453
454
  - Ruby >= 2.3.0
454
455
  rubyforge_project:
455
- rubygems_version: 2.6.14
456
+ rubygems_version: 2.6.12
456
457
  signing_key:
457
458
  specification_version: 4
458
459
  summary: Rails gem providing an easy, active-record-like interface for http json services
@@ -592,6 +593,7 @@ test_files:
592
593
  - spec/record/mapping_spec.rb
593
594
  - spec/record/model_name_spec.rb
594
595
  - spec/record/new_spec.rb
596
+ - spec/record/options_getter_spec.rb
595
597
  - spec/record/options_spec.rb
596
598
  - spec/record/paginatable_collection_spec.rb
597
599
  - spec/record/pagination_chain_spec.rb