search_flip 4.0.0.beta4 → 4.0.0.beta5

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
  SHA256:
3
- metadata.gz: 26839c09be4ddaecd0107d683afc1c16516c0ef562b3e9cb8652b6e0c1818003
4
- data.tar.gz: 22e8e36e94439280e8cb0caca5ccd0f3f552ec7518bdffaeb43365e5c8cbbea3
3
+ metadata.gz: 938e1745f8cfe0173c76f26a4f15ab7e62781fd627dcccb2c2523db7f8ca51bf
4
+ data.tar.gz: 2a8980bc0de4db9cb081c5186ed94bbee489a470ea30992a9e8a9c248563d3e6
5
5
  SHA512:
6
- metadata.gz: 001b1042dd9f7f2d103adc48789c658e12c6a5abb4e223c72d0d405a41159d37cbe2d3a2a4c76efe125befed963470c518e806b31223ca468f700f3b06e6674b
7
- data.tar.gz: d410d8a68b66496c246dac4b573c463b5fe08c4a998bff84146c6665a622a72ff524384d4ffb80d76ef83464858268816c794ab966ae1bba9ed962dd2ed7a105
6
+ metadata.gz: 2d622f6d843b9975a66af4ee3d937f1eb60b255d6c5017479dae583543d8f4dbba9608209513da94ba95a3aa3323714a0c1a9b21e594f1f4a2be61844864da3c
7
+ data.tar.gz: b7835e3adfd35074111e481e3ba54272e59a764a5478c569bc516aa4a8455c939618347a194802a9d6030a91bc52430bf7fac72b00c3ebca1eb09cb13021f21a
@@ -2,6 +2,7 @@ module SearchFlip
2
2
  class JSON
3
3
  @default_options = {
4
4
  mode: :custom,
5
+ use_to_json: true,
5
6
  time_format: :xmlschema,
6
7
  bigdecimal_as_decimal: false
7
8
  }
@@ -1,3 +1,3 @@
1
1
  module SearchFlip
2
- VERSION = "4.0.0.beta4"
2
+ VERSION = "4.0.0.beta5"
3
3
  end
@@ -4,7 +4,7 @@ RSpec.describe SearchFlip::JSON do
4
4
  describe ".generate" do
5
5
  it "encodes timestamps correctly" do
6
6
  Timecop.freeze "2020-06-01 12:00:00 UTC" do
7
- expect(described_class.generate(timestamp: Time.now.utc)).to eq('{"timestamp":"2020-06-01T12:00:00Z"}')
7
+ expect(described_class.generate(timestamp: Time.now.utc)).to eq('{"timestamp":"2020-06-01T12:00:00.000Z"}')
8
8
  end
9
9
  end
10
10
 
@@ -19,7 +19,7 @@ RSpec.describe SearchFlip::JSON do
19
19
 
20
20
  described_class.generate(payload)
21
21
 
22
- expect(Oj).to have_received(:dump).with(payload, mode: :custom, time_format: :xmlschema, bigdecimal_as_decimal: false)
22
+ expect(Oj).to have_received(:dump).with(payload, mode: :custom, use_to_json: true, time_format: :xmlschema, bigdecimal_as_decimal: false)
23
23
  end
24
24
 
25
25
  it "generates json" do
@@ -39,7 +39,7 @@ RSpec.describe SearchFlip::JSON do
39
39
 
40
40
  described_class.parse(payload)
41
41
 
42
- expect(Oj).to have_received(:load).with(payload, mode: :custom, time_format: :xmlschema, bigdecimal_as_decimal: false)
42
+ expect(Oj).to have_received(:load).with(payload, mode: :custom, use_to_json: true, time_format: :xmlschema, bigdecimal_as_decimal: false)
43
43
  end
44
44
  end
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_flip
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta4
4
+ version: 4.0.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Vetter